From 1e40a94e41a811a30b49150b5feabe9b7797948a Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期二, 14 五月 2024 08:23:06 +0800
Subject: [PATCH] #

---
 pages/phyz/stationManage/stationManage.vue |   72 ++++++++++++++++++++---------------
 1 files changed, 41 insertions(+), 31 deletions(-)

diff --git a/pages/phyz/stationManage/stationManage.vue b/pages/phyz/stationManage/stationManage.vue
index 02646d8..217b386 100644
--- a/pages/phyz/stationManage/stationManage.vue
+++ b/pages/phyz/stationManage/stationManage.vue
@@ -1,5 +1,5 @@
 <template>
-	<view>
+	<view style="font-size: 14px;">
 		<view class="code">
 			<uni-search-bar :focus="searchValueFocus" v-model="searchValue"  @input="searchValueInput()"
 				maxlength="500" ancel="cancel" @clear="clear" placeholder="杈撳叆 / 鎵弿 绔欑偣鍙�">
@@ -17,17 +17,16 @@
 				<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" style="background-color: #3eb689;color: #fff;" v-if="station">
 			<view class="list-left">
 				<view>宸ヤ綅缂栧彿锛歿{station.devNo}}</view>
 				<view>绔欑偣鐘舵�侊細{{station.locSts$}}</view>
 				<view>鏉″舰鐮侊細{{station.barcode}}</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> -->
 		<view class="list" style="background-color: #019fe8;color: #fff;" v-if="wrkMast">
 			<view class="list-left">
 				<view>宸ヤ綔鍙凤細{{wrkMast.wrkNo}}</view>
@@ -128,6 +127,7 @@
 			searchValueInput() {
 				if (this.searchValue == '') {
 					this.station = ''
+					this.stations = []
 					this.wrkMast = ''
 					this.wrkDetls = []
 				} else {
@@ -163,18 +163,21 @@
 								}
 								_this.stations = res.data.records  
 							} else {
-								console.log(123213);
+								res.data.records
 								for (let item of res.data.records) {
 									if (item.locSts != 'O') {
 										item['style'] = 'station-wrk'
 									} else {
 										item['style'] = 'station-nowrk'
 									}
-									_this.station = item
-									_this.getOrderDetl(_this.station)
 								}
+								_this.getOrderDetl(res.data.records[0])
 							}
-							
+						} 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' })
 						}
 					}
 				})
@@ -198,6 +201,11 @@
 								_this.waitPakins = res.data.records
 								// _this.getWrkDetl(item.wrkNo)
 							}
+						} 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' })
 						}
 					}
 				})
@@ -221,6 +229,11 @@
 								_this.wrkMast = item
 								_this.getWrkDetl(item.wrkNo)
 							}
+						} 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' })
 						}
 					}
 				})
@@ -241,6 +254,11 @@
 						res = res.data
 						if (res.code === 200) {
 							_this.wrkDetls = res.data.records
+						} 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' })
 						}
 					}
 				})
@@ -263,12 +281,11 @@
 								_this.wrkDetls = []
 								_this.waitPakins = []
 							},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' }) 
-							setTimeout(()=> {
-								_this.searchValue = ''
-								_this.getBasDevp()
-							},2000)
+							uni.showToast({ title: res.msg, icon: "error", position: 'top' })
 						}
 					}
 				})
@@ -293,12 +310,11 @@
 								_this.wrkDetls = []
 								_this.waitPakins = []
 							},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' }) 
-							setTimeout(()=> {
-								_this.searchValue = ''
-								_this.getBasDevp()
-							},2000)
+							uni.showToast({ title: res.msg, icon: "error", position: 'top' })
 						}
 					}
 				})
@@ -341,16 +357,10 @@
 								position: 'top'
 							})
 						} else if (res.code == 403) {
-							that.messageText = res.msg
-							that.messageToggle('error')
-							setTimeout(() => {
-								uni.reLaunch({
-									url: '../login/login'
-								});
-							}, 1000);
+							uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+							setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
 						} else {
-							that.messageText = res.msg
-							that.messageToggle('error')
+							uni.showToast({ title: res.msg, icon: "error", position: 'top' })
 						}
 					}
 				});
@@ -371,22 +381,22 @@
 				this.$refs.revise.close()
 			},
 			// 鍓嶅線绔欑偣鏄庣粏椤甸潰
-			getOrderDetl(item) {
+			getOrderDetl(e) {
 				let _this = this
 				uni.navigateTo({
 					url: "./stationDetl",
 					success: function(res) {
 						// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�   鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
 						res.eventChannel.emit('item', {
-							item: item
-						}),
+							item: e
+						})
 						_this.searchValue = ''
 					},
 					events: {
 						// 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�  鍙﹀涓�涓〉闈紶杩囨潵鐨�
 						acceptDataFromOpenedPage: function(data) {
 							_this.searchValueFocus = true
-						},
+						}
 					},
 				});
 			}

--
Gitblit v1.9.1