From b2b1ba0ec2e5c45cf4f37b0fcea6e23fe36f9b47 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期四, 20 三月 2025 11:24:40 +0800
Subject: [PATCH] feat: init

---
 src/views/Home/constants/index.ts |   25 +-------
 src/views/Home/Home.vue           |  102 ++++++++-------------------------
 2 files changed, 28 insertions(+), 99 deletions(-)

diff --git a/src/views/Home/Home.vue b/src/views/Home/Home.vue
index 9454328..3111cb1 100644
--- a/src/views/Home/Home.vue
+++ b/src/views/Home/Home.vue
@@ -24,7 +24,7 @@
               @change="getList()"
             />
           </QueryFilterItem>
-          <QueryFilterItem v-if="isJYB">
+          <QueryFilterItem>
             <FieldRadio
               v-model="extraParamState.insuranceType"
               :value-enum="insuranceTypeText"
@@ -37,7 +37,7 @@
             <SearchInput
               v-model="extraParamState.keyword"
               style="width: 260px"
-              :placeholder="keywordText"
+              placeholder="濮撳悕/韬唤璇�/鍗曚綅/淇濆崟鍙风瓑"
               @on-click-search="getList"
             >
             </SearchInput>
@@ -66,7 +66,6 @@
           </BlFileUpload>
 
           <el-button
-            v-if="isJYB"
             @click="handleEnterpriseBatchRefund()"
             type="primary"
             style="margin-right: 10px"
@@ -85,7 +84,7 @@
         v-bind="proTableProps"
         :columns="HomeColumns"
         :operationBtns="operationBtns"
-        :show-column-check="isJYB"
+        :show-column-check="true"
         :column-selectable="columnSelectable"
         ref="proTable"
         :table-props="{
@@ -130,12 +129,10 @@
 import { ModelValueType } from 'element-plus';
 import { useQueryClient } from '@tanstack/vue-query';
 import {
-  AppType,
   InsuranceOrderTempPath,
   JYBInsuranceOrderTempPath,
   OnJobFlagEnumText,
   insuranceTypeText,
-  isJYB,
 } from '@/constants';
 import dayjs from 'dayjs';
 import _ from 'lodash';
@@ -145,25 +142,7 @@
 });
 
 const operationBtns = defineOperationBtns([
-  // {
-  //   data: {
-  //     enCode: 'checkBtn',
-  //     name: '鐞嗚禂',
-  //   },
-  //   emits: {
-  //     onClick: (role) => goDetail(role),
-  //   },
-  // },
-  AppType === 'rz' && {
-    data: {
-      enCode: 'uploadBtn',
-      name: '涓婁紶鏉愭枡',
-    },
-    emits: {
-      onClick: (role) => openDialog(role),
-    },
-  },
-  isJYB && {
+  {
     data: {
       enCode: 'downloadBtn',
       name: '淇濆崟涓嬭浇',
@@ -176,13 +155,6 @@
     },
   },
 ]).filter(Boolean);
-
-const keywordText = computed(() => {
-  if (isJYB) {
-    return '濮撳悕/韬唤璇�/鍗曚綅/淇濆崟鍙风瓑';
-  }
-  return '濮撳悕/韬唤璇�/鍚堝悓鍗曚綅绛�';
-});
 
 const columnSelectable = (row: API.InsuranceOrderListOutput) => {
   return row.onJobFlag === '澧炲憳';
@@ -237,7 +209,7 @@
         format: 'YYYY/MM/DD',
       },
     },
