outaozhen 4 gadi atpakaļ
vecāks
revīzija
c17b364404

+ 1 - 1
src/pages/Business/Attendance/components/ApplicantModal/index.tsx

@@ -72,7 +72,7 @@ const ApplicantModal: React.FC<ConnectModalProps> = ({
   )
 
   const connectHandler = (staffId: string, applicantStaffId?: string) => {
-    if (type === modalType.addobjectModal) {
+    if (type === modalType.applicantModal) {
       tryLinkAttendance({ id: dataId, staffId })
     } else {
       tryAddAttendance({ applicantStaffId })

+ 13 - 3
src/pages/Business/Attendance/index.tsx

@@ -3,7 +3,7 @@ import AttendanceMenu from './components/AttendanceMenu/attendanceMenu'
 import { useRequest } from 'umi'
 import Icon from '@/components/IconPark'
 // import AddObjectModal from './components/AddObjectModal'
-// import ApplicantModal from './components/ApplicantModal'
+import ApplicantModal from './components/ApplicantModal'
 import { Table, Tag, Popconfirm, Popover, Button } from 'antd'
 import { fetchAttendanceList, unlinkAttendance, deleteAttendance } from '@/services/user/system'
 
@@ -84,7 +84,12 @@ const Attendance = () => {
           <span
             className="hover:text-hex-886ab5 cursor-pointer text-purple-500"
             onClick={() =>
-              setState({ ...state, id: record.id, visible: true, type: modalType.addobjectModal })
+              setState({
+                ...state,
+                id: record.id,
+                visible: true,
+                type: modalType.addobjectModal
+              })
             }>
             <Icon type="plus" />
             添加
@@ -124,7 +129,12 @@ const Attendance = () => {
               onClick={() => setState({ ...state, visible: true, type: modalType.applicantModal })}>
               添加新申请人
             </Button>
-            {/* <AddObjectModal title="添加新申请人" type visvi onCan /> */}
+            <ApplicantModal
+              type={modalType}
+              dataId={state.id}
+              visible={state.visible}
+              onCancel={() => setState({ ...state, visible: false, type: modalType })}
+            />
           </div>
           <Table
             bordered