| | |
| | | @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
|
| | | </uni-popup>
|
| | | </view>
|
| | | <!-- 平库库位推荐 --> |
| | | <view> |
| | | <uni-popup ref="recommend" type="dialog"> |
| | | <uni-popup-dialog :type="msgType" mode="base" :cancelText="null" confirmText="确认" title="推荐库位" :content="recomLoc"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view>
|
| | | </view>
|
| | | </template>
|
| | |
|
| | |
| | | msgType: 'success',
|
| | | messageText: '',
|
| | | title: '',
|
| | | recomLoc: '',
|
| | | content: '',
|
| | | barcodeFocus: true,
|
| | | matFocus: false,
|
| | |
| | | return;
|
| | | }
|
| | | }
|
| | | |
| | | uni.request({
|
| | | url: that.baseUrl + '/pda/comb/auth',
|
| | | data: JSON.stringify({
|
| | |
| | | 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()
|
| | | if (that.barcode.indexOf('PK') >= 0) { |
| | | that.recommendLocs(that) |
| | | } |
| | | that.resst(); |
| | | } else if (res.code == 403) {
|
| | | that.messageText = res.msg
|
| | | that.messageToggle('error')
|
| | |
| | | }
|
| | | });
|
| | | },
|
| | | |
| | | recommendLocs(that) { |
| | | uni.request({ |
| | | url: that.baseUrl + '/pda/recommend/locs', |
| | | method: 'GET', |
| | | header: { |
| | | 'token': uni.getStorageSync('token') |
| | | }, |
| | | success(result) { |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | if (res.data != null && res.data != undefined ) { |
| | | that.recomLoc = '系统推荐将货物放至:' + res.data.locNo |
| | | that.$refs.recommend.open() |
| | | } |
| | | } 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
|
| | | this.title = '警告'
|