zhengyiming
14 小时以前 62287d09f9f5f1135163359fa18fd1fc4f8b2bc6
src/views/Home/Home.vue
@@ -27,7 +27,7 @@
          <QueryFilterItem>
            <FieldRadio
              v-model="extraParamState.auditStatus"
              :value-enum="InsurancePolicyAuditStatusEnumText"
              :value-enum="InsurancePolicyAuditStatusEnumTextForFilter"
              buttonStyle
              showAllBtn
              @change="getList()"
@@ -58,6 +58,7 @@
            type="primary"
            style="margin-right: 10px"
            link
            v-if="isSjbAccount"
            >职业类型对照表</el-button
          >
          <el-button @click="handleDownload()" type="primary" style="margin-right: 10px" link
@@ -153,6 +154,7 @@
  InsurancePolicyStatusEnum,
  AppType,
  InsurancePolicyAuditStatusEnumText,
  InsurancePolicyAuditStatusEnumTextForFilter,
  InsurancePolicyAuditStatusEnum,
  InsurancePolicyProductIdNumberEnum,
  InsurancePolicyListPayStatusEnum,
@@ -162,6 +164,7 @@
import dayjs from 'dayjs';
import _ from 'lodash';
import InsureInstructionsDialog from './components/InsureInstructionsDialog.vue';
import { useUserInsureProductSetting } from '@/hooks';
// import { Recorder } from '@/utils/record';
defineOptions({
@@ -374,8 +377,12 @@
    } else if (res === InsurancePolicyStatusEnum.OutTimeEffect) {
      await Message.tipMessage('该批次保单已失效,请修改批次号后重新导入');
    } else if (res === InsurancePolicyStatusEnum.WaitEffect) {
      await Message.tipMessage('存在相同的批次号,是否覆盖?');
      importInsStaffToList();
      if (isSjbAccount.value) {
        await Message.tipMessage('存在相同的批次号,请修改批次号后重新导入');
      } else {
        await Message.tipMessage('存在相同的批次号,是否覆盖?');
        importInsStaffToList();
      }
    } else {
      importInsStaffToList();
    }
@@ -393,40 +400,51 @@
    };
    let res = await insuranceOrderServices.importInsStaffToList(params, {
      timeout: 60 * 1000 * 10,
      customErrorHandler(error) {
        if (error?.response?.data?.error?.code === '10001') {
          Message.tipMessage(error.response.data?.error?.message, {
            showCancelButton: false,
          });
          return true;
        }
        return false;
      },
    });
    if (res) {
      // await Message.tipMessage('存在错误数据,是否导出?');
      try {
        if (res.errorList.length > 0) {
          await Message.tipMessage(
            `总投保人数${res.importAllCount}人,投保成功${res.successCount}人,投保失败${res.errorList.length}人是否导出投保失败人员清单?`,
            {
              confirmButtonText: '导出',
            }
          );
          XLSXUtils.exportToXLSX({
            workbookDataList: res.errorList,
            fileName: '错误人员名单',
            workbookHeaderMap: {
              name: '雇员姓名',
              sex: '性别',
              certType: '证件类型',
              certNo: '证件号码',
              jobName: '雇员工种',
              useEmploer: '用工单位',
              address: '用工地点',
              note: '备注',
            },
          });
        } else {
          await Message.tipMessage(
            `总投保人数${res.importAllCount}人,投保成功${res.successCount}人`,
            {
              showCancelButton: false,
            }
          );
        }
      } catch (error) {}
      dialogState.dialogVisible = false;
      getList(paginationState.pageIndex);
      // await Message.tipMessage('存在错误数据,是否导出?');
      if (res.errorList.length > 0) {
        await Message.tipMessage(
          `总投保人数${res.importAllCount}人,投保成功${res.successCount}人,投保失败${res.errorList.length}人是否导出投保失败人员清单?`,
          {
            confirmButtonText: '导出',
          }
        );
        XLSXUtils.exportToXLSX({
          workbookDataList: res.errorList,
          fileName: '错误人员名单',
          workbookHeaderMap: {
            name: '雇员姓名',
            sex: '性别',
            certType: '证件类型',
            certNo: '证件号码',
            jobName: '雇员工种',
            useEmploer: '用工单位',
            address: '用工地点',
            note: '备注',
          },
        });
      } else {
        await Message.tipMessage(
          `总投保人数${res.importAllCount}人,投保成功${res.successCount}人`,
          {
            showCancelButton: false,
          }
        );
      }
    }
  } catch (error) {}
}
@@ -435,8 +453,14 @@
  onConfirm: handleUpload,
});
const { isSjbAccount } = useUserInsureProductSetting();
function handleOpenInstructions() {
  dialogInstructionsState.dialogVisible = true;
  if (isSjbAccount.value) {
    dialogInstructionsState.dialogVisible = true;
  } else {
    handleUpload();
  }
}
async function handleUpload() {
@@ -612,7 +636,12 @@
async function handleGoDownloadInvoice(row: API.GetInsurancePageOutput) {
  try {
    await insuranceOrderServices.getInvoiceId({ id: row.id });
    await insuranceOrderServices.getInvoiceId(
      { id: row.id },
      {
        timeout: 60 * 1000 * 30,
      }
    );
    router.push({
      name: 'InsureDownloadInvoice',
      params: {