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.street = e.value[1].name
this.showPicker = false this.showPicker = false
this.$emit('selectPlce', e) this.$emit('selectPlce', e)
let adress = Cache.get('LOCATION_DATA',true) let adress = Cache.get('LOCATION_DATA',true)
adress.address_component.street=e.value[1].name
Cache.set('LOCATION_DATA',adress) Cache.set('LOCATION_DATA',adress)
}, },
changeHandler(e) { changeHandler(e) {

View File

@ -99,25 +99,24 @@
title: '请输入正确的核销码' 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({ setTimeout(() => {
// title: '' verifierOrder(this.mer_id,this.verify_code)
// }); .then(res => {
// setTimeout(() => { uni.navigateTo({
// verifierOrder(this.mer_id,this.verify_code) url: '/pages/admin/cancellate_result/index?code='+this.verify_code+'&mer_id='+this.mer_id
// .then(res => { });
// self.orderInfo = res.data })
// self.iShidden = true .catch(res => {
// }) self.verify_code = ''
// .catch(res => { return self.$util.Tips({
// self.verify_code = '' title: res
// return self.$util.Tips({ });
// title: res });
// }); }, 800);
// });
// }, 800);
}, },
// //
scanCode() { scanCode() {
@ -127,10 +126,26 @@
scanType: ["qrCode", "barCode"], scanType: ["qrCode", "barCode"],
success(res) { success(res) {
self.verify_code = res.result self.verify_code = res.result
uni.navigateTo({ console.log(self.verify_code);
url: '/pages/admin/cancellate_result/index?code='+self.verify_code+'&mer_id='+self.mer_id verifierOrder(self.mer_id,self.verify_code)
}); .then(res => {
// self.codeChange(); 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) { fail(res) {
console.log(res); console.log(res);

View File

@ -122,6 +122,7 @@
addGoodsopen() { addGoodsopen() {
if (this.item) { if (this.item) {
post_product_import(this.item.product_id).then(e => { post_product_import(this.item.product_id).then(e => {
console.log(res);
if (e.status == 200) { if (e.status == 200) {
Toast(e.data.msg) Toast(e.data.msg)
this.addGoodsShow = false this.addGoodsShow = false
@ -212,19 +213,30 @@
}) })
}, },
async seachBarCode(code) { async seachBarCode(code) {
const { await seachBarCodeAPI({
data
} = await seachBarCodeAPI({
code: code, code: code,
mer_id: this.mer_id mer_id: this.mer_id
}) }).then(res=>{
if (data.list.length < 1) { if(!res.data){
uni.navigateTo({ // Toast(res.message)
url: `/pages/product/addGoods/index?mer_id=${this.mer_id}&code=${code}` uni.showToast({
}) title: res.message,
return duration: 3000,
} icon:'none',
this.goods = data.list });
}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() { onPullDownRefresh() {