From a241b66efcc41e973290a6722fb7a4d79b833ea1 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 13 十月 2026 09:54:32 +0800
Subject: [PATCH] feat(bi): 为图表配置接口添加名称字段

---
 src/views/crm/contract/data.ts |   45 ++++++++++++++++++++++++++++++++++-----------
 1 files changed, 34 insertions(+), 11 deletions(-)

diff --git a/src/views/crm/contract/data.ts b/src/views/crm/contract/data.ts
index de4629d..d87c188 100644
--- a/src/views/crm/contract/data.ts
+++ b/src/views/crm/contract/data.ts
@@ -66,6 +66,10 @@
       componentProps: {
         placeholder: '璇烽�夋嫨瀹㈡埛',
       },
+      dependencies: {
+        triggerFields: ['customerId'],
+        disabled: (values) => !!values.customerId,
+      },
     },
     {
       fieldName: 'orderDate',
@@ -75,7 +79,7 @@
       componentProps: {
         showTime: false,
         format: 'YYYY-MM-DD',
-        valueFormat: 'x',
+        valueFormat: 'YYYY-MM-DD',
         placeholder: '璇烽�夋嫨涓嬪崟鏃ユ湡',
       },
     },
@@ -88,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: [],
@@ -118,7 +128,7 @@
       componentProps: {
         showTime: false,
         format: 'YYYY-MM-DD',
-        valueFormat: 'x',
+        valueFormat: 'YYYY-MM-DD',
         placeholder: '璇烽�夋嫨鍚堝悓寮�濮嬫椂闂�',
       },
     },
@@ -129,7 +139,7 @@
       componentProps: {
         showTime: false,
         format: 'YYYY-MM-DD',
-        valueFormat: 'x',
+        valueFormat: 'YYYY-MM-DD',
         placeholder: '璇烽�夋嫨鍚堝悓缁撴潫鏃堕棿',
       },
     },
@@ -316,6 +326,7 @@
 
 export function useGridColumns(): VxeTableGridOptions['columns'] {
   return [
+    { type: 'checkbox', width: 50, fixed: 'left' },
     {
       title: '鍚堝悓缂栧彿',
       field: 'no',
@@ -358,19 +369,19 @@
       title: '涓嬪崟鏃堕棿',
       field: 'orderDate',
       minWidth: 120,
-      formatter: 'formatDateTime',
+      formatter: 'formatDate',
     },
     {
       title: '鍚堝悓寮�濮嬫椂闂�',
       field: 'startTime',
       minWidth: 120,
-      formatter: 'formatDateTime',
+      formatter: 'formatDate',
     },
     {
       title: '鍚堝悓缁撴潫鏃堕棿',
       field: 'endTime',
       minWidth: 120,
-      formatter: 'formatDateTime',
+      formatter: 'formatDate',
     },
     {
       title: '瀹㈡埛绛剧害浜�',
@@ -405,10 +416,22 @@
       },
     },
     {
+      title: '宸插紑绁ㄩ噾棰濓紙鍏冿級',
+      field: 'totalInvoicePrice',
+      minWidth: 150,
+      formatter: 'formatAmount2',
+    },
+    {
+      title: '鏈紑绁ㄩ噾棰濓紙鍏冿級',
+      field: 'unInvoicePrice',
+      minWidth: 140,
+      formatter: 'formatAmount2',
+    },
+    {
       title: '鏈�鍚庤窡杩涙椂闂�',
       field: 'contactLastTime',
       minWidth: 180,
-      formatter: 'formatDateTime',
+      formatter: 'formatDate',
     },
     {
       title: '璐熻矗浜�',
@@ -424,13 +447,13 @@
       title: '鏇存柊鏃堕棿',
       field: 'updateTime',
       minWidth: 180,
-      formatter: 'formatDateTime',
+      formatter: 'formatDate',
     },
     {
       title: '鍒涘缓鏃堕棿',
       field: 'createTime',
       minWidth: 180,
-      formatter: 'formatDateTime',
+      formatter: 'formatDate',
     },
     {
       title: '鍒涘缓浜�',

--
Gitblit v1.9.3