From 2d0da9658231da608852ba31cc5102bd342f6280 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期五, 05 四月 2024 09:43:33 +0800 Subject: [PATCH] # --- pages/phyz/stationManage/stationManage.vue | 55 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 45 insertions(+), 10 deletions(-) diff --git a/pages/phyz/stationManage/stationManage.vue b/pages/phyz/stationManage/stationManage.vue index 6478660..92ba2fd 100644 --- a/pages/phyz/stationManage/stationManage.vue +++ b/pages/phyz/stationManage/stationManage.vue @@ -5,6 +5,18 @@ maxlength="500" ancel="cancel" @clear="clear" placeholder="杈撳叆 / 鎵弿 绔欑偣鍙�"> </uni-search-bar> </view> + <view class="list" :class="item.style" v-if="stations" v-for="item in stations"> + <view class="list-left"> + <view>宸ヤ綅缂栧彿锛歿{item.devNo}}</view> + <view>宸ヤ綅鐘舵�侊細{{item.locSts$}}</view> + <view>鏉″舰鐮侊細{{item.barcode}}</view> + <view>绔欑偣绫诲瀷锛歿{item.locType1$}}</view> + <!-- <view class="card-id">{{i + 1}}</view> --> + </view> + <view class="list-right" @click="getOrderDetl(item)"> + <uni-icons type="right" color="#fff"></uni-icons> + </view> + </view> <view class="list" style="background-color: #3eb689;color: #fff;" v-if="station"> <view class="list-left"> <view>宸ヤ綅缂栧彿锛歿{station.devNo}}</view> @@ -98,15 +110,18 @@ searchValueFocus: true, searchValue: '', station: '', + stations: [], wrkMast: '', wrkDetls: [], waitPakins: [], - barcode: '' + barcode: '', + option: 'pick' } }, onLoad() { this.baseUrl = uni.getStorageSync('baseUrl'); this.token = uni.getStorageSync('token'); + this.getBasDevp('all') }, onShow() { @@ -118,7 +133,7 @@ this.wrkMast = '' this.wrkDetls = [] } else { - this.getBasDevp() + this.getBasDevp('one') } }, clear() { @@ -126,7 +141,7 @@ this.wrkDetls = [] }, // 鑾峰彇鏆傚瓨浣� - getBasDevp() { + getBasDevp(type) { let _this = this uni.request({ url: `${_this.baseUrl}/agv/basDevp/list/auth`, @@ -140,15 +155,27 @@ success(res) { res = res.data if (res.code === 200) { - for (let item of res.data.records) { - _this.station = item - if (item.barcode) { - _this.getWrkMast(item.barcode) - _this.getWaitPakin(item.barcode) - - } else { + if (type == 'all') { + for (let k of res.data.records) { + if (k.locSts != 'O') { + k['style'] = 'station-wrk' + } else { + k['style'] = 'station-nowrk' + } + } + _this.stations = res.data.records + } else { + for (let item of res.data.records) { + _this.station = item + if (item.barcode) { + _this.getWrkMast(item.barcode) + _this.getWaitPakin(item.barcode) + + } else { + } } } + } } }) @@ -426,4 +453,12 @@ align-items: center; color: #409EFF; } + .station-wrk { + background-color: #ff7356; + color: #fff; + } + .station-nowrk { + background-color: #3eb689; + color: #fff; + } </style> \ No newline at end of file -- Gitblit v1.9.1