Commit 267f5fca by wangyalan-git

扫码测试

parent adaa7a9a
...@@ -96,6 +96,10 @@ export default { ...@@ -96,6 +96,10 @@ export default {
needResult: 1, needResult: 1,
success: function (result) { success: function (result) {
getGoodsInfo({ barCode: result.data.qrcode_str }).then(res => { getGoodsInfo({ barCode: result.data.qrcode_str }).then(res => {
if(!res.data){
that.$toast('该物品暂未入库')
return
}
let data = res.data let data = res.data
let params = { let params = {
id: data.id, id: data.id,
...@@ -119,7 +123,32 @@ export default { ...@@ -119,7 +123,32 @@ export default {
} }
}) })
// getGoodsInfo({ barCode: '11111111111111111111' }).then(res => {
// if(!res.data){
// this.$toast('该物品暂未入库')
// return
// }
// console.log('data',res)
// let data = res.data
// let params = {
// id: data.id,
// name: data.name,
// goodsNo: data.goodsNo,
// goodsCategoryId: data.goodsCategoryId,
// goodsCategoryName: data.goodsCategoryName,
// goodsNum: 1,
// maxNum: data.goodsNum
// }
// let isExist = that.list.findIndex(item =>
// item.id === data.id
// )
// if (isExist === -1) {
// that.list.push(params)
// } else {
// that.list[isExist].goodsNum = that.list[isExist].goodsNum + 1
// }
// console.log('要出库的商品', that.list)
// })
}, },
// 数量修改 // 数量修改
changeNum (value, id) { changeNum (value, id) {
...@@ -142,6 +171,7 @@ export default { ...@@ -142,6 +171,7 @@ export default {
outMemberId: this.$store.getters.memberId, outMemberId: this.$store.getters.memberId,
vankeGoodsDtoList: this.list vankeGoodsDtoList: this.list
} }
console.log('出库', params)
outBoundGoods(params).then(res => { outBoundGoods(params).then(res => {
this.$toast.success('出库成功') this.$toast.success('出库成功')
this.list = [] this.list = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment