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/detail/data.ts | 30 +++---------------------------
1 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/src/views/crm/business/detail/data.ts b/src/views/crm/business/detail/data.ts
index cf2e3c8..78272d2 100644
--- a/src/views/crm/business/detail/data.ts
+++ b/src/views/crm/business/detail/data.ts
@@ -4,10 +4,9 @@
import type { CrmBusinessApi } from '#/api/crm/business';
import type { DescriptionItemSchema } from '#/components/description';
-import { erpPriceInputFormatter, formatDateTime } from '../../../../packages/utils/src';
+import { erpPriceInputFormatter, formatDateTime } from '@vben/utils';
import {
- DEFAULT_STATUSES,
getBusinessStatusSimpleList,
} from '#/api/crm/business/status';
@@ -95,24 +94,6 @@
},
{
fieldName: 'statusId',
- label: '鍟嗘満鐘舵��',
- component: 'Input',
- dependencies: {
- triggerFields: [''],
- show: () => false,
- },
- },
- {
- fieldName: 'endStatus',
- label: '鍟嗘満鐘舵��',
- component: 'Input',
- dependencies: {
- triggerFields: [''],
- show: () => false,
- },
- },
- {
- fieldName: 'status',
label: '鍟嗘満闃舵',
component: 'Select',
dependencies: {
@@ -121,17 +102,12 @@
const statusList = await getBusinessStatusSimpleList(
formData.value?.statusTypeId ?? 0,
);
- const statusOptions = statusList.map((item) => ({
+ const options = statusList.map((item) => ({
label: `${item.name}(璧㈠崟鐜囷細${item.percent}%)`,
value: item.id,
}));
- const options = DEFAULT_STATUSES.map((item) => ({
- label: `${item.name}(璧㈠崟鐜囷細${item.percent}%)`,
- value: item.endStatus,
- }));
- statusOptions.push(...options);
return {
- options: statusOptions,
+ options,
};
},
},
--
Gitblit v1.9.3