| | |
| | | import { FlexJobManageColumns } from './constants'; |
| | | import { EnumTaskUserHireStatusText, EnumTaskUserSignContractStatusText } from '@/constants'; |
| | | import { Message } from '@bole-core/core'; |
| | | import { convertApi2FormUrlOnlyOne, downloadFileByUrl, format, omitByFalse } from '@/utils'; |
| | | import { convertApi2FormUrlOnlyOne, downloadFileByUrl, format } from '@/utils'; |
| | | import StaffInfoDialog from './components/StaffInfoDialog.vue'; |
| | | import BatchImportDialog from './components/BatchImportDialog.vue'; |
| | | import SendShotMessageDialog from './components/SendShotMessageDialog.vue'; |
| | |
| | | extraProps: { |
| | | hide: (row: API.GetEnterpriseEmployeesQueryResultItem) => |
| | | !( |
| | | row.userSignContractStatus === EnumTaskUserSignContractStatus.Wait || |
| | | row.userSignContractStatus === EnumTaskUserSignContractStatus.Stop |
| | | row.userSignContractStatus !== EnumTaskUserSignContractStatus.Pass && |
| | | row.hireStatus === EnumTaskUserHireStatus.Pass |
| | | ), |
| | | }, |
| | | }, |
| | |
| | | ), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'delBtn', |
| | | name: '删除', |
| | | }, |
| | | props: { type: 'danger' }, |
| | | emits: { |
| | | onClick: (role) => handleDelete(role), |
| | | }, |
| | | }, |
| | | // { |
| | | // data: { |
| | | // enCode: 'delBtn', |
| | | // name: '删除', |
| | | // }, |
| | | // props: { type: 'danger' }, |
| | | // emits: { |
| | | // onClick: (role) => handleDelete(role), |
| | | // }, |
| | | // }, |
| | | ]); |
| | | |
| | | const router = useRouter(); |
| | |
| | | enterpriseSignContractStatus: extraParamState.enterpriseSignContractStatus, |
| | | }; |
| | | |
| | | let res = await enterpriseEmployeeServices.getEnterpriseEmployees(omitByFalse(params), { |
| | | let res = await enterpriseEmployeeServices.getEnterpriseEmployees(params, { |
| | | showLoading: !state.loading, |
| | | }); |
| | | return res; |
| | |
| | | } = useFormDialog({ |
| | | onConfirm: signContract, |
| | | defaultFormParams: { |
| | | id: '', |
| | | ids: [] as string[], |
| | | contractTemplateId: '', |
| | | }, |
| | | }); |
| | |
| | | function handleInviteSign(row: API.GetEnterpriseEmployeesQueryResultItem) { |
| | | if (row) { |
| | | handleSignEdit({ |
| | | id: row.id, |
| | | ids: [row.id], |
| | | contractTemplateId: '', |
| | | }); |
| | | } |
| | | } |
| | | function handleBatchSign() { |
| | | const selectionRows = getSelectionRows(); |
| | | console.log('selectionRows: ', selectionRows); |
| | | if (selectionRows) { |
| | | const hasSigned = selectionRows?.some( |
| | | (x) => |
| | |
| | | Message.warnMessage('勾选人员中包含已签约完成或未录用人员'); |
| | | return; |
| | | } |
| | | handleSignAdd(); |
| | | handleSignAdd({ |
| | | ids: selectionRows.map((x) => x.id), |
| | | contractTemplateId: '', |
| | | }); |
| | | } |
| | | } |
| | | |
| | | async function signContract() { |
| | | try { |
| | | let params: API.InviteElectronSignCommand = { |
| | | id: signEditForm.id, |
| | | ids: signEditForm.ids, |
| | | contractTemplateId: signEditForm.contractTemplateId, |
| | | }; |
| | | let res = await enterpriseEmployeeServices.inviteElectronSign(params); |
| | |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleUnSign(row: API.GetEnterpriseEmployeesQueryResultItem) { |
| | | try { |
| | | await Message.tipMessage('确定解约用户?'); |
| | | let res = await enterpriseEmployeeServices.stopElectronSign({ id: row.id }); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | function handleUnSign(row: API.GetEnterpriseEmployeesQueryResultItem) { |
| | | stopElectronSign([row.id]); |
| | | } |
| | | |
| | | function handleBatchUnSign() { |
| | | try { |
| | | Message.warnMessage('功能开发中'); |
| | | const selectionRows = getSelectionRows(); |
| | | if (selectionRows) { |
| | | stopElectronSign(selectionRows.map((x) => x.id)); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function stopElectronSign(ids: string[]) { |
| | | try { |
| | | await Message.tipMessage('确定解约用户?'); |
| | | let res = await enterpriseEmployeeServices.stopElectronSign({ ids: ids }); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |