From c6347278c9d0ede1d88680f9c80f863bca53bb5f Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期二, 01 四月 2025 16:38:22 +0800
Subject: [PATCH] fix: bug
---
src/views/Home/components/InsureOrderInfoView.vue | 95 +++++++++++++++++++++++++++++++++--------------
1 files changed, 67 insertions(+), 28 deletions(-)
diff --git a/src/views/Home/components/InsureOrderInfoView.vue b/src/views/Home/components/InsureOrderInfoView.vue
index 18afc27..ef51a0f 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>
@@ -141,17 +144,18 @@
useFormDialog,
BlFileUpload,
UploadUserFile,
+ XLSXUtils,
} from '@bole-core/components';
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 * as insuranceClaimServices from '@/services/api/InsuranceClaim';
import { useQuery, useQueryClient } from '@tanstack/vue-query';
import { downloadFile, downloadFileByUrl, Message, OrderInputType } from '@bole-core/core';
import { setOSSLink } from '@/utils';
@@ -219,7 +223,7 @@
},
{
id: '11',
- enCode: 'serialNumber',
+ enCode: 'claimCount',
name: '鐞嗚禂',
width: 100,
},
@@ -245,11 +249,11 @@
name: '鐞嗚禂璇︽儏',
},
emits: {
- onClick: (role) => handleInsureClaimDetail(role),
+ onClick: (role) => handleDetail(role),
},
extraProps: {
hide: (row: API.GetInsuranceStaffPageTemplate) =>
- !(row.serialNumber && detail.value?.status !== InsurancePolicyStatusEnum.WaitEffect),
+ !(row.claimCount && detail.value?.status !== InsurancePolicyStatusEnum.WaitEffect),
},
},
]);
@@ -325,6 +329,10 @@
}
async function handleClear() {
try {
+ if (paginationState.total === 0) {
+ Message.warnMessage('娌℃湁闇�瑕佹竻绌虹殑鏁版嵁~');
+ return;
+ }
await Message.tipMessage('鏄惁娓呯┖浜哄憳淇℃伅');
let res = await insuranceOrderServices.clearInsuranceStaffData({
id: id,
@@ -337,18 +345,31 @@
}
async function handleUploadSuccess(response: UploadUserFile) {
try {
- // let res = await insuranceOrderServices.importInsuranceOrderData(response.url, {
- // getResponse: true,
- // responseType: 'blob',
- // });
- // if (res?.data?.size) {
- // await Message.tipMessage('瀛樺湪閿欒鏁版嵁锛屾槸鍚﹀鍑猴紵');
- // downloadFile(res.data, `閿欒浜哄憳鍚嶅崟`, 'xlsx');
- // }
- // queryClient.invalidateQueries({
- // queryKey: ['insuranceOrderServices/getInsuranceStaffList'],
- // });
- // getInsuranceStaffList();
+ let res = await insuranceOrderServices.importInsDetailStaffToList({
+ id: id,
+ url: response.url,
+ });
+ if (res?.length > 0) {
+ await Message.tipMessage('瀛樺湪閿欒鏁版嵁锛屾槸鍚﹀鍑猴紵');
+ XLSXUtils.exportToXLSX({
+ workbookDataList: res,
+ fileName: '閿欒浜哄憳鍚嶅崟',
+ workbookHeaderMap: {
+ name: '闆囧憳濮撳悕',
+ sex: '鎬у埆',
+ certType: '璇佷欢绫诲瀷',
+ certNo: '璇佷欢鍙风爜',
+ jobName: '闆囧憳宸ョ',
+ useEmploer: '鐢ㄥ伐鍗曚綅',
+ address: '鐢ㄥ伐鍦扮偣',
+ note: '澶囨敞',
+ },
+ });
+ }
+ queryClient.invalidateQueries({
+ queryKey: ['insuranceOrderServices/getInsuranceStaffList'],
+ });
+ getInsuranceStaffList();
} catch (error) {}
}
@@ -379,6 +400,11 @@
name: 'BatchChange',
params: {
id: id,
+ },
+ query: {
+ insurerName: detail.value?.insurerName ?? '',
+ insureBillNo: detail.value?.insureBillNo ?? '',
+ effectEndTime: detail.value?.effectEndTime ?? '',
},
});
}
@@ -421,16 +447,29 @@
} catch (error) {}
}
-function handleInsureClaimDetail(row: API.GetInsuranceStaffPageTemplate) {
- router.push({
- name: 'InsuranceClaimDetail',
- params: {
+const { dialogProps: dialogInsureClaimProps, handleEdit: handleInsureClaimEdit } = useFormDialog({
+ defaultFormParams: {
+ id: '',
+ routeId: '',
+ staffList: [] as API.InsuranceClaimDetailOutput[],
+ },
+});
+
+async function getInsuranceClaimDetailList(id: string) {
+ try {
+ return await insuranceClaimServices.getInsuranceClaimDetailList({ id: id });
+ } catch (error) {}
+}
+
+async function handleDetail(row: API.GetInsuranceStaffPageTemplate) {
+ try {
+ const res = await getInsuranceClaimDetailList(row.id);
+ handleInsureClaimEdit({
id: row.id,
- },
- query: {
- fromRoute: 'InsuranceOrderDetail',
- },
- });
+ staffList: res,
+ routeId: id,
+ });
+ } catch (error) {}
}
</script>
--
Gitblit v1.9.1