| | |
| | | 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, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | async function handleGoDownloadInvoice(row: API.GetInsurancePageOutput) { |
| | | try { |
| | | await insuranceOrderServices.getInvoiceId({ id: row.id }); |
| | | router.push({ |
| | | name: 'InsureDownloadInvoice', |
| | | params: { |
| | | id: row.id, |
| | | }, |
| | | }); |
| | | } catch (error) {} |
| | | } |
| | | </script> |