From 55b1f3b706b4b4d081e6f09cb96c4ee2a512e442 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Wed, 31 May 2023 14:19:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BE=9B=E5=BA=94=E9=93=BE?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E7=AE=A1=E7=90=86=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/nongKe/gather/select_warehouse.vue | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/pages/nongKe/gather/select_warehouse.vue b/pages/nongKe/gather/select_warehouse.vue index 7e250cd..4f82806 100644 --- a/pages/nongKe/gather/select_warehouse.vue +++ b/pages/nongKe/gather/select_warehouse.vue @@ -107,7 +107,6 @@ onLoad(e) { this.mer_id = e.mer_id this.stype = e.stype - console.log(this.stype); if (this.stype == 1) { return this.goodsData[0].name = '商品添加' } @@ -186,14 +185,31 @@ } }, navigato(type) { - type === 1 ? this.searchGoodsShow = true : this.scanCode(); + if (type === 1) { + if (this.stype == 1) { + uni.navigateTo({ + url: '/pages/product/addGoods/index' + }); + return; + } + + this.searchGoodsShow = true + } else { + this.scanCode(); + } }, scanCode() { const self = this uni.scanCode({ scanType: ["qrCode", "barCode", "datamatrix", "pdf417"], success(res) { - self.seachBarCode(res.result) + if (self.stype == 1) { + uni.navigateTo({ + url: `/pages/product/addGoods/index?mer_id=${self.mer_id}&code=${res.result}` + }) + } else { + self.seachBarCode(res.result) + } }, fail(res) {