-    showSummary: AppType === 'rz' || isJYB,
+    showSummary: true,
     summaryPropertys: [
       {
         property: 'table-operation',
@@ -268,44 +240,25 @@
 
 async function handleUploadSuccess(response: UploadUserFile) {
   try {
-    if (AppType === 'one') {
-      let res = await insuranceOrderServices.checkImportInsuranceOrderData(response.url);
-      if (res) {
-        let checkRes = await insuranceOrderServices.importInsuranceOrderData(response.url, {
-          getResponse: true,
-          responseType: 'blob',
-        });
-        if (checkRes?.data?.size) {
-          Message.tipMessage('瀛樺湪閿欒鏁版嵁锛屾槸鍚﹀鍑猴紵')
-            .then(() => {
-              downloadFile(checkRes.data, `閿欒浜哄憳鍚嶅崟`, 'xlsx');
-            })
-            .catch(() => {
-              getList(paginationState.pageIndex);
-            });
-        }
-      }
-    } else {
-      let res = await insuranceOrderServices.importInsuranceOrderData(response.url, {
-        getResponse: true,
-        responseType: 'blob',
-      });
-      if (res?.data?.size) {
-        await Message.tipMessage('瀛樺湪閿欒鏁版嵁锛屾槸鍚﹀鍑猴紵');
-        downloadFile(res.data, `閿欒浜哄憳鍚嶅崟`, 'xlsx');
-        // XLSXUtils.exportToXLSX({
-        //   workbookDataList: res,
-        //   fileName: '閿欒浜哄憳鍚嶅崟',
-        //   workbookHeaderMap: {
-        //     ...omit(Object.fromEntries(HomeColumns.map((x) => [x.enCode, x.name])), [
-        //       'channel',
-        //       'salesmanName',
-        //       'createTime',
-        //     ]),
-        //     erroMsg: '澶囨敞',
-        //   },
-        // });
-      }
+    let res = await insuranceOrderServices.importInsuranceOrderData(response.url, {
+      getResponse: true,
+      responseType: 'blob',
+    });
+    if (res?.data?.size) {
+      await Message.tipMessage('瀛樺湪閿欒鏁版嵁锛屾槸鍚﹀鍑猴紵');
+      downloadFile(res.data, `閿欒浜哄憳鍚嶅崟`, 'xlsx');
+      // XLSXUtils.exportToXLSX({
+      //   workbookDataList: res,
+      //   fileName: '閿欒浜哄憳鍚嶅崟',
+      //   workbookHeaderMap: {
+      //     ...omit(Object.fromEntries(HomeColumns.map((x) => [x.enCode, x.name])), [
+      //       'channel',
+      //       'salesmanName',
+      //       'createTime',
+      //     ]),
+      //     erroMsg: '澶囨敞',
+      //   },
+      // });
     }
     queryClient.invalidateQueries({
       queryKey: ['insuranceOrderServices/getInsuranceOrderListByOrderRelevance'],
@@ -356,16 +309,11 @@
 }
 
 function handleDownload() {
-  if (isJYB) {
-    downloadFileByUrl(JYBInsuranceOrderTempPath, '淇濆崟瀵煎叆妯℃澘');
-  } else {
-    downloadFileByUrl(InsuranceOrderTempPath, '淇濆崟瀵煎叆妯℃澘');
-  }
+  downloadFileByUrl(JYBInsuranceOrderTempPath, '淇濆崟瀵煎叆妯℃澘');
 }
 
 function handleRowStyle(data: { row: API.InsuranceOrderListOutput; rowIndex: number }) {
   if (
-    isJYB &&
     dayjs(dayjs(data.row?.insuranceEndTime).format('YYYY-MM-DD')).diff(dayjs(), 'day') >= 0 &&
     dayjs(dayjs(data.row?.insuranceEndTime).format('YYYY-MM-DD')).diff(dayjs(), 'day') < 6
   ) {
diff --git a/src/views/Home/constants/index.ts b/src/views/Home/constants/index.ts
index f55dcfe..f6f7668 100644
--- a/src/views/Home/constants/index.ts
+++ b/src/views/Home/constants/index.ts
@@ -1,17 +1,10 @@
 import { defineColumns } from '@bole-core/components';
-import { AppType, isJYB } from '@/constants';
 
 export const HomeColumns = defineColumns([
   {
     id: '1',
     enCode: 'channel',
     name: '娓犻亾',
-    width: 160,
-  },
-  AppType === 'rz' && {
-    id: '2',
-    enCode: 'salesmanName',
-    name: '涓氬姟鍛樺鍚�',
     width: 160,
   },
   {
@@ -44,7 +37,7 @@
     name: '瀹為檯宸ヤ綔鍗曚綅',
     width: 160,
   },
-  isJYB && {
+  {
     id: '8',
     enCode: 'workAddress',
     name: '鐢ㄥ伐鍦扮偣',
@@ -74,13 +67,13 @@
     name: '鎶曚繚鏂规',
     width: 160,
   },
-  isJYB && {
+  {
     id: '13',
     enCode: 'insuranceType',
     name: '鎶曚繚鏂瑰紡',
     width: 160,
   },
-  (AppType === 'rz' || isJYB) && {
+  {
     id: '14',
     enCode: 'orderNo',
     name: '淇濆崟鍙�',
@@ -102,18 +95,6 @@
     id: '17',
     enCode: 'age',
     name: '骞撮緞',
-    width: 160,
-  },
-  AppType !== 'other' && {
-    id: '18',
-    enCode: 'idCardCheckResult',
-    name: '韬唤璇佹牎楠�',
-    width: 160,
-  },
-  AppType !== 'other' && {
-    id: '19',
-    enCode: 'idCardRepeatResult',
-    name: '韬唤璇佹槸鍚﹂噸澶�',
     width: 160,
   },
   {

--
Gitblit v1.9.1