| | |
| | | |
| | | /** 新增保单导入 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 || {}), |
| | | }); |
| | | } |
| | |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIimportInsStaffToListParams { |
| | | url?: string; |
| | | serialNum?: string; |
| | | productIdNumber?: string; |
| | | productSchemeIdNumber?: string; |
| | | } |
| | | |
| | | interface APIsearchParams { |
| | | filter?: string; |
| | | sorting?: string; |
| | |
| | | /** 产品名称 */ |
| | | productName: string; |
| | | status?: InsureProductSettingStatusEnum; |
| | | /** 投保人数上限 */ |
| | | maxCount: number; |
| | | } |
| | | |
| | | interface CreateOrUpdateRoleInput { |
| | |
| | | phone?: string; |
| | | claimCount?: number; |
| | | creationTime?: string; |
| | | /** 投保批次号 */ |
| | | payOrder?: string; |
| | | status?: InsuranceDetailStatusEnum; |
| | | /** 备注 */ |
| | | auditRemark?: string; |
| | | } |
| | | |
| | | interface GetInsuranceStaffPageTemplatePageOutput { |
| | |
| | | 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 { |
| | |
| | | month?: number; |
| | | count?: number; |
| | | } |
| | | |
| | | type InsuranceDetailStatusEnum = 10 | 12 | 14 | 20 | 30; |
| | | |
| | | interface InsuranceOrderListOutput { |
| | | id?: string; |
| | |
| | | invoiceDownloadOssUrl?: string; |
| | | } |
| | | |
| | | type InsurancePolicyPayStatusEnum = 1 | 2; |
| | | type InsurancePolicyPayStatusEnum = 1 | 2 | -1; |
| | | |
| | | type InsurancePolicyStatusEnum = 10 | 20 | 30; |
| | | |
| | |
| | | status?: InsureProductSettingStatusEnum; |
| | | /** 创建时间 */ |
| | | creationTime?: string; |
| | | /** 投保人数上限 */ |
| | | maxCount?: number; |
| | | } |
| | | |
| | | interface InsureProductSettingDtoPageOutput { |
| | |
| | | </AppContainer> |
| | | <UploadInsurePersonDialog v-bind="dialogProps" /> |
| | | <UploadStampFileDialog v-bind="dialogStampFileProps" /> |
| | | <InsureInstructionsDialog v-bind="dialogInstructionsProps" @onConfirm="handleUpload" /> |
| | | <InsureInstructionsDialog v-bind="dialogInstructionsProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | |
| | | |
| | | 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) { |
| | |
| | | |
| | | 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[], |
| | |
| | | }, |
| | | { |
| | | id: '101', |
| | | enCode: 'serialNum', |
| | | enCode: 'payOrder', |
| | | name: '批次号', |
| | | width: 140, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | id: '103', |
| | | enCode: 'remark', |
| | | enCode: 'auditRemark', |
| | | name: '备注', |
| | | width: 140, |
| | | }, |
| | |
| | | keyWord: '', |
| | | orderInput: [{ property: 'id', order: OrderInputType.Asc }], |
| | | }, |
| | | columnsRenderProps: {}, |
| | | columnsRenderProps: { |
| | | status: { |
| | | type: 'enum', |
| | | valueEnum: InsurancePolicyStatusEnumText, |
| | | }, |
| | | }, |
| | | } |
| | | ); |
| | | |