#
whycq
2024-02-26 ecda7682082580f1bc5d8cf38c04aaf21082602f
#
2个文件已修改
91 ■■■■ 已修改文件
pages/LoginDemo/LoginDemo.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/project/jmAGV/home.vue 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/LoginDemo/LoginDemo.vue
@@ -74,17 +74,12 @@
                    username: '',
                    password: ''
                },
                network: [{
                        name: 'wms',
                        ip: '192.168.1.1',
                        port: '8080',
                        address: 'pswms'
                    },
                network: [
                    {
                        name: 'wcs',
                        ip: '192.168.1.1',
                        ip: '10.10.10.200',
                        port: '9090',
                        address: 'pswcs'
                        address: 'jmwcs'
                    }
                ],
                load: {
pages/project/jmAGV/home.vue
@@ -54,16 +54,16 @@
                    {name: '10号地面站',code:'10-C1',traget: '10-A1',type: 'foolr'}
                ],
                traySiteList: [
                    {name: '1号托盘站',code:'1-A1',inTraget: '1-C1',type: 'tray'},
                    {name: '2号托盘站',code:'2-A1',inTraget: '1-C1',type: 'tray'},
                    {name: '3号托盘站',code:'3-A1',inTraget: '1-C1',type: 'tray'},
                    {name: '4号托盘站',code:'4-A1',inTraget: '1-C1',type: 'tray'},
                    {name: '5号托盘站',code:'5-A1',inTraget: '1-C1',type: 'tray'},
                    {name: '6号托盘站',code:'6-A1',inTraget: '1-C1',type: 'tray'},
                    {name: '7号托盘站',code:'7-A1',inTraget: '1-C1',type: 'tray'},
                    {name: '8号托盘站',code:'8-A1',inTraget: '1-C1',type: 'tray'},
                    {name: '9号托盘站',code:'9-A1',inTraget: '1-C1',type: 'tray'},
                    {name: '10号托盘站',code:'10-A1',inTraget: '1-C1',type: 'tray'}
                    {name: '1号托盘站',code:'KW-1',type: 'tray'},
                    {name: '2号托盘站',code:'KW-2',type: 'tray'},
                    {name: '3号托盘站',code:'KW-3',type: 'tray'},
                    {name: '4号托盘站',code:'KW-4',type: 'tray'},
                    {name: '5号托盘站',code:'KW-5',type: 'tray'},
                    {name: '6号托盘站',code:'KW-6',type: 'tray'},
                    {name: '7号托盘站',code:'KW-7',type: 'tray'},
                    {name: '8号托盘站',code:'KW-8',type: 'tray'},
                    {name: '9号托盘站',code:'KW-9',type: 'tray'},
                    {name: '10号托盘站',code:'KW-10',type: 'tray'}
                ],
                item: '',
                text: '',
@@ -83,7 +83,7 @@
                this.text = item.name
                if (type == 'left') {
                    this.btnTitle1 = '地面站放置托盘(上架)'
                    this.btnTitle2 = '托盘站取置托盘(下架)'
                    this.btnTitle2 = '托盘站取置地面(下架)'
                } else {
                    this.btnTitle1 = '托盘-仓库(入库)'
                    this.btnTitle2 = '仓库-托盘(出库)'
@@ -92,22 +92,70 @@
            },
            upTray() {
                let _this = this 
                let type = '',originLocal = '',targetLocal = '';
                if (this.item.type == 'foolr') {
                    type = 'load', // 上架
                    originLocal = this.item.code,
                    targetLocal = this.item.traget
                } else {
                    type = 'in' // 入库
                    originLocal = this.item.code,
                    targetLocal = 'KW-J'
                }
                // this.text = originLocal + targetLocal
                uni.request({
                    url: `${_this.baseUrl}/agv/inBound`,
                    data: {
                        originLocal: _this.item.code,
                        targetLocal: _this.item.traget,
                        type: 'load'
                        originLocal: originLocal,
                        targetLocal: targetLocal,
                        type: type
                    },
                    header: { 'token': uni.getStorageSync('token') },
                    method: 'POST',
                    success(res) {
                        console.log(res);
                        res = res.data
                        if (res.code === 200) {
                            this.$refs.revise.close()
                            uni.showToast({ title: '操作成功', icon: "none", position: 'top' })
                        } else {
                            uni.showToast({ title: '异常!!!', icon: "none", position: 'top' })
                        }
                    }
                })
            },
            downTray() {
                let _this = this
                let type = '',originLocal = '',targetLocal = '';
                if (this.item.type == 'foolr') {
                    type = 'unload', // 下架
                    originLocal = this.item.traget,
                    targetLocal = this.item.code
                } else {
                    type = 'out' // 出库
                    originLocal = 'KW-C'
                    targetLocal = this.item.code
                }
                // this.text = originLocal + targetLocal
                uni.request({
                    url: `${_this.baseUrl}/agv/inBound`,
                    data: {
                        originLocal: originLocal,
                        targetLocal: targetLocal,
                        type: type
                    },
                    header: { 'token': uni.getStorageSync('token') },
                    method: 'POST',
                    success(res) {
                        res = res.data
                        if (res.code === 200) {
                            this.$refs.revise.close()
                            uni.showToast({ title: '操作成功', icon: "none", position: 'top' })
                        } else {
                            uni.showToast({ title: '异常!!!', icon: "none", position: 'top' })
                        }
                    }
                })
            }
            
        }