From d1cf2e1b5d3f56d14e5d75024ce2d054f9142b2e Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 06 八月 2026 17:54:54 +0800
Subject: [PATCH] refactor(components): 重构多个组件以提升代码质量和可维护性

---
 src/views/crm/business/index.vue |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/src/views/crm/business/index.vue b/src/views/crm/business/index.vue
index 445bd7a..7125acc 100644
--- a/src/views/crm/business/index.vue
+++ b/src/views/crm/business/index.vue
@@ -8,7 +8,7 @@
 import { Page, useVbenModal } from '@vben/common-ui';
 import { downloadFileFromBlobPart } from '@vben/utils';
 
-import { Button, message, Tabs } from 'ant-design-vue';
+import { Button, message, Tabs, Tag } from 'ant-design-vue';
 
 import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
 import {
@@ -23,6 +23,22 @@
 
 const { push } = useRouter();
 const sceneType = ref('1');
+
+const STATUS_COLORS: Record<string, string> = {
+  鎷滆: 'default',
+  鍒濇鎺ヨЕ: 'processing',
+  闇�姹傜‘璁�: 'cyan',
+  鏂规鎶ヤ环: 'orange',
+  鍟嗗姟璋堝垽: 'volcano',
+  鍚堝悓绛捐: 'success',
+  璧㈠崟: 'success',
+  杈撳崟: 'error',
+  鏃犳晥: 'default',
+};
+
+function getStatusColor(name: string): string {
+  return STATUS_COLORS[name] || 'blue';
+}
 
 const [FormModal, formModalApi] = useVbenModal({
   connectedComponent: Form,
@@ -157,6 +173,9 @@
           {{ row.customerName }}
         </Button>
       </template>
+      <template #statusName="{ row }">
+        <Tag v-if="row.statusName" :color="getStatusColor(row.statusName)">{{ row.statusName }}</Tag>
+      </template>
       <template #actions="{ row }">
         <TableAction
           :actions="[

--
Gitblit v1.9.3