Browse Source

修改发货任务数量校验

hella_online_20240803
lijuncheng 3 months ago
parent
commit
7ce55b4e85
  1. 18
      src/pages/deliver/job/deliverDetail.vue

18
src/pages/deliver/job/deliverDetail.vue

@ -182,20 +182,15 @@
}); });
getDeliverDetail(that.id).then(res => { getDeliverDetail(that.id).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.data == null) { if (res.data &&res.data.subList.length > 0) {
that.showMessage('未获取到详情');
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data; that.jobContent = res.data;
that.jobStatus = res.data.status; that.jobStatus = res.data.status;
that.subList = res.data.subList; that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.subList) that.detailSource = getDataSource(that.detailSource, that.subList)
that.toLocationCode = that.subList[0].toLocationCode that.toLocationCode = that.subList[0].toLocationCode
that.resizeCollapse(); that.resizeCollapse();
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('未获取到详情');
}
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
@ -279,21 +274,24 @@
}) })
}) })
}) })
//
item.totalQty =totalQty item.totalQty =totalQty
}) })
}) })
//
this.detailSource.forEach(detail=>{ this.detailSource.forEach(detail=>{
detail.Items.forEach(item=>{ detail.Items.forEach(item=>{
if(this.jobContent.allowPartialComplete=="FALSE"){
if(item.taskQty!=item.totalQty){ if(item.taskQty!=item.totalQty){
str += `物料号【${item.itemCode}】提交数量【${item.totalQty}】与任务物料数量【${item.taskQty}】不一致\n` str += `物料号【${item.itemCode}】任务数量【${item.taskQty}】与提交数量【${item.totalQty}】不一致\n`
}
} }
}) })
}) })
if(str){ if(str){
str = '任务明细未全部完成,请全部扫描后提交\n' + str str = '不允许提交\n' + str
this.showErrorMessage(str) this.showErrorMessage(str)
} }

Loading…
Cancel
Save