From efb39fe52a9829815bb0b82fb5b920cd3b552c2f Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 14 十月 2025 15:12:34 +0800
Subject: [PATCH] fix: 修改投保方式

---
 src/views/Home/Home.vue |   32 ++++++++++++++++++++++++++++----
 1 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/src/views/Home/Home.vue b/src/views/Home/Home.vue
index 822087a..b9b7bf6 100644
--- a/src/views/Home/Home.vue
+++ b/src/views/Home/Home.vue
@@ -113,6 +113,7 @@
     <UploadInsurePersonDialog v-bind="dialogProps" />
     <UploadStampFileDialog v-bind="dialogStampFileProps" />
     <InsureInstructionsDialog v-bind="dialogInstructionsProps" />
+    <InsureLineModeSelectDialog v-bind="dialogLineModeSelectProps" />
   </LoadingLayout>
 </template>
 
@@ -135,7 +136,7 @@
 } from '@bole-core/components';
 import * as insuranceOrderServices from '@/services/api/InsuranceOrder';
 import { Message, OrderInputType, downloadFileByUrl } from '@bole-core/core';
-import { columns } from './constants';
+import { columns, InsureLineMode } from './constants';
 import UploadInsurePersonDialog from './components/UploadInsurePersonDialog.vue';
 import UploadStampFileDialog from './components/UploadStampFileDialog.vue';
 import {
@@ -166,6 +167,7 @@
 import dayjs from 'dayjs';
 import _ from 'lodash';
 import InsureInstructionsDialog from './components/InsureInstructionsDialog.vue';
+import InsureLineModeSelectDialog from './components/InsureLineModeSelectDialog.vue';
 import { useInsureProductSchemeAllList, useUserInsureProductSetting } from '@/hooks';
 // import { Recorder } from '@/utils/record';
 
@@ -205,8 +207,16 @@
       onClick: (role) => handleUploadStampFile(role),
     },
     extraProps: {
-      hide: (row: API.GetInsurancePageOutput) =>
-        row.status !== InsurancePolicyStatusEnum.WaitEffect,
+      hide: (row: API.GetInsurancePageOutput) => {
+        if (row.productOnline) {
+          return (
+            row.auditStatus !== InsurancePolicyAuditStatusEnum.WaitAdd &&
+            row.auditStatus !== InsurancePolicyAuditStatusEnum.WaitAudit
+          );
+        } else {
+          return row.status !== InsurancePolicyStatusEnum.WaitEffect;
+        }
+      },
     },
   },
   {
@@ -477,13 +487,27 @@
   } catch (error) {}
 }
 
+const { dialogProps: dialogLineModeSelectProps, dialogState: dialogLineModeSelectState } =
+  useDialog({
+    onConfirm: handleLineModeSelect,
+  });
+
+async function handleLineModeSelect(mode: InsureLineMode) {
+  if (mode === InsureLineMode.OnLine) {
+    dialogInstructionsState.dialogVisible = true;
+  } else {
+    handleUpload();
+  }
+}
+
 const { dialogProps: dialogInstructionsProps, dialogState: dialogInstructionsState } = useDialog({
   onConfirm: handleUpload,
 });
 
 function handleOpenInstructions() {
   if (isSjbAccount.value) {
-    dialogInstructionsState.dialogVisible = true;
+    // dialogInstructionsState.dialogVisible = true;
+    dialogLineModeSelectState.dialogVisible = true;
   } else {
     handleUpload();
   }

--
Gitblit v1.9.1