From 8299116e84cd704e28dac09d284d3fc33adca511 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期日, 25 十月 2026 12:42:29 +0800
Subject: [PATCH] feat(constants): 添加MES业务枚举常量并更新自动生成码规则

---
 src/views/wls/barcode/data.ts |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/views/wls/barcode/data.ts b/src/views/wls/barcode/data.ts
index fb7ac7f..d53696a 100644
--- a/src/views/wls/barcode/data.ts
+++ b/src/views/wls/barcode/data.ts
@@ -18,8 +18,8 @@
 import { z } from '#/adapter/form';
 import { generateBarcodeContent } from '#/api/mes/wm/barcode';
 import { DictTag } from '#/components/dict-tag';
+import CrmCustomerSelect from '#/components/crm-customer-select.vue';
 import { DvMachinerySelect } from '#/views/mes/dv/machinery/components';
-import { MdClientSelect } from '#/views/mes/md/client/components';
 import { MdItemSelect } from '#/views/mes/md/item/components';
 import { SrmSupplierSelect } from '#/views/srm/supplier/components';
 import {
@@ -76,6 +76,11 @@
     case BarcodeBizTypeEnum.STOCK: {
       bizCode = item.itemCode;
       bizName = item.itemName;
+      break;
+    }
+    case BarcodeBizTypeEnum.CLIENT: {
+      bizCode = String(item.id);
+      bizName = item.name;
       break;
     }
     default: {
@@ -301,7 +306,7 @@
     {
       fieldName: 'bizId',
       label: '瀹㈡埛',
-      component: markRaw(MdClientSelect),
+      component: markRaw(CrmCustomerSelect),
       componentProps: {
         onChange: (item: any) => syncBizDetail(formApi, item),
       },
@@ -609,6 +614,7 @@
 /** 閰嶇疆鍒楄〃鐨勫瓧娈� */
 export function useConfigGridColumns(
   onAutoGenerateChange: (
+    newValue: boolean,
     row: MesWmBarcodeConfigApi.BarcodeConfig,
   ) => Promise<boolean>,
 ): VxeTableGridOptions<MesWmBarcodeConfigApi.BarcodeConfig>['columns'] {
@@ -658,6 +664,7 @@
       cellRender: {
         name: 'CellSwitch',
         attrs: { beforeChange: onAutoGenerateChange },
+        props: { checkedValue: true, unCheckedValue: false },
       },
     },
     {

--
Gitblit v1.9.3