|
|
@ -7,6 +7,9 @@ |
|
|
|
<view class="header_item"> |
|
|
|
申请单号 : {{jobContent.requestNumber}} |
|
|
|
</view> |
|
|
|
<view class="header_item"> |
|
|
|
来源仓库 : {{jobContent.fromWarehouseCode}} |
|
|
|
</view> |
|
|
|
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line> |
|
|
|
</view> |
|
|
|
<view class="page-main"> |
|
|
@ -37,7 +40,8 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
|
|
|
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> |
|
|
|
<win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack> |
|
|
|
<!-- <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> --> |
|
|
|
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> |
|
|
|
|
|
|
|
<com-message ref="comMessage"></com-message> |
|
|
@ -57,7 +61,8 @@ |
|
|
|
navigateBack, |
|
|
|
getPackingNumberAndBatch, |
|
|
|
getInventoryStatusName, |
|
|
|
getDirectoryItemArray |
|
|
|
getDirectoryItemArray, |
|
|
|
compareAsc |
|
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
import { |
|
|
@ -75,6 +80,7 @@ |
|
|
|
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
|
|
|
import comMessage from '@/mycomponents/common/comMessage.vue' |
|
|
|
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
|
|
|
import winScanPack from "@/mycomponents/scan/winScanPack.vue" |
|
|
|
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" |
|
|
|
import detailInfoPopup from '@/pages/transfer/coms/detailInfoPopup.vue' |
|
|
|
import jobTop from '@/mycomponents/job/jobTop.vue' |
|
|
@ -85,7 +91,7 @@ |
|
|
|
winScanButton, |
|
|
|
requiredLocation, |
|
|
|
comMessage, |
|
|
|
winScanPackAndLocation, |
|
|
|
winScanPack, |
|
|
|
comDetailCard, |
|
|
|
detailInfoPopup, |
|
|
|
jobTop |
|
|
@ -101,7 +107,7 @@ |
|
|
|
toLocationCode: "", |
|
|
|
businessTypeInfo: {}, |
|
|
|
managementList: [], |
|
|
|
tolocationTypeList:[] |
|
|
|
tolocationTypeList: [] |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
@ -227,29 +233,45 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
openScanPopup() { |
|
|
|
let fromlocationCode = ''; |
|
|
|
let fromlocationList = []; |
|
|
|
for (var i = 0; i < this.detailSource.length; i++) { |
|
|
|
let item = this.detailSource[i]; |
|
|
|
item.subList.forEach(l => { |
|
|
|
//重复的库位不往里面插入 |
|
|
|
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode) |
|
|
|
if (location.length == 0) { |
|
|
|
fromlocationList.push(l.fromLocationCode); |
|
|
|
} |
|
|
|
//来源库位赋默认值 |
|
|
|
if (fromlocationCode == '') { |
|
|
|
if (!l.scaned) { |
|
|
|
fromlocationCode = l.fromLocationCode; |
|
|
|
this.$refs.scanPopup.openScanPopup(); |
|
|
|
}, |
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
|
try { |
|
|
|
var packingNumber = result.label.packingNumber; |
|
|
|
var batch = result.label.batch; |
|
|
|
var qty = result.label.qty; |
|
|
|
var itemCode = result.label.itemCode; |
|
|
|
var detail = this.detailSource.find(r => r.itemCode == itemCode); |
|
|
|
if (detail == undefined) { |
|
|
|
this.showMessage("物料号【" + itemCode + "】不在列表中") |
|
|
|
} else { |
|
|
|
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch); |
|
|
|
if (itemDetail == undefined) { |
|
|
|
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中") |
|
|
|
} else { |
|
|
|
if (itemDetail.scaned) { |
|
|
|
this.showMessage("箱码【" + packingNumber + "】已经扫描") |
|
|
|
} else { |
|
|
|
itemDetail.scaned = true; |
|
|
|
this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序 |
|
|
|
itemDetail.handleQty = Number(result.label.qty); |
|
|
|
itemDetail.toLocationCode = this.toLocationCode; |
|
|
|
itemDetail.labelQty = Number(result.label.qty); |
|
|
|
calcHandleQty(this.detailSource); |
|
|
|
this.continueScan() |
|
|
|
this.$forceUpdate() |
|
|
|
var list = this.detailSource[0].subList; |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
this.showErrorMessage(e.message) |
|
|
|
} |
|
|
|
this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
|
getScanResult1(result) { |
|
|
|
try { |
|
|
|
var packingNumber = result.label.packingNumber; |
|
|
|
var batch = result.label.batch; |
|
|
@ -272,15 +294,16 @@ |
|
|
|
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); |
|
|
|
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); |
|
|
|
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { |
|
|
|
if(this.jobContent.allowModifyInventoryStatus=="TRUE"){ |
|
|
|
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + |
|
|
|
if (this.jobContent.allowModifyInventoryStatus == "TRUE") { |
|
|
|
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + |
|
|
|
itemStatus + |
|
|
|
']不一致,是否继续入库?', res => { |
|
|
|
if (res) { |
|
|
|
itemDetail.scaned = true; |
|
|
|
itemDetail.handleQty = Number(result.balance.qty) ; |
|
|
|
itemDetail.handleQty = Number(result.balance.qty); |
|
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus |
|
|
|
itemDetail.balance = result.balance; |
|
|
|
itemDetail.balance.balanceQty = Number(result.balance.qty) ; |
|
|
|
itemDetail.balance.balanceQty = Number(result.balance.qty); |
|
|
|
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) |
|
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
|
this.calcHandleQty(); |
|
|
@ -288,8 +311,9 @@ |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}else { |
|
|
|
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + |
|
|
|
} else { |
|
|
|
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + |
|
|
|
itemStatus + |
|
|
|
']不一致,不允许转移!', res => { |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
}); |
|
|
@ -298,10 +322,10 @@ |
|
|
|
|
|
|
|
} else { |
|
|
|
itemDetail.scaned = true; |
|
|
|
itemDetail.handleQty = Number(result.balance.qty) ; |
|
|
|
itemDetail.handleQty = Number(result.balance.qty); |
|
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus |
|
|
|
itemDetail.balance = result.balance; |
|
|
|
itemDetail.balance.balanceQty = Number(result.balance.qty) ; |
|
|
|
itemDetail.balance.balanceQty = Number(result.balance.qty); |
|
|
|
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) |
|
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
|
this.calcHandleQty(); |
|
|
|