| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode(){ |
| | | // this.hform.HBarCode = 'GXLX00001165' |
| | | // this.getHBarCodeData('GXLX00001165') |
| | | // const str = "GXLX250603001-01@10"; |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.hform.HBarCode = res.result |
| | | this.getHBarCodeData(res.result) |
| | | var str = res.result |
| | | if(str.includes('@')) { |
| | | const parts = str.split('@'); |
| | | this.hform.HBarCode = parts[0] |
| | | this.hform.HProcNo = parts[1] |
| | | this.getHBarCodeData(parts[0]) |
| | | this.getHProcNoData(parts[0],parts[1]) |
| | | }else{ |
| | | this.hform.HBarCode = res.result |
| | | this.getHBarCodeData(res.result) |
| | | } |
| | | } |
| | | }); |
| | | }, |