Browse Source

YT-704预生产收货,pda提交数量与任务不一致,提示去掉包装号

intex_online20241111
zhang_li 3 months ago
parent
commit
70fce459b7
  1. 64
      src/pages/productReceipt/job/productReceiptDetail.vue

64
src/pages/productReceipt/job/productReceiptDetail.vue

@ -361,7 +361,7 @@
});
},
commit() {
async commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
@ -376,18 +376,40 @@
}else{
this.toLocationCode = this.jobToLocationCode
}
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
await getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList&& this.managementList[0]&& this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING'
}
})
//
if (this.scanCount == this.subList.length) {
if (this.checkCount()) {
this.submitJob();
if(this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY'){
if (this.checkCountBatch()) {
this.submitJob();
}
}else{
if (this.checkCount()) {
this.submitJob();
}
}
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
if (this.checkCount()) {
this.submitJob();
if(this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY'){
if (this.checkCountBatch()) {
this.submitJob();
}
}else{
if (this.checkCount()) {
this.submitJob();
}
}
} else {
//
@ -425,7 +447,34 @@
return isCheck;
},
checkCountBatch(){
var isCheck = true;
var hint = ""
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
for (var j = 0; j < item.subList.length; j++) {
var subItem = item.subList[i]
console.log(calc.sub(subItem.handleQty, subItem.qty) )
if (calc.sub(subItem.handleQty, subItem.qty) < 0 || calc.sub(subItem.handleQty, subItem.qty) > 0) {
isCheck = false;
hint = "批次【" + subItem.batch + "】实际收货数量:[" + subItem.handleQty + "]与包装数量[" + subItem.qty +
"]不相等,是否继续收货?"
break
}
}
}
console.log(isCheck)
if (!isCheck) {
this.showQuestMessage(hint, res => {
if (res) {
this.submitJob();
}
})
}
return isCheck;
},
submitJob() {
uni.showLoading({
title: "提交中....",
@ -435,6 +484,7 @@
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
return
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;

Loading…
Cancel
Save