| | |
| | | </BlFileUpload> |
| | | <el-button |
| | | v-if="checkSubModuleItemShow('pageButton', 'addBtn')" |
| | | @click="handleStaffInfoAdd()" |
| | | @click="handleInternalStaffAdd()" |
| | | type="primary" |
| | | >新建</el-button |
| | | > |
| | |
| | | /> |
| | | <SendShotMessageDialog v-bind="dialogShotMessageProps" /> |
| | | <SignDialog v-bind="dialogSignProps" /> |
| | | <AddInternalStaffDialog v-bind="dialogAddInternalStaffProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | |
| | | 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'; |
| | |
| | | handleAdd: handleStaffInfoAdd, |
| | | editForm: staffInfoEditForm, |
| | | } = useFormDialog({ |
| | | onConfirm: addEnterpriseEmployee, |
| | | onConfirm: editEnterpriseEmployee, |
| | | defaultFormParams: { |
| | | id: '', |
| | | name: '', |
| | |
| | | regiterTime: '', |
| | | userRealTime: '', |
| | | userSignContractTime: '', |
| | | contractTime: [] as unknown as ModelValueType, |
| | | isDetail: false, |
| | | }, |
| | | }); |
| | |
| | | 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) {} |
| | | } |
| | | |
| | |
| | | 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> |