Browse Source

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

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

Loading…
Cancel
Save