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