|
|
@ -384,6 +384,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
newRow['fromLocationCode'] = item['locationCode'] |
|
|
|
newRow['uom'] = item['uom'] |
|
|
|
newRow['qty'] = item['qty'] |
|
|
|
newRow['inventoryQty'] = item['qty'] |
|
|
|
if(routeName.value == 'NoktoholdRequestMain'){ |
|
|
|
newRow['toInventoryStatus'] = "HOLD" |
|
|
|
}else if ( routeName.value == 'HoldtookRequestMain') { |
|
|
@ -606,11 +607,11 @@ const buttonTableClick = async (val, row) => { |
|
|
|
/** 添加/修改操作 */ |
|
|
|
const formRef = ref() |
|
|
|
const openForm =async (type: string, row?: number) => { |
|
|
|
InventorymoveRequestDetail.allSchemas.tableFormColumns.forEach(item=>{ |
|
|
|
if(item.field == 'qty'){ |
|
|
|
item.tableForm.disabled = routeName.value == "HoldtookRequestMain" |
|
|
|
} |
|
|
|
}) |
|
|
|
// InventorymoveRequestDetail.allSchemas.tableFormColumns.forEach(item=>{ |
|
|
|
// if(item.field == 'qty'){ |
|
|
|
// item.tableForm.disabled = routeName.value == "HoldtookRequestMain" |
|
|
|
// } |
|
|
|
// }) |
|
|
|
tableData.value = [] // 重置明细数据 |
|
|
|
formRef.value.open(type, row) |
|
|
|
} |
|
|
@ -768,6 +769,13 @@ const submitForm = async (formType, submitData) => { |
|
|
|
} |
|
|
|
formRef.value.formLoading = true |
|
|
|
try { |
|
|
|
const cmdExists = data.subList.some(filter => |
|
|
|
parseFloat(filter.inventoryQty) < parseFloat(filter.qty) |
|
|
|
); |
|
|
|
if(cmdExists){ |
|
|
|
message.warning("数量不能大于库存数量") |
|
|
|
return |
|
|
|
} |
|
|
|
if (formType === 'create') { |
|
|
|
await InventorymoveRequestMainApi.createInventorymoveRequestMain(data) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|