wupengfei
3 天以前 fcb87424f8f9fc58163227684ecee36a99ba0c3d
src/views/FlexJobManage/FlexJobManage.vue
@@ -139,6 +139,7 @@
import SignDialog from './components/SignDialog.vue';
import * as enterpriseEmployeeServices from '@/services/api/enterpriseEmployee';
import { ModelValueType } from 'element-plus';
import _ from 'lodash';
defineOptions({
  name: 'FlexJobManageList',
@@ -513,28 +514,37 @@
  }
}
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 {
    let res = await enterpriseEmployeeServices.batchEnterpriseSignContract({ ids: ids });
    let res = await enterpriseEmployeeServices.batchEnterpriseSignContract(
      { ids: ids },
      {
        showLoading: !state.loading,
      }
    );
    if (res) {
      Message.successMessage('操作成功');
      getList(paginationState.pageIndex);
@@ -547,7 +557,7 @@
              name: '姓名',
              contactPhoneNumber: '手机号',
              identity: '身份证号',
              errorMessage: '错误信息',
              errorMessages: '错误信息',
            },
          });
        });