zhengyiming
6 天以前 98b88860d68494a81007a2a1737dfd37a4b70c99
fix: 江佑保系统健壮性修复
4个文件已修改
130 ■■■■■ 已修改文件
src/services/api/InsuranceOrder.ts 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/typings.d.ts 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Home/Home.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Home/components/InsureOrderInfoView.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/InsuranceOrder.ts
@@ -386,15 +386,15 @@
/** 新增保单导入 POST /api/InsuranceOrder/ImportInsStaffToList */
export async function importInsStaffToList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIimportInsStaffToListParams,
  body: API.ImportInsStaffToListFrontInput,
  options?: API.RequestConfig
) {
  return request<API.ImportInsStaffAnalysisList[]>('/api/InsuranceOrder/ImportInsStaffToList', {
  return request<API.ImportInsStaffToListOutput>('/api/InsuranceOrder/ImportInsStaffToList', {
    method: 'POST',
    params: {
      ...params,
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
src/services/api/typings.d.ts
@@ -367,13 +367,6 @@
    id?: string;
  }
  interface APIimportInsStaffToListParams {
    url?: string;
    serialNum?: string;
    productIdNumber?: string;
    productSchemeIdNumber?: string;
  }
  interface APIsearchParams {
    filter?: string;
    sorting?: string;
@@ -620,6 +613,8 @@
    /** 产品名称 */
    productName: string;
    status?: InsureProductSettingStatusEnum;
    /** 投保人数上限 */
    maxCount: number;
  }
  interface CreateOrUpdateRoleInput {
@@ -970,6 +965,11 @@
    phone?: string;
    claimCount?: number;
    creationTime?: string;
    /** 投保批次号 */
    payOrder?: string;
    status?: InsuranceDetailStatusEnum;
    /** 备注 */
    auditRemark?: string;
  }
  interface GetInsuranceStaffPageTemplatePageOutput {
@@ -1312,6 +1312,26 @@
    isNormal?: boolean;
  }
  interface ImportInsStaffToListFrontInput {
    serialNum?: string;
    url?: string;
    /** 保险产品IdNumber */
    productIdNumber?: string;
    /** 保险产品方案Id */
    productSchemeIdNumber?: string;
    /** 保单生效时间 */
    effectStartTime?: string;
  }
  interface ImportInsStaffToListOutput {
    /** 总人数 */
    importAllCount?: number;
    /** 已导入人数 */
    successCount?: number;
    /** 导入失败列表 */
    errorList?: ImportInsStaffAnalysisList[];
  }
  type InsuranceClaimAttachmentBusinessTypeEnum = 10 | 20 | 30 | 40 | 50;
  interface InsuranceClaimAttachmentOutput {
@@ -1437,6 +1457,8 @@
    month?: number;
    count?: number;
  }
  type InsuranceDetailStatusEnum = 10 | 12 | 14 | 20 | 30;
  interface InsuranceOrderListOutput {
    id?: string;
@@ -1569,7 +1591,7 @@
    invoiceDownloadOssUrl?: string;
  }
  type InsurancePolicyPayStatusEnum = 1 | 2;
  type InsurancePolicyPayStatusEnum = 1 | 2 | -1;
  type InsurancePolicyStatusEnum = 10 | 20 | 30;
@@ -1702,6 +1724,8 @@
    status?: InsureProductSettingStatusEnum;
    /** 创建时间 */
    creationTime?: string;
    /** 投保人数上限 */
    maxCount?: number;
  }
  interface InsureProductSettingDtoPageOutput {
src/views/Home/Home.vue
@@ -111,7 +111,7 @@
    </AppContainer>
    <UploadInsurePersonDialog v-bind="dialogProps" />
    <UploadStampFileDialog v-bind="dialogStampFileProps" />
    <InsureInstructionsDialog v-bind="dialogInstructionsProps" @onConfirm="handleUpload" />
    <InsureInstructionsDialog v-bind="dialogInstructionsProps" />
  </LoadingLayout>
</template>
@@ -364,9 +364,9 @@
async function checkInrancesSerialNumStatus() {
  try {
    let params: API.APIimportInsStaffToListParams = {
    let params: API.APIcheckInrancesSerialNumStatusParams = {
      serialNum: editForm.serialNum,
      url: editForm.url?.[0]?.path,
      // url: editForm.url?.[0]?.path,
    };
    let res = await insuranceOrderServices.checkInrancesSerialNumStatus(params);
    if (res === InsurancePolicyStatusEnum.Effecting) {
@@ -384,43 +384,62 @@
async function importInsStaffToList() {
  try {
    let params: API.APIimportInsStaffToListParams = {
    let params: API.ImportInsStaffToListFrontInput = {
      serialNum: editForm.serialNum,
      url: editForm.url?.[0]?.path,
      productIdNumber: editForm.productIdNumber,
      productSchemeIdNumber: editForm.productSchemeIdNumber,
      effectStartTime: editForm.effectStartTime,
    };
    let res = await insuranceOrderServices.importInsStaffToList(params);
    if (res.length > 0) {
      await Message.tipMessage('存在错误数据,是否导出?');
      XLSXUtils.exportToXLSX({
        workbookDataList: res,
        fileName: '错误人员名单',
        workbookHeaderMap: {
          name: '雇员姓名',
          sex: '性别',
          certType: '证件类型',
          certNo: '证件号码',
          jobName: '雇员工种',
          useEmploer: '用工单位',
          address: '用工地点',
          note: '备注',
        },
      });
    let res = await insuranceOrderServices.importInsStaffToList(params, {
      timeout: 60 * 1000 * 10,
    });
    if (res) {
      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,
          }
        );
      }
    }
    dialogState.dialogVisible = false;
    getList(paginationState.pageIndex);
  } catch (error) {}
}
const { dialogProps: dialogInstructionsProps, dialogState: dialogInstructionsState } = useDialog();
const { dialogProps: dialogInstructionsProps, dialogState: dialogInstructionsState } = useDialog({
  onConfirm: handleUpload,
});
function handleOpenInstructions() {
  dialogInstructionsState.dialogVisible = true;
}
function handleUpload() {
async function handleUpload() {
  handleAdd({
    serialNum: `${dayjs().format('YYYYMMDD')}${_.random(0, 9999).toString().padStart(4, '0')}`,
    url: [] as UploadUserFile[],
src/views/Home/components/InsureOrderInfoView.vue
@@ -249,7 +249,7 @@
  },
  {
    id: '101',
    enCode: 'serialNum',
    enCode: 'payOrder',
    name: '批次号',
    width: 140,
  },
@@ -261,7 +261,7 @@
  },
  {
    id: '103',
    enCode: 'remark',
    enCode: 'auditRemark',
    name: '备注',
    width: 140,
  },
@@ -365,7 +365,12 @@
      keyWord: '',
      orderInput: [{ property: 'id', order: OrderInputType.Asc }],
    },
    columnsRenderProps: {},
    columnsRenderProps: {
      status: {
        type: 'enum',
        valueEnum: InsurancePolicyStatusEnumText,
      },
    },
  }
);