|
@ -10,6 +10,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class=""> |
|
|
<view class=""> |
|
|
|
|
|
|
|
|
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg" |
|
|
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg" |
|
|
@click="closeScanPopup()"></image> |
|
|
@click="closeScanPopup()"></image> |
|
|
</view> |
|
|
</view> |
|
@ -178,7 +179,7 @@ |
|
|
fontSize: "100rpx" |
|
|
fontSize: "100rpx" |
|
|
}, |
|
|
}, |
|
|
bussinessCode: 'Issue', |
|
|
bussinessCode: 'Issue', |
|
|
toLocationAreaTypeList:[] |
|
|
toLocationAreaTypeList: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
@ -234,7 +235,7 @@ |
|
|
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.toLocationAreaTypeList=getDirectoryItemArray(this.jobContent.toAreaTypes) |
|
|
that.toLocationAreaTypeList = getDirectoryItemArray(this.jobContent.toAreaTypes) |
|
|
// that.fromLocationList = that.getFromLocationList(); |
|
|
// that.fromLocationList = that.getFromLocationList(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -317,9 +318,9 @@ |
|
|
"库区 [" + areaType + "] \n" + |
|
|
"库区 [" + areaType + "] \n" + |
|
|
"未查找到库存余额" |
|
|
"未查找到库存余额" |
|
|
this.showErrorMessage(hint, |
|
|
this.showErrorMessage(hint, |
|
|
res => { |
|
|
res => { |
|
|
that.getfocus(); |
|
|
that.getfocus(); |
|
|
}) |
|
|
}) |
|
|
} else if (res.data.length == 1) { |
|
|
} else if (res.data.length == 1) { |
|
|
result.balance = res.data[0] |
|
|
result.balance = res.data[0] |
|
|
|
|
|
|
|
@ -337,15 +338,15 @@ |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showErrorMessage(error, |
|
|
this.showErrorMessage(error, |
|
|
res => { |
|
|
res => { |
|
|
that.getfocus(); |
|
|
that.getfocus(); |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
this.showErrorMessage(e.stack,res => { |
|
|
this.showErrorMessage(e.stack, res => { |
|
|
that.getfocus(); |
|
|
that.getfocus(); |
|
|
}) |
|
|
}) |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -500,7 +501,7 @@ |
|
|
let item = that.toLocation.Items.find(r => r.itemCode == itemCode); |
|
|
let item = that.toLocation.Items.find(r => r.itemCode == itemCode); |
|
|
that.fromLocationCode = balance.locationCode; |
|
|
that.fromLocationCode = balance.locationCode; |
|
|
let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode); |
|
|
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); |
|
|
let batch = fromLocation.Batchs.find(r => r.batch == lot); |
|
|
if (batch != undefined) { |
|
|
if (batch != undefined) { |
|
|
if (batch.Records == undefined) { |
|
|
if (batch.Records == undefined) { |
|
@ -530,7 +531,7 @@ |
|
|
} else { |
|
|
} else { |
|
|
that.addRecord(batch, label, balance, packageInfo) |
|
|
that.addRecord(batch, label, balance, packageInfo) |
|
|
} |
|
|
} |
|
|
that.$emit("afterScan"); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱', |
|
|
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱', |
|
|
res => { |
|
|
res => { |
|
@ -550,6 +551,7 @@ |
|
|
batch.detail = fromLocation.Batchs[0].detail; |
|
|
batch.detail = fromLocation.Batchs[0].detail; |
|
|
} |
|
|
} |
|
|
fromLocation.Batchs.unshift(batch); |
|
|
fromLocation.Batchs.unshift(batch); |
|
|
|
|
|
this.getfocus(); |
|
|
that.$emit("afterScan"); |
|
|
that.$emit("afterScan"); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -561,8 +563,22 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
let locaion = that.createLocationInfo(label, balance, packageInfo); |
|
|
|
|
|
item.Locations.push(locaion); |
|
|
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) { |
|
|
} catch (e) { |
|
|
that.showErrorMessage(e.stack, |
|
|
that.showErrorMessage(e.stack, |
|
@ -573,18 +589,19 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//增加实际扫描的明细 |
|
|
//增加不是任务中的库位,实际扫描的明细 |
|
|
createLocationInfo(label, balance, packageInfo) { |
|
|
createLocationInfo(label, balance, packageInfo) { |
|
|
let location = { |
|
|
let location = { |
|
|
fromLocationCode: balance.locationCode, |
|
|
fromLocationCode: balance.locationCode, |
|
|
qty: balance.qty, |
|
|
qty: balance.qty, |
|
|
uom: balance.uom, |
|
|
uom: balance.uom, |
|
|
handleQty: 0, |
|
|
handleQty: 0, |
|
|
|
|
|
isNewAdd:true, |
|
|
Batchs: [] |
|
|
Batchs: [] |
|
|
} |
|
|
} |
|
|
let batch = this.createBatchInfo(label, balance, packageInfo); |
|
|
let batch = this.createBatchInfo(label, balance, packageInfo); |
|
|
batch.detail = balance; |
|
|
batch.detail = balance; |
|
|
batch.detail.fromLocationCode=balance.locationCode; |
|
|
batch.detail.fromLocationCode = balance.locationCode; |
|
|
location.Batchs.push(batch); |
|
|
location.Batchs.push(batch); |
|
|
return location; |
|
|
return location; |
|
|
}, |
|
|
}, |
|
@ -615,8 +632,8 @@ |
|
|
batch: label.batch, |
|
|
batch: label.batch, |
|
|
// qty: Number(balance.qty), |
|
|
// qty: Number(balance.qty), |
|
|
// 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), |
|
|
qty: Number(balance.qty), |
|
|
qty: Number(balance.qty), |
|
|
handleQty: Number(balance.qty), |
|
|
handleQty: Number(balance.qty), |
|
|
uom: balance.uom, |
|
|
uom: balance.uom, |
|
|
inventoryStatus: balance.inventoryStatus, |
|
|
inventoryStatus: balance.inventoryStatus, |
|
|
balance: balance, |
|
|
balance: balance, |
|
@ -644,6 +661,7 @@ |
|
|
this.issueRecord.unshift(record) |
|
|
this.issueRecord.unshift(record) |
|
|
this.calcBatchHandleQty(batch); |
|
|
this.calcBatchHandleQty(batch); |
|
|
this.getfocus(); |
|
|
this.getfocus(); |
|
|
|
|
|
this.$emit("afterScan"); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getfocus() { |
|
|
getfocus() { |
|
@ -691,7 +709,6 @@ |
|
|
this.issueRecord.splice(index, 1) |
|
|
this.issueRecord.splice(index, 1) |
|
|
|
|
|
|
|
|
let item = this.toLocation.Items.find(r => r.itemCode == record.itemCode); |
|
|
let item = this.toLocation.Items.find(r => r.itemCode == record.itemCode); |
|
|
|
|
|
|
|
|
if (item != undefined) { |
|
|
if (item != undefined) { |
|
|
|
|
|
|
|
|
item.Locations.forEach(l => { |
|
|
item.Locations.forEach(l => { |
|
|