| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button |
| | | @click="handleDownloadOccupationType()" |
| | | type="primary" |
| | | style="margin-right: 10px" |
| | | link |
| | | >职业类型对照表</el-button |
| | | > |
| | | <el-button @click="handleDownload()" type="primary" style="margin-right: 10px" link |
| | | >模板下载</el-button |
| | | > |
| | | <el-button @click="handleUpload()" type="primary" style="margin-right: 10px" |
| | | <el-button @click="handleOpenInstructions()" type="primary" style="margin-right: 10px" |
| | | >导入投保人员</el-button |
| | | > |
| | | <!-- <el-button |
| | |
| | | class="box-item" |
| | | effect="dark" |
| | | :content="row.auditRemark" |
| | | placement="top-start" |
| | | placement="top" |
| | | v-if="row.auditStatus === InsurancePolicyAuditStatusEnum.Reject && row.auditRemark" |
| | | popper-class="max-width-popper" |
| | | > |
| | |
| | | </AppContainer> |
| | | <UploadInsurePersonDialog v-bind="dialogProps" /> |
| | | <UploadStampFileDialog v-bind="dialogStampFileProps" /> |
| | | <InsureInstructionsDialog v-bind="dialogInstructionsProps" /> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | |
| | | SearchInput, |
| | | FieldRadio, |
| | | XLSXUtils, |
| | | useDialog, |
| | | } from '@bole-core/components'; |
| | | import * as insuranceOrderServices from '@/services/api/InsuranceOrder'; |
| | | import { Message, OrderInputType, downloadFileByUrl } from '@bole-core/core'; |
| | | import { columns } from './constants'; |
| | | import UploadInsurePersonDialog from './components/UploadInsurePersonDialog.vue'; |
| | | import UploadStampFileDialog from './components/UploadStampFileDialog.vue'; |
| | | import { format, downloadFile, setOSSLink, toThousand, convertApi2FormUrl } from '@/utils'; |
| | | import { |
| | | format, |
| | | downloadFile, |
| | | setOSSLink, |
| | | toThousand, |
| | | convertApi2FormUrl, |
| | | convertFormUrl2Api, |
| | | } from '@/utils'; |
| | | import { ModelValueType } from 'element-plus'; |
| | | import { |
| | | InsuranceOrderTempPath, |
| | |
| | | InsurancePolicyProductIdNumberEnum, |
| | | InsurancePolicyListPayStatusEnum, |
| | | InsurancePolicyListPayStatusEnumText, |
| | | InsuranceOccupationTypeTempPath, |
| | | } from '@/constants'; |
| | | import dayjs from 'dayjs'; |
| | | import _ from 'lodash'; |
| | | import InsureInstructionsDialog from './components/InsureInstructionsDialog.vue'; |
| | | // import { Recorder } from '@/utils/record'; |
| | | |
| | | defineOptions({ |
| | | name: 'Home', |
| | |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetInsurancePageOutput) => |
| | | row.auditStatus !== InsurancePolicyAuditStatusEnum.Pass || |
| | | row.status !== InsurancePolicyStatusEnum.WaitEffect, |
| | | }, |
| | | }, |
| | |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | // const recorder = ref(new Recorder()); |
| | | |
| | | onMounted(async () => { |
| | | await getList(); |
| | | state.loading = false; |
| | | // handleOpenInstructions(); |
| | | |
| | | // setTimeout(() => { |
| | | // // recorder.value.init(); |
| | | // recorder.value.replaySession('9cb24e5a-0423-4dcd-abd5-fa7a4117cadc'); |
| | | // }, 3000); |
| | | }); |
| | | |
| | | // onUnmounted(() => { |
| | | // recorder.value.stopRecordingAndSave(); |
| | | // }); |
| | | |
| | | const { |
| | | getDataSource: getList, |
| | |
| | | url: [] as UploadUserFile[], |
| | | productIdNumber: '', |
| | | productSchemeIdNumber: '', |
| | | effectStartTime: dayjs().add(1, 'day').format('YYYY-MM-DD'), |
| | | }, |
| | | closeAfterConfirm: false, |
| | | }); |
| | | |
| | | 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) {} |
| | | } |
| | | |
| | | function handleUpload() { |
| | | const { dialogProps: dialogInstructionsProps, dialogState: dialogInstructionsState } = useDialog({ |
| | | onConfirm: handleUpload, |
| | | }); |
| | | |
| | | function handleOpenInstructions() { |
| | | dialogInstructionsState.dialogVisible = true; |
| | | } |
| | | |
| | | async function handleUpload() { |
| | | handleAdd({ |
| | | serialNum: `${dayjs().format('YYYYMMDD')}${_.random(0, 9999).toString().padStart(4, '0')}`, |
| | | url: [] as UploadUserFile[], |
| | |
| | | downloadFile(res.data, `在保人员导出`, 'xlsx'); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handleDownloadOccupationType() { |
| | | downloadFileByUrl(InsuranceOccupationTypeTempPath, '职业类型对照表'); |
| | | } |
| | | |
| | | function handleDownload() { |
| | |
| | | try { |
| | | let params: API.UploadInsuranceStampFilesInput = { |
| | | insurancePolicyId: stampFileForm.id, |
| | | listFiles: stampFileForm.url?.map((x) => x.path) ?? [], |
| | | listFiles: convertFormUrl2Api(stampFileForm.url), |
| | | }; |
| | | let res = await insuranceOrderServices.uploadInsuranceStampFiles(params); |
| | | if (res) { |