From cc0e1bffc4fa5dc3f51405ef967e99c00997a18e Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期五, 28 三月 2025 17:23:40 +0800 Subject: [PATCH] feat: 接口对接 --- src/views/Home/components/InsureOrderInfoView.vue | 56 +++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 37 insertions(+), 19 deletions(-) diff --git a/src/views/Home/components/InsureOrderInfoView.vue b/src/views/Home/components/InsureOrderInfoView.vue index 18afc27..3ce3581 100644 --- a/src/views/Home/components/InsureOrderInfoView.vue +++ b/src/views/Home/components/InsureOrderInfoView.vue @@ -35,12 +35,14 @@ <ProFormCol> <ProFormColItem :span="8"> <ProFormItemV2 label="鍙備繚鏈烘瀯:" prop="insuranceOrg"> - <ProFormRadio v-model="detail.insuranceOrg" :value-enum="InsuredInstitutionEnum" /> + <!-- <ProFormRadio v-model="detail.insuranceOrg" :value-enum="InsuredInstitutionEnum" /> --> + <ProFormText v-model.trim="detail.insuranceOrg" /> </ProFormItemV2> </ProFormColItem> <ProFormColItem :span="8"> <ProFormItemV2 label="鎶曚繚鏂规:" prop="insuranceScheme"> - <ProFormRadio v-model="detail.insuranceScheme" :value-enum="InsuranceSchemeEnum" /> + <!-- <ProFormRadio v-model="detail.insuranceScheme" :value-enum="InsuranceSchemeEnum" /> --> + <ProFormText v-model.trim="detail.insuranceScheme" /> </ProFormItemV2> </ProFormColItem> <ProFormColItem :span="8"> @@ -115,6 +117,7 @@ </ProTableV2> </ChunkCell> <ChangePersonInfoDialog v-bind="dialogProps"></ChangePersonInfoDialog> + <InsureClaimDetailDialog v-bind="dialogInsureClaimProps"></InsureClaimDetailDialog> </AppScrollContainer> </LoadingLayout> </template> @@ -145,12 +148,11 @@ import { InsuranceOrderTempPath, insuranceTypeText, - InsuredInstitutionEnum, - InsuranceSchemeEnum, InsurancePolicyStatusEnum, InsurancePolicyStatusEnumText, } from '@/constants'; import ChangePersonInfoDialog from './ChangePersonInfoDialog.vue'; +import InsureClaimDetailDialog from './InsureClaimDetailDialog.vue'; import * as insuranceOrderServices from '@/services/api/InsuranceOrder'; import { useQuery, useQueryClient } from '@tanstack/vue-query'; import { downloadFile, downloadFileByUrl, Message, OrderInputType } from '@bole-core/core'; @@ -245,7 +247,7 @@ name: '鐞嗚禂璇︽儏', }, emits: { - onClick: (role) => handleInsureClaimDetail(role), + onClick: (role) => handleDetail(role), }, extraProps: { hide: (row: API.GetInsuranceStaffPageTemplate) => @@ -337,10 +339,17 @@ } async function handleUploadSuccess(response: UploadUserFile) { try { - // let res = await insuranceOrderServices.importInsuranceOrderData(response.url, { - // getResponse: true, - // responseType: 'blob', - // }); + let res = await insuranceOrderServices.importInsDetailStaffToList( + { + id: id, + url: response.url, + }, + { + getResponse: true, + responseType: 'blob', + } + ); + console.log('res: ', res); // if (res?.data?.size) { // await Message.tipMessage('瀛樺湪閿欒鏁版嵁锛屾槸鍚﹀鍑猴紵'); // downloadFile(res.data, `閿欒浜哄憳鍚嶅崟`, 'xlsx'); @@ -379,6 +388,10 @@ name: 'BatchChange', params: { id: id, + }, + query: { + insurerName: detail.value?.insurerName ?? '', + insureBillNo: detail.value?.insureBillNo ?? '', }, }); } @@ -421,16 +434,21 @@ } catch (error) {} } -function handleInsureClaimDetail(row: API.GetInsuranceStaffPageTemplate) { - router.push({ - name: 'InsuranceClaimDetail', - params: { - id: row.id, - }, - query: { - fromRoute: 'InsuranceOrderDetail', - }, - }); +const { dialogProps: dialogInsureClaimProps, handleEdit: handleInsureClaimEdit } = useFormDialog({ + defaultFormParams: { + id: '', + staffList: [] as API.InsureBatchBillDetailDto[], + }, +}); + +async function handleDetail(row: API.InsureBatchBillDto) { + try { + // const res = await getInsureBatchDetail(row.insureBatchBillId); + handleInsureClaimEdit({ + id: row.insureBatchBillId, + staffList: [], + }); + } catch (error) {} } </script> -- Gitblit v1.9.1