From fea063f5c7fdf79d56ada2dd2b8045a44ca2db44 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 08 八月 2025 15:17:55 +0800
Subject: [PATCH] feat: 任务

---
 src/views/EmploymentManage/EmploymentSignList.vue |   74 ++++++++++++++++++++++++++++---------
 1 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/src/views/EmploymentManage/EmploymentSignList.vue b/src/views/EmploymentManage/EmploymentSignList.vue
index 79703e5..c025329 100644
--- a/src/views/EmploymentManage/EmploymentSignList.vue
+++ b/src/views/EmploymentManage/EmploymentSignList.vue
@@ -19,7 +19,7 @@
             <SearchInput
               v-model="extraParamState.searchWord"
               style="width: 250px"
-              placeholder="浠诲姟鍚嶇О"
+              placeholder="濮撳悕/韬唤璇佸彿/鐢佃瘽"
               @on-click-search="getList"
               @keyup.enter="getList()"
             >
@@ -34,6 +34,7 @@
       >
       </ProTableV2>
     </AppContainer>
+    <StaffInfoDialog v-bind="dialogStaffInfoProps" />
   </LoadingLayout>
 </template>
 
@@ -46,16 +47,16 @@
   AppContainer,
   QueryFilterItem,
   useTable,
-  FieldDatePicker,
   FieldRadio,
   defineOperationBtns,
+  useFormDialog,
+  UploadUserFile,
 } from '@bole-core/components';
-import * as flexEnterpriseServices from '@/services/api/FlexEnterprise';
 import { EmploymentSignColumns } from './constants/columns';
-import { OrderInputType, Message } from '@bole-core/core';
-import { useGlobalEventContext } from '@/hooks';
-import { FlexEnterpriseSettingStatus } from '@/constants';
+import {  Message } from '@bole-core/core';
+import { FlexEnterpriseSettingStatus, Gender } from '@/constants';
 import StaffInfoDialog from '@/views/FlexJobManage/components/StaffInfoDialog.vue';
+import { convertApi2FormUrlOnlyOne } from '@/utils';
 
 defineOptions({
   name: 'EmploymentSignList',
@@ -98,22 +99,13 @@
 ]);
 
 const router = useRouter();
-
+const route = useRoute();
+const id = route.params.id as string;
 const BaseState = {
   loading: true,
 };
 
 const state = reactive({ ...BaseState });
-
-const eventContext = useGlobalEventContext();
-
-eventContext.addEvent('employment:add', () => {
-  getList();
-});
-
-eventContext.addEvent('employment:edit', () => {
-  getList(paginationState.pageIndex);
-});
 
 onMounted(async () => {
   await getList();
@@ -150,7 +142,7 @@
   {
     defaultExtraParams: {
       searchWord: '',
-      orderInput: [{ property: 'id', order: OrderInputType.Desc }],
+      orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }],
       flexEnterpriseSettingStatus: '' as any as FlexEnterpriseSettingStatus,
     },
     queryKey: ['flexEnterpriseServices/getFlexEnterpriseList'],
@@ -158,6 +150,52 @@
   }
 );
 
+const {
+  dialogProps: dialogStaffInfoProps,
+  handleEdit: handleStaffInfoEdit,
+  editForm: staffInfoEditForm,
+} = useFormDialog({
+  defaultFormParams: {
+    id: '',
+    name: '',
+    idNumber: '',
+    phoneNumber: '',
+    genderType: Gender.Male,
+    age: 0,
+    companyId: '',
+    customerId: '',
+    idFrontUrl: [] as UploadUserFile[],
+    idBackUrl: [] as UploadUserFile[],
+    contractUrl: [] as UploadUserFile[],
+    regiterTime: '',
+    realVerifyTime: '',
+    signTime: '',
+    isDetail: false,
+  },
+});
+
+function openDialog(row) {
+  handleStaffInfoEdit({
+    id: row.id,
+    name: row.name,
+    idNumber: row.idNumber,
+    phoneNumber: row.phoneNumber,
+    genderType: Gender.Male,
+    age: row.age ?? 0,
+    companyId: row.companyId,
+    customerId: row.customerId,
+    idFrontUrl: convertApi2FormUrlOnlyOne(row.idFrontUrl),
+    idBackUrl: convertApi2FormUrlOnlyOne(row.idBackUrl),
+    contractUrl: convertApi2FormUrlOnlyOne(row.contractUrl, {
+      fileName: row.contractUrl ? row.contractUrl.split('/').pop() : '鍚堝悓',
+    }),
+    regiterTime: row.regiterTime,
+    realVerifyTime: row.realVerifyTime,
+    signTime: row.signTime,
+    isDetail: true,
+  });
+}
+
 function handleRecruit(row) {}
 function handleRefuse(row) {}
 </script>

--
Gitblit v1.9.1