|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <AppContainer> | 
|---|
|  |  |  | <ProTableV2 | 
|---|
|  |  |  | v-bind="proTableProps" | 
|---|
|  |  |  | :columns="column" | 
|---|
|  |  |  | :operationBtns="operationBtns" | 
|---|
|  |  |  | :autoHeight="false" | 
|---|
|  |  |  | :tableProps="{ | 
|---|
|  |  |  | maxHeight: '400px', | 
|---|
|  |  |  | }" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </ProTableV2> | 
|---|
|  |  |  | <BatchChangeRecordDetailDialog v-bind="dialogProps"></BatchChangeRecordDetailDialog> | 
|---|
|  |  |  | </AppContainer> | 
|---|
|  |  |  | <LoadingLayout :loading="state.loading"> | 
|---|
|  |  |  | <AppContainer> | 
|---|
|  |  |  | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> | 
|---|
|  |  |  | <template #checkStatus="{ row }"> | 
|---|
|  |  |  | <el-tooltip | 
|---|
|  |  |  | class="box-item" | 
|---|
|  |  |  | effect="dark" | 
|---|
|  |  |  | :content="row.auditNote" | 
|---|
|  |  |  | placement="top-start" | 
|---|
|  |  |  | v-if="row.checkStatus === BatchBillCheckStatus.CheckTurnDown" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <div style="display: inline-flex; align-items: center"> | 
|---|
|  |  |  | {{ BatchBillCheckStatusText[row.checkStatus] }} | 
|---|
|  |  |  | <el-icon size="16" color="#3a71ff"><QuestionFilled /></el-icon> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-tooltip> | 
|---|
|  |  |  | <el-text v-else> | 
|---|
|  |  |  | {{ BatchBillCheckStatusText[row.checkStatus] }} | 
|---|
|  |  |  | </el-text> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </ProTableV2> | 
|---|
|  |  |  | <BatchChangeRecordDetailDialog v-bind="dialogProps"></BatchChangeRecordDetailDialog> | 
|---|
|  |  |  | </AppContainer> | 
|---|
|  |  |  | </LoadingLayout> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup lang="ts"> | 
|---|
|  |  |  | 
|---|
|  |  |  | defineOperationBtns, | 
|---|
|  |  |  | useFormDialog, | 
|---|
|  |  |  | } from '@bole-core/components'; | 
|---|
|  |  |  | import * as insuranceOrderServices from '@/services/api/InsuranceOrder'; | 
|---|
|  |  |  | import { OrderInputType } from '@bole-core/core'; | 
|---|
|  |  |  | import * as insureBatchBillServices from '@/services/api/InsureBatchBill'; | 
|---|
|  |  |  | import { downloadFileByUrl, Message, OrderInputType } from '@bole-core/core'; | 
|---|
|  |  |  | import BatchChangeRecordDetailDialog from './BatchChangeRecordDetailDialog.vue'; | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | BatchBillCheckStatus, | 
|---|
|  |  |  | BatchBillCheckStatusText, | 
|---|
|  |  |  | BatchChangeTypeEnumText, | 
|---|
|  |  |  | } from '@/constants'; | 
|---|
|  |  |  | import { setOSSLink } from '@/utils'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | defineOptions({ | 
|---|
|  |  |  | name: 'BatchChangeRecordView', | 
|---|
|  |  |  | 
|---|
|  |  |  | const column: API.CustomModuleColumnDto[] = [ | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '1', | 
|---|
|  |  |  | enCode: 'name', | 
|---|
|  |  |  | enCode: 'batchBillNo', | 
|---|
|  |  |  | name: '批单号', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '2', | 
|---|
|  |  |  | enCode: 'name', | 
|---|
|  |  |  | enCode: 'changeType', | 
|---|
|  |  |  | name: '批改类型', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '3', | 
|---|
|  |  |  | enCode: 'name', | 
|---|
|  |  |  | enCode: 'creationTime', | 
|---|
|  |  |  | name: '申请日期', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '4', | 
|---|
|  |  |  | enCode: 'idNumber', | 
|---|
|  |  |  | enCode: 'effectTime', | 
|---|
|  |  |  | name: '批改生效日期', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '5', | 
|---|
|  |  |  | enCode: 'idNumber', | 
|---|
|  |  |  | enCode: 'insurePersonNumber', | 
|---|
|  |  |  | name: '在保人数', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '6', | 
|---|
|  |  |  | enCode: 'idNumber', | 
|---|
|  |  |  | enCode: 'orginInsurePersonNumber', | 
|---|
|  |  |  | name: '原在保人数', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '7', | 
|---|
|  |  |  | enCode: 'idNumber', | 
|---|
|  |  |  | enCode: 'addPersonNumber', | 
|---|
|  |  |  | name: '新增', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '8', | 
|---|
|  |  |  | enCode: 'idNumber', | 
|---|
|  |  |  | enCode: 'subPersonNumber', | 
|---|
|  |  |  | name: '减少', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '9', | 
|---|
|  |  |  | enCode: 'idNumber', | 
|---|
|  |  |  | enCode: 'checkStatus', | 
|---|
|  |  |  | name: '批单状态', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | ]; | 
|---|
|  |  |  | 
|---|
|  |  |  | emits: { | 
|---|
|  |  |  | onClick: (role) => handleDetail(role), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // extraProps: { | 
|---|
|  |  |  | //   hide: (row: API.InsuranceOrderListOutput) => !row.orderBillFile, | 
|---|
|  |  |  | // }, | 
|---|
|  |  |  | extraProps: { | 
|---|
|  |  |  | hide: (row: API.InsureBatchBillDto) => row.checkStatus !== BatchBillCheckStatus.InValidate, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | data: { | 
|---|
|  |  |  | enCode: 'downloadBtn', | 
|---|
|  |  |  | name: '下载批单', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | emits: { | 
|---|
|  |  |  | onClick: (role) => handleDownload(role), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | extraProps: { | 
|---|
|  |  |  | hide: (row: API.InsureBatchBillDto) => row.checkStatus !== BatchBillCheckStatus.InValidate, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | ]); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } = useTable( | 
|---|
|  |  |  | async ({ pageIndex, pageSize }, extraParamState) => { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | let params: API.QueryInsuranceOrderPageInput = { | 
|---|
|  |  |  | let params: API.GetInsuranceBatchBillInput = { | 
|---|
|  |  |  | pageModel: { | 
|---|
|  |  |  | rows: pageSize, | 
|---|
|  |  |  | page: pageIndex, | 
|---|
|  |  |  | orderInput: extraParamState.orderInput, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | condition: extraParamState.keyWord, | 
|---|
|  |  |  | // insurePolicyOperateHistoryId: id, | 
|---|
|  |  |  | insurancePolicyId: id, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | let res = await insuranceOrderServices.getInsuranceOrderPage(params, { | 
|---|
|  |  |  | let res = await insureBatchBillServices.getInsureBatchBillList(params, { | 
|---|
|  |  |  | showLoading: !state.loading, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | return res; | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | defaultExtraParams: { | 
|---|
|  |  |  | keyWord: '', | 
|---|
|  |  |  | orderInput: [{ property: 'id', order: OrderInputType.Asc }], | 
|---|
|  |  |  | orderInput: [{ property: 'insureBatchBillId', order: OrderInputType.Asc }], | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | columnsRenderProps: {}, | 
|---|
|  |  |  | columnsRenderProps: { | 
|---|
|  |  |  | creationTime: { | 
|---|
|  |  |  | type: 'date', | 
|---|
|  |  |  | format: 'YYYY-MM-DD', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | effectTime: { | 
|---|
|  |  |  | type: 'date', | 
|---|
|  |  |  | format: 'YYYY-MM-DD', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | changeType: { | 
|---|
|  |  |  | type: 'enum', | 
|---|
|  |  |  | valueEnum: BatchChangeTypeEnumText, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | async function getInsureBatchDetail(id: string) { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | return await insureBatchBillServices.getInsureBatchDetail({ batchBillId: id }); | 
|---|
|  |  |  | } catch (error) {} | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { dialogProps, handleEdit } = useFormDialog({ | 
|---|
|  |  |  | defaultFormParams: { | 
|---|
|  |  |  | id: '', | 
|---|
|  |  |  | staffList: [] as API.InsureBatchBillDetailDto[], | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function handleDetail(row: API.InsuranceOrderListOutput) { | 
|---|
|  |  |  | handleEdit({ | 
|---|
|  |  |  | id: row.id, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | async function handleDetail(row: API.InsureBatchBillDto) { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | const res = await getInsureBatchDetail(row.insureBatchBillId); | 
|---|
|  |  |  | handleEdit({ | 
|---|
|  |  |  | id: row.insureBatchBillId, | 
|---|
|  |  |  | staffList: res.staffList, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } catch (error) {} | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | onMounted(() => { | 
|---|
|  |  |  | getBatchRefundInfoDetail(); | 
|---|
|  |  |  | function handleDownload(row: API.InsureBatchBillDto) { | 
|---|
|  |  |  | if (!row.attachmentUrl) { | 
|---|
|  |  |  | Message.errorMessage('未上传批单文件'); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | downloadFileByUrl(setOSSLink(row.attachmentUrl)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | onMounted(async () => { | 
|---|
|  |  |  | await getBatchRefundInfoDetail(); | 
|---|
|  |  |  | state.loading = false; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|