Commit 02b3dfef by wangyalan-git

库存统计,领用记录,库存统计,领用详情

parent f9207d15
<template> <template>
<div class="page"> <div class="page">
<navbar title="扫码出库" rightText="完成" @rightClick="submit" ></navbar> <navbar title="扫码出库" rightText="完成" @rightClick="submit"></navbar>
<div class="container"> <div class="container">
<div class="info" v-if="JSON.stringify(userInfo)!= '{}'"> <div class="info" v-if="JSON.stringify(userInfo)!= '{}'">
<p>申领人: <span>{{userInfo.name}}</span></p> <p>申领人: <span>{{userInfo.name}}</span></p>
...@@ -68,6 +68,9 @@ export default { ...@@ -68,6 +68,9 @@ export default {
}) })
}) })
console.log('成功', result) console.log('成功', result)
},
error: function (res) {
alert(res)
} }
}) })
// const result = '{"onlyId":"84c322654e1a4ae4bf93c99839a5af72","memberId":36}' // const result = '{"onlyId":"84c322654e1a4ae4bf93c99839a5af72","memberId":36}'
...@@ -84,16 +87,16 @@ export default { ...@@ -84,16 +87,16 @@ export default {
// 物品条形码扫描 // 物品条形码扫描
scanBarCode () { scanBarCode () {
/* eslint-disable */ /* eslint-disable */
if (JSON.stringify(this.userInfo) == '{}') { // if (JSON.stringify(this.userInfo) == '{}') {
this.$toast.fail('请先扫描员工二维码') // this.$toast.fail('请先扫描员工二维码')
return // return
} // }
window.qing.call('scanQRCode', { window.qing.call('scanQRCode', {
needResult: 1, needResult: 1,
success: function (result) { success: function (result) {
// result.data = '{"barCode":"f7c3af254e5a40caaf7dab1b06fd7a1c","memberId":53}' // result.data = '{"barCode":"f7c3af254e5a40caaf7dab1b06fd7a1c","memberId":53}'
// const data = JSON.parse(result.data) // const data = JSON.parse(result.data)
getGoodsInfo({ barCode: result.data.qrcode_str}).then(res => { getGoodsInfo({ barCode: result.data.qrcode_str }).then(res => {
let data = res.data let data = res.data
let params = { let params = {
id: data.id, id: data.id,
...@@ -146,7 +149,7 @@ export default { ...@@ -146,7 +149,7 @@ export default {
item.id === id item.id === id
) )
this.list[isIndex].goodsNum = value this.list[isIndex].goodsNum = value
console.log('修改数量',this.list) console.log('修改数量', this.list)
}, },
// 提交 // 提交
submit () { submit () {
...@@ -154,7 +157,7 @@ export default { ...@@ -154,7 +157,7 @@ export default {
this.$toast.fail('请先扫描物品') this.$toast.fail('请先扫描物品')
return return
} }
console.log('this.userInfo.id',this.userInfo.id) console.log('this.userInfo.id', this.userInfo.id)
let params = { let params = {
memberId: this.userInfo.id, memberId: this.userInfo.id,
outMemberId: this.$store.getters.memberId, outMemberId: this.$store.getters.memberId,
......
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