Browse Source

Merge branch 'hella_online_20240906' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into hella_online_20240906

hella_online_20240906
zhang_li 3 months ago
parent
commit
f09a512fc2
  1. 1
      src/pages/package/job/overPackageJob.vue
  2. 54
      src/pages/package/job/overPackageJobDetail.vue

1
src/pages/package/job/overPackageJob.vue

@ -235,6 +235,7 @@
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
this.openScanPopup()
}
var list = res.data.list;
this.totalCount = res.data.total

54
src/pages/package/job/overPackageJobDetail.vue

@ -338,23 +338,47 @@
// }
},
checkSubmit() {
var tempHandleQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].handleQty
var tempQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].qty
var toPackQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].toPackQty
if (tempHandleQty == 0) {
this.showErrorMessage("实际数量为0,请先扫描数据")
return
}
if (tempHandleQty > tempQty) {
//
this.showCommitMessage("实际数量【" + tempHandleQty + "】大于需求数量" + "【" + tempQty + "】, 是否提交?", tempHandleQty,
toPackQty)
} else if (tempHandleQty < tempQty) {
this.showCommitMessage("实际数量【" + tempHandleQty + "】小于需求数量" + "【" + tempQty + "】, 是否提交?", tempHandleQty,
toPackQty)
let str=""
this.detailSource.forEach(detail => {
detail.Items.forEach(item => {
var taskQty =0;
item.taskQty =calc.add(taskQty,item.qty)
var totalQty =0;
item.Locations.forEach(lco => {
lco.Batchs.forEach(batch => {
batch.Records.forEach(record => {
if(record){
var hanleQty =record.qty?record.qty:0
totalQty = calc.add(totalQty,hanleQty)
}
})
})
})
//
item.totalQty =totalQty
})
})
//
this.detailSource.forEach(detail=>{
detail.Items.forEach(item=>{
if(item.taskQty!=item.totalQty){
str += `物料号【${item.itemCode}】实际提交数量【${item.totalQty}】与任务数量【${item.taskQty}】与不一致\n`
}
})
})
var toPackQty = this.detailSource[0].Items[0].qty
var commitHandleQty =this.detailSource[0].Items[0].totalQty
if(str){
str ="是否提交\n"+str
this.showCommitMessage(str,commitHandleQty,toPackQty)
}else {
this.packageHint(tempHandleQty, toPackQty)
this.packageHint(commitHandleQty, toPackQty)
}
},
packageHint(tempHandleQty, toPackQty) {
//

Loading…
Cancel
Save