From 453394dd3e9702850e73af8a1960a19ce4a0b1bc Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 12 Nov 2024 15:39:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/deliver/job/deliverDetailBatch.vue | 30 +++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/pages/deliver/job/deliverDetailBatch.vue b/src/pages/deliver/job/deliverDetailBatch.vue index a5a43e30..edbb6418 100644 --- a/src/pages/deliver/job/deliverDetailBatch.vue +++ b/src/pages/deliver/job/deliverDetailBatch.vue @@ -228,8 +228,36 @@ }, - getScanResult(result, managementTypeParams) { + getScanResult(result, managementTypeParams) { this.managementType = managementTypeParams + let array1 = []//记录推荐的库位 + let array2 = []//记录推荐的批次 + this.detailSource.forEach(item=>{ + item.subList.forEach(cur=>{ + array1.push(cur.fromLocationCode) + array2.push(cur.batch) + }) + }) + // 扫描的库位是否在 + const obj1 = array1.find(item=>item == result.fromLocationCode) + const obj2 = array2.find(item=>item == result.label.batch) + if(this.jobContent.allowModifyLocation == 'FALSE'){ + if(!obj1){ + this.showErrorMessage(`不可以扫描推荐库位【${array1.join(',')}】以外的库位`) + return + } + } + if(this.jobContent.allowModifyBatch == 'FALSE'){ + if(!obj2){ + this.showErrorMessage(`不可以扫描推荐批次【${array2.join(',')}】以外的批次`) + return + } + } + if(!obj1){ + this.recommendQty = 0 + }else{ + this.recommendQty = result.balance.qty + } if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ this.setDataBatch(result) }else{