Browse Source

修改发料扫描校验

ljc_0803
lijuncheng 1 month ago
parent
commit
b1ef7583bb
  1. 25
      src/pages/issue/coms/comScanIssuePack.vue

25
src/pages/issue/coms/comScanIssuePack.vue

@ -10,6 +10,7 @@
</view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg"
@click="closeScanPopup()"></image>
</view>
@ -500,7 +501,7 @@
let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
that.fromLocationCode = balance.locationCode;
let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode);
if (fromLocation != undefined) {
if (fromLocation &&!fromLocation.isNewAdd) {
let batch = fromLocation.Batchs.find(r => r.batch == lot);
if (batch != undefined) {
if (batch.Records == undefined) {
@ -530,7 +531,7 @@
} else {
that.addRecord(batch, label, balance, packageInfo)
}
that.$emit("afterScan");
} else {
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱',
res => {
@ -550,6 +551,7 @@
batch.detail = fromLocation.Batchs[0].detail;
}
fromLocation.Batchs.unshift(batch);
this.getfocus();
that.$emit("afterScan");
}
})
@ -561,8 +563,22 @@
}
}
} else {
if (this.jobContent.allowModifyLocation == "FALSE") {
this.showQuestionMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode +
"】与推荐的库位不一致,是否要继续发料?", res => {
if (res) {
let locaion = that.createLocationInfo(label, balance, packageInfo);
item.Locations.push(locaion);
this.getfocus();
that.$emit("afterScan");
}
})
} else {
this.showErrorMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode +
"】与推荐的库位不一致,不允许继续发料?")
}
}
} catch (e) {
that.showErrorMessage(e.stack,
@ -573,13 +589,14 @@
}
},
//
//
createLocationInfo(label, balance, packageInfo) {
let location = {
fromLocationCode: balance.locationCode,
qty: balance.qty,
uom: balance.uom,
handleQty: 0,
isNewAdd:true,
Batchs: []
}
let batch = this.createBatchInfo(label, balance, packageInfo);
@ -644,6 +661,7 @@
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);
this.getfocus();
this.$emit("afterScan");
},
getfocus() {
@ -691,7 +709,6 @@
this.issueRecord.splice(index, 1)
let item = this.toLocation.Items.find(r => r.itemCode == record.itemCode);
if (item != undefined) {
item.Locations.forEach(l => {

Loading…
Cancel
Save