| | |
| | | <view class="code-decs">源托盘:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="orgBarcode" :focus="orgBarcodeFocus" /> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">出库站号:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="devNo" /> |
| | | </view> |
| | | <view class="item" style="display: none;"> |
| | | <view class="code-decs">台车码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" /> |
| | |
| | | return; |
| | | } |
| | | } |
| | | |
| | | uni.request({ |
| | | url: that.baseUrl + '/mobile/comb/auth', |
| | | data: JSON.stringify({ |
| | | orderNo: that.orderNo, |
| | | barcode: that.barcode, |
| | | boxType1: that.boxType1, |
| | | combMats: that.dataList, |
| | | type: '1' |
| | | }), |
| | | url: `${this.baseUrl}/mobile/agv/collectionPakin/auth`, |
| | | method: 'POST', |
| | | data: JSON.stringify({ |
| | | orgBarcode: that.orgBarcode, |
| | | tarBarcode: that.barcode, |
| | | devNo: that.devNo, |
| | | combMats: that.dataList |
| | | }), |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | token: that.token |
| | | }, |
| | | success(result) { |
| | | var res = result.data |
| | | success: (result) => { |
| | | const res = result.data |
| | | if (res.code === 200) { |
| | | that.resst(); |
| | | that.messageText = "组托成功" |
| | | that.messageToggle('success') |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | innerAudioContext.src = '/static/music/pakinOk.mp3'; |
| | | innerAudioContext.play() |
| | | } else if (res.code == 403) { |
| | | that.messageText = res.msg |
| | | that.messageToggle('error') |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '../login/login' |
| | | }); |
| | | }, 1000); |
| | | that.clearAll() |
| | | that.showMessage(res.msg, 'success') |
| | | // this.showMessage('组托成功') |
| | | // // 播放成功提示音 |
| | | // const audio = uni.createInnerAudioContext() |
| | | // audio.src = '/static/music/pakinOk.mp3' |
| | | // audio.play() |
| | | } else if (res.code === 403) { |
| | | that.handleAuthError(res.msg) |
| | | } else { |
| | | that.messageText = res.msg |
| | | that.messageToggle('error') |
| | | that.showMessage(res.msg, 'error') |
| | | } |
| | | }, |
| | | complete: () => { |
| | | // 请求完成后解除防抖锁定 |
| | | setTimeout(() => { |
| | | that.isCombing = false |
| | | }, 500) |
| | | } |
| | | }); |
| | | // uni.request({ |
| | | // url: that.baseUrl + '/mobile/comb/auth', |
| | | // data: JSON.stringify({ |
| | | // orderNo: that.orderNo, |
| | | // barcode: that.barcode, |
| | | // boxType1: that.boxType1, |
| | | // combMats: that.dataList, |
| | | // type: '1' |
| | | // }), |
| | | // method: 'POST', |
| | | // header: { |
| | | // 'token': uni.getStorageSync('token') |
| | | // }, |
| | | // success(result) { |
| | | // var res = result.data |
| | | // if (res.code === 200) { |
| | | // that.resst(); |
| | | // that.messageText = "组托成功" |
| | | // that.messageToggle('success') |
| | | // const innerAudioContext = uni.createInnerAudioContext(); |
| | | // innerAudioContext.src = '/static/music/pakinOk.mp3'; |
| | | // innerAudioContext.play() |
| | | // } else if (res.code == 403) { |
| | | // that.messageText = res.msg |
| | | // that.messageToggle('error') |
| | | // setTimeout(() => { |
| | | // uni.reLaunch({ |
| | | // url: '../login/login' |
| | | // }); |
| | | // }, 1000); |
| | | // } else { |
| | | // that.messageText = res.msg |
| | | // that.messageToggle('error') |
| | | // } |
| | | // } |
| | | // }); |
| | | }, |
| | | reset(type) { |
| | | this.msgType = type |