wupengfei
3 天以前 df0862c15f2c2178e45c262c4bf96b33ee3b321c
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,27 +514,32 @@
  }
}
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 {
    state.loading = true;
    let res = await enterpriseEmployeeServices.batchEnterpriseSignContract({ ids: ids });
    if (res) {
      Message.successMessage('操作成功');
@@ -553,7 +559,10 @@
        });
      }
    }
  } catch (error) {}
  } catch (error) {
  } finally {
    state.loading = false;
  }
}
async function signContract() {