From 78caa769e452f63288743b8997f7b4c21bb06ce5 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 06 十一月 2026 19:00:38 +0800
Subject: [PATCH] feat(crm,mes): 扩展客户字段与重构批次号生成逻辑

---
 src/views/mes/pro/batch/data.ts |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/views/mes/pro/batch/data.ts b/src/views/mes/pro/batch/data.ts
index 4be0fd3..bbf92d4 100644
--- a/src/views/mes/pro/batch/data.ts
+++ b/src/views/mes/pro/batch/data.ts
@@ -80,6 +80,8 @@
   existingBinding?: BindingMode,
 ): VbenFormSchema[] {
   const disabled = formType === 'detail';
+  // 鎵规鍙蜂粎鍦ㄦ柊澧炪�佽ˉ褰曟椂鍏佽浜哄伐杈撳叆锛涚暀绌虹敱鍚庣鎸夈�屽勾浠�+3浣嶆祦姘淬�嶈嚜鍔ㄧ敓鎴�
+  const codeEditable = formType === 'create' || formType === 'fill';
   return [
     {
       fieldName: 'id',
@@ -94,12 +96,9 @@
       label: '鎵规鍙�',
       component: 'Input',
       componentProps: {
-        disabled: true,
-        placeholder: '琛ュ綍鍚庤嚜鍔ㄧ敓鎴�',
-      },
-      dependencies: {
-        triggerFields: [''],
-        show: () => formType !== 'create',
+        disabled: !codeEditable,
+        maxlength: 7,
+        placeholder: codeEditable ? '鐣欑┖鑷姩鐢熸垚锛屽 2026001' : '鎵规鍙疯嚜鍔ㄧ敓鎴�',
       },
     },
     {
@@ -276,7 +275,6 @@
 /** 鍒楄〃鐨勬悳绱㈣〃鍗� */
 export function useGridFormSchema(): VbenFormSchema[] {
   return [
-    { fieldName: 'businessCode', label: '涓氬姟鐮�', component: 'Input', componentProps: { allowClear: true, placeholder: '璇疯緭鍏ヤ綔涓氭壂鐮佷笟鍔$爜' } },
     {
       fieldName: 'code',
       label: '鎵规鍙�',
@@ -346,7 +344,6 @@
 /** 鍒楄〃鐨勫瓧娈� */
 export function useGridColumns(): VxeTableGridOptions<MesProBatchApi.Batch>['columns'] {
   return [
-    { field: 'businessCode', title: '涓氬姟鐮侊紙浣滀笟鎵爜锛�', minWidth: 210 },
     {
       field: 'code',
       title: '鎵规鍙�',
@@ -354,6 +351,13 @@
       minWidth: 200,
       slots: { default: 'code' },
     },
+    {
+      field: 'palletCodes',
+      title: '鎵樼洏鐮�',
+      minWidth: 200,
+      showOverflow: 'tooltip',
+      slots: { default: 'palletCodes' },
+    },
     { field: 'itemName', title: '鍝佺鍚嶇О', minWidth: 150 },
     { field: 'itemCode', title: '鍝佺缂栫爜', minWidth: 150 },
     {

--
Gitblit v1.9.3