| | |
| | | Reject = -10, |
| | | /**待审核 */ |
| | | WaitAudit = 10, |
| | | /**审核中 */ |
| | | Auditing = 15, |
| | | /**通过 */ |
| | | Pass = 20, |
| | | } |
| | |
| | | export const InsurancePolicyAuditStatusEnumText = { |
| | | [InsurancePolicyAuditStatusEnum.Reject]: '驳回', |
| | | [InsurancePolicyAuditStatusEnum.WaitAudit]: '待审核', |
| | | [InsurancePolicyAuditStatusEnum.Auditing]: '审核中', |
| | | [InsurancePolicyAuditStatusEnum.Pass]: '通过', |
| | | }; |
| | | |
| | |
| | | return insureProduct?.id ?? ''; |
| | | } |
| | | |
| | | const queryClient = useQueryClient(); |
| | | |
| | | function ensureUserInsureProductSetting() { |
| | | return queryClient.ensureQueryData<API.InsureProductSettingDto[]>({ |
| | | queryKey: ['dictionaryServices/getUserInsureProductSetting'], |
| | | }); |
| | | } |
| | | |
| | | /**是否是生煎保账号 */ |
| | | const isSjbAccount = computed(() => allUserInsureProductSettingList.value.length > 0); |
| | | |
| | | return { |
| | | allUserInsureProductSettingList, |
| | | getInsureProductByIdNumber, |
| | | getInsureProductIdByIdNumber, |
| | | refetch, |
| | | ensureUserInsureProductSetting, |
| | | isSjbAccount, |
| | | }; |
| | | } |
| | | |
| | |
| | | isLoading, |
| | | }; |
| | | } |
| | | |
| | | export function useInsureActions() { |
| | | const router = useRouter(); |
| | | async function handleGoDownloadInvoice(id: string) { |
| | | try { |
| | | await insuranceOrderServices.getInvoiceId({ id: id }); |
| | | router.push({ |
| | | name: 'InsureDownloadInvoice', |
| | | params: { |
| | | id: id, |
| | | }, |
| | | }); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleGoStampFiles(id: string) { |
| | | try { |
| | | router.push({ |
| | | name: 'InsurancePolicyStampFiles', |
| | | params: { |
| | | id: id, |
| | | }, |
| | | }); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | return { |
| | | handleGoDownloadInvoice, |
| | | handleGoStampFiles, |
| | | }; |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 获取电子保单 POST /api/InsuranceOrder/DownloadPolicyFile/${param0} */ |
| | | export async function downloadPolicyFileId( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIdownloadPolicyFileIdParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | const { id: param0, ...queryParams } = params; |
| | | return request<string>(`/api/InsuranceOrder/DownloadPolicyFile/${param0}`, { |
| | | method: 'POST', |
| | | params: { ...queryParams }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 批量减员保单数据 POST /api/InsuranceOrder/DownsizingInsuranceOrderData */ |
| | | export async function downsizingInsuranceOrderData( |
| | | body: API.DownsizingInsuranceOrderData, |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 保单详情-导入人员清单 GET /api/InsuranceOrder/GetInsuranceStaffListExport */ |
| | | /** 保单详情-导出人员清单 POST /api/InsuranceOrder/GetInsuranceStaffListExport */ |
| | | export async function getInsuranceStaffListExport( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetInsuranceStaffListExportParams, |
| | | body: API.ExportInsuranceStaffListInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<any>('/api/InsuranceOrder/GetInsuranceStaffListExport', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | body: API.InsurancePolicyAuditInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/InsuranceOrder/InsurancePolicyAudit', { |
| | | return request<API.InsurancePolicyAuditOutput>('/api/InsuranceOrder/InsurancePolicyAudit', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 保单再审 POST /api/InsuranceOrder/InsurancePolicyAuditAgain */ |
| | | export async function insurancePolicyAuditAgain( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIinsurancePolicyAuditAgainParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<any>('/api/InsuranceOrder/InsurancePolicyAuditAgain', { |
| | | method: 'POST', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 投保状态补录 POST /api/InsuranceOrder/RestorePolicyStatus */ |
| | | export async function restorePolicyStatus( |
| | | body: API.RestorePolicyInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<any>('/api/InsuranceOrder/RestorePolicyStatus', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIdownloadPolicyFileIdParams { |
| | | id: string; |
| | | } |
| | | |
| | | interface APIexportInsuranceBatchStaffParams { |
| | | batchBillId?: string; |
| | | } |
| | |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIgetInsuranceStaffListExportParams { |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIgetInsureBatchDetailParams { |
| | | batchBillId?: string; |
| | | } |
| | |
| | | |
| | | interface APIimportInsDetailStaffToListParams { |
| | | url?: string; |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIinsurancePolicyAuditAgainParams { |
| | | id?: string; |
| | | } |
| | | |
| | |
| | | interface EntityExtensionDto { |
| | | properties?: Record<string, any>; |
| | | configuration?: Record<string, any>; |
| | | } |
| | | |
| | | interface ExportInsuranceStaffListInput { |
| | | status?: InsuranceDetailStatusEnum; |
| | | insurancePolicyId?: string; |
| | | } |
| | | |
| | | interface ExtensionEnumDto { |
| | |
| | | count?: number; |
| | | } |
| | | |
| | | type InsuranceDetailStatusEnum = 10 | 12 | 14 | 20 | 30; |
| | | type InsuranceDetailStatusEnum = 10 | 12 | 13 | 14 | 20 | 30; |
| | | |
| | | interface InsuranceOrderListOutput { |
| | | id?: string; |
| | |
| | | returnUrl?: string; |
| | | } |
| | | |
| | | type InsurancePolicyAuditStatusEnum = 10 | 20 | -10; |
| | | interface InsurancePolicyAuditOutput { |
| | | /** 消息 */ |
| | | messages?: string[]; |
| | | /** 总投保人数 */ |
| | | totalCount?: number; |
| | | /** 投保成功 */ |
| | | successCount?: number; |
| | | /** 投保失败 */ |
| | | failCount?: number; |
| | | } |
| | | |
| | | type InsurancePolicyAuditStatusEnum = 10 | 15 | 20 | -10; |
| | | |
| | | type InsurancePolicyListPayStatusEnum = 1 | 2; |
| | | |
| | |
| | | password?: string; |
| | | } |
| | | |
| | | interface RestorePolicyDto { |
| | | /** Id */ |
| | | id?: string; |
| | | /** 订单号 */ |
| | | channelOrderNo?: string; |
| | | /** 保单号 */ |
| | | policyNo?: string; |
| | | /** 电子保单链接 */ |
| | | policyOssUrl?: string; |
| | | } |
| | | |
| | | interface RestorePolicyInput { |
| | | /** 保单Id */ |
| | | insurancePolicyId?: string; |
| | | /** 投保批次 */ |
| | | items?: RestorePolicyDto[]; |
| | | } |
| | | |
| | | interface ReturnValueApiDescriptionModel { |
| | | type?: string; |
| | | typeSimple?: string; |
| | |
| | | type="primary" |
| | | style="margin-right: 10px" |
| | | link |
| | | v-if="isSjbAccount" |
| | | >职业类型对照表</el-button |
| | | > |
| | | <el-button @click="handleDownload()" type="primary" style="margin-right: 10px" link |
| | |
| | | import dayjs from 'dayjs'; |
| | | import _ from 'lodash'; |
| | | import InsureInstructionsDialog from './components/InsureInstructionsDialog.vue'; |
| | | import { useUserInsureProductSetting } from '@/hooks'; |
| | | // import { Recorder } from '@/utils/record'; |
| | | |
| | | defineOptions({ |
| | |
| | | onConfirm: handleUpload, |
| | | }); |
| | | |
| | | const { isSjbAccount } = useUserInsureProductSetting(); |
| | | |
| | | function handleOpenInstructions() { |
| | | if (isSjbAccount.value) { |
| | | dialogInstructionsState.dialogVisible = true; |
| | | } else { |
| | | handleUpload(); |
| | | } |
| | | } |
| | | |
| | | async function handleUpload() { |
| | |
| | | <el-button |
| | | type="primary" |
| | | link |
| | | @click="handleGoStampFiles" |
| | | @click="handleGoStampFiles(id)" |
| | | v-if="detail.productOnline && detail.anyPayComplete" |
| | | >详情</el-button |
| | | > |
| | |
| | | </ProForm> |
| | | </ChunkCell> |
| | | <ChunkCell title="人员信息" class="full-table-chunk"> |
| | | <template #titleRight v-if="detail.status !== InsurancePolicyStatusEnum.WaitEffect"> |
| | | <template |
| | | #titleRight |
| | | v-if="detail.status !== InsurancePolicyStatusEnum.WaitEffect && !detail.productOnline" |
| | | > |
| | | <el-button type="primary" @click="handleBatchChange">批改申请</el-button> |
| | | </template> |
| | | <ProTableQueryFilterBar @on-reset="reset"> |
| | |
| | | </template> |
| | | <template #btn> |
| | | <template v-if="detail.status === InsurancePolicyStatusEnum.WaitEffect"> |
| | | <el-button @click="handleTemplateDownload()" link type="primary">模板下载</el-button> |
| | | <template v-if="!detail.productOnline"> |
| | | <el-button @click="handleTemplateDownload()" link type="primary" |
| | | >模板下载</el-button |
| | | > |
| | | <BlFileUpload |
| | | v-if=" |
| | | detail.auditStatus !== InsurancePolicyAuditStatusEnum.Pass && |
| | | !detail.productOnline |
| | | " |
| | | v-if="detail.auditStatus !== InsurancePolicyAuditStatusEnum.Pass" |
| | | :limitFileSize="10" |
| | | accept="xls,xlsx" |
| | | :showTip="false" |
| | |
| | | <el-button icon="Plus" type="primary">导入</el-button> |
| | | </template> |
| | | </BlFileUpload> |
| | | <el-button @click="handleClear()" type="primary">导出投保错误人员清单</el-button> |
| | | <el-button @click="handleClear()" type="primary">清空数据</el-button> |
| | | </template> |
| | | <template v-else> |
| | | <el-button @click="handleDownloadPerson()" type="primary">下载人员清单</el-button> |
| | | <template v-if="detail.productOnline"> |
| | | <el-button v-if="detail.anyPayComplete" @click="handleGoStampFiles()" type="primary" |
| | | >下载保单</el-button |
| | | > |
| | | </template> |
| | | <el-button v-else @click="handleDownloadOrder()" type="primary">下载保单</el-button> |
| | | <template v-else> |
| | | <template v-if="detail.productOnline"> |
| | | <el-button @click="handleExport(InsuranceDetailStatusEnum.Effecting)" type="primary" |
| | | >导出在保人员</el-button |
| | | > |
| | | <el-button @click="handleExport(InsuranceDetailStatusEnum.Fail)" type="primary" |
| | | >导出错误人员</el-button |
| | | > |
| | | <el-button @click="handleGoStampFiles(id)" type="primary">下载保单</el-button> |
| | | <el-button @click="handleGoDownloadInvoice(id)" type="primary">下载发票</el-button> |
| | | </template> |
| | | <template v-else> |
| | | <el-button @click="handleExport(null)" type="primary">下载人员清单</el-button> |
| | | <el-button @click="handleDownloadOrder()" type="primary">下载保单</el-button> |
| | | </template> |
| | | </template> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | |
| | | InsurancePolicyStatusEnumText, |
| | | InsurancePolicyAuditStatusEnum, |
| | | InsuranceDetailStatusEnumText, |
| | | InsuranceDetailStatusEnum, |
| | | } from '@/constants'; |
| | | import ChangePersonInfoDialog from './ChangePersonInfoDialog.vue'; |
| | | import InsureClaimDetailDialog from './InsureClaimDetailDialog.vue'; |
| | |
| | | import { downloadFile, downloadFileByUrl, Message, OrderInputType } from '@bole-core/core'; |
| | | import { setOSSLink } from '@/utils'; |
| | | import dayjs from 'dayjs'; |
| | | import { useInsureActions } from '@/hooks'; |
| | | |
| | | defineOptions({ |
| | | name: 'InsureOrderInfoView', |
| | |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleDownloadPerson() { |
| | | try { |
| | | if (paginationState.total === 0) { |
| | | Message.warnMessage('没有数据可以导出哦~'); |
| | | return; |
| | | } |
| | | let res = await insuranceOrderServices.getInsuranceStaffListExport( |
| | | { id: id }, |
| | | { |
| | | responseType: 'blob', |
| | | getResponse: true, |
| | | } |
| | | ); |
| | | if (res) { |
| | | downloadFile(res.data, `人员清单`, 'xlsx'); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | function handleDownloadOrder() { |
| | | downloadFileByUrl(setOSSLink(detail.value?.insureBillUrl)); |
| | | } |
| | | |
| | | function handleGoStampFiles() { |
| | | router.push({ |
| | | name: 'InsurancePolicyStampFiles', |
| | | params: { |
| | | id: id, |
| | | }, |
| | | }); |
| | | } |
| | | const { handleGoDownloadInvoice, handleGoStampFiles } = useInsureActions(); |
| | | |
| | | function handleBatchChange() { |
| | | if ( |
| | |
| | | }); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleExport(status: InsuranceDetailStatusEnum) { |
| | | try { |
| | | if (paginationState.total === 0) { |
| | | Message.warnMessage('没有数据可以导出哦~'); |
| | | return; |
| | | } |
| | | let res = await insuranceOrderServices.getInsuranceStaffListExport( |
| | | { insurancePolicyId: id, status: status }, |
| | | { |
| | | responseType: 'blob', |
| | | getResponse: true, |
| | | } |
| | | ); |
| | | if (res) { |
| | | downloadFile(res.data, `人员清单`, 'xlsx'); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |