Browse Source

成品发货任务--同一物料,可以扫描提交不在任务中的库位 2024/8/7

hella_vue3
王志国 1 month ago
parent
commit
0d4d745829
  1. 32
      src/pages/deliver/coms/comScanDeliverPack.vue

32
src/pages/deliver/coms/comScanDeliverPack.vue

@ -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) {

Loading…
Cancel
Save