|
@ -225,6 +225,10 @@ |
|
|
that.jobContent.detailToLocationCode = res.data.subList[0].toLocationCode |
|
|
that.jobContent.detailToLocationCode = res.data.subList[0].toLocationCode |
|
|
that.toLocationCode= res.data.subList[0].toLocationCode |
|
|
that.toLocationCode= res.data.subList[0].toLocationCode |
|
|
that.fromLocationCode = that.subList[0].fromLocationCode |
|
|
that.fromLocationCode = that.subList[0].fromLocationCode |
|
|
|
|
|
|
|
|
|
|
|
that.detailSource.forEach(r => { |
|
|
|
|
|
r.isRecommTaskItem = true//为推荐任务 |
|
|
|
|
|
}) |
|
|
//任务中已经扫描,模拟扫描赋值 |
|
|
//任务中已经扫描,模拟扫描赋值 |
|
|
if (this.scanMessage) { |
|
|
if (this.scanMessage) { |
|
|
this.openScanPopupSimulate(this.scanMessage); |
|
|
this.openScanPopupSimulate(this.scanMessage); |
|
@ -622,28 +626,33 @@ |
|
|
let str1="" |
|
|
let str1="" |
|
|
let str2="" |
|
|
let str2="" |
|
|
let str3="" |
|
|
let str3="" |
|
|
var totalQty =0; |
|
|
let isTrue = true |
|
|
var taskQty =0; |
|
|
|
|
|
console.log(877,this.detailSource) |
|
|
|
|
|
this.detailSource.forEach(detail => { |
|
|
this.detailSource.forEach(detail => { |
|
|
detail.subList.forEach(item => { |
|
|
const isScaned = detail.subList.some(cur=>cur.scaned) |
|
|
if(item.scaned){ |
|
|
if(isScaned){ |
|
|
taskQty =calc.add(taskQty,item.qty) |
|
|
if(parseFloat(detail.handleQty)<parseFloat(detail.qty)){ |
|
|
totalQty =calc.add(totalQty,item.handleQty) |
|
|
str += `物料号【${detail.itemCode}】提交数量【${detail.handleQty}】不允许小于任务数量【${detail.qty}】` |
|
|
if(parseFloat(item.handleQty)<parseFloat(item.qty)){ |
|
|
} |
|
|
str += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不允许小于任务数量【${item.qty}】` |
|
|
if(parseFloat(detail.handleQty)>parseFloat(detail.qty)){ |
|
|
|
|
|
str1 += `物料号【${detail.itemCode}】提交数量【${detail.handleQty}】不允许大于任务数量【${detail.qty}】` |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
if(parseFloat(item.handleQty)!=parseFloat(item.qty)){ |
|
|
if(detail.isRecommTaskItem){//扫描推荐任务中的任务时候才有这个提示 |
|
|
str3 += `批次【${item.batch}】扫描数量【${parseFloat(item.handleQty)}】和任务数量【${item.qty}】不一致` |
|
|
detail.handleQty = detail.handleQty || 0 |
|
|
|
|
|
if(detail.handleQty == 0 && isTrue){ |
|
|
|
|
|
isTrue = false |
|
|
|
|
|
str3 = '推荐的箱码没扫,' |
|
|
} |
|
|
} |
|
|
if (parseFloat( item.handleQty )> parseFloat(item.qty)){ |
|
|
if(parseFloat(detail.handleQty)!=parseFloat(detail.qty)){ |
|
|
str1 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不允许大于任务数量【${item.qty}】` |
|
|
str3 += `物料号【${detail.itemCode}】扫描数量【${parseFloat(detail.handleQty)}】和任务数量【${detail.qty}】不一致` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
detail.subList.forEach(item => { |
|
|
|
|
|
if(item.scaned){ |
|
|
if(parseFloat(item.handleQty)>parseFloat(item.balance.qty)){ |
|
|
if(parseFloat(item.handleQty)>parseFloat(item.balance.qty)){ |
|
|
str2 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不可以大于库存数量【${item.balance.qty}】` |
|
|
str2 += `物料号【${detail.itemCode}】批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不可以大于库存数量【${item.balance.qty}】` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
@ -675,7 +684,7 @@ |
|
|
if (res) { |
|
|
if (res) { |
|
|
return |
|
|
return |
|
|
//防止重复点击 |
|
|
//防止重复点击 |
|
|
this.$throttle(this.submit, 2000, this)() |
|
|
// this.$throttle(this.submit, 2000, this)() |
|
|
} else { |
|
|
} else { |
|
|
this.scanPopupGetFocus() |
|
|
this.scanPopupGetFocus() |
|
|
} |
|
|
} |
|
@ -683,7 +692,7 @@ |
|
|
}else { |
|
|
}else { |
|
|
return |
|
|
return |
|
|
//防止重复点击 |
|
|
//防止重复点击 |
|
|
this.$throttle(this.submit, 2000, this)() |
|
|
// this.$throttle(this.submit, 2000, this)() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|