| | |
| | | }); |
| | | } |
| | | |
| | | /** 获取用户公司名称列表 GET /api/InsuranceClaim/GetInsuranceClaimCompanyList */ |
| | | export async function getInsuranceClaimCompanyList(options?: API.RequestConfig) { |
| | | return request<string[]>('/api/InsuranceClaim/GetInsuranceClaimCompanyList', { |
| | | method: 'GET', |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取保险理赔统计数量 POST /api/InsuranceClaim/GetInsuranceClaimCount */ |
| | | export async function getInsuranceClaimCount( |
| | | body: API.QueryInsuranceClaimCountInput, |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 获取人员理赔列表 GET /api/InsuranceClaim/GetInsuranceClaimDetailList */ |
| | | export async function getInsuranceClaimDetailList( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetInsuranceClaimDetailListParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.InsuranceClaimDetailOutput[]>( |
| | | '/api/InsuranceClaim/GetInsuranceClaimDetailList', |
| | | { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 获取保险理赔分页列表 POST /api/InsuranceClaim/GetInsuranceClaimPage */ |
| | | export async function getInsuranceClaimPage( |
| | | body: API.QueryInsuranceClaimPageInput, |
| | |
| | | orderId?: string; |
| | | } |
| | | |
| | | interface APIgetInsuranceClaimDetailListParams { |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIgetInsuranceClaimDetailParams { |
| | | id?: string; |
| | | } |
| | |
| | | age?: number; |
| | | birthDay?: string; |
| | | phone?: string; |
| | | claimCount?: number; |
| | | creationTime?: string; |
| | | } |
| | | |
| | |
| | | disabilityRatio?: number; |
| | | /** 理赔渠道 */ |
| | | claimChannel?: string; |
| | | /** 理赔渠道 */ |
| | | companyName?: string; |
| | | claimResult?: InsuranceClaimResultEnum; |
| | | claimResultStr?: string; |
| | | /** 下款金额 */ |
| | |
| | | month?: number; |
| | | /** 理赔渠道 */ |
| | | claimChannel?: string; |
| | | companyName?: string; |
| | | } |
| | | |
| | | interface QueryInsuranceClaimPageInput { |
| | | pageModel?: Pagination; |
| | | /** 理赔渠道 */ |
| | | claimChannel?: string; |
| | | /** 公司名称 */ |
| | | companyName?: string; |
| | | /** 劳动合同单位 */ |
| | | laborContractEnterprise?: string; |
| | | /** 实际工作单位 */ |
| | | workEnterprise?: string; |
| | | /** 身份证号 */ |
| | | idNumber?: string; |
| | | /** 投保人/被保人 */ |
| | | insurerName?: string; |
| | | claimResult?: InsuranceClaimResultEnum; |
| | | } |
| | | |
| | |
| | | <InsureOrderInfoView /> |
| | | </ProTabPane> |
| | | <ProTabPane |
| | | v-if="detail.status !== InsurancePolicyStatusEnum.WaitEffect" |
| | | v-if="detail?.status !== InsurancePolicyStatusEnum.WaitEffect" |
| | | lazy |
| | | label="批改记录" |
| | | :name="InsureOrderTabType.BatchOrder" |
| | |
| | | :columns="column" |
| | | :operation-btns="operationBtns" |
| | | > |
| | | <template #changeType="{ row }"> {{ BatchChangeTypeEnumText[row.changeType] }}</template> |
| | | <template #claimResult="{ row }"> |
| | | {{ InsuranceClaimResultEnumText[row.claimResult] }} |
| | | </template> |
| | | <template #reportedTime="{ row }"> |
| | | {{ dayjs(row.reportedTime).format('YYYY-MM-DD') }} |
| | | </template> |
| | | </ProTableV2> |
| | | </ProDialogTableWrapper> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="emit('onCancel')">取 消</el-button> |
| | | <el-button type="primary" @click="emit('onCancel')">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </ProDialog> |
| | | </template> |
| | | |
| | |
| | | useTable, |
| | | defineOperationBtns, |
| | | } from '@bole-core/components'; |
| | | import { OrderInputType } from '@bole-core/core'; |
| | | import { paginateList } from '@/utils'; |
| | | import { BatchChangeTypeEnumText } from '@/constants'; |
| | | import { InsuranceClaimResultEnumText } from '@/constants'; |
| | | import dayjs from 'dayjs'; |
| | | |
| | | defineOptions({ |
| | | name: 'InsureClaimDetailDialog', |
| | |
| | | modelValue: boolean; |
| | | form?: { |
| | | id: string; |
| | | staffList: API.InsureBatchBillDetailDto[]; |
| | | routeId: string; |
| | | staffList: API.InsuranceClaimDetailOutput[]; |
| | | }; |
| | | }; |
| | | |
| | |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'idNumber', |
| | | enCode: 'reportedTime', |
| | | name: '报案时间', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'idNumber', |
| | | enCode: 'contactNumber', |
| | | name: '联系电话', |
| | | }, |
| | | { |
| | | id: '5', |
| | | enCode: 'idNumber', |
| | | enCode: 'accidentType', |
| | | name: '事故类型', |
| | | }, |
| | | { |
| | | id: '6', |
| | | enCode: 'idNumber', |
| | | enCode: 'claimResult', |
| | | name: '理赔结果', |
| | | }, |
| | | ]; |
| | |
| | | extraParamState, |
| | | reset, |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | async ({ pageIndex, pageSize }) => { |
| | | try { |
| | | return Promise.resolve({ |
| | | pageModel: { |
| | |
| | | } catch (error) {} |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | keyWord: '', |
| | | orderInput: [{ property: 'id', order: OrderInputType.Asc }], |
| | | columnsRenderProps: { |
| | | reportedTime: { |
| | | type: 'date', |
| | | format: 'YYYY-MM-DD', |
| | | }, |
| | | }, |
| | | } |
| | | ); |
| | |
| | | }, |
| | | query: { |
| | | fromRoute: 'InsuranceOrderDetail', |
| | | insuranceClaimId: row.id, |
| | | routeId: props.form.routeId, |
| | | }, |
| | | }); |
| | | } |
| | |
| | | useFormDialog, |
| | | BlFileUpload, |
| | | UploadUserFile, |
| | | XLSXUtils, |
| | | } from '@bole-core/components'; |
| | | import { |
| | | InsuranceOrderTempPath, |
| | |
| | | import ChangePersonInfoDialog from './ChangePersonInfoDialog.vue'; |
| | | import InsureClaimDetailDialog from './InsureClaimDetailDialog.vue'; |
| | | import * as insuranceOrderServices from '@/services/api/InsuranceOrder'; |
| | | import * as insuranceClaimServices from '@/services/api/InsuranceClaim'; |
| | | import { useQuery, useQueryClient } from '@tanstack/vue-query'; |
| | | import { downloadFile, downloadFileByUrl, Message, OrderInputType } from '@bole-core/core'; |
| | | import { setOSSLink } from '@/utils'; |
| | |
| | | }, |
| | | { |
| | | id: '11', |
| | | enCode: 'serialNumber', |
| | | enCode: 'claimCount', |
| | | name: '理赔', |
| | | width: 100, |
| | | }, |
| | |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetInsuranceStaffPageTemplate) => |
| | | !(row.serialNumber && detail.value?.status !== InsurancePolicyStatusEnum.WaitEffect), |
| | | !(row.claimCount && detail.value?.status !== InsurancePolicyStatusEnum.WaitEffect), |
| | | }, |
| | | }, |
| | | ]); |
| | |
| | | } |
| | | async function handleClear() { |
| | | try { |
| | | if (paginationState.total === 0) { |
| | | Message.warnMessage('没有需要清空的数据~'); |
| | | return; |
| | | } |
| | | await Message.tipMessage('是否清空人员信息'); |
| | | let res = await insuranceOrderServices.clearInsuranceStaffData({ |
| | | id: id, |
| | |
| | | } |
| | | async function handleUploadSuccess(response: UploadUserFile) { |
| | | try { |
| | | let res = await insuranceOrderServices.importInsDetailStaffToList( |
| | | { |
| | | let res = await insuranceOrderServices.importInsDetailStaffToList({ |
| | | id: id, |
| | | url: response.url, |
| | | }); |
| | | if (res?.length > 0) { |
| | | await Message.tipMessage('存在错误数据,是否导出?'); |
| | | XLSXUtils.exportToXLSX({ |
| | | workbookDataList: res, |
| | | fileName: '错误人员名单', |
| | | workbookHeaderMap: { |
| | | name: '雇员姓名', |
| | | sex: '性别', |
| | | certType: '证件类型', |
| | | certNo: '证件号码', |
| | | jobName: '雇员工种', |
| | | useEmploer: '用工单位', |
| | | address: '用工地点', |
| | | note: '备注', |
| | | }, |
| | | { |
| | | getResponse: true, |
| | | responseType: 'blob', |
| | | }); |
| | | } |
| | | ); |
| | | console.log('res: ', res); |
| | | // if (res?.data?.size) { |
| | | // await Message.tipMessage('存在错误数据,是否导出?'); |
| | | // downloadFile(res.data, `错误人员名单`, 'xlsx'); |
| | | // } |
| | | // queryClient.invalidateQueries({ |
| | | // queryKey: ['insuranceOrderServices/getInsuranceStaffList'], |
| | | // }); |
| | | // getInsuranceStaffList(); |
| | | queryClient.invalidateQueries({ |
| | | queryKey: ['insuranceOrderServices/getInsuranceStaffList'], |
| | | }); |
| | | getInsuranceStaffList(); |
| | | } catch (error) {} |
| | | } |
| | | |
| | |
| | | const { dialogProps: dialogInsureClaimProps, handleEdit: handleInsureClaimEdit } = useFormDialog({ |
| | | defaultFormParams: { |
| | | id: '', |
| | | staffList: [] as API.InsureBatchBillDetailDto[], |
| | | routeId: '', |
| | | staffList: [] as API.InsuranceClaimDetailOutput[], |
| | | }, |
| | | }); |
| | | |
| | | async function handleDetail(row: API.InsureBatchBillDto) { |
| | | async function getInsuranceClaimDetailList(id: string) { |
| | | try { |
| | | // const res = await getInsureBatchDetail(row.insureBatchBillId); |
| | | return await insuranceClaimServices.getInsuranceClaimDetailList({ id: id }); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleDetail(row: API.GetInsuranceStaffPageTemplate) { |
| | | try { |
| | | const res = await getInsuranceClaimDetailList(row.id); |
| | | handleInsureClaimEdit({ |
| | | id: row.insureBatchBillId, |
| | | staffList: [], |
| | | id: row.id, |
| | | staffList: res, |
| | | routeId: id, |
| | | }); |
| | | } catch (error) {} |
| | | } |
| | |
| | | |
| | | const route = useRoute(); |
| | | const insuranceOrderId = (route.params.id as string) ?? ''; |
| | | const routeId = (route.query.routeId as string) ?? ''; |
| | | const fromRoute = route.query.fromRoute as string; |
| | | const { closeViewPush } = useRouteView(); |
| | | |
| | |
| | | const { form, isLoading, claimDetail, disabledReportedDate, queryClaimDetailByOrderId, resetForm } = |
| | | useInsuranceClaimDetail({ |
| | | insuranceOrderId, |
| | | fromRoute, |
| | | }); |
| | | |
| | | // const { existedInsuranceOrderList } = useInsuranceOrderListByOrderRelevance({ |
| | |
| | | function handleBack() { |
| | | closeViewPush(route, { |
| | | name: fromRoute ?? 'Home', |
| | | params: { |
| | | id: routeId, |
| | | }, |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | |
| | | type UseInsuranceClaimDetailOptions = { |
| | | insuranceOrderId?: MaybeRef<string>; |
| | | fromRoute?: MaybeRef<string>; |
| | | }; |
| | | |
| | | export function useInsuranceClaimDetail({ insuranceOrderId }: UseInsuranceClaimDetailOptions) { |
| | | export function useInsuranceClaimDetail({ |
| | | insuranceOrderId, |
| | | fromRoute, |
| | | }: UseInsuranceClaimDetailOptions) { |
| | | const DefaultAccidentProcess = `事故经过: |
| | | 治疗医院:二级及以上公立医院 |
| | | 诊断结果(与诊断证明一致) |
| | |
| | | |
| | | const form = reactive({ |
| | | insuranceOrderId: unref(insuranceOrderId), |
| | | fromRoute: unref(fromRoute), |
| | | reportedTime: '', |
| | | accidentTime: '', |
| | | ...DefaultForm, |
| | |
| | | }); |
| | | } |
| | | |
| | | const { isLoading: isClaimDetailLoading } = useQuery({ |
| | | queryKey: ['insuranceClaimServices/getInsuranceClaimDetail', _insuranceOrderId], |
| | | queryFn: async () => { |
| | | return await insuranceClaimServices.getInsuranceClaimDetail( |
| | | { id: form.insuranceOrderId }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | placeholderData: () => ({} as API.InsuranceClaimDetailOutput), |
| | | onSuccess(data) { |
| | | if (data) { |
| | | form.name = data.name; |
| | | form.idNumber = data.idNumber; |
| | | // form.insuredInstitution = data.insuredInstitution; |
| | | form.insuranceScheme = data.insuranceScheme; |
| | | form.reportedTime = data.reportedTime; |
| | | form.contactNumber = data.contactNumber; |
| | | form.bakContactNumber = data.bakContactNumber; |
| | | form.accidentType = data.accidentType; |
| | | form.accidentTime = data.accidentTime; |
| | | form.disabilityRatio = data.disabilityRatio ?? 0; |
| | | form.accidentAddress = data.accidentAddress; |
| | | form.accidentProcess = data.accidentProcess ?? DefaultAccidentProcess; |
| | | |
| | | form.insuranceBeginTime = data.insuranceBeginTime; |
| | | form.insuranceEndTime = data.insuranceEndTime; |
| | | form.laborContractEnterprise = data.laborContractEnterprise; |
| | | form.workEnterprise = data.workEnterprise; |
| | | form.workType = data.workType; |
| | | |
| | | form.channel = data.channel; |
| | | form.onJobFlag = data.onJobFlag; |
| | | form.gender = data.gender; |
| | | form.age = data.age; |
| | | form.premiumAmount = data.premiumAmount; |
| | | form.incDecAmount = data.incDecAmount; |
| | | |
| | | form.claimResult = data.claimResult ?? ('' as any as InsuranceClaimResultEnum); |
| | | form.claimResultTime = data.claimResultTime ?? ''; |
| | | form.downPaymentAmount = data.downPaymentAmount ?? 0; |
| | | |
| | | const attachmentIdCard = convertAttAchmentsToForm( |
| | | data.attachments, |
| | | InsuranceClaimAttachmentBusinessTypeEnum.InjuredIdCardImg |
| | | ); |
| | | form.attachmentFrontIdCards = attachmentIdCard[0] ? [attachmentIdCard[0]] : []; |
| | | form.attachmentBackIdCards = attachmentIdCard[1] ? [attachmentIdCard[1]] : []; |
| | | form.attachmentSites = convertAttAchmentsToForm( |
| | | data.attachments, |
| | | InsuranceClaimAttachmentBusinessTypeEnum.InjurySiteImg |
| | | ); |
| | | form.attachmentHandheldIdCards = convertAttAchmentsToForm( |
| | | data.attachments, |
| | | InsuranceClaimAttachmentBusinessTypeEnum.InjuredHandheldIdCardImg |
| | | ); |
| | | form.attachmentAreas = convertAttAchmentsToForm( |
| | | data.attachments, |
| | | InsuranceClaimAttachmentBusinessTypeEnum.InjuredAreaImg |
| | | ); |
| | | form.attachmentCases = convertAttAchmentsToForm( |
| | | data.attachments, |
| | | InsuranceClaimAttachmentBusinessTypeEnum.CasesImg |
| | | ); |
| | | } |
| | | }, |
| | | enabled: computed(() => !!form.insuranceOrderId && form.fromRoute === 'InsuranceOrderDetail'), |
| | | }); |
| | | |
| | | const { isLoading } = useQuery({ |
| | | queryKey: ['insuranceOrderServices/getInsuranceOrderDetail', _insuranceOrderId], |
| | | queryFn: async () => { |
| | |
| | | onSuccess(data) { |
| | | importInsuranceOrderData(data); |
| | | }, |
| | | enabled: computed(() => !!form.insuranceOrderId), |
| | | enabled: computed(() => !!form.insuranceOrderId && form.fromRoute !== 'InsuranceOrderDetail'), |
| | | }); |
| | | |
| | | function importInsuranceOrderData(data: API.InsuranceOrderListOutput) { |