Browse Source

YT-686扫描箱码数量与任务数量不一致时,提交时提示去掉包装号YT-687隔离转报废,超出库存数量可以提交,应检验库存数量

intex_online20241111
zhang_li 3 months ago
parent
commit
180b83685c
  1. 17
      src/pages/inventoryMove/job/inventoryMoveDetail.vue

17
src/pages/inventoryMove/job/inventoryMoveDetail.vue

@ -314,6 +314,7 @@
getScanResult(result,managementPrecision) {
this.managementType = managementPrecision
if(managementPrecision == 'BY_BATCH' || managementPrecision == 'BY_QUANTITY' ){
this.setDataBatch(result,managementPrecision)
}else{
@ -322,6 +323,7 @@
},
setDataBatch(result,managementPrecision){
console.log(877,result.balance.qty)
try {
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
@ -482,6 +484,7 @@
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList&& this.managementList[0]&& this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING'
console.log(11,this.managementType)
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
@ -490,7 +493,7 @@
//
//
if (this.scanCount == this.subList.length) {
if(this.managementType == 'BY_BATCH'){
if(this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY'){
this.checkCountBatch();
}else{
this.checkCount();
@ -545,6 +548,7 @@
checkCountBatch(){
//
let str = ''
let str1 = ''
this.detailSource.forEach((item) => {
item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) {
@ -556,9 +560,19 @@
}
str +=
`提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n`
if( cur.handleQty > cur.balance.balanceQty){
console.log(2333,cur.handleQty)
console.log(2333,cur.balance.balanceQty)
str1 +=
`提交数量【${ cur.handleQty}】不可以大于库存数量【${cur.balance.balanceQty}`
}
}
})
})
if(str1){
this.$refs.comMessage.showConfirmWarningModal(str1)
return
}
if (str) {
str = '任务明细未全部完成,是否提交?\n' + str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
@ -577,6 +591,7 @@
});
var params = this.setParams()
console.log("提交" + JSON.stringify(params))
return
inventoryMoveSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {

Loading…
Cancel
Save