| | |
| | | <view class="container"> |
| | | <!-- 主内容区 --> |
| | | <!-- <view class="scan-container"> --> |
| | | <text class="main-title">来料扫码检验</text> |
| | | <text class="subtitle">请对准物料条码,保持10-15cm距离</text> |
| | | <!-- 扫描框 --> |
| | | <view class="scan-box" @click="startScan"> |
| | | <view class="scan-line" :style="{top: linePosition + '%'}"></view> |
| | | </view> |
| | | <!-- 手动输入 --> |
| | | <!-- <button class="manual-input" @click="showManualInput">手动输入条码</button> --> |
| | | <text class="main-title">来料扫码检验</text> |
| | | <text class="subtitle">请对准物料条码,保持10-15cm距离</text> |
| | | <!-- 扫描框 --> |
| | | <view class="scan-box" @click="startScan"> |
| | | <view class="scan-line" :style="{top: linePosition + '%'}"></view> |
| | | </view> |
| | | <!-- 手动输入 --> |
| | | <!-- <button class="manual-input" @click="showManualInput">手动输入条码</button> --> |
| | | <!-- </view> --> |
| | | <!-- 手动输入弹窗 --> |
| | | <!-- <uni-popup ref="inputPopup" type="dialog"> |
| | |
| | | </uni-popup> --> |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | |
| | | data: { |
| | | Barcode: code |
| | | } |
| | | }).then(ress => { |
| | | if (ress.data.tbBillList.length > 0) { |
| | | }).then(ress => { |
| | | if (ress.status == 0) { |
| | | if (ress.data.tbBillList.length > 0) { |
| | | |
| | | if (ress.data.tbBillList[0].fsubmit === 1) { |
| | | if (ress.data.tbBillList[0].fsubmit === 1) { |
| | | |
| | | uni.navigateTo({ |
| | | url: 'Add?id=' + ress.data.tbBillList[0].id + '&lotNo=' + ress.data |
| | | .tbBillList[0].lotNo + '&releaseNo=' + ress.data.tbBillList[0] |
| | | .releaseNo + |
| | | '¤t=B' |
| | | }) |
| | | uni.navigateTo({ |
| | | url: 'Add?id=' + ress.data.tbBillList[0].id + '&lotNo=' + ress.data |
| | | .tbBillList[0].lotNo + '&releaseNo=' + ress.data.tbBillList[0] |
| | | .releaseNo + |
| | | '¤t=B' |
| | | }) |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: 'Add?id=' + ress.data.tbBillList[0].id + '&lotNo=' + ress.data |
| | | .tbBillList[0].lotNo + '&releaseNo=' + ress.data.tbBillList[0] |
| | | .releaseNo + |
| | | '¤t=A' |
| | | }) |
| | | |
| | | |
| | | // uni.showModal({ |
| | | // title: '开始检验', |
| | | // content: '开始检验将记录当前时间为开始检验时间,确定开始?', |
| | | // success: function(res) { |
| | | // if (res.confirm) { |
| | | // uni.navigateTo({ |
| | | // url: 'Add?id=' + ress.data.tbBillList[0].id + '&lotNo=' + ress.data |
| | | // .tbBillList[0].lotNo + '&releaseNo=' + ress.data.tbBillList[0] |
| | | // .releaseNo + |
| | | // '¤t=A' |
| | | // }) |
| | | // } else { |
| | | |
| | | // } |
| | | // } |
| | | // }) |
| | | } |
| | | |
| | | } else { |
| | | |
| | | uni.navigateTo({ |
| | | url: 'Add?id=' + ress.data.tbBillList[0].id + '&lotNo=' + ress.data |
| | | .tbBillList[0].lotNo + '&releaseNo=' + ress.data.tbBillList[0] |
| | | .releaseNo + |
| | | '¤t=A' |
| | | uni.showModal({ |
| | | title: '扫码错误', |
| | | content: '未查询到条码【' + code + '】相关单据内容', |
| | | showCancel: false |
| | | }) |
| | | //showScanError('提示:未查询到条码【' + res.result + '】相关单据内容') |
| | | //this.msg = '提示:未查询到条码【' + res.result + '】相关单据内容' |
| | | } |
| | | |
| | | } else { |
| | | console.log(ress.data.message); |
| | | uni.showModal({ |
| | | title: '扫码错误', |
| | | content: '未查询到条码【' + code + '】相关单据内容', |
| | | title: '提示', |
| | | content: ress.message, |
| | | showCancel: false |
| | | }) |
| | | //showScanError('提示:未查询到条码【' + res.result + '】相关单据内容') |
| | | //this.msg = '提示:未查询到条码【' + res.result + '】相关单据内容' |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | |
| | |
| | | |
| | | // 确认手动输入 |
| | | confirmManualInput(value) { |
| | | |
| | | |
| | | this.handleScanResult(value) |
| | | }, |
| | | |