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. 56
      src/pages/package/job/overPackageJobDetail.vue

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

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

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

@ -338,23 +338,47 @@
// } // }
}, },
checkSubmit() { 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 let str=""
var toPackQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].toPackQty this.detailSource.forEach(detail => {
if (tempHandleQty == 0) { detail.Items.forEach(item => {
this.showErrorMessage("实际数量为0,请先扫描数据") var taskQty =0;
return item.taskQty =calc.add(taskQty,item.qty)
} var totalQty =0;
if (tempHandleQty > tempQty) { item.Locations.forEach(lco => {
// lco.Batchs.forEach(batch => {
this.showCommitMessage("实际数量【" + tempHandleQty + "】大于需求数量" + "【" + tempQty + "】, 是否提交?", tempHandleQty, batch.Records.forEach(record => {
toPackQty) if(record){
} else if (tempHandleQty < tempQty) { var hanleQty =record.qty?record.qty:0
this.showCommitMessage("实际数量【" + tempHandleQty + "】小于需求数量" + "【" + tempQty + "】, 是否提交?", tempHandleQty, totalQty = calc.add(totalQty,hanleQty)
toPackQty) }
} else {
this.packageHint(tempHandleQty, toPackQty) })
})
})
//
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(commitHandleQty, toPackQty)
} }
}, },
packageHint(tempHandleQty, toPackQty) { packageHint(tempHandleQty, toPackQty) {
// //

Loading…
Cancel
Save