Browse Source

YT-595隔离转合格,新增,数量改为可以修改编辑

intex_online20241111
zhaoyiran 4 weeks ago
parent
commit
6e31ca6545
  1. 18
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

18
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

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

Loading…
Cancel
Save