Browse Source

YT-923 修改提交校验数量

intex
lijuncheng 2 weeks ago
parent
commit
e0572b20b7
  1. 18
      src/pages/customerReturn/job/returnDetail.vue

18
src/pages/customerReturn/job/returnDetail.vue

@ -259,8 +259,7 @@
getScanResult(result) {
console.log(result)
this.managementType ==result.managementType
if(result.managementType == "BY_BATCH" || result.managementType == "BY_QUANTITY" ){
if(this.managementType == "BY_BATCH" || this.managementType == "BY_QUANTITY" ){
this.setDataBatch(result)
}else{
this.setData(result)
@ -294,6 +293,7 @@
itemDetail.handleQty = Number(result.label.qty)
itemDetail.packQty = Number(result.package.packQty)
itemDetail.packUnit = result.package.packUnit
itemDetail.balanceQty=result.label.qty
this.calcHandleQty();
}
@ -416,6 +416,7 @@
let str = ''
let str1 = ''
let str2 = ''
let str3 = ''
this.detailSource.forEach((item) => {
item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) {
@ -433,9 +434,13 @@
if(cur.handleQty < cur.qty){
str2 = `批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以小于推荐数量【${cur.qty}`
}
if(parseFloat(cur.handleQty)>parseFloat(cur.balanceQty)){
str3 += `物料号【${item.itemCode}】批次【${cur.batch}】实际提交数量【${cur.handleQty}】不可以大于库存数量【${cur.qty}\n`
}
})
})
this.jobContent.allowBiggerQty = 'FALSE'
// this.jobContent.allowBiggerQty = 'FALSE'
if(this.jobContent.allowBiggerQty == 'FALSE' &&str1){
this.$refs.comMessage.showConfirmWarningModal(str1)
return
@ -444,6 +449,11 @@
this.$refs.comMessage.showConfirmWarningModal(str2)
return
}
if(str3){
this.$refs.comMessage.showErrorMessage(str3);
return;
}
if (str) {
str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
@ -471,7 +481,7 @@
this.managementList = res.list;
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
return;
customerReturnJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {

Loading…
Cancel
Save