From babd7a49ba48c83334bbe9a4c992d784e062f6e3 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期五, 04 七月 2025 14:33:47 +0800 Subject: [PATCH] fix: 江佑保系统健壮性修复 --- src/views/Home/Home.vue | 75 +++++++++++++++++++++---------------- 1 files changed, 43 insertions(+), 32 deletions(-) diff --git a/src/views/Home/Home.vue b/src/views/Home/Home.vue index ddd83ce..de84ceb 100644 --- a/src/views/Home/Home.vue +++ b/src/views/Home/Home.vue @@ -27,7 +27,7 @@ <QueryFilterItem> <FieldRadio v-model="extraParamState.auditStatus" - :value-enum="InsurancePolicyAuditStatusEnumText" + :value-enum="InsurancePolicyAuditStatusEnumTextForFilter" buttonStyle showAllBtn @change="getList()" @@ -58,6 +58,7 @@ type="primary" style="margin-right: 10px" link + v-if="isSjbAccount" >鑱屼笟绫诲瀷瀵圭収琛�</el-button > <el-button @click="handleDownload()" type="primary" style="margin-right: 10px" link @@ -153,6 +154,7 @@ InsurancePolicyStatusEnum, AppType, InsurancePolicyAuditStatusEnumText, + InsurancePolicyAuditStatusEnumTextForFilter, InsurancePolicyAuditStatusEnum, InsurancePolicyProductIdNumberEnum, InsurancePolicyListPayStatusEnum, @@ -162,6 +164,7 @@ import dayjs from 'dayjs'; import _ from 'lodash'; import InsureInstructionsDialog from './components/InsureInstructionsDialog.vue'; +import { useUserInsureProductSetting } from '@/hooks'; // import { Recorder } from '@/utils/record'; defineOptions({ @@ -395,38 +398,40 @@ timeout: 60 * 1000 * 10, }); if (res) { + // await Message.tipMessage('瀛樺湪閿欒鏁版嵁锛屾槸鍚﹀鍑猴紵'); + try { + if (res.errorList.length > 0) { + await Message.tipMessage( + `鎬绘姇淇濅汉鏁�${res.importAllCount}浜猴紝鎶曚繚鎴愬姛${res.successCount}浜猴紝鎶曚繚澶辫触${res.errorList.length}浜烘槸鍚﹀鍑烘姇淇濆け璐ヤ汉鍛樻竻鍗曪紵`, + { + confirmButtonText: '瀵煎嚭', + } + ); + XLSXUtils.exportToXLSX({ + workbookDataList: res.errorList, + fileName: '閿欒浜哄憳鍚嶅崟', + workbookHeaderMap: { + name: '闆囧憳濮撳悕', + sex: '鎬у埆', + certType: '璇佷欢绫诲瀷', + certNo: '璇佷欢鍙风爜', + jobName: '闆囧憳宸ョ', + useEmploer: '鐢ㄥ伐鍗曚綅', + address: '鐢ㄥ伐鍦扮偣', + note: '澶囨敞', + }, + }); + } else { + await Message.tipMessage( + `鎬绘姇淇濅汉鏁�${res.importAllCount}浜猴紝鎶曚繚鎴愬姛${res.successCount}浜篳, + { + showCancelButton: false, + } + ); + } + } catch (error) {} dialogState.dialogVisible = false; getList(paginationState.pageIndex); - // await Message.tipMessage('瀛樺湪閿欒鏁版嵁锛屾槸鍚﹀鍑猴紵'); - if (res.errorList.length > 0) { - await Message.tipMessage( - `鎬绘姇淇濅汉鏁�${res.importAllCount}浜猴紝鎶曚繚鎴愬姛${res.successCount}浜猴紝鎶曚繚澶辫触${res.errorList.length}浜烘槸鍚﹀鍑烘姇淇濆け璐ヤ汉鍛樻竻鍗曪紵`, - { - confirmButtonText: '瀵煎嚭', - } - ); - XLSXUtils.exportToXLSX({ - workbookDataList: res.errorList, - fileName: '閿欒浜哄憳鍚嶅崟', - workbookHeaderMap: { - name: '闆囧憳濮撳悕', - sex: '鎬у埆', - certType: '璇佷欢绫诲瀷', - certNo: '璇佷欢鍙风爜', - jobName: '闆囧憳宸ョ', - useEmploer: '鐢ㄥ伐鍗曚綅', - address: '鐢ㄥ伐鍦扮偣', - note: '澶囨敞', - }, - }); - } else { - await Message.tipMessage( - `鎬绘姇淇濅汉鏁�${res.importAllCount}浜猴紝鎶曚繚鎴愬姛${res.successCount}浜篳, - { - showCancelButton: false, - } - ); - } } } catch (error) {} } @@ -435,8 +440,14 @@ onConfirm: handleUpload, }); +const { isSjbAccount } = useUserInsureProductSetting(); + function handleOpenInstructions() { - dialogInstructionsState.dialogVisible = true; + if (isSjbAccount.value) { + dialogInstructionsState.dialogVisible = true; + } else { + handleUpload(); + } } async function handleUpload() { -- Gitblit v1.9.1