From 4bd50eb5c9011983c7b10de364bf70e3f57791cc Mon Sep 17 00:00:00 2001 From: THK3121 Date: Sat, 10 Jun 2023 16:09:58 +0800 Subject: [PATCH] =?UTF-8?q?6.10/=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/zbpSwiper.vue | 3 +- pages/admin/order_cancellation/index.vue | 59 +++++++++++++++--------- pages/nongKe/gather/select_warehouse.vue | 34 +++++++++----- 3 files changed, 61 insertions(+), 35 deletions(-) diff --git a/components/zbpSwiper.vue b/components/zbpSwiper.vue index 800db19..2d461b0 100644 --- a/components/zbpSwiper.vue +++ b/components/zbpSwiper.vue @@ -107,8 +107,7 @@ this.street = e.value[1].name this.showPicker = false this.$emit('selectPlce', e) - let adress = Cache.get('LOCATION_DATA',true) - adress.address_component.street=e.value[1].name + let adress = Cache.get('LOCATION_DATA',true) Cache.set('LOCATION_DATA',adress) }, changeHandler(e) { diff --git a/pages/admin/order_cancellation/index.vue b/pages/admin/order_cancellation/index.vue index 2a43d77..b0dde4d 100644 --- a/pages/admin/order_cancellation/index.vue +++ b/pages/admin/order_cancellation/index.vue @@ -99,25 +99,24 @@ title: '请输入正确的核销码' }); - uni.navigateTo({ - url: '/pages/admin/cancellate_result/index?code='+this.verify_code+'&mer_id='+this.mer_id + + self.$util.Tips({ + title: '查询中' }); - // self.$util.Tips({ - // title: '查询中' - // }); - // setTimeout(() => { - // verifierOrder(this.mer_id,this.verify_code) - // .then(res => { - // self.orderInfo = res.data - // self.iShidden = true - // }) - // .catch(res => { - // self.verify_code = '' - // return self.$util.Tips({ - // title: res - // }); - // }); - // }, 800); + setTimeout(() => { + verifierOrder(this.mer_id,this.verify_code) + .then(res => { + uni.navigateTo({ + url: '/pages/admin/cancellate_result/index?code='+this.verify_code+'&mer_id='+this.mer_id + }); + }) + .catch(res => { + self.verify_code = '' + return self.$util.Tips({ + title: res + }); + }); + }, 800); }, // 扫码核销 scanCode() { @@ -127,10 +126,26 @@ scanType: ["qrCode", "barCode"], success(res) { self.verify_code = res.result - uni.navigateTo({ - url: '/pages/admin/cancellate_result/index?code='+self.verify_code+'&mer_id='+self.mer_id - }); - // self.codeChange(); + console.log(self.verify_code); + verifierOrder(self.mer_id,self.verify_code) + .then(res => { + uni.navigateTo({ + url: '/pages/admin/cancellate_result/index?code='+self.verify_code+'&mer_id='+self.mer_id + }); + }) + .catch(res => { + self.verify_code = '' + return self.$util.Tips({ + title: res + }); + }); + // if(!self.verify_code){ + // return + // }else{ + // uni.navigateTo({ + // url: '/pages/admin/cancellate_result/index?code='+self.verify_code+'&mer_id='+self.mer_id + // }); + // } }, fail(res) { console.log(res); diff --git a/pages/nongKe/gather/select_warehouse.vue b/pages/nongKe/gather/select_warehouse.vue index fcaa92c..82c1243 100644 --- a/pages/nongKe/gather/select_warehouse.vue +++ b/pages/nongKe/gather/select_warehouse.vue @@ -122,6 +122,7 @@ addGoodsopen() { if (this.item) { post_product_import(this.item.product_id).then(e => { + console.log(res); if (e.status == 200) { Toast(e.data.msg) this.addGoodsShow = false @@ -212,19 +213,30 @@ }) }, async seachBarCode(code) { - const { - data - } = await seachBarCodeAPI({ + await seachBarCodeAPI({ code: code, mer_id: this.mer_id - }) - if (data.list.length < 1) { - uni.navigateTo({ - url: `/pages/product/addGoods/index?mer_id=${this.mer_id}&code=${code}` - }) - return - } - this.goods = data.list + }).then(res=>{ + if(!res.data){ + // Toast(res.message) + uni.showToast({ + title: res.message, + duration: 3000, + icon:'none', + }); + }else{ + if (data.list.length < 1) { + uni.navigateTo({ + url: `/pages/product/addGoods/index?mer_id=${this.mer_id}&code=${code}` + }) + return + } + this.goods = data.list + } + }) + console.log(data); + + }, }, onPullDownRefresh() {