|
@ -45,8 +45,8 @@ |
|
|
|
|
|
|
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true" :headerType="headerType" |
|
|
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true" |
|
|
:isShowHistory="false"> |
|
|
:headerType="headerType" :isShowHistory="false"> |
|
|
</win-com-scan> |
|
|
</win-com-scan> |
|
|
|
|
|
|
|
|
<view style="width: 100%;"> |
|
|
<view style="width: 100%;"> |
|
@ -102,6 +102,11 @@ |
|
|
getDetailOption, |
|
|
getDetailOption, |
|
|
getDetailEditRemoveOption |
|
|
getDetailEditRemoveOption |
|
|
} from '@/common/array.js'; |
|
|
} from '@/common/array.js'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
calc |
|
|
|
|
|
} from '@/common/calc.js'; |
|
|
import { |
|
|
import { |
|
|
getWorkShopLineStation |
|
|
getWorkShopLineStation |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
@ -150,9 +155,9 @@ |
|
|
positionInfo: "请选择位置", |
|
|
positionInfo: "请选择位置", |
|
|
positionList: [], |
|
|
positionList: [], |
|
|
defaultValueList: [], |
|
|
defaultValueList: [], |
|
|
label:{}, |
|
|
label: {}, |
|
|
fromInventoryStatuses :"", |
|
|
fromInventoryStatuses: "", |
|
|
packageInfo:{} |
|
|
packageInfo: {} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
@ -185,14 +190,14 @@ |
|
|
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(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showBalanceSelect(items,packageInfo) { |
|
|
showBalanceSelect(items, packageInfo) { |
|
|
this.packageInfo = packageInfo; |
|
|
this.packageInfo = packageInfo; |
|
|
this.$refs.balanceSelect.openPopup(items); |
|
|
this.$refs.balanceSelect.openPopup(items); |
|
|
}, |
|
|
}, |
|
@ -250,7 +255,8 @@ |
|
|
title: '加载中', |
|
|
title: '加载中', |
|
|
mask: true |
|
|
mask: true |
|
|
}) |
|
|
}) |
|
|
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses, balanceRes => { |
|
|
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses, |
|
|
|
|
|
balanceRes => { |
|
|
if (balanceRes.success) { |
|
|
if (balanceRes.success) { |
|
|
if (balanceRes.data.list.length == 0) { |
|
|
if (balanceRes.data.list.length == 0) { |
|
|
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录', |
|
|
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录', |
|
@ -259,10 +265,10 @@ |
|
|
}) |
|
|
}) |
|
|
} 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,packageInfo); |
|
|
this.afterGetBalance(result.label, balance, packageInfo); |
|
|
} else { |
|
|
} else { |
|
|
this.label =result.label; |
|
|
this.label = result.label; |
|
|
this.showBalanceSelect(balanceRes.data.list,packageInfo); |
|
|
this.showBalanceSelect(balanceRes.data.list, packageInfo); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage(balanceRes.message.message); |
|
|
this.showErrorMessage(balanceRes.message.message); |
|
@ -277,11 +283,11 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
selectBalanceItem(balance) { |
|
|
selectBalanceItem(balance) { |
|
|
this.afterGetBalance(this.label, balance,this.packageInfo); |
|
|
this.afterGetBalance(this.label, balance, this.packageInfo); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
afterGetBalance(label, balance,packageInfo) { |
|
|
afterGetBalance(label, balance, packageInfo) { |
|
|
try { |
|
|
try { |
|
|
let that = this; |
|
|
let that = this; |
|
|
let itemCode = label.itemCode; |
|
|
let itemCode = label.itemCode; |
|
@ -302,11 +308,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 => { |
|
@ -316,7 +322,7 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
that.addRecord(batch, label, balance,packageInfo) |
|
|
that.addRecord(batch, label, balance, packageInfo) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱', |
|
|
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱', |
|
@ -371,14 +377,14 @@ |
|
|
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(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, |
|
@ -391,13 +397,13 @@ |
|
|
calcBatchHandleQty(batch) { |
|
|
calcBatchHandleQty(batch) { |
|
|
let handleQty = 0; |
|
|
let handleQty = 0; |
|
|
batch.Records.forEach(res => { |
|
|
batch.Records.forEach(res => { |
|
|
handleQty += Number(res.qty) |
|
|
handleQty = calc.add(handleQty,res.qty) |
|
|
}) |
|
|
}) |
|
|
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); |
|
|