From bd22cf1b35738f1556c9a45a8b3a55fe2959581c Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 19 八月 2024 11:04:05 +0800
Subject: [PATCH] #
---
pages/phyz/wrkMast/wrkMast.vue | 57 +++++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 45 insertions(+), 12 deletions(-)
diff --git a/pages/phyz/wrkMast/wrkMast.vue b/pages/phyz/wrkMast/wrkMast.vue
index 8ab1cba..a85df39 100644
--- a/pages/phyz/wrkMast/wrkMast.vue
+++ b/pages/phyz/wrkMast/wrkMast.vue
@@ -21,7 +21,7 @@
<view>鐩爣搴撲綅锛歿{orderDetl.locNo}}</view>
<view>璐ф灦鐮侊細{{orderDetl.barcode}}</view>
</view>
- <view class="list-right" @click="opt(index)">
+ <view class="list-right" @click="opt(orderDetl)">
<uni-icons type="bars" size="25" color="#fff"></uni-icons>
</view>
</view>
@@ -108,10 +108,13 @@
<view class="filter-popup" style="height: 50vh;">
<!-- 鏍囬 -->
<view class="title">鎿嶄綔</view>
- <button size="mini">瀹屾垚</button>
- <button size="mini">鍙栨秷(AGV)</button>
- <button size="mini">鍙栨秷</button>
- <button size="mini">鏇存敼璋冩嫧鏂瑰紡</button>
+ <view style="display: flex;flex-wrap: wrap;">
+ <button size="mini" type="primary" @click="handControlWrkMast('1')" >瀹屾垚</button>
+ <button size="mini" type="warn" @click="handControlWrkMast('2')">鍙栨秷(AGV)</button>
+ <button size="mini" @click="handControlWrkMast('5')">鍙栨秷</button>
+ </view>
+
+ <!-- <button size="mini">鏇存敼璋冩嫧鏂瑰紡</button> -->
</view>
</uni-popup>
</view>
@@ -149,7 +152,8 @@
},
index: 0,
count: 0,
- mask: false
+ mask: false,
+ wrkNo: ''
}
},
@@ -161,15 +165,15 @@
onLoad() {
this.baseUrl = uni.getStorageSync('baseUrl');
this.token = uni.getStorageSync('token');
- this.searchValue = uni.getStorageSync('bcpThreeCode');
+ this.searchValue = uni.getStorageSync('wrkNo');
this.getOrderDetlList(this.searchValue,10)
console.log("onLoad");
},
onShow() {
- console.log(uni.getStorageSync('pakinOrderCar'));
+ console.log(uni.getStorageSync('wrkNo'));
},
onHide() {
- uni.setStorageSync('pakinOrderCar', this.orderCarList);
+ uni.setStorageSync('wrkNo', this.orderCarList);
},
methods: {
getOrderDetlList(threeCode,limit) {
@@ -214,7 +218,7 @@
searchValueInput2() {
this.dataList = []
this.data.curr = 1
- uni.setStorageSync('bcpThreeCode', this.searchValue);
+ uni.setStorageSync('wrkNo', this.searchValue);
if (this.searchValue.length == 0) {
this.getOrderDetlList(this.searchValue,10)
} else {
@@ -230,7 +234,8 @@
},300)
},
// 娣诲姞鍏ュ簱鍟嗗搧鑷� 寰呯粍鎵樺垪琛�
- opt(index) {
+ opt(orderDetl) {
+ this.wrkNo = orderDetl.wrkNo
this.$refs.option.open('bottom')
},
addClose() {
@@ -268,7 +273,7 @@
console.log(data);
if (data.data == 1) {
_this.orderCarList = []
- _this.getOrderDetlList(uni.getStorageSync('bcpThreeCode'),10)
+ _this.getOrderDetlList(uni.getStorageSync('wrkNo'),10)
}
}
}
@@ -305,6 +310,33 @@
this.data.io_type = ''
this.getOrderDetlList(this.searchValue,10)
this.$refs.filter.close()
+ },
+ handControlWrkMast(type) {
+ let _this = this
+ let param = {workNo: _this.wrkNo,type: type}
+ uni.request({
+ url: `${_this.baseUrl}/agv/hand/control/wrkMast`,
+ header: {
+ 'token': uni.getStorageSync('token'),
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ data: param,
+ method: 'POST',
+ success(res) {
+ res = res.data
+ if (res.code === 200) {
+ _this.$refs.option.close()
+ setTimeout(()=>{
+ _this.getOrderDetlList(_this.searchValue,10)
+ },100)
+ } else if (res.code == 403) {
+ uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+ setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
+ } else {
+ uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+ }
+ }
+ })
}
}
@@ -441,6 +473,7 @@
border-radius: 30rpx 30rpx 0rpx 0rpx;
}
.filter-popup button {
+ flex: 1;
margin: 16rpx;
}
.filter-popup-item {
--
Gitblit v1.9.1