Browse Source

修改发料提示

ljc_0803
lijuncheng 3 months ago
parent
commit
8b7c4acc0f
  1. 24
      src/pages/issue/job/issueDetail.vue

24
src/pages/issue/job/issueDetail.vue

@ -32,7 +32,7 @@
<view class="">
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
<button class="btn_single_commit" hover-class="btn_commit_after" @click="autoCommit()">提交</button>
</view>
</view>
</view>
@ -449,9 +449,15 @@
afterScan() {
this.resizeCollapse();
let str = ""
this.autoCommit()
},
autoCommit(){
var totalQty =0;
var taskQty =0;
this.detailSource.forEach(detail => {
detail.Items.forEach(item => {
taskQty =calc.add(taskQty,item.qty)
item.Locations.forEach(lco => {
lco.Batchs.forEach(batch => {
batch.Records.forEach(record => {
@ -466,16 +472,23 @@
str +=
`包装号【${record.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${batch.qty}】不一致\n`
}
}
if(record){
var hanleQty =record.qty?record.qty:0
totalQty = calc.add(totalQty,hanleQty)
}
})
})
})
})
})
if (str) {
if(str){
str = '任务明细未全部完成,是否提交?\n' + str
}
if(totalQty!=taskQty){
str ="扫描数量["+totalQty+"]与任务数量不一致["+taskQty+"],是否提交"
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) {
//
@ -484,10 +497,9 @@
this.scanPopupGetFocus()
}
});
} else {
}else {
//
this.$throttle(this.submit, 2000, this)()
}
},

Loading…
Cancel
Save