Commit 0521542a by wangyalan-git

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

parent 8d09c601
...@@ -56,11 +56,12 @@ export default { ...@@ -56,11 +56,12 @@ export default {
}, },
methods: { methods: {
init () { init () {
window.qing.call('scanQRCode', { window.qing.config({
needResult: 0, debug: true,
success: function (result) { // 声明需要调用的API
alert('初始化' + result) jsApiList: ['scanQRCode']
} // 声明需要监听的事件,声明后可通过 document.addEventListener 绑定监听函数
// jsEventList: ['appear', 'disappear']
}) })
}, },
// 员工二维码扫描 // 员工二维码扫描
...@@ -68,7 +69,7 @@ export default { ...@@ -68,7 +69,7 @@ export default {
window.qing.call('scanQRCode', { window.qing.call('scanQRCode', {
needResult: 1, needResult: 1,
success: function (result) { success: function (result) {
alert('成功' + result.data) alert('成功' + result.data.qrcode_str)
const data = JSON.parse(result.data) const data = JSON.parse(result.data)
checkQcode(data).then(res => { checkQcode(data).then(res => {
console.log('校验结果', res) console.log('校验结果', res)
...@@ -104,6 +105,7 @@ export default { ...@@ -104,6 +105,7 @@ export default {
window.qing.call('scanQRCode', { window.qing.call('scanQRCode', {
needResult: 1, needResult: 1,
success: function (result) { success: function (result) {
alert('物品'+ result.data.qrcode_str)
// 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 => {
......
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