From 0b7ccd0f64efad4c87b21fefa4ea20d76681eb91 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Thu, 14 Nov 2024 16:09:37 +0800 Subject: [PATCH] =?UTF-8?q?YT-743:=20=E8=A1=A5=E6=96=99=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repairMaterialStrategy/AddForm.vue | 73 ++++++++++++------- 1 file changed, 48 insertions(+), 25 deletions(-) diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue index 9390c60b5..f2be85f3a 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue @@ -99,37 +99,21 @@ - - + + + + + + + + + + + + + @@ -320,7 +325,7 @@ const formData = ref({ //规则条件集合 condition: [ // 物料类型/物料分组/物料/abc类/项目/ - { ParamCode: 'ItemGroup', Operator: 'IN', Value: '' }, + { ParamCode: 'itemType', Operator: 'IN', Value: '' }, // 仓库 { ParamCode: 'LocationCode', Operator: 'IN', Value: '' } ], @@ -332,7 +337,11 @@ const formData = ref({ // 安全库存 SafetyQty: 0, // 补料数量 - FeedQty: 0 + FeedQty: 0, + // 自动补料 + autoFeed: false, + // 邮件提醒 + emailNotification: true } }) @@ -370,9 +379,9 @@ const options = reactive({ // 物料类型列表 itemTypeOptions: [ - { value: 'ItemGroup', label: '物料分组' }, - { value: 'ItemCode', label: '物料' }, - { value: 'Project', label: '项目' } + { value: 'ItemType', label: '物料类型' }, + { value: 'ItemStatus', label: '物料状态' }, + { value: 'ItemCode', label: '物料' } ], //仓库列表 @@ -593,7 +602,11 @@ const resetForm = () => { // 安全库存 SafetyQty: 0, // 补料数量 - FeedQty: 0 + FeedQty: 0, + // 自动补料 + autoFeed: false, + // 邮件提醒 + emailNotification: true } } } @@ -609,6 +622,16 @@ const validatorNum = (rule: any, value: any, callback: any) => { callback() } } + +// 添加自定义验证函数 +const validateFeedQty = (rule, value, callback) => { + if (formData.value.configuration.autoFeed && value <= 0) { + callback(new Error('自动补料开启时,补料数量必须大于0')) + } else { + callback() + } +} +