From 91c82965b2d987452ca276e3a03b48c8dcda2ae9 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 19 八月 2026 11:47:26 +0800
Subject: [PATCH] config(env): 更新生产环境配置和公司名称
---
src/views/crm/contract/data.ts | 46 ++++++++++++++++++++++++++++++++--------------
1 files changed, 32 insertions(+), 14 deletions(-)
diff --git a/src/views/crm/contract/data.ts b/src/views/crm/contract/data.ts
index cc5afc9..7dabc09 100644
--- a/src/views/crm/contract/data.ts
+++ b/src/views/crm/contract/data.ts
@@ -7,8 +7,10 @@
import { z } from '#/adapter/form';
import { getSimpleBusinessList } from '#/api/crm/business';
import { getSimpleContactList } from '#/api/crm/contact';
-import { getCustomerSimpleList } from '#/api/crm/customer';
import { getSimpleUserList } from '#/api/system/user';
+import CrmCustomerSelect from '#/components/crm-customer-select.vue';
+
+import { markRaw } from 'vue';
/** 鏂板/淇敼鐨勮〃鍗� */
export function useFormSchema(): VbenFormSchema[] {
@@ -59,13 +61,14 @@
{
fieldName: 'customerId',
label: '瀹㈡埛鍚嶇О',
- component: 'ApiSelect',
+ component: markRaw(CrmCustomerSelect),
rules: 'required',
componentProps: {
- api: getCustomerSimpleList,
- labelField: 'name',
- valueField: 'id',
placeholder: '璇烽�夋嫨瀹㈡埛',
+ },
+ dependencies: {
+ triggerFields: ['customerId'],
+ disabled: (values) => !!values.customerId,
},
},
{
@@ -76,7 +79,7 @@
componentProps: {
showTime: false,
format: 'YYYY-MM-DD',
- valueFormat: 'x',
+ valueFormat: 'YYYY-MM-DD',
placeholder: '璇烽�夋嫨涓嬪崟鏃ユ湡',
},
},
@@ -89,9 +92,15 @@
placeholder: '璇烽�夋嫨鍟嗘満',
},
dependencies: {
- triggerFields: ['customerId'],
- disabled: (values) => !values.customerId,
+ triggerFields: ['customerId', 'businessId'],
+ disabled: (values) => !!values.businessId || !values.customerId,
async componentProps(values) {
+ if (values.businessId && values.businessName) {
+ return {
+ options: [{ label: values.businessName, value: values.businessId }],
+ placeholder: '璇烽�夋嫨鍟嗘満',
+ };
+ }
if (!values.customerId) {
return {
options: [],
@@ -119,7 +128,7 @@
componentProps: {
showTime: false,
format: 'YYYY-MM-DD',
- valueFormat: 'x',
+ valueFormat: 'YYYY-MM-DD',
placeholder: '璇烽�夋嫨鍚堝悓寮�濮嬫椂闂�',
},
},
@@ -130,7 +139,7 @@
componentProps: {
showTime: false,
format: 'YYYY-MM-DD',
- valueFormat: 'x',
+ valueFormat: 'YYYY-MM-DD',
placeholder: '璇烽�夋嫨鍚堝悓缁撴潫鏃堕棿',
},
},
@@ -280,11 +289,8 @@
{
fieldName: 'customerId',
label: '瀹㈡埛',
- component: 'ApiSelect',
+ component: markRaw(CrmCustomerSelect),
componentProps: {
- api: getCustomerSimpleList,
- labelField: 'name',
- valueField: 'id',
placeholder: '璇烽�夋嫨瀹㈡埛',
allowClear: true,
},
@@ -409,6 +415,18 @@
},
},
{
+ title: '宸插紑绁ㄩ噾棰濓紙鍏冿級',
+ field: 'totalInvoicePrice',
+ minWidth: 150,
+ formatter: 'formatAmount2',
+ },
+ {
+ title: '鏈紑绁ㄩ噾棰濓紙鍏冿級',
+ field: 'unInvoicePrice',
+ minWidth: 140,
+ formatter: 'formatAmount2',
+ },
+ {
title: '鏈�鍚庤窡杩涙椂闂�',
field: 'contactLastTime',
minWidth: 180,
--
Gitblit v1.9.3