From 6738e8f5a78431e41fed28e6b795e70c2396070a Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 03 九月 2026 17:27:23 +0800
Subject: [PATCH] refactor(mes): 优化工艺路线配置与工单表单功能
---
src/views/mes/process-design/route/data.ts | 41 ++++++++++++++++++++++++++++-------------
1 files changed, 28 insertions(+), 13 deletions(-)
diff --git a/src/views/mes/process-design/route/data.ts b/src/views/mes/process-design/route/data.ts
index 7990b1e..2210b59 100644
--- a/src/views/mes/process-design/route/data.ts
+++ b/src/views/mes/process-design/route/data.ts
@@ -410,8 +410,11 @@
];
}
-/** 宸ヨ壓璺嚎浜у搧琛ㄥ崟 */
-export function useRouteProductFormSchema(onItemChange?: (item: any) => void): VbenFormSchema[] {
+/** 宸ヨ壓璺嚎浜у搧琛ㄥ崟锛沵ultiple = true锛堟柊澧炴ā寮忥級鏃朵骇鍝佸彲澶氶�夛紝涓�娆℃�х粦瀹氬涓� */
+export function useRouteProductFormSchema(
+ onItemChange?: (item: any) => void,
+ multiple = false,
+): VbenFormSchema[] {
return [
{
fieldName: "id",
@@ -423,17 +426,29 @@
component: "Input",
dependencies: { triggerFields: [""], show: () => false },
},
- // 浜у搧鐗╂枡锛氫娇鐢ㄤ笟鍔¤嚜瀹氫箟閫夋嫨鍣紝change 鍥炲~缂栫爜/鍚嶇О/瑙勬牸/鍗曚綅
- {
- fieldName: "itemId",
- label: "浜у搧",
- component: markRaw(MdItemSelect),
- componentProps: {
- onChange: onItemChange,
- },
- formItemClass: "col-span-2",
- rules: "selectRequired",
- },
+ // 鏂板锛堝閫夛級锛氫竴娆$粦瀹氬涓骇鍝侊紱缂栬緫锛堝崟閫夛級锛歝hange 鍥炲~缂栫爜/鍚嶇О/瑙勬牸/鍗曚綅
+ multiple
+ ? {
+ fieldName: "itemIds",
+ label: "浜у搧锛堝彲澶氶�夛級",
+ component: markRaw(MdItemSelect),
+ componentProps: {
+ multiple: true,
+ placeholder: "璇烽�夋嫨瑕佺粦瀹氱殑浜у搧锛堝彲澶氶�夛級",
+ },
+ formItemClass: "col-span-2",
+ rules: "selectRequired",
+ }
+ : {
+ fieldName: "itemId",
+ label: "浜у搧",
+ component: markRaw(MdItemSelect),
+ componentProps: {
+ onChange: onItemChange,
+ },
+ formItemClass: "col-span-2",
+ rules: "selectRequired",
+ },
{
fieldName: "quantity",
label: "鐢熶骇鏁伴噺",
--
Gitblit v1.9.3