From 2e288a3c734f8a06b5986606615a97c502b9429c Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期五, 05 四月 2024 11:29:12 +0800
Subject: [PATCH] #
---
pages/phyz/stationManage/stationDetl.vue | 128 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 125 insertions(+), 3 deletions(-)
diff --git a/pages/phyz/stationManage/stationDetl.vue b/pages/phyz/stationManage/stationDetl.vue
index 8183fd0..83aa8b4 100644
--- a/pages/phyz/stationManage/stationDetl.vue
+++ b/pages/phyz/stationManage/stationDetl.vue
@@ -1,6 +1,31 @@
<template>
<view>
+ <!-- 绔欑偣璇︽儏 -->
+ <view class="station" :class="station.style" >
+ <view class="mt-flex">
+ <view class="station-title" style="flex: 1;">{{station.devNo}}</view>
+ <view><button size="mini" :loading="reload.loading" @click="reloadStation()">{{reload.loadingText}}</button></view>
+ </view>
+ <view>绔欑偣绫诲瀷锛歿{station.locType1$}}鍖�</view>
+ <view>璐ф灦鍓嶄袱浣嶏細{{station.locType2$}}</view>
+ <view>绔欑偣鐘舵�侊細{{station.locSts$}}</view>
+ <view class="mt-flex">
+ <view class="station-barcode" style="flex: 1">璐ф灦鐮侊細<text>{{station.barcode ? station.barcode : '--'}}</text></view>
+ <view v-if="station.barcode"><button size="mini" type="warn" @click="unbind()">瑙i櫎缁戝畾</button></view>
+ </view>
+ </view>
+
+
+
+
+
+ <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
+ <view class="buttom">
+ <button size="mini" type="primary" @click="emptyPakin(searchValue)" v-if="btnType == 'emptyPakin'">绌烘澘鍏ュ簱</button>
+ <button size="mini" type="primary" @click="containerMoveOut(searchValue)" v-if="btnType == 'out'">纭鍑哄簱</button>
+ <button size="mini" type="primary" @click="pickIn(searchValue)" v-if="btnType == 'pick'">宸叉嫞鏂欏洖搴�</button>
+ </view>
</view>
</template>
@@ -8,15 +33,112 @@
export default {
data() {
return {
-
+ station: null,
+ reload: {
+ loading: false,
+ loadingText: '鏇存柊鐘舵��'
+ },
+ btnType: 'emptyPakin'
}
},
+ onLoad() {
+ let _this = this
+ this.baseUrl = uni.getStorageSync('baseUrl');
+ this.token = uni.getStorageSync('token');
+ // const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
+ const eventChannel = this.getOpenerEventChannel();
+ // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
+ eventChannel.on('item', function(data) {
+ console.log(data);
+ _this.station = data.item
+ })
+ },
methods: {
-
+ // 鏇存柊绔欑偣
+ reloadStation() {
+ let _this = this
+ _this.reload.loading = true
+ _this.reload.loadingText = '鏇存柊涓�...'
+ uni.request({
+ url: `${_this.baseUrl}/agv/basDevp/list/auth`,
+ header: {'token': uni.getStorageSync('token')},
+ data: { curr: 1, limit: 1000, dev_no: _this.station.devNo },
+ method: 'GET',
+ success(res) {
+ res = res.data
+ if (res.code === 200) {
+ setTimeout(()=>{
+ for (let k of res.data.records) {
+ if (k.locSts != 'O') {
+ k['style'] = 'station-wrk'
+ } else {
+ k['style'] = 'station-nowrk'
+ }
+ }
+ _this.station = res.data.records[0]
+ _this.reload.loading = false
+ _this.reload.loadingText = '鏇存柊鐘舵��'
+ },500)
+ } 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' })
+ }
+ }
+ })
+ },
+ // 绔欑偣瑙g粦
+ unbind() {
+ let _this = this
+ let data = {param: JSON.stringify(_this.station)}
+ uni.request({
+ url: `${_this.baseUrl}/agv/basDevp/unbind/auth`,
+ header: {
+ 'token': uni.getStorageSync('token'),
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ data: data,
+ method: 'POST',
+ success(res) {
+ res = res.data
+ if (res.code === 200) {
+ _this.reloadStation()
+ } 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' })
+ }
+ }
+ })
+ }
}
}
</script>
<style>
-
+ @import url('../../../static/css/common/order.css');
+ .station-title {
+ font-size: 32px;
+ font-weight: bold;
+ padding: 24rpx 0;
+ }
+ .station {
+ font-size: 18px;
+ padding: 24rpx;
+ }
+ .station-barcode {
+ font-size: 24px;
+ font-weight: bold;
+ padding: 24rpx 0;
+ }
+ .station-wrk {
+ background-color: #ff7356;
+ color: #fff;
+ }
+ .station-nowrk {
+ background-color: #3eb689;
+ color: #fff;
+ }
</style>
--
Gitblit v1.9.1