From 7ce55b4e85a8ccc4d7661ffdf6c1b0769d91bff1 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Mon, 26 Aug 2024 18:54:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E8=B4=A7=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=95=B0=E9=87=8F=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/deliver/job/deliverDetail.vue | 32 ++++++++++++------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/pages/deliver/job/deliverDetail.vue b/src/pages/deliver/job/deliverDetail.vue index 91249a41..a000f2a5 100644 --- a/src/pages/deliver/job/deliverDetail.vue +++ b/src/pages/deliver/job/deliverDetail.vue @@ -182,20 +182,15 @@ }); getDeliverDetail(that.id).then(res => { uni.hideLoading(); - if (res.data == null) { - that.showMessage('未获取到详情'); + if (res.data &&res.data.subList.length > 0) { + that.jobContent = res.data; + that.jobStatus = res.data.status; + that.subList = res.data.subList; + that.detailSource = getDataSource(that.detailSource, that.subList) + that.toLocationCode = that.subList[0].toLocationCode + that.resizeCollapse(); } else { - if (res.data.subList.length > 0) { - that.jobContent = res.data; - that.jobStatus = res.data.status; - - that.subList = res.data.subList; - that.detailSource = getDataSource(that.detailSource, that.subList) - that.toLocationCode = that.subList[0].toLocationCode - that.resizeCollapse(); - } else { - that.showMessage('列表数据为0'); - } + that.showMessage('未获取到详情'); } }).catch(error => { uni.hideLoading() @@ -279,21 +274,24 @@ }) }) }) + //实际扫描的数量 item.totalQty =totalQty }) }) - + //如果允许部分提交任务有扫描记录就可以直接提交;如果不允许部分执行,任务数量和提交数量不一致给出提示 this.detailSource.forEach(detail=>{ detail.Items.forEach(item=>{ - if(item.taskQty!=item.totalQty){ - str += `物料号【${item.itemCode}】提交数量【${item.totalQty}】与任务物料数量【${item.taskQty}】不一致\n` + if(this.jobContent.allowPartialComplete=="FALSE"){ + if(item.taskQty!=item.totalQty){ + str += `物料号【${item.itemCode}】任务数量【${item.taskQty}】与提交数量【${item.totalQty}】不一致\n` + } } }) }) if(str){ - str = '任务明细未全部完成,请全部扫描后提交\n' + str + str = '不允许提交\n' + str this.showErrorMessage(str) }