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