|
|
@ -14,7 +14,7 @@ |
|
|
|
</scroll-view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="page-footer"> |
|
|
|
<view class="uni-flex u-col-center space-between padding_10" |
|
|
@ -53,6 +53,7 @@ |
|
|
|
import { |
|
|
|
goHome, |
|
|
|
updateTitle, |
|
|
|
navigateBack, |
|
|
|
getCurrDateTime, |
|
|
|
getPackingNumberAndBatch, |
|
|
|
getInventoryStatusName |
|
|
@ -234,7 +235,7 @@ |
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
|
try { |
|
|
|
var supplierCode =result.package.supplierCode |
|
|
|
var supplierCode = result.package.supplierCode |
|
|
|
var packingNumber = result.balance.packingNumber; |
|
|
|
var batch = result.balance.batch; |
|
|
|
var qty = result.balance.qty; |
|
|
@ -266,14 +267,14 @@ |
|
|
|
']不一致,是否继续上架?', res => { |
|
|
|
if (res) { |
|
|
|
itemDetail.scaned = true; |
|
|
|
itemDetail.supplierCode =supplierCode |
|
|
|
itemDetail.supplierCode = supplierCode |
|
|
|
itemDetail.handleQty = Number(result.label.qty) > Number(result.balance |
|
|
|
.qty) ? Number(result.balance.qty) : Number(result.label.qty); |
|
|
|
itemDetail.toInventoryStatus = result.balance.inventoryStatus; |
|
|
|
itemDetail.balance = result.balance; |
|
|
|
itemDetail.balance.balanceQty = result.balance.qty; |
|
|
|
itemDetail.balance.stdPackQty =result.package.stdPackQty |
|
|
|
itemDetail.balance.stdPackUnit =result.package.stdPackUnit |
|
|
|
itemDetail.balance.stdPackQty = result.package.stdPackQty |
|
|
|
itemDetail.balance.stdPackUnit = result.package.stdPackUnit |
|
|
|
this.calcHandleQty(); |
|
|
|
} else { |
|
|
|
this.scanPopupGetFocus(); |
|
|
@ -320,7 +321,7 @@ |
|
|
|
if (!this.checkLocation()) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//扫描数量和任务数量相等,直接提交 |
|
|
|
if (this.scanCount == this.subList.length) { |
|
|
|
this.submitJob(); |
|
|
@ -341,19 +342,19 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
checkLocation() { |
|
|
|
var isPass = true; |
|
|
|
if (this.toLocationCode == "" || this.toLocationCode == null) { |
|
|
|
this.showMessageHint('请扫描目库位', callback => { |
|
|
|
this.$refs.comScanLocation.showLocation(); |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
return isPass = false; |
|
|
|
} |
|
|
|
return isPass; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showMessageHint(hint, callback) { |
|
|
|
this.$refs.comMessage.showErrorMessage(hint, res => { |
|
|
|
if (res) { |
|
|
@ -362,7 +363,7 @@ |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
submitJob() { |
|
|
|
submitJob() { |
|
|
|
uni.showLoading({ |
|
|
|
title: "提交中....", |
|
|
|
mask: true |
|
|
@ -371,13 +372,13 @@ |
|
|
|
this.detailSource.forEach(item => { |
|
|
|
itemCodes.push(item.itemCode) |
|
|
|
}) |
|
|
|
|
|
|
|
getManagementPrecisions(itemCodes,this.toLocationCode, res => { |
|
|
|
|
|
|
|
getManagementPrecisions(itemCodes, this.toLocationCode, res => { |
|
|
|
if (res.success) { |
|
|
|
this.managementList = res.list; |
|
|
|
var params = this.setParams() |
|
|
|
console.log("提交参数",JSON.stringify(params)); |
|
|
|
|
|
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
productionReceiptJobSubmit(params).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
@ -395,27 +396,27 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setParams() { |
|
|
|
var subList = [] |
|
|
|
var creator = this.$store.state.user.id |
|
|
|
|
|
|
|
|
|
|
|
this.detailSource.forEach(item => { |
|
|
|
item.subList.forEach(detail => { |
|
|
|
if (detail.scaned) { |
|
|
|
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
|
detail.packingNumber, detail.batch); |
|
|
|
detail.toPackingNumber = info.packingNumber; |
|
|
|
detail.toBatch =info.batch; |
|
|
|
detail.toContainerNumber = ""; |
|
|
|
detail.toLocationCode =this.toLocationCode; |
|
|
|
detail.toPackingNumber = info.packingNumber; |
|
|
|
detail.toBatch = info.batch; |
|
|
|
detail.toContainerNumber = ""; |
|
|
|
detail.toLocationCode = this.toLocationCode; |
|
|
|
|
|
|
|
subList.push(detail) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.jobContent.subList = subList |
|
|
|
this.jobContent.creator =creator; |
|
|
|
this.jobContent.creator = creator; |
|
|
|
return this.jobContent; |
|
|
|
}, |
|
|
|
|
|
|
@ -463,7 +464,7 @@ |
|
|
|
afterCloseMessage() { |
|
|
|
this.scanPopupGetFocus(); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
scanLocationCode(location, code) { |
|
|
|
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { |
|
|
|
this.toLocationCode = code |
|
|
@ -476,14 +477,9 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
|
setTimeout(() => { |
|
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
|
|
|
|
|
}) |
|
|
|
uni.navigateTo({ |
|
|
|
url: './putawayJob' |
|
|
|
}) |
|
|
|
}, 3000) |
|
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
|
navigateBack(1) |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|