From c5db127ed8bd5e9960afe8e2df0b5cd361b2dfc1 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 17 七月 2026 15:31:55 +0800
Subject: [PATCH] 银川 1.客户管理选择框复用组件应用
---
src/views/crm/receivable/data.ts | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/src/views/crm/receivable/data.ts b/src/views/crm/receivable/data.ts
index b85771d..e1e0255 100644
--- a/src/views/crm/receivable/data.ts
+++ b/src/views/crm/receivable/data.ts
@@ -6,12 +6,14 @@
import { useUserStore } from '@vben/stores';
import { getContractSimpleList } from '#/api/crm/contract';
-import { getCustomerSimpleList } from '#/api/crm/customer';
import {
getReceivablePlan,
getReceivablePlanSimpleList,
} from '#/api/crm/receivable/plan';
import { getSimpleUserList } from '#/api/system/user';
+import CrmCustomerSelect from '#/components/crm-customer-select.vue';
+
+import { markRaw } from 'vue';
/** 鏂板/淇敼鐨勮〃鍗� */
export function useFormSchema(): VbenFormSchema[] {
@@ -55,12 +57,9 @@
{
fieldName: 'customerId',
label: '瀹㈡埛鍚嶇О',
- component: 'ApiSelect',
+ component: markRaw(CrmCustomerSelect),
rules: 'required',
componentProps: (_values, form) => ({
- api: getCustomerSimpleList,
- labelField: 'name',
- valueField: 'id',
placeholder: '璇烽�夋嫨瀹㈡埛',
onChange: () => {
form.setFieldValue('contractId', undefined);
@@ -216,11 +215,8 @@
{
fieldName: 'customerId',
label: '瀹㈡埛',
- component: 'ApiSelect',
+ component: markRaw(CrmCustomerSelect),
componentProps: {
- api: getCustomerSimpleList,
- labelField: 'name',
- valueField: 'id',
placeholder: '璇烽�夋嫨瀹㈡埛',
allowClear: true,
},
--
Gitblit v1.9.3