From ecda7682082580f1bc5d8cf38c04aaf21082602f Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期一, 26 二月 2024 11:05:51 +0800
Subject: [PATCH] #
---
pages/LoginDemo/LoginDemo.vue | 11 +----
pages/project/jmAGV/home.vue | 80 ++++++++++++++++++++++++++++++++--------
2 files changed, 67 insertions(+), 24 deletions(-)
diff --git a/pages/LoginDemo/LoginDemo.vue b/pages/LoginDemo/LoginDemo.vue
index e4b6fbc..1e50bf4 100644
--- a/pages/LoginDemo/LoginDemo.vue
+++ b/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: {
diff --git a/pages/project/jmAGV/home.vue b/pages/project/jmAGV/home.vue
index 62594b9..3a49553 100644
--- a/pages/project/jmAGV/home.vue
+++ b/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' })
+ }
+ }
+ })
}
}
--
Gitblit v1.9.1