#
zjj
2024-09-09 321a8a61f3cbc8c0c507d7339e1d46f59ec535c2
#
2个文件已添加
4个文件已修改
238 ■■■■■ 已修改文件
pages.json 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/WCS/wcsButton.vue 206 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/css/wms.css/wms.css 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/img/zy_logo.png 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -189,6 +189,13 @@
                "navigationBarTitleText" : "订单组托",
                "enablePullDownRefresh" : false
            }
        },
        {
            "path" : "pages/WCS/wcsButton",
            "style" :
            {
                "navigationBarTitleText" : "WCS按钮"
            }
        }
    ],
    "globalStyle": {
pages/WCS/wcsButton.vue
New file
@@ -0,0 +1,206 @@
<template>
    <view>
        <scroll-view scroll-y class="page">
            <view class="tag-list">
                <picker mode="selector" :range="list" @change="onChange($event)">
                      <view class="picker">
                        {{sta}} 叠盘机
                      </view>
                </picker>
            </view>
            <view class="tag-list">
                <button type="primary" @click="stackBack">空板回退</button>
            </view>
            <view class="tag-list">
                <button type="primary" @click="stackOut">叠盘出库</button>
            </view>
            <view class="tag-list">
                <button type="primary" @click="stackOut2">叠满入库</button>
            </view>
        </scroll-view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                wcsbaseUrl:'',
                list:["114","103"],
                sta:'103',
                msgType: 'success',
                messageText: '',
                title: '',
                content: '',
            }
        },
        onShow() {
            this.wcsbaseUrl = uni.getStorageSync('wcsBaseUrl');
        },
        methods: {
            onChange(e) {
                  this.sta = this.list[e.detail.value];
            },
            stackBack(){
                var that = this
                uni.showModal({
                    title:'提示',
                    content: that.sta+'站确认执行空板回退吗?',
                    success: (res) => {
                        if (res.confirm) {
                            uni.request({
                                url: that.wcsbaseUrl + '/console/stackBack',
                                data: JSON.stringify({
                                    devpNo: that.sta
                                }),
                                method: 'POST',
                                header: {
                                    'token': uni.getStorageSync('token')
                                },
                                success(result) {
                                    var res = result.data
                                    if (res.code === 200) {
                                        uni.showToast({
                                            title:'操作成功',
                                            icon:'success',
                                            duration:2000
                                        })
                                    } else if (res.code == 403) {
                                        that.messageText = res.msg
                                        that.messageToggle('error')
                                        setTimeout(() => {
                                            uni.reLaunch({
                                                url: '../login/login'
                                            });
                                        }, 1000);
                                    } else {
                                        uni.showToast({
                                            title:'操作失败',
                                            icon:'error',
                                            duration:2000
                                        })
                                    }
                                }
                            });
                        } else if (res.cancel) {
                        }
                    }
                })
            },
            stackOut(){
                var that = this
                var devpNo = that.sta == '103'?'123':'122'
                uni.showModal({
                    title:'提示',
                    content: that.sta+'站确认执行叠盘出库吗?',
                    success: (res) => {
                        if (res.confirm) {
                            uni.request({
                                url: that.wcsbaseUrl + '/console/stackOut',
                                data: JSON.stringify({
                                    devpNo: devpNo
                                }),
                                method: 'POST',
                                header: {
                                    'token': uni.getStorageSync('token')
                                },
                                success(result) {
                                    var res = result.data
                                    if (res.code === 200) {
                                        uni.showToast({
                                            title:'操作成功',
                                            icon:'success',
                                            duration:2000
                                        })
                                    } else if (res.code == 403) {
                                        that.messageText = res.msg
                                        that.messageToggle('error')
                                        setTimeout(() => {
                                            uni.reLaunch({
                                                url: '../login/login'
                                            });
                                        }, 1000);
                                    } else {
                                        uni.showToast({
                                            title:'操作失败',
                                            icon:'error',
                                            duration:2000
                                        })
                                    }
                                }
                            });
                        } else if (res.cancel) {
                        }
                    }
                })
            },
            stackOut2(){
                var that = this
                var devpNo = that.sta == '103'?'104':'115'
                uni.showModal({
                    title:'提示',
                    content: that.sta+'站确认执行叠满入库吗?',
                    success: (res) => {
                        if (res.confirm) {
                            uni.request({
                                url: that.wcsbaseUrl + '/console/stackOut',
                                data: JSON.stringify({
                                    devpNo: devpNo
                                }),
                                method: 'POST',
                                header: {
                                    'token': uni.getStorageSync('token')
                                },
                                success(result) {
                                    var res = result.data
                                    if (res.code === 200) {
                                        uni.showToast({
                                            title:'操作成功',
                                            icon:'success',
                                            duration:2000
                                        })
                                    } else if (res.code == 403) {
                                        that.messageText = res.msg
                                        that.messageToggle('error')
                                        setTimeout(() => {
                                            uni.reLaunch({
                                                url: '../login/login'
                                            });
                                        }, 1000);
                                    } else {
                                        uni.showToast({
                                            title:'操作失败',
                                            icon:'error',
                                            duration:2000
                                        })
                                    }
                                }
                            });
                        } else if (res.cancel) {
                        }
                    }
                })
            },
        }
    }
