| | |
| | | <QueryFilterItem> |
| | | <FieldRadio |
| | | v-model="extraParamState.auditStatus" |
| | | :value-enum="InsurancePolicyAuditStatusEnumText" |
| | | :value-enum="InsurancePolicyAuditStatusEnumTextForFilter" |
| | | buttonStyle |
| | | showAllBtn |
| | | @change="getList()" |
| | |
| | | type="primary" |
| | | style="margin-right: 10px" |
| | | link |
| | | v-if="isSjbAccount" |
| | | >职业类型对照表</el-button |
| | | > |
| | | <el-button @click="handleDownload()" type="primary" style="margin-right: 10px" link |
| | |
| | | InsurancePolicyStatusEnum, |
| | | AppType, |
| | | InsurancePolicyAuditStatusEnumText, |
| | | InsurancePolicyAuditStatusEnumTextForFilter, |
| | | InsurancePolicyAuditStatusEnum, |
| | | InsurancePolicyProductIdNumberEnum, |
| | | InsurancePolicyListPayStatusEnum, |
| | |
| | | import dayjs from 'dayjs'; |
| | | import _ from 'lodash'; |
| | | import InsureInstructionsDialog from './components/InsureInstructionsDialog.vue'; |
| | | import { useUserInsureProductSetting } from '@/hooks'; |
| | | // import { Recorder } from '@/utils/record'; |
| | | |
| | | defineOptions({ |
| | |
| | | } 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(); |
| | | } |
| | |
| | | }; |
| | | 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) {} |
| | | } |
| | |
| | | onConfirm: handleUpload, |
| | | }); |
| | | |
| | | const { isSjbAccount } = useUserInsureProductSetting(); |
| | | |
| | | function handleOpenInstructions() { |
| | | dialogInstructionsState.dialogVisible = true; |
| | | if (isSjbAccount.value) { |
| | | dialogInstructionsState.dialogVisible = true; |
| | | } else { |
| | | handleUpload(); |
| | | } |
| | | } |
| | | |
| | | async function handleUpload() { |