diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue index 000036fea..0b06729cc 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue @@ -1230,7 +1230,39 @@ const submitForm = async () => { message.error('请选择库位') return } - + + let TransactionType = formData.value.condition[5]['Value'] + if(Array.isArray(TransactionType)){ + TransactionType = TransactionType.join(',') + } + if(TransactionType=='Repleinment'){ + //补料--物料和库位必填 + let msg = '' + + // 判断物料必填 + let itemCodes = formData.value.condition[1]['Value'] + if(Array.isArray(itemCodes)){ + itemCodes = itemCodes.join(',') + } + if(itemCodes.trim().length<=0){ + msg = '请您选择物料' + }else if(warehouseType.value!='LocationCode'){ + // 判断库位必填 + msg = '请选择库位类型' + }else{ + let locationCodes = formData.value.configuration.LocationCode + if(Array.isArray(locationCodes)){ + locationCodes = locationCodes.join(',') + } + if(locationCodes.trim().length<=0){ + msg = '请您选择库位' + } + } + if(msg){ + message.error(msg) + return + } + } // 校验表单 if (!formRef) return const valid = await formRef.value.validate()