|
@ -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; |
|
@ -145,8 +145,8 @@ |
|
|
positionInfo: "请选择位置", |
|
|
positionInfo: "请选择位置", |
|
|
positionList: [], |
|
|
positionList: [], |
|
|
defaultValueList: [], |
|
|
defaultValueList: [], |
|
|
label:{}, |
|
|
label: {}, |
|
|
fromInventoryStatuses :"", |
|
|
fromInventoryStatuses: "", |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
@ -179,7 +179,7 @@ |
|
|
let that = this; |
|
|
let that = this; |
|
|
that.fromLocationList = []; |
|
|
that.fromLocationList = []; |
|
|
if (that.dataContent != null) { |
|
|
if (that.dataContent != null) { |
|
|
that.fromInventoryStatuses =this.jobContent.outInventoryStatuses |
|
|
that.fromInventoryStatuses = this.jobContent.outInventoryStatuses |
|
|
that.toLocation = that.dataContent[0]; |
|
|
that.toLocation = that.dataContent[0]; |
|
|
that.toLocationCode = that.dataContent[0].toLocationCode; |
|
|
that.toLocationCode = that.dataContent[0].toLocationCode; |
|
|
that.fromLocationList = that.getFromLocationList(); |
|
|
that.fromLocationList = that.getFromLocationList(); |
|
@ -243,24 +243,25 @@ |
|
|
title: '加载中', |
|
|
title: '加载中', |
|
|
mask: true |
|
|
mask: true |
|
|
}) |
|
|
}) |
|
|
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses, balanceRes => { |
|
|
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses, |
|
|
if (balanceRes.success) { |
|
|
balanceRes => { |
|
|
if (balanceRes.data.list.length == 0) { |
|
|
if (balanceRes.success) { |
|
|
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录', |
|
|
if (balanceRes.data.list.length == 0) { |
|
|
res => { |
|
|
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录', |
|
|
this.packGetFocus(); |
|
|
res => { |
|
|
}) |
|
|
this.packGetFocus(); |
|
|
} else if (balanceRes.data.list.length == 1) { |
|
|
}) |
|
|
let balance = balanceRes.data.list[0]; |
|
|
} else if (balanceRes.data.list.length == 1) { |
|
|
this.afterGetBalance(result.label, balance,packageInfo); |
|
|
let balance = balanceRes.data.list[0]; |
|
|
|
|
|
this.afterGetBalance(result.label, balance, packageInfo); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showBalanceSelect(balanceRes.data.list); |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.showBalanceSelect(balanceRes.data.list); |
|
|
this.showErrorMessage(balanceRes.message.message); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
uni.hideLoading(); |
|
|
this.showErrorMessage(balanceRes.message.message); |
|
|
}); |
|
|
} |
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
this.showErrorMessage(e.stack) |
|
|
this.showErrorMessage(e.stack) |
|
@ -271,7 +272,7 @@ |
|
|
this.afterGetBalance(this.label, balance); |
|
|
this.afterGetBalance(this.label, balance); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
afterGetBalance(label, balance,packageInfo) { |
|
|
afterGetBalance(label, balance, packageInfo) { |
|
|
try { |
|
|
try { |
|
|
let that = this; |
|
|
let that = this; |
|
|
let itemCode = label.itemCode; |
|
|
let itemCode = label.itemCode; |
|
@ -292,11 +293,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,packageInfo) |
|
|
that.addRecord(batch, label, balance, packageInfo) |
|
|
} else { |
|
|
} else { |
|
|
//允许修改箱码 |
|
|
//允许修改箱码 |
|
|
if (this.jobContent.allowModifyPackingNumber == 'TRUE') { |
|
|
if (this.jobContent.allowModifyPackingNumber == 'TRUE') { |
|
|
that.addRecord(batch, label, balance,packageInfo); |
|
|
that.addRecord(batch, label, balance, packageInfo); |
|
|
} else { |
|
|
} else { |
|
|
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细', |
|
|
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细', |
|
|
res => { |
|
|
res => { |
|
@ -306,7 +307,7 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
that.addRecord(batch, label, balance,packageInfo) |
|
|
that.addRecord(batch, label, balance, packageInfo) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱', |
|
|
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱', |
|
@ -361,14 +362,15 @@ |
|
|
return batch; |
|
|
return batch; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
creatRecord(label, balance,packageInfo) { |
|
|
creatRecord(label, balance, packageInfo) { |
|
|
balance.stdPackQty = packageInfo.stdPackQty |
|
|
balance.stdPackQty = packageInfo.stdPackQty |
|
|
balance.stdPackUnit = packageInfo.stdPackUnit |
|
|
balance.stdPackUnit = packageInfo.stdPackUnit |
|
|
let record = { |
|
|
let record = { |
|
|
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(balance.qty), |
|
|
|
|
|
// qty: Number(label.qty)>Number(balance.qty)?Number(balance.qty):Number(label.qty), |
|
|
uom: balance.uom, |
|
|
uom: balance.uom, |
|
|
inventoryStatus: balance.inventoryStatus, |
|
|
inventoryStatus: balance.inventoryStatus, |
|
|
balance: balance, |
|
|
balance: balance, |
|
@ -386,8 +388,8 @@ |
|
|
batch.handleQty = handleQty; |
|
|
batch.handleQty = handleQty; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
addRecord(batch, label, balance,packageInfo) { |
|
|
addRecord(batch, label, balance, packageInfo) { |
|
|
let record = this.creatRecord(label, balance,packageInfo); |
|
|
let record = this.creatRecord(label, balance, packageInfo); |
|
|
batch.Records.push(record); |
|
|
batch.Records.push(record); |
|
|
this.issueRecord.unshift(record) |
|
|
this.issueRecord.unshift(record) |
|
|
this.calcBatchHandleQty(batch); |
|
|
this.calcBatchHandleQty(batch); |
|
|