| | |
| | | /**生煎保 */ |
| | | SJB = 'A05C1397S00', |
| | | } |
| | | |
| | | export enum InsurancePolicyPayStatusEnum { |
| | | /**待支付 */ |
| | | WaitPay = 1, |
| | | /**已支付 */ |
| | | CompletePay = 2, |
| | | } |
| | | |
| | | export const InsurancePolicyPayStatusEnumText = { |
| | | [InsurancePolicyPayStatusEnum.WaitPay]: '待支付', |
| | | [InsurancePolicyPayStatusEnum.CompletePay]: '已支付', |
| | | }; |
| | | |
| | | export enum InsurancePolicyListPayStatusEnum { |
| | | /**待支付 */ |
| | | WaitPay = 1, |
| | | /**已支付 */ |
| | | CompletePay = 2, |
| | | } |
| | | |
| | | export const InsurancePolicyListPayStatusEnumText = { |
| | | [InsurancePolicyListPayStatusEnum.WaitPay]: '待支付', |
| | | [InsurancePolicyListPayStatusEnum.CompletePay]: '已支付', |
| | | }; |
| | |
| | | refetch, |
| | | }; |
| | | } |
| | | |
| | | type UseInsurancePolicyPayOptions = { |
| | | id: MaybeRef<string>; |
| | | }; |
| | | |
| | | export function useInsurancePolicyPay({ id }: UseInsurancePolicyPayOptions) { |
| | | const { data: insurancePolicyPayList, isLoading } = useQuery({ |
| | | queryKey: ['insuranceOrderServices/getInsurancePolicyPay', id], |
| | | queryFn: async () => { |
| | | return await insuranceOrderServices.getInsurancePolicyPay({ |
| | | id: unref(id), |
| | | }); |
| | | }, |
| | | placeholderData: () => [] as API.InsurancePolicyPayDto[], |
| | | }); |
| | | |
| | | return { |
| | | insurancePolicyPayList, |
| | | isLoading, |
| | | }; |
| | | } |
| | |
| | | }, |
| | | }, |
| | | { |
| | | path: '/InsurancePolicyStampFiles/:id', |
| | | name: 'InsurancePolicyStampFiles', |
| | | hidden: true, |
| | | component: () => import('@/views/Home/InsurancePolicyStampFiles.vue'), |
| | | meta: { |
| | | rank: 10003, |
| | | title: '保单下载', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/InsureDownloadInvoice/:id', |
| | | name: 'InsureDownloadInvoice', |
| | | hidden: true, |
| | | component: () => import('@/views/Home/InsureDownloadInvoice.vue'), |
| | | meta: { |
| | | rank: 10004, |
| | | title: '发票下载', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/InsurePayDetail/:id', |
| | | name: 'InsurePayDetail', |
| | | hidden: true, |
| | | component: () => import('@/views/Home/InsurePayDetail.vue'), |
| | | meta: { |
| | | rank: 10005, |
| | | title: '支付详情', |
| | | // rootMenu: true, |
| | | icon: 'home', |
| | | }, |
| | | }, |
| | | { |
| | | path: '/BatchChange/:id', |
| | | name: 'BatchChange', |
| | | hidden: true, |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 获取保单支付信息 GET /api/InsuranceOrder/GetInsurancePolicyPay */ |
| | | export async function getInsurancePolicyPay( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetInsurancePolicyPayParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.InsurancePolicyPayDto[]>('/api/InsuranceOrder/GetInsurancePolicyPay', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取盖章文件 GET /api/InsuranceOrder/GetInsurancePolicyStampFiles */ |
| | | export async function getInsurancePolicyStampFiles( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIgetInsurancePolicyPayParams { |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIgetInsurancePolicyStampFilesParams { |
| | | id?: string; |
| | | } |
| | |
| | | productIdNumber?: string; |
| | | /** 是否走线上流程 */ |
| | | productOnline?: boolean; |
| | | payStatus?: InsurancePolicyListPayStatusEnum; |
| | | /** 任意分批支付完成 */ |
| | | anyPayComplete?: boolean; |
| | | } |
| | | |
| | | interface GetInsurancePageOutputPageOutput { |
| | |
| | | |
| | | type InsurancePolicyAuditStatusEnum = 10 | 20 | -10; |
| | | |
| | | type InsurancePolicyListPayStatusEnum = 1 | 2; |
| | | |
| | | interface InsurancePolicyPayDto { |
| | | id?: string; |
| | | /** 订单号 */ |
| | | channelOrderNo?: string; |
| | | /** 投保单号 */ |
| | | proposalNo?: string; |
| | | /** 支付短链 */ |
| | | payUrl?: string; |
| | | /** 支付流水号 */ |
| | | payRegistrationNo?: string; |
| | | /** 保费金额 */ |
| | | sumSignPremium?: number; |
| | | status?: InsurancePolicyPayStatusEnum; |
| | | /** 保单号 */ |
| | | policyNo?: string; |
| | | /** 电子保单链接 */ |
| | | policyUrl?: string; |
| | | /** 电子保单链接 */ |
| | | policyOssUrl?: string; |
| | | /** 完成时间 */ |
| | | completionTime?: string; |
| | | /** 发票号码 */ |
| | | invoiceSerialNo?: string; |
| | | /** 发票价税合计 */ |
| | | invoicePlanFee?: number; |
| | | /** 发票下载地址 */ |
| | | invoiceDownloadUrl?: string; |
| | | /** 发票下载地址 */ |
| | | invoiceDownloadOssUrl?: string; |
| | | } |
| | | |
| | | type InsurancePolicyPayStatusEnum = 1 | 2; |
| | | |
| | | type InsurancePolicyStatusEnum = 10 | 20 | 30; |
| | | |
| | | interface InsureBatchBillDetailDto { |
| | |
| | | InsurancePolicyAuditStatusEnumText, |
| | | InsurancePolicyAuditStatusEnum, |
| | | InsurancePolicyProductIdNumberEnum, |
| | | InsurancePolicyListPayStatusEnum, |
| | | InsurancePolicyListPayStatusEnumText, |
| | | } from '@/constants'; |
| | | import dayjs from 'dayjs'; |
| | | import _ from 'lodash'; |
| | |
| | | onClick: (role) => handleDownloadInsureFile(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetInsurancePageOutput) => !row.insureBillUrl, |
| | | hide: (row: API.GetInsurancePageOutput) => row.productOnline || !row.insureBillUrl, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'payBtn', |
| | | name: '支付', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handlePay(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetInsurancePageOutput) => |
| | | row.payStatus != InsurancePolicyListPayStatusEnum.WaitPay, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'stampFilesBtn', |
| | | name: '保单下载', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handleGoStampFiles(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetInsurancePageOutput) => !(row.productOnline && row.anyPayComplete), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'downloadInvoiceBtn', |
| | | name: '发票下载', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handleGoDownloadInvoice(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetInsurancePageOutput) => !(row.productOnline && row.anyPayComplete), |
| | | }, |
| | | }, |
| | | |
| | | // { |
| | | // data: { |
| | | // enCode: 'standarEndoBtn', |
| | |
| | | formatter: (row: API.GetInsurancePageOutput) => |
| | | row.amount == null ? '' : toThousand(row.amount), |
| | | }, |
| | | payStatus: { type: 'enum', valueEnum: InsurancePolicyListPayStatusEnumText }, |
| | | }, |
| | | } |
| | | ); |
| | |
| | | // } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleGoStampFiles(row: API.GetInsurancePageOutput) { |
| | | try { |
| | | router.push({ |
| | | name: 'InsurancePolicyStampFiles', |
| | | params: { |
| | | id: row.id, |
| | | }, |
| | | }); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handlePay(row: API.GetInsurancePageOutput) { |
| | | router.push({ |
| | | name: 'InsurePayDetail', |
| | | params: { |
| | | id: row.id, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | function handleGoDownloadInvoice(row: API.GetInsurancePageOutput) { |
| | | router.push({ |
| | | name: 'InsureDownloadInvoice', |
| | | params: { |
| | | id: row.id, |
| | | }, |
| | | }); |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <LoadingLayout :loading="isLoading"> |
| | | <AppContainer> |
| | | <ProTableV2 |
| | | :columns="InsurancePolicyStampFilesColumns" |
| | | :operationBtns="operationBtns" |
| | | :tableData="insurancePolicyPayList" |
| | | :columnRenderMap="InsurancePolicyPayRenderProps" |
| | | > |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { |
| | | OperationBtnType, |
| | | ProTableV2, |
| | | LoadingLayout, |
| | | AppContainer, |
| | | useTable, |
| | | ProTableV2Props, |
| | | defineOperationBtns, |
| | | } from '@bole-core/components'; |
| | | import { useAccess, useInsurancePolicyPay } from '@/hooks'; |
| | | import { paginateList, downloadFileByUrl, setOSSLink, downloadFile } from '@/utils'; |
| | | import { InsurancePolicyStampFilesColumns } from './constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'InsurancePolicyStampFiles', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'downloadBtn', |
| | | name: '下载', |
| | | }, |
| | | emits: { onClick: (role) => handleDownload(role) }, |
| | | extraProps: { |
| | | hide: (row: API.InsurancePolicyPayDto) => !row.policyOssUrl, |
| | | }, |
| | | }, |
| | | ]); |
| | | |
| | | const route = useRoute(); |
| | | const id = route.params.id as string; |
| | | |
| | | const { insurancePolicyPayList, isLoading } = useInsurancePolicyPay({ id: id }); |
| | | |
| | | const InsurancePolicyPayRenderProps: ProTableV2Props['columnRenderMap'] = { |
| | | sumSignPremium: { type: 'money' }, |
| | | }; |
| | | |
| | | function handleDownload(row: API.InsurancePolicyPayDto) { |
| | | downloadFileByUrl(setOSSLink(row.policyOssUrl), `保单_${row.channelOrderNo}`); |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <LoadingLayout :loading="isLoading"> |
| | | <AppContainer> |
| | | <ProTableV2 |
| | | :columns="InsureDownloadInvoiceColumns" |
| | | :operationBtns="operationBtns" |
| | | :tableData="insurancePolicyPayList" |
| | | :columnRenderMap="InsurancePolicyPayRenderProps" |
| | | > |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { |
| | | OperationBtnType, |
| | | ProTableV2, |
| | | LoadingLayout, |
| | | AppContainer, |
| | | useTable, |
| | | ProTableV2Props, |
| | | defineOperationBtns, |
| | | } from '@bole-core/components'; |
| | | import { useAccess, useInsurancePolicyPay } from '@/hooks'; |
| | | import { downloadFileByUrl, setOSSLink } from '@/utils'; |
| | | import { InsureDownloadInvoiceColumns } from './constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'InsureDownloadInvoice', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'downloadBtn', |
| | | name: '下载', |
| | | }, |
| | | emits: { onClick: (role) => handleDownload(role) }, |
| | | extraProps: { |
| | | hide: (row: API.InsurancePolicyPayDto) => !row.invoiceDownloadOssUrl, |
| | | }, |
| | | }, |
| | | ]); |
| | | |
| | | const route = useRoute(); |
| | | const id = route.params.id as string; |
| | | |
| | | const { insurancePolicyPayList, isLoading } = useInsurancePolicyPay({ id: id }); |
| | | |
| | | const InsurancePolicyPayRenderProps: ProTableV2Props['columnRenderMap'] = { |
| | | invoicePlanFee: { type: 'money' }, |
| | | }; |
| | | |
| | | function handleDownload(row: API.InsurancePolicyPayDto) { |
| | | downloadFileByUrl(setOSSLink(row.invoiceDownloadOssUrl)); |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <LoadingLayout :loading="isLoading"> |
| | | <AppContainer> |
| | | <ProTableV2 |
| | | :columns="InsurePayDetailColumns" |
| | | :operationBtns="operationBtns" |
| | | :showPagination="false" |
| | | :tableData="insurancePolicyPayList" |
| | | :columnRenderMap="InsurancePolicyPayRenderProps" |
| | | > |
| | | </ProTableV2> |
| | | </AppContainer> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { |
| | | OperationBtnType, |
| | | ProTableV2, |
| | | LoadingLayout, |
| | | AppContainer, |
| | | useTable, |
| | | ProTableV2Props, |
| | | defineOperationBtns, |
| | | } from '@bole-core/components'; |
| | | import { useAccess, useInsurancePolicyPay } from '@/hooks'; |
| | | import * as insuranceOrderServices from '@/services/api/InsuranceOrder'; |
| | | import { InsurancePolicyPayStatusEnumText, InsurancePolicyPayStatusEnum } from '@/constants'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { InsurePayDetailColumns } from './constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'InsurePayDetail', |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'payBtn', |
| | | name: '支付', |
| | | }, |
| | | emits: { onClick: (role) => handlePay(role) }, |
| | | extraProps: { |
| | | hide: (row: API.InsurancePolicyPayDto) => row.status !== InsurancePolicyPayStatusEnum.WaitPay, |
| | | }, |
| | | }, |
| | | ]); |
| | | |
| | | const route = useRoute(); |
| | | const id = route.params.id as string; |
| | | |
| | | const { insurancePolicyPayList, isLoading } = useInsurancePolicyPay({ id: id }); |
| | | |
| | | const InsurancePolicyPayRenderProps: ProTableV2Props['columnRenderMap'] = { |
| | | sumSignPremium: { type: 'money' }, |
| | | status: { type: 'enum', valueEnum: InsurancePolicyPayStatusEnumText }, |
| | | }; |
| | | |
| | | function handlePay(row: API.InsurancePolicyPayDto) { |
| | | window.open(row.payUrl, '_blank'); |
| | | } |
| | | </script> |
| | |
| | | </template> |
| | | <template v-else> |
| | | <el-button @click="handleDownloadPerson()" type="primary">下载人员清单</el-button> |
| | | <el-button @click="handleDownloadOrder()" type="primary">下载保单</el-button> |
| | | <el-button v-if="detail.productOnline" @click="handleGoStampFiles()" type="primary" |
| | | >下载保单</el-button |
| | | > |
| | | <el-button v-else @click="handleDownloadOrder()" type="primary">下载保单</el-button> |
| | | </template> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | |
| | | downloadFileByUrl(setOSSLink(detail.value?.insureBillUrl)); |
| | | } |
| | | |
| | | function handleGoStampFiles() { |
| | | router.push({ |
| | | name: 'InsurancePolicyStampFiles', |
| | | params: { |
| | | id: id, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | function handleBatchChange() { |
| | | if ( |
| | | dayjs(detail.value?.effectEndTime).isBefore(dayjs()) || |
| | |
| | | width: 160, |
| | | }, |
| | | { |
| | | id: '141', |
| | | enCode: 'payStatus', |
| | | name: '支付状态', |
| | | width: 160, |
| | | }, |
| | | { |
| | | id: '15', |
| | | enCode: 'status', |
| | | name: '投保状态', |
| | |
| | | width: 160, |
| | | }, |
| | | ]).filter(Boolean); |
| | | |
| | | export const InsurancePolicyStampFilesColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'channelOrderNo', |
| | | name: '订单号', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'proposalNo', |
| | | name: '投保单号', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'sumSignPremium', |
| | | name: '保费金额', |
| | | }, |
| | | ]); |
| | | |
| | | export const InsureDownloadInvoiceColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'channelOrderNo', |
| | | name: '订单号', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'proposalNo', |
| | | name: '投保单号', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'invoiceSerialNo', |
| | | name: '发票号码', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'invoicePlanFee', |
| | | name: '价税合计', |
| | | }, |
| | | ]); |
| | | |
| | | export const InsurePayDetailColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'channelOrderNo', |
| | | name: '订单号', |
| | | }, |
| | | { |
| | | id: '2', |
| | | enCode: 'proposalNo', |
| | | name: '投保单号', |
| | | }, |
| | | { |
| | | id: '3', |
| | | enCode: 'sumSignPremium', |
| | | name: '保费金额', |
| | | }, |
| | | { |
| | | id: '4', |
| | | enCode: 'status', |
| | | name: '支付状态', |
| | | }, |
| | | ]); |