From 60c07403e4beca114bc322e41d733b5dd081ceaa Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Fri, 21 Jun 2024 10:42:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1--=E6=89=AB=E6=8F=8FASN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/jobList/jobList.vue | 8 ++++--- src/pages/purchaseReceipt/job/receiptJob.vue | 25 +++++++++++--------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/mycomponents/jobList/jobList.vue b/src/mycomponents/jobList/jobList.vue index d25588cc..460c590c 100644 --- a/src/mycomponents/jobList/jobList.vue +++ b/src/mycomponents/jobList/jobList.vue @@ -26,6 +26,7 @@ import { onShow } from '@dcloudio/uni-app'; }, data() { return { + isScanedASN:false, list: [] // [{ // title:'哈哈哈哈', @@ -36,13 +37,14 @@ import { onShow } from '@dcloudio/uni-app'; props: { }, methods:{ - openList(list){ - this.list = list + openList(list,isScanedASN=false){ + this.list = list; + this.isScanedASN = isScanedASN; this.$refs.listPopup.open('center') }, selectItem(item,index){ this.$refs.listPopup.close(); - this.$emit("selectItem", item); + this.$emit("selectItem", item,this.isScanedASN); } } } diff --git a/src/pages/purchaseReceipt/job/receiptJob.vue b/src/pages/purchaseReceipt/job/receiptJob.vue index 455dfe9f..f2709948 100644 --- a/src/pages/purchaseReceipt/job/receiptJob.vue +++ b/src/pages/purchaseReceipt/job/receiptJob.vue @@ -20,7 +20,7 @@ - + @@ -344,16 +344,19 @@ openScanPopup() { this.$refs.scanPopup.openScanPopup(); }, - selectItem(item) { - this.$refs.scanPopup.closeScanPopup(); - this.openJobDetail(item, item.packingNumber); + selectItem(item,isScanedASN=false) { + + this.$refs.scanPopup.closeScanPopup(); + if(isScanedASN){ + this.openJobDetail(item) + }else{ + ; + this.openJobDetail(item, item.packingNumber); + } + }, getScanResult(result) { - - if(result.scanMessage.indexOf('ASN')>-1){ - this.showMessage('请扫描箱标签') - return - } + try { let filters = [] @@ -419,9 +422,9 @@ console.log('list', list) if (list.length > 1) { - this.$refs.jobList.openList(list) + this.$refs.jobList.openList(list,result.scanMessage.indexOf('ASN')>-1) } else { - this.selectItem(list[0]) + this.selectItem(list[0],result.scanMessage.indexOf('ASN')>-1) } } else { this.showMessage('未查找到任务')