| | |
| | | <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content"
|
| | | @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>
|
| | |
| | | msgType1: 'success',
|
| | | msgType: 'success',
|
| | | messageText: '',
|
| | | title: '',
|
| | | title: '', |
| | | recomLoc: '',
|
| | | content: '',
|
| | | barcodeFocus: true,
|
| | | matFocus: false,
|
| | |
| | | // 不设置定时器 会出现扫入的字符串不全
|
| | | setTimeout(() => {
|
| | | var len = this.barcode.length
|
| | | if (len != 8) {
|
| | | uni.showToast({
|
| | | title: '托盘码有误请重试',
|
| | | icon: "none",
|
| | | position: 'top'
|
| | | });
|
| | | // this.barcodeFocuss()
|
| | | return;
|
| | | }
|
| | | // if (len != 8) {
|
| | | // uni.showToast({
|
| | | // title: '托盘码有误请重试',
|
| | | // icon: "none",
|
| | | // position: 'top'
|
| | | // });
|
| | | // // this.barcodeFocuss()
|
| | | // return;
|
| | | // }
|
| | | // this.focuss()
|
| | | }, 200)
|
| | | },
|
| | |
| | | // 搜索物料
|
| | | findMat() { |
| | | let that = this |
| | | if (that.matnr == null && that.matnr == '') { |
| | | if (that.matnr == null || that.matnr == '') { |
| | | uni.showToast({ |
| | | title: "物料码不能为空!!", |
| | | title: "订单号不能为空!!", |
| | | icon: "none", |
| | | position: "top" |
| | | }) |
| | | return; |
| | | } else { |
| | | } |
| | | uni.navigateTo({ |
| | | url: "../pakin/pakinSelector?barcode=" + that.matnr, |
| | | success:function(res){ |
| | | let matnrs = that.dataList.map(data => data.matnr); |
| | | console.log(matnrs); |
| | | res.eventChannel.emit('acceptOpenPager', matnrs) |
| | | } |
| | | }); |
| | | }
|
| | |
|
| | | },
|
| | |
|
| | | checkMat(mat) { |
| | |
| | | this.messageToggle('error')
|
| | | 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()
|
| | | 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 = '警告'
|
| | |
| | | resst() {
|
| | | this.dataList = []
|
| | | this.barcode = ''
|
| | | this.matnr = ''
|
| | | this.barcodeFocuss()
|
| | | },
|
| | | }
|