From c77086ad2d7949ab36dd0c4e0b59907e672dd64f Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 18 九月 2026 15:04:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'refs/remotes/origin/dev_pro2.0' into dev_宁夏_九泓化工
---
src/views/mes/process-design/route/data.ts | 52 ++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 38 insertions(+), 14 deletions(-)
diff --git a/src/views/mes/process-design/route/data.ts b/src/views/mes/process-design/route/data.ts
index 941a2be..3f99c03 100644
--- a/src/views/mes/process-design/route/data.ts
+++ b/src/views/mes/process-design/route/data.ts
@@ -205,12 +205,21 @@
fieldName: "linkType",
label: "涓庝笅閬撳伐搴忓叧绯�",
component: "Select",
+ help: () =>
+ h(
+ "div",
+ {
+ style:
+ "white-space: pre-line; max-width: 320px; line-height: 1.6;",
+ },
+ "0=寮�濮�-寮�濮�(SS)锛氭湰宸ュ簭寮�濮嬪悗锛屼笅閬撳伐搴忔墠鑳藉紑濮嬶紙鍙噸鍙犲苟琛屽紑宸ワ級\n1=缁撴潫-缁撴潫(FF)锛氫笅閬撳伐搴忓繀椤荤瓑鍒版湰宸ュ簭缁撴潫鎵嶈兘缁撴潫锛堝苟琛屼絾鍚屾瀹屽伐锛塡n2=寮�濮�-缁撴潫(SF)锛氭湰宸ュ簭寮�濮嬪悗锛屼笅閬撳伐搴忔墠鑳界粨鏉焅n3=缁撴潫-寮�濮�(FS)锛氭湰宸ュ簭缁撴潫鍚庯紝涓嬮亾宸ュ簭鎵嶈兘寮�濮嬶紙榛樿鍊硷級",
+ ),
componentProps: {
allowClear: true,
options: getDictOptions(DICT_TYPE.MES_PRO_LINK_TYPE, "number"),
placeholder: "璇烽�夋嫨",
},
- rules: z.number().default(3),
+ rules: z.number().optional(),
},
{
fieldName: "colorCode",
@@ -401,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",
@@ -414,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