Browse Source

修改error

wms3.0_pda
lijuncheng 1 year ago
parent
commit
d008a20952
  1. 38
      pages/deliver/coms/comScanDeliverPack.vue

38
pages/deliver/coms/comScanDeliverPack.vue

@ -7,7 +7,7 @@
扫描箱码 扫描箱码
<text class="fr" @click="closeScanPopup()">关闭</text> <text class="fr" @click="closeScanPopup()">关闭</text>
</view> </view>
<!-- <view class="uni-flex uni-row" style="align-items: center; <!-- <view class="uni-flex uni-row" style="align-items: center;
background-color: #fff; background-color: #fff;
margin-left: 20rpx; margin-left: 20rpx;
margin-right: 20rpx; margin-right: 20rpx;
@ -138,7 +138,7 @@
fromLocationList: [], fromLocationList: [],
fromLocationCode: '', fromLocationCode: '',
fromLocation: null, fromLocation: null,
issueRecord: [], // issueRecord: [], //
expand: true, expand: true,
scanOptions: {}, scanOptions: {},
editItem: {}, editItem: {},
@ -212,11 +212,10 @@
let location = this.fromLocationList.find(r => r == fromlocation) let location = this.fromLocationList.find(r => r == fromlocation)
if (location == undefined) { if (location == undefined) {
this.fromLocationCode = '' this.fromLocationCode = ''
this.showErrorMessage('补料库位【' + fromlocation + '】不存在') this.showErrorMessage('发货库位【' + fromlocation + '】不存在')
} }
}, },
onScan(result) { onScan(result) {
debugger
try { try {
let that = this; let that = this;
@ -226,13 +225,12 @@
}); });
return; return;
} }
let package =result.package;
let itemCode = result.label.itemCode; let itemCode = result.label.itemCode;
let packingCode = result.label.packingNumber; let packingCode = result.label.packingNumber;
let lot = result.label.batch; let lot = result.label.batch;
let item = that.toLocation.Items.find(r => r.itemCode == itemCode); let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
if (item == undefined) { if (item == undefined) {
that.showErrorMessage('未查找到零件【' + itemCode + '】的补料明细', that.showErrorMessage('未查找到零件【' + itemCode + '】的发货明细',
res => { res => {
that.getfocus(); that.getfocus();
} }
@ -253,7 +251,7 @@
}) })
} else if (balanceRes.data.list.length == 1) { } else if (balanceRes.data.list.length == 1) {
let balance = balanceRes.data.list[0]; let balance = balanceRes.data.list[0];
this.afterGetBalance(result.label, balance,package); this.afterGetBalance(result.label, balance);
} else { } else {
this.label =result.label; this.label =result.label;
this.showBalanceSelect(balanceRes.data.list); this.showBalanceSelect(balanceRes.data.list);
@ -269,13 +267,15 @@
uni.hideLoading(); uni.hideLoading();
} }
}, },
selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance);
}, },
afterGetBalance(label, balance,package) { afterGetBalance(label, balance) {
try { try {
let that = this; let that = this;
let stdPackQty = package.stdPackQty;
let stdPackUnit = package.stdPackUnit;
let itemCode = label.itemCode; let itemCode = label.itemCode;
let packingCode = label.packingNumber; let packingCode = label.packingNumber;
let lot = label.batch; let lot = label.batch;
@ -294,11 +294,11 @@
if (batch.Recommends.length > 0) { if (batch.Recommends.length > 0) {
let recommend = batch.Recommends.find(r => r.packingNumber == packingCode); let recommend = batch.Recommends.find(r => r.packingNumber == packingCode);
if (recommend != undefined) { if (recommend != undefined) {
that.addRecord(batch, label, balance,package) that.addRecord(batch, label, balance)
} else { } else {
// //
if (this.jobContent.allowModifyPackingNumber == 'TRUE') { if (this.jobContent.allowModifyPackingNumber == 'TRUE') {
that.addRecord(batch, label, balance,package); that.addRecord(batch, label, balance);
} else { } else {
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细', that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细',
res => { res => {
@ -308,7 +308,7 @@
} }
} }
} else { } else {
that.addRecord(batch, label, balance,package) that.addRecord(batch, label, balance)
} }
} else { } else {
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱', that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱',
@ -320,21 +320,21 @@
} else { } else {
if (this.jobContent.AllowModifyBatch == null) { if (this.jobContent.AllowModifyBatch == null) {
this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot + this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot +
'】的补料明细,是否要继续补料?', res => { '】的发货明细,是否要继续发货?', res => {
if (res) { if (res) {
let batch = that.createBatchInfo(label, balance); let batch = that.createBatchInfo(label, balance);
fromLocation.Batchs.unshift(batch); fromLocation.Batchs.unshift(batch);
} }
}) })
} else { } else {
that.showErrorMessage('未查找到批次【' + lot + '】的补料明细', that.showErrorMessage('未查找到批次【' + lot + '】的发货明细',
res => { res => {
that.getfocus(); that.getfocus();
}); });
} }
} }
} else { } else {
that.showErrorMessage('未查找到推荐库位【' + that.fromLocationCode + '】的补料明细', that.showErrorMessage('未查找到推荐库位【' + that.fromLocationCode + '】的发货明细',
res => { res => {
that.getfocus(); that.getfocus();
} }
@ -368,7 +368,7 @@
itemCode: label.itemCode, itemCode: label.itemCode,
packingNumber: label.packingNumber, packingNumber: label.packingNumber,
batch: label.batch, batch: label.batch,
qty: Number(label.qty)>Number(balance.qty)?Number(balance.qty):Number(label.qty), qty: Number(label.qty)>Number(label.balance)?Number(label.balance):Number(label.qty),
uom: balance.uom, uom: balance.uom,
inventoryStatus: balance.inventoryStatus, inventoryStatus: balance.inventoryStatus,
balance: balance, balance: balance,
@ -386,11 +386,9 @@
batch.handleQty = handleQty; batch.handleQty = handleQty;
}, },
addRecord(batch, label, balance,package) { addRecord(batch, label, balance) {
let record = this.creatRecord(label, balance); let record = this.creatRecord(label, balance);
batch.Records.push(record); batch.Records.push(record);
batch.stdPackUnit = package.stdPackUnit;
batch.stdPackQty = package.stdPackQty;
this.issueRecord.unshift(record) this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch); this.calcBatchHandleQty(batch);
this.getfocus(); this.getfocus();

Loading…
Cancel
Save