From 48e9b7d100ddd91a13e79e09bb5d992a62ffd026 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 13 十月 2026 14:34:16 +0800
Subject: [PATCH] fix(crm): 统一日期格式化并添加客户公海配置选项

---
 src/views/crm/contact/data.ts |   30 ++++++++++++------------------
 1 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/src/views/crm/contact/data.ts b/src/views/crm/contact/data.ts
index d3d50d5..c2d6813 100644
--- a/src/views/crm/contact/data.ts
+++ b/src/views/crm/contact/data.ts
@@ -3,14 +3,14 @@
 
 import { markRaw } from 'vue';
 
-import { DICT_TYPE } from '..\..\..\packages\constants\src';
-import { getDictOptions } from '..\..\..\packages\effects\hooks\src';
-import { useUserStore } from '..\..\..\packages\stores\src';
+import { DICT_TYPE } from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
+import { useUserStore } from '@vben/stores';
 
 import { getSimpleContactList } from '#/api/crm/contact';
-import { getCustomerSimpleList } from '#/api/crm/customer';
 import { getSimpleUserList } from '#/api/system/user';
 import { AreaCascader } from '#/components/area';
+import CrmCustomerSelect from '#/components/crm-customer-select.vue';
 
 /** 鏂板/淇敼鐨勮〃鍗� */
 export function useFormSchema(): VbenFormSchema[] {
@@ -53,12 +53,9 @@
     {
       fieldName: 'customerId',
       label: '瀹㈡埛鍚嶇О',
-      component: 'ApiSelect',
+      component: markRaw(CrmCustomerSelect),
       rules: 'required',
       componentProps: {
-        api: getCustomerSimpleList,
-        labelField: 'name',
-        valueField: 'id',
         placeholder: '璇烽�夋嫨瀹㈡埛',
       },
     },
@@ -167,8 +164,8 @@
       component: 'DatePicker',
       componentProps: {
         showTime: true,
-        format: 'YYYY-MM-DD HH:mm:ss',
-        valueFormat: 'x',
+        format: 'YYYY-MM-DD',
+        valueFormat: 'YYYY-MM-DD HH:mm:ss',
         placeholder: '璇烽�夋嫨涓嬫鑱旂郴鏃堕棿',
       },
     },
@@ -189,11 +186,8 @@
     {
       fieldName: 'customerId',
       label: '瀹㈡埛',
-      component: 'ApiSelect',
+      component: markRaw(CrmCustomerSelect),
       componentProps: {
-        api: getCustomerSimpleList,
-        labelField: 'name',
-        valueField: 'id',
         placeholder: '璇烽�夋嫨瀹㈡埛',
       },
     },
@@ -310,7 +304,7 @@
     {
       field: 'contactNextTime',
       title: '涓嬫鑱旂郴鏃堕棿',
-      formatter: 'formatDateTime',
+      formatter: 'formatDate',
       minWidth: 180,
     },
     {
@@ -330,7 +324,7 @@
     {
       field: 'contactLastTime',
       title: '鏈�鍚庤窡杩涙椂闂�',
-      formatter: 'formatDateTime',
+      formatter: 'formatDate',
       minWidth: 180,
     },
     {
@@ -346,13 +340,13 @@
     {
       field: 'updateTime',
       title: '鏇存柊鏃堕棿',
-      formatter: 'formatDateTime',
+      formatter: 'formatDate',
       minWidth: 180,
     },
     {
       field: 'createTime',
       title: '鍒涘缓鏃堕棿',
-      formatter: 'formatDateTime',
+      formatter: 'formatDate',
       minWidth: 180,
     },
     {

--
Gitblit v1.9.3