From 233fdc1cc07df94e54036fa421addf1e17cdff83 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 28 二月 2024 10:58:12 +0800
Subject: [PATCH] #
---
pages/api/common/common.js | 2 +-
pages/LoginDemo/LoginDemo.vue | 3 ++-
pages/project/jmAGV/home.vue | 51 +++++++++++++++++++++++++++++++++++++++++++++------
3 files changed, 48 insertions(+), 8 deletions(-)
diff --git a/pages/LoginDemo/LoginDemo.vue b/pages/LoginDemo/LoginDemo.vue
index 200e9a6..09d9eef 100644
--- a/pages/LoginDemo/LoginDemo.vue
+++ b/pages/LoginDemo/LoginDemo.vue
@@ -150,6 +150,7 @@
this.load.btnText = '鐧诲綍涓�';
uni.setStorageSync('user', this.user);
let res = await common.onLogin(this.user)
+ console.log(res);
if (res.code === 200) {
setTimeout(() => {
uni.showToast({
@@ -157,7 +158,7 @@
})
setTimeout(() => {
uni.reLaunch({
- url: `/pages/home/home`,
+ url: `/pages/project/jmAGV/home`,
});
}, 300)
if (!this.remberPassword) {
diff --git a/pages/api/common/common.js b/pages/api/common/common.js
index 7133231..a2b2f18 100644
--- a/pages/api/common/common.js
+++ b/pages/api/common/common.js
@@ -12,7 +12,7 @@
var login = await uni.request({
url: `${baseUrl}/login.action`,
data: {
- username: user.username,
+ mobile: user.username,
password: md5.hex_md5(user.password)
},
}).then((result) => {
diff --git a/pages/project/jmAGV/home.vue b/pages/project/jmAGV/home.vue
index 3a49553..6533e3e 100644
--- a/pages/project/jmAGV/home.vue
+++ b/pages/project/jmAGV/home.vue
@@ -19,6 +19,7 @@
<view>{{text}}</view>
<view class="button-nk" @click="upTray()">{{btnTitle1}}</view>
<view class="button-nk" @click="downTray">{{btnTitle2}}</view>
+ <view v-show="outType" class="button-nk" @click="downTray1">{{btnTitle3}}</view>
</view>
</uni-popup>
</view>
@@ -69,6 +70,8 @@
text: '',
btnTitle1: '',
btnTitle2: '',
+ btnTitle3: '',
+ outType: '',
stationType: 'load'
}
},
@@ -82,11 +85,14 @@
this.item = item
this.text = item.name
if (type == 'left') {
+ this.outType = false
this.btnTitle1 = '鍦伴潰绔欐斁缃墭鐩�(涓婃灦)'
this.btnTitle2 = '鎵樼洏绔欏彇缃湴闈�(涓嬫灦)'
} else {
+ this.outType = true
this.btnTitle1 = '鎵樼洏-浠撳簱(鍏ュ簱)'
- this.btnTitle2 = '浠撳簱-鎵樼洏(鍑哄簱)'
+ this.btnTitle2 = '浠撳簱-绌烘墭鐩�(鍑哄簱)'
+ this.btnTitle3 = '浠撳簱-婊℃墭鐩�(鍑哄簱)'
}
this.$refs.revise.open(type)
},
@@ -104,7 +110,7 @@
}
// this.text = originLocal + targetLocal
uni.request({
- url: `${_this.baseUrl}/agv/inBound`,
+ url: `${_this.baseUrl}/agv/requestTask`,
data: {
originLocal: originLocal,
targetLocal: targetLocal,
@@ -118,7 +124,7 @@
this.$refs.revise.close()
uni.showToast({ title: '鎿嶄綔鎴愬姛', icon: "none", position: 'top' })
} else {
- uni.showToast({ title: '寮傚父锛侊紒锛�', icon: "none", position: 'top' })
+ uni.showToast({ title: res.msg, icon: "none", position: 'top' })
}
}
@@ -132,13 +138,13 @@
originLocal = this.item.traget,
targetLocal = this.item.code
} else {
- type = 'out' // 鍑哄簱
+ type = 'out1' // 鍑哄簱
originLocal = 'KW-C'
targetLocal = this.item.code
}
// this.text = originLocal + targetLocal
uni.request({
- url: `${_this.baseUrl}/agv/inBound`,
+ url: `${_this.baseUrl}/agv/requestTask`,
data: {
originLocal: originLocal,
targetLocal: targetLocal,
@@ -152,7 +158,40 @@
this.$refs.revise.close()
uni.showToast({ title: '鎿嶄綔鎴愬姛', icon: "none", position: 'top' })
} else {
- uni.showToast({ title: '寮傚父锛侊紒锛�', icon: "none", position: 'top' })
+ uni.showToast({ title: res.msg, icon: "none", position: 'top' })
+ }
+ }
+ })
+ },
+ downTray1() {
+ let _this = this
+ let type = '',originLocal = '',targetLocal = '';
+ if (this.item.type == 'foolr') {
+ type = 'unload', // 涓嬫灦
+ originLocal = this.item.traget,
+ targetLocal = this.item.code
+ } else {
+ type = 'out2' // 鍑哄簱
+ originLocal = 'KW-C'
+ targetLocal = this.item.code
+ }
+ // this.text = originLocal + targetLocal
+ uni.request({
+ url: `${_this.baseUrl}/agv/requestTask`,
+ 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: res.msg, icon: "none", position: 'top' })
}
}
})
--
Gitblit v1.9.1