From acaec313ab0e3c9381060e36bf3ce4abc606dc9a Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期五, 28 三月 2025 14:07:11 +0800 Subject: [PATCH] feat: 接口对接 --- src/views/Home/components/BatchChangeRecordView.vue | 95 ++++++++++++++++++++++++++++++++++++----------- 1 files changed, 72 insertions(+), 23 deletions(-) diff --git a/src/views/Home/components/BatchChangeRecordView.vue b/src/views/Home/components/BatchChangeRecordView.vue index 1b37424..28f8619 100644 --- a/src/views/Home/components/BatchChangeRecordView.vue +++ b/src/views/Home/components/BatchChangeRecordView.vue @@ -10,6 +10,23 @@ maxHeight: '400px', }" > + <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> @@ -25,8 +42,14 @@ useFormDialog, } from '@bole-core/components'; import * as insureBatchBillServices from '@/services/api/InsureBatchBill'; -import { OrderInputType } from '@bole-core/core'; +import { downloadFileByUrl, OrderInputType } from '@bole-core/core'; import BatchChangeRecordDetailDialog from './BatchChangeRecordDetailDialog.vue'; +import { + BatchBillCheckStatus, + BatchBillCheckStatusText, + BatchChangeTypeEnumText, +} from '@/constants'; +import { setOSSLink } from '@/utils'; defineOptions({ name: 'BatchChangeRecordView', @@ -35,47 +58,47 @@ 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: '鎵瑰崟鐘舵��', }, ]; @@ -89,9 +112,9 @@ emits: { onClick: (role) => handleDetail(role), }, - // extraProps: { - // hide: (row: API.InsureBatchBillDto) => !row.orderBillFile, - // }, + extraProps: { + hide: (row: API.InsureBatchBillDto) => row.checkStatus !== BatchBillCheckStatus.InValidate, + }, }, { data: { @@ -101,9 +124,9 @@ emits: { onClick: (role) => handleDownload(role), }, - // extraProps: { - // hide: (row: API.InsureBatchBillDto) => !row.orderBillFile, - // }, + extraProps: { + hide: (row: API.InsureBatchBillDto) => row.checkStatus !== BatchBillCheckStatus.InValidate, + }, }, ]); @@ -141,25 +164,51 @@ { 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.InsureBatchBillDto) { - handleEdit({ - id: row.insureBatchBillId, - }); +async function handleDetail(row: API.InsureBatchBillDto) { + try { + const res = await getInsureBatchDetail(row.insureBatchBillId); + handleEdit({ + id: row.insureBatchBillId, + staffList: res.staffList, + }); + } catch (error) {} } -function handleDownload(row: API.InsureBatchBillDto) {} +function handleDownload(row: API.InsureBatchBillDto) { + downloadFileByUrl(setOSSLink(row.attachmentUrl)); +} onMounted(async () => { await getBatchRefundInfoDetail(); -- Gitblit v1.9.1