Browse Source

优先校验补料

hella_online_20240919
yufei_wang 2 months ago
parent
commit
5d9eee0f3c
  1. 64
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

64
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

@ -1210,6 +1210,37 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
/** 提交表单 */ /** 提交表单 */
const emit = defineEmits(['success']) // success const emit = defineEmits(['success']) // success
const submitForm = async () => { const submitForm = async () => {
let TransactionType = formData.value.condition[5]['Value']
if(Array.isArray(TransactionType)){
TransactionType = TransactionType.join(',')
}
if(TransactionType=='Repleinment'){
//--
let msg = ''
let itemCodeType = formData.value.condition[1]['ParamCode']
let itemCodes = formData.value.condition[1]['Value']
if(Array.isArray(itemCodes)){
itemCodes = itemCodes.join(',')
}
let locationCodes = formData.value.configuration.LocationCode
if(Array.isArray(locationCodes)){
locationCodes = locationCodes.join(',')
}
if(itemCodeType!='ItemCode'){
msg = '请选择物料'
}else if(itemCodes.trim().length<=0){
msg = '请您选择物料'
}else if(warehouseType.value!='LocationCode'){
//
msg = '请选择库位'
}else if(locationCodes.trim().length<=0){
msg = '请您选择库位'
}
if(msg){
message.error(msg)
return
}
}
await blurWarehouse() await blurWarehouse()
// await blurTransactionType() // await blurTransactionType()
if(warehouseType.value == 'WarehouseCode' && !formData.value.configuration.WarehouseCode){ if(warehouseType.value == 'WarehouseCode' && !formData.value.configuration.WarehouseCode){
@ -1231,38 +1262,7 @@ const submitForm = async () => {
return 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 if (!formRef) return
const valid = await formRef.value.validate() const valid = await formRef.value.validate()

Loading…
Cancel
Save