</script>
<style>
.tag-list {
        width: 94%;
        min-height: 30px;
        margin: 10px auto;
        background-color: #FFF;
        border-radius: 5px;
        box-shadow: 0 5upx 20upx rgba(0, 0, 0, 0.2);
    }
    .picker {
        border-radius: 5px;
      padding: 10px;
      background-color: #fff;
      text-align: center;
    }
</style>
pages/home/home.vue
@@ -32,11 +32,11 @@
                        url: '/pakin/pakin'
                    },
                    {
                        title: '拣料站到站',
                        name: 'leftover',
                        title: 'WCS按钮',
                        name: 'wcsButton',
                        color: 'orange',
                        cuIcon: 'pullup',
                        url: '/pakin/leftovers'
                        url: '/WCS/wcsButton'
                    },
                    // {
                    //     title: '再次拣料',
pages/login/login.vue
@@ -9,7 +9,7 @@
        <!-- logo -->
        <view class="logo">
            <view class="logo-box">
                <image src="../../static/img/logo.png" mode="aspectFit"></image>
                <image src="../../static/img/zy_logo.png" mode="aspectFit"></image>
            </view>
        </view>
        <view class="content">
@@ -76,6 +76,18 @@
                        <view class="popup-item-left">项目:</view>
                        <view class="popup-item-right"><input type="text" v-model="url.project"></view>
                    </view>
                    <view class="popup-item">
                        <view class="popup-item-left">WCSIP:</view>
                        <view class="popup-item-right"><input type="text" v-model="url.wcsIp"></view>
                    </view>
                    <view class="popup-item">
                        <view class="popup-item-left">WCS端口:</view>
                        <view class="popup-item-right"><input type="text" v-model="url.wcsPort"></view>
                    </view>
                    <view class="popup-item">
                        <view class="popup-item-left">WCS项目:</view>
                        <view class="popup-item-right"><input type="text" v-model="url.wcsProject"></view>
                    </view>
                    <view class="btn">
                        <view class="btn-left" @click="close">取消</view>
                        <view class="btn-right" @click="settingConfirm">确认</view>
@@ -116,6 +128,7 @@
                    project: ''
                },
                baseUrl: '',
                wcsBaseUrl: '',
                user: {
                    userName: '',
                    password: '',
@@ -166,7 +179,9 @@
            // 保存ip
            settingConfirm() {
                this.baseUrl = "http://" + this.url.ip + ':' + this.url.port + '/' + this.url.project
                this.wcsBaseUrl = "http://" + this.url.wcsIp + ':' + this.url.wcsPort + '/' + this.url.wcsProject
                uni.setStorageSync('baseUrl', this.baseUrl);
                uni.setStorageSync('wcsBaseUrl',this.wcsBaseUrl)
                uni.setStorageSync('url', this.url);
                this.$refs.inputDialog.close()
            },
static/css/wms.css/wms.css
@@ -77,7 +77,7 @@
    font-size: 14px;
}
.popup-item-left {
    width: 16vw;
    width: 18vw;
    padding-right: 20rpx;
    text-align: right;
    color: #606266;
static/img/zy_logo.png