调整商品扫码导入
This commit is contained in:
parent
55b1f3b706
commit
a9400f5482
@ -125,7 +125,6 @@
|
|||||||
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(e)
|
|
||||||
if (e.status == 200) {
|
if (e.status == 200) {
|
||||||
Toast(e.data.msg)
|
Toast(e.data.msg)
|
||||||
this.addGoodsShow = false
|
this.addGoodsShow = false
|
||||||
@ -139,7 +138,6 @@
|
|||||||
Toast('已经导入过该商品了')
|
Toast('已经导入过该商品了')
|
||||||
this.addGoodsShow = false
|
this.addGoodsShow = false
|
||||||
}
|
}
|
||||||
console.log(err);
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.item = []
|
this.item = []
|
||||||
@ -192,7 +190,6 @@
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.searchGoodsShow = true
|
this.searchGoodsShow = true
|
||||||
} else {
|
} else {
|
||||||
this.scanCode();
|
this.scanCode();
|
||||||
@ -218,7 +215,6 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async seachBarCode(code) {
|
async seachBarCode(code) {
|
||||||
console.log(code);
|
|
||||||
const {
|
const {
|
||||||
data
|
data
|
||||||
} = await seachBarCodeAPI({
|
} = await seachBarCodeAPI({
|
||||||
@ -231,25 +227,7 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log(data.list[0]);
|
this.goods = data.list
|
||||||
post_product_import(data.list[0].product_id).then(e => {
|
|
||||||
console.log(e)
|
|
||||||
if (e.status == 200) {
|
|
||||||
Toast(e.data.msg)
|
|
||||||
this.addGoodsShow = false
|
|
||||||
if (e.status == 400) {
|
|
||||||
Toast(e.message)
|
|
||||||
this.addGoodsShow = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
if (err == "已经导入过该商品了") {
|
|
||||||
Toast('已经导入过该商品了')
|
|
||||||
this.addGoodsShow = false
|
|
||||||
}
|
|
||||||
console.log(err);
|
|
||||||
})
|
|
||||||
// this.goods = data.list
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user