Browse Source

HL-5524库存移动记录(新)无法移动线边的负数库存记录

hella_online_20240821
wangyufei 1 month ago
parent
commit
5559705ffa
  1. 17
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue
  2. 4
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts

17
src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue

@ -325,7 +325,6 @@ const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
//true0
const flag = ref()
//
const submitForm = async (formType, submitData) => {
@ -334,15 +333,20 @@ const submitForm = async (formType, submitData) => {
data.id = data.masterId
}
data.subList = tableData.value //
let flag = false
data.subList.forEach(item => {
item.toBatch = item.fromBatch
item.fromLocationCode = data.fromLocationCode
item.toLocationCode = data.toLocationCode
item.toInventoryStatus = data.toInventoryStatus
if(item.qty == 0){
message.error(`数量不能为0!`)
flag.value = true
if(item.checkQty>0&&Number(item.qty)==0){
message.error(`${item['itemCode']}数量不能为0!`)
flag = true
return;
}
if(item.checkQty>0&&item.qty<0){
message.error(`${item['itemCode']}数量不能小于0!`)
flag = true
return;
}
})
@ -351,7 +355,7 @@ const submitForm = async (formType, submitData) => {
message.warning('从库位和到库位不能相同')
return
}
if(flag.value){
if(flag){
formRef.value.formLoading = false
return
}
@ -387,6 +391,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['fromInventoryStatus'] = item['inventoryStatus']
newRow['origin_fromLocationCode'] = item['locationCode']
newRow['uom'] = item['uom']
newRow['checkQty'] = item['qty'] // HL-5524
newRow['qty'] = item['qty']
if(item['packingNumber']&&item['packingNumber'].length>0){
newRow['packUnit'] = item['packUnit']

4
src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts

@ -411,14 +411,14 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
form: {
component: 'InputNumber',
componentProps: {
min: 0,
// min: 0,
precision: 6
}
},
tableForm: {
disabled: false,
type: 'InputNumber',
min: 0,
// min: 0,
precision: 6
}
},

Loading…
Cancel
Save