|
@ -171,10 +171,10 @@ const getFromLocationList = () => { |
|
|
} |
|
|
} |
|
|
const fromLocationUpdate = (fromlocation) => { |
|
|
const fromLocationUpdate = (fromlocation) => { |
|
|
const location = fromLocationList.value.find((r) => r == fromlocation) |
|
|
const location = fromLocationList.value.find((r) => r == fromlocation) |
|
|
if (location == undefined) { |
|
|
// if (location == undefined) { |
|
|
fromLocationCode.value = '' |
|
|
// showErrorMessage(`发货库位【${fromlocation}】不存在`) |
|
|
showErrorMessage(`发货库位【${fromlocation}】不存在`) |
|
|
// } |
|
|
} |
|
|
fromLocationCode.value = fromlocation |
|
|
} |
|
|
} |
|
|
const onScan = (result) => { |
|
|
const onScan = (result) => { |
|
|
try { |
|
|
try { |
|
@ -230,7 +230,29 @@ const afterGetBalance = (label, balance, packageInfo) => { |
|
|
const packingCode = label.packingNumber |
|
|
const packingCode = label.packingNumber |
|
|
const lot = label.batch |
|
|
const lot = label.batch |
|
|
const item = toLocation.value.Items.find((r) => r.itemCode == itemCode) |
|
|
const item = toLocation.value.Items.find((r) => r.itemCode == itemCode) |
|
|
const fromLocation = item.Locations.find((l) => l.fromLocationCode == fromLocationCode.value) |
|
|
let fromLocation = item.Locations.find((l) => l.fromLocationCode == fromLocationCode.value) |
|
|
|
|
|
if(!fromLocation){ |
|
|
|
|
|
fromLocation = { |
|
|
|
|
|
Batchs:[{ |
|
|
|
|
|
Recommends:[], |
|
|
|
|
|
Records: [], |
|
|
|
|
|
batch: label.batch, |
|
|
|
|
|
detail:{ |
|
|
|
|
|
...packageInfo, |
|
|
|
|
|
fromLocationCode: balance.locationCode, |
|
|
|
|
|
}, |
|
|
|
|
|
handleQty: 0, |
|
|
|
|
|
packingNumber: label.packingNumber, |
|
|
|
|
|
qty: label.qty, |
|
|
|
|
|
uom: label.uom |
|
|
|
|
|
}], |
|
|
|
|
|
fromLocationCode: balance.locationCode, |
|
|
|
|
|
handleQty: 0, |
|
|
|
|
|
qty: label.qty, |
|
|
|
|
|
uom: label.uom |
|
|
|
|
|
} |
|
|
|
|
|
item.Locations.push(fromLocation) |
|
|
|
|
|
} |
|
|
if (fromLocation != undefined) { |
|
|
if (fromLocation != undefined) { |
|
|
const batch = fromLocation.Batchs.find((r) => r.batch == lot) |
|
|
const batch = fromLocation.Batchs.find((r) => r.batch == lot) |
|
|
if (batch != undefined) { |
|
|
if (batch != undefined) { |
|
|