6.10/优化

This commit is contained in:
THK3121 2023-06-10 16:09:58 +08:00
parent 50a2cac271
commit 4bd50eb5c9
3 changed files with 61 additions and 35 deletions

View File

@ -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) {

View File

@ -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);

View File

@ -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() {