| | |
| | | import SignDialog from './components/SignDialog.vue'; |
| | | import * as enterpriseEmployeeServices from '@/services/api/enterpriseEmployee'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import _ from 'lodash'; |
| | | |
| | | defineOptions({ |
| | | name: 'FlexJobManageList', |
| | |
| | | } |
| | | } |
| | | |
| | | function handleEnterpriseBatchSign() { |
| | | const selectionRows = getSelectionRows(); |
| | | if (selectionRows) { |
| | | const hasSigned = selectionRows?.some( |
| | | (x) => |
| | | !( |
| | | x.userSignContractStatus === EnumTaskUserSignContractStatus.Pass && |
| | | x.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Wait |
| | | ) |
| | | ); |
| | | if (hasSigned) { |
| | | Message.warnMessage('勾选人员中包含已企业签约、未录用人员或未签约完成人员'); |
| | | return; |
| | | const handleEnterpriseBatchSign = _.debounce( |
| | | () => { |
| | | const selectionRows = getSelectionRows(); |
| | | if (selectionRows) { |
| | | const hasSigned = selectionRows?.some( |
| | | (x) => |
| | | !( |
| | | x.userSignContractStatus === EnumTaskUserSignContractStatus.Pass && |
| | | x.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Wait |
| | | ) |
| | | ); |
| | | if (hasSigned) { |
| | | Message.warnMessage('勾选人员中包含已企业签约、未录用人员或未签约完成人员'); |
| | | return; |
| | | } |
| | | const ids = selectionRows.map((x) => x.id); |
| | | handleBatchEnterpriseSign(ids); |
| | | } |
| | | const ids = selectionRows.map((x) => x.id); |
| | | handleBatchEnterpriseSign(ids); |
| | | } |
| | | } |
| | | }, |
| | | 1000, |
| | | { leading: true, trailing: false } |
| | | ); |
| | | |
| | | async function handleBatchEnterpriseSign(ids: string[]) { |
| | | try { |