skyouc
17 小时以前 f2e9b22a4cd54705700ebb69f5f04de6a7eccce8
no message
1个文件已修改
52 ■■■■■ 已修改文件
pages/pakin/pakin.vue 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/pakin/pakin.vue
@@ -126,6 +126,12 @@
                <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>
@@ -143,7 +149,8 @@
                msgType1: 'success',
                msgType: 'success',
                messageText: '',
                title: '',
                title: '',
                recomLoc: '',
                content: '',
                barcodeFocus: true,
                matFocus: false,
@@ -340,7 +347,8 @@
                        this.messageToggle('error')
                        return;
                    }
                }
                }
                uni.request({
                    url: that.baseUrl + '/pda/comb/auth',
                    data: JSON.stringify({
@@ -355,12 +363,15 @@
                    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')
@@ -375,7 +386,38 @@
                        }
                    }
                });
            },
            },
            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 = '警告'