From 2d186e743eb24fd44fba02e2146e55273a66f153 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期三, 12 十一月 2025 17:53:47 +0800
Subject: [PATCH] feat: 1.3.0.2
---
src/views/FlexJobManage/FlexJobManage.vue | 75 ++++++++++++++++++++++++-------------
1 files changed, 48 insertions(+), 27 deletions(-)
diff --git a/src/views/FlexJobManage/FlexJobManage.vue b/src/views/FlexJobManage/FlexJobManage.vue
index da5ec98..b723cbc 100644
--- a/src/views/FlexJobManage/FlexJobManage.vue
+++ b/src/views/FlexJobManage/FlexJobManage.vue
@@ -124,7 +124,7 @@
</BlFileUpload>
<el-button
v-if="checkSubModuleItemShow('pageButton', 'addBtn')"
- @click="handleStaffInfoAdd()"
+ @click="handleInternalStaffAdd()"
type="primary"
>鏂板缓</el-button
>
@@ -174,6 +174,7 @@
/>
<SendShotMessageDialog v-bind="dialogShotMessageProps" />
<SignDialog v-bind="dialogSignProps" />
+ <AddInternalStaffDialog v-bind="dialogAddInternalStaffProps" />
</LoadingLayout>
</template>
@@ -202,6 +203,7 @@
import BatchImportDialog from './components/BatchImportDialog.vue';
import SendShotMessageDialog from './components/SendShotMessageDialog.vue';
import StaffDetailInfoDialog from './components/StaffDetailInfoDialog.vue';
+import AddInternalStaffDialog from './components/AddInternalStaffDialog.vue';
import SignDialog from './components/SignDialog.vue';
import * as enterpriseEmployeeServices from '@/services/api/enterpriseEmployee';
import { ModelValueType } from 'element-plus';
@@ -304,7 +306,7 @@
handleAdd: handleStaffInfoAdd,
editForm: staffInfoEditForm,
} = useFormDialog({
- onConfirm: addEnterpriseEmployee,
+ onConfirm: editEnterpriseEmployee,
defaultFormParams: {
id: '',
name: '',
@@ -318,7 +320,6 @@
regiterTime: '',
userRealTime: '',
userSignContractTime: '',
- contractTime: [] as unknown as ModelValueType,
isDetail: false,
},
});
@@ -342,31 +343,7 @@
userRealTime: row.userRealTime ?? '',
userSignContractTime: row.userSignContractTime ?? '',
isDetail: isDetail,
-
- contractTime: [row.contractBegin, row.contractEnd],
});
- } catch (error) {}
-}
-
-async function addEnterpriseEmployee() {
- try {
- let params: API.AddEnterpriseEmployeeCommand = {
- name: staffInfoEditForm.name,
- identity: staffInfoEditForm.identity,
- contactPhoneNumber: staffInfoEditForm.contactPhoneNumber,
- gender: staffInfoEditForm.gender,
- age: staffInfoEditForm.age,
- identityImg: staffInfoEditForm.identityImg[0]?.path ?? '',
- identityBackImg: staffInfoEditForm.identityBackImg[0]?.path ?? '',
- contractUrl: staffInfoEditForm.contractUrl[0]?.path ?? '',
- contractBegin: format(staffInfoEditForm.contractTime[0], 'YYYY-MM-DD 00:00:00'),
- contractEnd: format(staffInfoEditForm.contractTime[1], 'YYYY-MM-DD 23:59:59'),
- };
- let res = await enterpriseEmployeeServices.addEnterpriseEmployee(params);
- if (res) {
- Message.successMessage('鎿嶄綔鎴愬姛');
- getList(paginationState.pageIndex);
- }
} catch (error) {}
}
@@ -676,4 +653,48 @@
state.flexjobUrl = [] as UploadUserFile[];
}
}
+
+const {
+ dialogProps: dialogAddInternalStaffProps,
+ handleAdd: handleInternalStaffAdd,
+ editForm: internalStaffEditForm,
+} = useFormDialog({
+ onConfirm: addEnterpriseEmployee,
+ defaultFormParams: {
+ name: '',
+ identity: '',
+ contactPhoneNumber: '',
+ gender: EnumUserGender.Male,
+ age: null as any as number,
+ identityImg: [] as UploadUserFile[],
+ identityBackImg: [] as UploadUserFile[],
+ contractUrl: [] as UploadUserFile[],
+ regiterTime: '',
+ userRealTime: '',
+ userSignContractTime: '',
+ contractTime: [] as unknown as ModelValueType,
+ },
+});
+
+async function addEnterpriseEmployee() {
+ try {
+ let params: API.AddEnterpriseEmployeeCommand = {
+ name: internalStaffEditForm.name,
+ identity: internalStaffEditForm.identity,
+ contactPhoneNumber: internalStaffEditForm.contactPhoneNumber,
+ gender: internalStaffEditForm.gender,
+ age: internalStaffEditForm.age,
+ identityImg: internalStaffEditForm.identityImg[0]?.path ?? '',
+ identityBackImg: internalStaffEditForm.identityBackImg[0]?.path ?? '',
+ contractUrl: internalStaffEditForm.contractUrl[0]?.path ?? '',
+ contractBegin: format(internalStaffEditForm.contractTime[0], 'YYYY-MM-DD 00:00:00'),
+ contractEnd: format(internalStaffEditForm.contractTime[1], 'YYYY-MM-DD 23:59:59'),
+ };
+ let res = await enterpriseEmployeeServices.addEnterpriseEmployee(params);
+ if (res) {
+ Message.successMessage('鎿嶄綔鎴愬姛');
+ getList(paginationState.pageIndex);
+ }
+ } catch (error) {}
+}
</script>
--
Gitblit v1.9.1