From 77175a85d081f5315ced40a66ef149eed53f6771 Mon Sep 17 00:00:00 2001
From: tx <2622874537@qq.com>
Date: Fri, 9 Aug 2024 18:03:26 +0800
Subject: [PATCH] 11

---
 common/http.interceptor.js            |  20 +--
 page_user/yj.vue                      |  22 ++-
 pages.json                            |  26 ++-
 pages/index/index.vue                 | 229 +++++++++++++++++---------
 pages_admin/admin_order.vue           |  70 +++++++-
 pages_admin/admin_worke.vue           |  10 ++
 pages_admin/order/device_detail.vue   |  22 ++-
 pages_admin/order/order_detail.vue    |  99 ++++++++---
 pages_admin/worke/woke_deviceMgmt.vue |   8 +-
 9 files changed, 367 insertions(+), 139 deletions(-)

diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 55129ad..02a1480 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -1,20 +1,5 @@
 const install = (Vue, vm) => {
-    // Vue.prototype.$u.http.setConfig({
-    //     baseURL: 'https://yruibao.com/admin',
-    //     // baseUrl: 'http://192.168.10.104:8088',  
-    //     method: 'POST',      
-    //     // 设置为json,返回后会对数据进行一次JSON.parse()
-    //     dataType: 'json',  
-    //     showLoading: true, // 是否显示请求中的loading
-    //     loadingText: '请求加载中...', // 请求loading中的文字提示
-    //     loadingTime: 10000, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
-    //     originalData: false, // 是否在拦截器中返回服务端的原始数据
-    //     loadingMask: true, // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
-    //     // 配置请求头信息 
-    //     header: {   
-    //         'content-type': 'application/json;charset=UTF-8',
-    //     },
-    // });
+   
 
     uni.setStorageSync('deptId', 100);
     Vue.prototype.$u.http.setConfig({
@@ -30,7 +15,8 @@ const install = (Vue, vm) => {
             'content-type': 'application/json;charset=UTF-8',
         },
     });
-
+	// 创特:wx3428c498d5061192
+	// 俞山岛:	wx4d178f8c80348214
     // 请求拦截部分
     Vue.prototype.$u.http.interceptor.request = (config) => {
         // 引用token
diff --git a/page_user/yj.vue b/page_user/yj.vue
index ccece33..2b2a8b0 100644
--- a/page_user/yj.vue
+++ b/page_user/yj.vue
@@ -40,12 +40,15 @@
 					style="margin-top: 18rpx;font-weight: 700;font-size: 92rpx;color: #3D3D3D;line-height: 72rpx;"><span
 						style="font-size: 52rpx;">¥</span>{{userinfo.balance}}</view>
 				
-				<view class="btn" v-if="userinfo.balance!=0" @click="show=true">
+				<view class="btn" v-if="userinfo.balance!=0&&isInAuditOrder.length==0" @click="show=true">
 					提现
 				</view>
-				<view class="btn " v-else="false" @click="sub4">
-					充值押金
+				<view class="tit" v-if="isInAuditOrder.length!=0" style="font-size: 32rpx;color: #808080;margin-top: 0;">
+					有订单审核中暂时无法提现
 				</view>
+				<!-- <view class="btn " v-else="false" @click="sub4">
+					充值押金
+				</view> -->
 			</view>
 			<view class="card2" style="padding-bottom: 30rpx;">
 				<view class="card_top">
@@ -203,7 +206,8 @@
 				loadingmask:true,
 				ispaid:false,
 				showtxtip:false,
-				showList:false
+				showList:false,
+				isInAuditOrder:[]
 
 			}
 
@@ -213,7 +217,14 @@
 
 			// 	// 执行其他操作...
 			// });
+			this.$u.post("/app/user/isInAuditOrder?userId=" + this.userId).then((res) => {
 			
+				if (res.code == 200) {
+					this.isInAuditOrder=res.data
+				} else {
+					
+				}
+			});
 			this.getarea()
 		},
 		onLoad(e) {
@@ -288,6 +299,7 @@
 
 					} else {
 						uni.hideLoading()
+						
 						uni.showToast({
 							title: res.msg,
 							icon: 'none',
@@ -670,7 +682,7 @@
 			padding: 28rpx 0;
 			margin: 30rpx auto;
 			width: 680rpx;
-			height: 406rpx;
+			// height: 406rpx;
 			background: #FFFFFF;
 			box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
 			border-radius: 20rpx 20rpx 20rpx 20rpx;
diff --git a/pages.json b/pages.json
index 8ca43be..c85702f 100644
--- a/pages.json
+++ b/pages.json
@@ -159,15 +159,7 @@
 						"enablePullDownRefresh" : false
 					}
 				}
-				// {
-				// 	"path" : "worke/bind_sn",
-				// 	"style" : 
-				// 	{
-				// 		"navigationBarTitleText" : "",
-				// 		"navigationStyle": "custom",
-				// 		"enablePullDownRefresh" : false
-				// 	}
-				// }
+				
 
 				// ... 分包A的其他页面  
 			]
@@ -216,6 +208,22 @@
 				}
 			
 				
+				// ... 分包A的其他页面  
+			]
+		},
+		{
+			"root": "pages_adminSet", // 分包A的根目录  
+			"pages": [
+				{
+					"path": "shgl",
+					"style": {
+						"navigationBarTitleText": "上传",
+						"enablePullDownRefresh": false,
+						"navigationStyle": "custom"
+					}
+				}
+			
+				
 				// ... 分包A的其他页面  
 			]
 		},
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 997eab0..97e7e0f 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -305,8 +305,6 @@
 						</view> -->
 					</view>
 					<view class="bot" style="margin-top: 20rpx;" v-if="orderinfo.status==0">
-
-
 						<view class="btn" style="	margin-right: 16rpx;" @click="unlockdevice()">
 							解锁骑行
 						</view>
@@ -318,14 +316,12 @@
 						</view>
 					</view>
 					<view class="bot" style="margin-top: 20rpx;" v-if="orderinfo.status==2">
-
 						<view class="changebiketip" @click="tochange()">
 							换车骑行 <view class="iconfont icon-xiangyou1">
-
 							</view>
 						</view>
 						<view class="btn" style="	margin-right: 16rpx;"
-							v-if="OrderdeviceInfos.status==3||OrderdeviceInfos.status==6" @click="taploadmask (2)">
+							 v-if="OrderdeviceInfos.sn!='' && (OrderdeviceInfos.status == 3 || OrderdeviceInfos.status == 6)" @click="taploadmask (2)">
 							临时锁车
 						</view>
 						<view class="btn" style="	margin-right: 16rpx;" v-if="OrderdeviceInfos.status==4"
@@ -1056,7 +1052,11 @@
 				isupload: false,
 				showparkinfo: false,
 				parkinfo: {},
-				netonlines: false
+				netonlines: false,
+				isqrcode:false,
+				deviceGps:{
+					
+				}
 			}
 		},
 		watch: {
@@ -1206,8 +1206,8 @@
 
 									that.latitude = lb.latitude;
 									that.longitude = lb.longitude;
-
-
+									that.deviceGps.latitude = lb.latitude;
+									that.deviceGps.longitude = lb.longitude;
 									console.log(that.areaInfo, 'that.areaInfo');
 									that.getArea()
 									if (that.qParam != 'null' && that.showagre == false) {
@@ -1483,7 +1483,7 @@
 				// this.sn = ''
 				this.type = 0
 				this.freeInfo = {}
-				this.freeListIndex = 0
+				// this.freeListIndex = 0
 				this.mappolyline = []
 				// this.showparkinfo=false
 				// this.parkinfo={}
@@ -1547,7 +1547,7 @@
 				this.deviceIndex = 0;
 				this.type = 0;
 				this.freeInfo = {};
-				this.freeListIndex = 0;
+				// this.freeListIndex = 0;
 				this.parkinfo = {}
 				this.showparkinfo = false
 				if (e.type === 'markertap') {
@@ -1565,7 +1565,7 @@
 
 					if (markerExists) {
 						this.sn = e.markerId;
-						this.deviceInfo(0);
+						this.deviceInfo(1);
 
 						// Revert the last clicked marker to the default image and zIndex
 						if (this.lastClickedMarkerId !== null) {
@@ -1650,57 +1650,7 @@
 				return R * c;
 			},
 
-			getmarks() {
-				let data = {
-					areaId: this.areaInfo.areaId
-				};
-				if (this.areaInfo.areaId) {
-					this.$u.get(`/app/allVehicleByArea`, data).then((res) => {
-						if (res.code === 200 && res.data != '') {
-							this.listData = res.data;
-							const newDeviceMarkers = this.listData.map(item => ({
-								id: parseFloat(item.sn),
-								latitude: parseFloat(item.latitude),
-								longitude: parseFloat(item.longitude),
-								width: 40,
-								height: 28,
-								iconPath: this.defaultMarkerIconPath,
-								isDeviceMarker: true // 区分为设备标记
-							}));
-
-							// 保留停车标记和特定设备标记
-							const preservedMarkers = this.markers.filter(marker => marker.isParkingMarker || marker
-								.id === parseFloat(this.OrderdeviceInfos.sn));
-
-							// 更新markers数组,避免删除已识别的重要标记
-							let updatedMarkers = [...newDeviceMarkers, ...preservedMarkers];
-
-							// 确保点击的标记保持其图标
-							if (this.lastClickedMarkerId != null) {
-								updatedMarkers = updatedMarkers.map(marker => {
-									if (marker.id === this.lastClickedMarkerId) {
-										return {
-											...marker,
-											width: 50,
-											height: 35,
-											iconPath: this.clickedMarkerIconPath
-										};
-									}
-									return marker;
-								});
-							}
-
-							// 使用this.$set触发Vue的响应式更新
-							this.$set(this, 'markers', updatedMarkers);
-
-							this.oldMarkers = [...this.markers];
-						}
-					}).catch(error => {
-						console.error("Error fetching device data:", error);
-					});
-				}
-			},
-
+			
 			timestare() {
 				this.timers = setInterval(() => {
 					this.getmarks();
@@ -1708,6 +1658,7 @@
 					if (this.orderinfo.sn) {
 						this.$u.get('/app/device/info?sn=' + this.orderinfo.sn).then((res) => {
 							if (res.code === 200) {
+								this.isqrcode=false
 								this.mac = this.OrderdeviceInfos.mac;
 								// this.OrderdeviceInfos.onlineStatus = '1'
 								if (this.OrderdeviceInfos.onlineStatus !== res.data.onlineStatus) {
@@ -2590,11 +2541,124 @@
 				})
 			},
 
+			getmarks() {
+				if(this.isqrcode){
+					let data = {
+						areaId: this.areaInfo.areaId
+					};
+					if (this.areaInfo.areaId) {
+						this.$u.get(`/app/allVehicleByArea`, data).then((res) => {
+							if (res.code === 200 && res.data != '') {
+								this.listData = res.data;
+								const newDeviceMarkers = this.listData.map(item => ({
+									id: parseFloat(item.sn),
+									latitude: parseFloat(item.latitude),
+									longitude: parseFloat(item.longitude),
+									width: 40,
+									height: 28,
+									iconPath: this.defaultMarkerIconPath,
+									isDeviceMarker: true // 区分为设备标记
+								}));
+					
+								// 保留停车标记和特定设备标记
+								const preservedMarkers = this.markers.filter(marker => marker.isParkingMarker || marker
+									.id === parseFloat(this.OrderdeviceInfos.sn));
+					
+								// 更新markers数组,避免删除已识别的重要标记
+								let updatedMarkers = [...newDeviceMarkers, ...preservedMarkers];
+					
+								// 确保点击的标记保持其图标
+								if (this.lastClickedMarkerId != null) {
+									updatedMarkers = updatedMarkers.map(marker => {
+										if (marker.id === this.lastClickedMarkerId) {
+											return {
+												...marker,
+												width: 50,
+												height: 35,
+												iconPath: this.clickedMarkerIconPath
+											};
+										}
+										return marker;
+									});
+								}
+					
+								// 使用this.$set触发Vue的响应式更新
+								this.$set(this, 'markers', updatedMarkers);
+					
+								this.oldMarkers = [...this.markers];
+							}
+						}).catch(error => {
+							console.error("Error fetching device data:", error);
+						});
+					}
+								
+				}else{
+					let data = {
+					    longitude: this.deviceGps.longitude,
+					    latitude: this.deviceGps.latitude,
+					}
+					
+					this.$u.get(`/app/vehicleLocalization?`, data).then((res) => {
+					    if (res.code === 200) {
+					        if (res.data !== '') {
+					            this.listData = res.data;
+					            const newDeviceMarkers = this.listData.map(item => ({
+					                id: parseFloat(item.sn),
+					                latitude: parseFloat(item.latitude),
+					                longitude: parseFloat(item.longitude),
+					                width: 40,
+					                height: 28,
+					                iconPath: this.defaultMarkerIconPath,
+					                isDeviceMarker: true // 区分为设备标记
+					            }));
+					
+					            // 保留停车标记和特定设备标记
+					            const preservedMarkers = this.markers.filter(marker => marker.isParkingMarker || marker.id === parseFloat(this.OrderdeviceInfos.sn));
+					
+					            // 更新markers数组,避免删除已识别的重要标记
+					            let updatedMarkers = [...newDeviceMarkers, ...preservedMarkers];
+					
+					            // 确保点击的标记保持其图标
+					            if (this.lastClickedMarkerId != null) {
+					                updatedMarkers = updatedMarkers.map(marker => {
+					                    if (marker.id === this.lastClickedMarkerId) {
+					                        return {
+					                            ...marker,
+					                            width: 50,
+					                            height: 35,
+					                            iconPath: this.clickedMarkerIconPath
+					                        };
+					                    }
+					                    return marker;
+					                });
+					            }
+					
+					            // 使用this.$set触发Vue的响应式更新
+					            this.$set(this, 'markers', updatedMarkers);
+					            this.oldMarkers = [...this.markers];
+					        } else {
+					            // 当 res.data 为空时,删除 markers 中对应的设备标记
+					            this.markers = this.markers.filter(marker => marker.isParkingMarker || marker.id === parseFloat(this.OrderdeviceInfos.sn));
+					
+					            // 使用this.$set触发Vue的响应式更新
+					            this.$set(this, 'markers', this.markers);
+					        }
+					    }
+					}).catch(error => {
+					    console.error("Error fetching device data:", error);
+					});
 
+				}
+				
+				
+			
+			},
+			
+			
 			onMapRegionChange(event) {
 				// console.log('regionchange', event)
 				if (event.detail.type == 'end') {
-					// this.getCenterLanLat()
+					this.getCenterLanLat()
 				}
 				// 你可以在这里执行你需要的操作
 			},
@@ -2604,9 +2668,9 @@
 					type: 'gcj02',
 					success: (res) => {
 						console.log("当前地图中心的经纬度", res)
-						that.gps.latitude = res.latitude;
-						that.gps.longitude = res.longitude;
-						that.getAreas()
+						that.deviceGps.latitude = res.latitude;
+						that.deviceGps.longitude = res.longitude;
+						that.getmarks()
 						//其他逻辑
 					},
 					fail: (err) => {}
@@ -2637,7 +2701,7 @@
 
 
 
-						this.setMapScale()
+						// this.setMapScale()
 						// if(!hasShownPopup){
 						// 	console.log(typeof(hasShownPopup),'hasShownPopuphasShownPopup');
 						// 	this.showTips=uni.getStorageSync('hasShownPopup')
@@ -3550,7 +3614,7 @@
 				});
 			},
 			async setMapScale(e, val) {
-				console.log('调用了');
+				console.log('调用了校验');
 				let mapContext = uni.createMapContext('map', this);
 				let setScale = () => {
 					return new Promise((resolve, reject) => {
@@ -4189,6 +4253,7 @@
 			changefree(item, index) {
 				this.freeInfo = item
 				this.freeListIndex = index
+			
 			},
 			getlist() {
 				this.freList = []
@@ -4206,6 +4271,13 @@
 							}
 							return item;
 						});
+							
+						setTimeout(()=>{
+							this.freeInfo = this.freList[0]
+							this.freeListIndex = 1
+							console.log(this.freeListIndex,'this.freeListIndexthis.freeListIndexthis.freeListIndex');
+						},300)
+						
 						console.log(this.freList, ' this.freList this.freList');
 					} else {
 						uni.showToast({
@@ -4340,7 +4412,7 @@
 				}
 			},
 			getArea() {
-				this.showmap = false
+				// this.showmap = false
 				// 发送请求获取数据
 				this.areaInfo = {}
 				console.log(this.qParam, 'qParamqParamqParamqParam');
@@ -4357,12 +4429,10 @@
 				if (this.sn != '') {
 					this.gps.sn = this.sn
 				}
-				setTimeout(() => {
-					this.setMapScale()
-				}, 300)
+				
 
 				this.$u.get('/app/area/info?', this.gps).then((res) => {
-					this.showmap = true
+					// this.showmap = true
 					if (res.code === 200) {
 
 						// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
@@ -4410,9 +4480,14 @@
 						}
 						if (this.sn) {
 							setTimeout(()=>{
-								this.deviceInfo(1)
-								this.qParam = null
-							},500)
+								if (this.orderinfo.status) {
+									this.showtcs = true
+								}else{
+									this.deviceInfo(1)
+									this.qParam = null
+								}
+							
+							},800)
 						
 						}
 
@@ -4752,6 +4827,7 @@
 
 					this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
 						if (res.code === 200) {
+							this.isqrcode=true
 							this.deviceInfos = res.data;
 							if (!this.orderinfo.sn) {
 								this.mac = res.data.mac
@@ -4863,6 +4939,7 @@
 													.then((
 														res) => {
 														if (res.code === 200) {
+															this.isqrcode=true
 															this.deviceInfos = res.data;
 
 															if (num == 0) {
diff --git a/pages_admin/admin_order.vue b/pages_admin/admin_order.vue
index 8675a0f..6623d9a 100644
--- a/pages_admin/admin_order.vue
+++ b/pages_admin/admin_order.vue
@@ -651,50 +651,87 @@
 						运营区外调度费
 					</view>
 					<view class="ipt">
-						<input type="text" v-model="orderInfo.dispatchFee" placeholder="0.00" class="input"
+						<input type="text" v-model="dispatchFee" placeholder="0.00" class="input"
 							placeholder-style="color:#C7CDD3" @input="checkAndUpdate('dispatchFee')">
 						元
 					</view>
 				</view>
+				<view class="ipt_box" style="width:100%;margin-top: 6rpx;">
+					<view class="width:10% ;">
+						
+					</view>
+					<view  style="color: #ccc;margin-left: auto; font-size: 24rpx;">
+						最大可退款金额:{{orderInfo.dispatchFee}}元
+					</view>
+					
+				</view>
 				<view class="ipt_box">
 					<view class="text">
 						停车点外调度费
 					</view>
 					<view class="ipt">
-						<input type="text" v-model="orderInfo.manageFee" placeholder="0.00" class="input"
+						<input type="text" v-model="manageFee" placeholder="0.00" class="input"
 							placeholder-style="color:#C7CDD3" @input="checkAndUpdate('manageFee')">
 						元
 					</view>
 				</view>
+				<view class="ipt_box" style="width:100%;margin-top: 6rpx;">
+					<view class="width:10% ;">
+						
+					</view>
+					<view  style="color: #ccc;margin-left: auto; font-size: 24rpx;">
+						最大可退款金额:{{orderInfo.manageFee}}元
+					</view>
+					
+				</view>
 				<view class="ipt_box">
 					<view class="text">
 						骑行费
 					</view>
 					<view class="ipt">
-						<input type="text" v-model="orderInfo.ridingFee" placeholder="0.00" class="input"
+						<input type="text" v-model="ridingFee" placeholder="0.00" class="input"
 							placeholder-style="color:#C7CDD3" @input="checkAndUpdate('ridingFee')">
 						元
 					</view>
 				</view>
+				<view class="ipt_box" style="width:100%;margin-top: 6rpx;">
+					<view class="width:10% ;">
+						
+					</view>
+					<view  style="color: #ccc;margin-left: auto; font-size: 24rpx;">
+						最大可退款金额:{{orderInfo.ridingFee}}元
+					</view>
+					
+				</view>
 				<view class="ipt_box">
 					<view class="text">
 						预约费
 					</view>
 					<view class="ipt">
-						<input type="text" v-model="orderInfo.appointmentFee" placeholder="0.00" class="input"
+						<input type="text" v-model="appointmentFee" placeholder="0.00" class="input"
 							placeholder-style="color:#C7CDD3" @input="checkAndUpdate('appointmentFee')">
 						元
 					</view>
 				</view>
+				<view class="ipt_box" style="width:100%;margin-top: 6rpx;">
+					<view class="width:10% ;">
+						
+					</view>
+					<view  style="color: #ccc;margin-left: auto; font-size: 24rpx;">
+						最大可退款金额:{{orderInfo.appointmentFee}}元
+					</view>
+					
+				</view>
 				<view class="ipt_box">
 					<view class="text">
 						原因
 					</view>
 					<view class="ipt">
-						<input type="text" v-model="orderInfo.reason" placeholder="选填" class="input"
+						<input type="text" v-model="reason" placeholder="选填" class="input"
 							placeholder-style="color:#C7CDD3" @input="checkAndUpdate('reason')">
 					</view>
 				</view>
+				
 			</view>
 			<view class="bot">
 				<view class="bot_left" @click="closetk()">
@@ -764,8 +801,13 @@
 				],
 				typeidx: '2',
 				areainfo:{},
-				passList:[]
-
+				passList:[],
+				dispatchFee:0,
+				manageFee:0,
+				ridingFee:0,
+				appointmentFee:0,
+				
+			
 			}
 		},
 		onShow() {
@@ -919,7 +961,19 @@
 					appointmentFee: this.orderInfo.appointmentFee,
 					reason: this.orderInfo.reason
 				}
-
+				 if (
+				        data.dispatchFee > this.orderInfo.dispatchFee ||
+				        data.manageFee > this.orderInfo.manageFee ||
+				        data.ridingFee > this.orderInfo.ridingFee ||
+				        data.appointmentFee > this.orderInfo.appointmentFee
+				    ) {
+				        uni.showToast({
+				            title: '退款金额不能大于实际支付金额',
+				            icon: 'none',
+				            duration: 2000
+				        });
+				        return; // 阻止请求的发送
+				    }
 				this.$u.put('/appVerify/order/refund', data).then((res) => {
 					if (res.code === 200) {
 						// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
diff --git a/pages_admin/admin_worke.vue b/pages_admin/admin_worke.vue
index a355d64..2f9be70 100644
--- a/pages_admin/admin_worke.vue
+++ b/pages_admin/admin_worke.vue
@@ -54,6 +54,12 @@
 						账户明细
 					</view>
 				</view>
+				<view class="cont" @click="topage(7)" >
+					<image src="https://lxnapi.ccttiot.com/bike/img/static/u47okd0YdEQBsyhLlQIt" mode="" style="width: 50rpx;height: 50rpx;"></image>
+					<view class="text">
+						故障审核
+					</view>
+				</view>
 			</view>
 		</view>
 			<u-select v-model="show" :list="list" title='选择运营区' @confirm="confirm"></u-select>
@@ -212,6 +218,10 @@
 					uni.navigateTo({
 						url:'/pages_admin/worke/AccountDetails'
 					})
+				}else if(num==7){
+					uni.navigateTo({
+						url:'/pages_adminSet/shgl'
+					})
 				}
 			}
 		}
diff --git a/pages_admin/order/device_detail.vue b/pages_admin/order/device_detail.vue
index 1897b1e..d62d263 100644
--- a/pages_admin/order/device_detail.vue
+++ b/pages_admin/order/device_detail.vue
@@ -187,6 +187,9 @@
 			<view class="btn" @click="btn(7)">
 				车牌修改
 			</view> 
+			<view class="btn" @click="btn(8)">
+				坐垫锁
+			</view> 
 			<!-- <view class="btn" @click="tipshow=true" v-if="info.type==1">
 				维修处理
 			</view>
@@ -572,7 +575,7 @@
 					}).catch(error => {
 						console.error("Error fetching area data:", error);
 					});
-				} else if (num == 4) {
+				} else if (num == 4) { 
 					uni.showLoading({})
 					this.$u.post('/app/device/ring?sn=' + this.sn).then((res) => {
 						if (res.code == 200) {
@@ -650,6 +653,23 @@
 					})
 				
 			
+				}else if (num == 9) {
+					this.$u.put('/appVerify/device/seatCushionLock?sn=' + this.sn).then((res) => {
+						if (res.code == 200) {
+							this.deviceInfo()
+							uni.showToast({
+								title: '操作成功',
+								icon: 'none',
+								duration: 2000
+							});
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none',
+								duration: 2000
+							});
+						}
+					})
 				}
 			},
 			
diff --git a/pages_admin/order/order_detail.vue b/pages_admin/order/order_detail.vue
index 7422a0d..ea36507 100644
--- a/pages_admin/order/order_detail.vue
+++ b/pages_admin/order/order_detail.vue
@@ -50,7 +50,20 @@
 			</view>
 			<view class="lines"></view>
 			<view class="cont">
-
+				<view class="info_li">
+					<view class="half_infoli" v-if="deviceInfos.onlineStatus==0">
+						网络状态:<span style="color: #FF4444;">离线</span>
+					</view>
+					<view class="half_infoli" v-if="deviceInfos.onlineStatus==1">
+						网络状态:<span >在线</span>
+					</view>
+					<view class="half_infoli" v-if="deviceInfos.lockStatus==0">
+						锁状态:<span >关锁</span>
+					</view>
+					<view class="half_infoli" v-if="deviceInfos.lockStatus==1">
+						锁状态:<span >开锁</span>
+					</view>
+				</view>
 				<view class="info_li">
 					<view class="half_infoli">
 						车牌号:
@@ -63,26 +76,16 @@
 						<span v-else>--</span>
 					</view>
 				</view>
-				<view class="info_li">
-					<view class="half_infoli" v-if="deviceInfos.onlineStatus==0">
-						网络状态:<span >离线</span>
-					</view>
-					<view class="half_infoli" v-if="deviceInfos.onlineStatus==1">
-						网络状态:<span >在线</span>
-					</view>
+				<!-- <view class="info_li">
+					
 					<view class="half_infoli">
 						运营区域:
 						<span v-if="orderInfo.area">{{orderInfo.area}}</span>
 						<span v-else>--</span>
 					</view>
-				</view>
+				</view> -->
 				<view class="info_li">
-					<view class="half_infoli" v-if="deviceInfos.lockStatus==0">
-						锁状态:<span >关锁</span>
-					</view>
-					<view class="half_infoli" v-if="deviceInfos.lockStatus==1">
-						锁状态:<span >开锁</span>
-					</view>
+					
 				
 				</view>
 			</view>
@@ -310,7 +313,7 @@
 			
 		</view>
 		<u-mask :show="showload" :z-index='100' />
-		<u-mask :show="show" @click="show = false" :z-index='100' />
+		<u-mask :show="show" :z-index='100' />
 		<u-mask :show="showfzhc" @click="show = false" :z-index='100' />
 			<u-mask :show="showgj" :z-index='100' />
 		<view class="tip_box1" v-if="showgj">
@@ -399,41 +402,77 @@
 						运营区外调度费
 					</view>
 					<view class="ipt">
-						<input type="text" v-model="orderInfo.dispatchFee" placeholder="0.00" class="input"
+						<input type="text" v-model="dispatchFee" placeholder="0.00" class="input"
 							placeholder-style="color:#C7CDD3" @input="checkAndUpdate('dispatchFee')">
 						元
 					</view>
 				</view>
+				<view class="ipt_box" style="width:100%;margin-top: 6rpx;">
+					<view class="width:10% ;">
+						
+					</view>
+					<view  style="color: #ccc;margin-left: auto; font-size: 24rpx;">
+						最大可退款金额:{{orderInfo.dispatchFee}}元
+					</view>
+					
+				</view>
 				<view class="ipt_box">
 					<view class="text">
 						停车点外调度费
 					</view>
 					<view class="ipt">
-						<input type="text" v-model="orderInfo.manageFee" placeholder="0.00" class="input"
+						<input type="text" v-model="manageFee" placeholder="0.00" class="input"
 							placeholder-style="color:#C7CDD3" @input="checkAndUpdate('manageFee')">
 						元
 					</view>
 				</view>
+				<view class="ipt_box" style="width:100%;margin-top: 6rpx;">
+					<view class="width:10% ;">
+						
+					</view>
+					<view  style="color: #ccc;margin-left: auto; font-size: 24rpx;">
+						最大可退款金额:{{orderInfo.manageFee}}元
+					</view>
+					
+				</view>
 				<view class="ipt_box">
 					<view class="text">
 						骑行费
 					</view>
 					<view class="ipt">
-						<input type="text" v-model="orderInfo.ridingFee" placeholder="0.00" class="input"
+						<input type="text" v-model="ridingFee" placeholder="0.00" class="input"
 							placeholder-style="color:#C7CDD3" @input="checkAndUpdate('ridingFee')">
 						元
 					</view>
 				</view>
+				<view class="ipt_box" style="width:100%;margin-top: 6rpx;">
+					<view class="width:10% ;">
+						
+					</view>
+					<view  style="color: #ccc;margin-left: auto; font-size: 24rpx;">
+						最大可退款金额:{{orderInfo.ridingFee}}元
+					</view>
+					
+				</view>
 				<view class="ipt_box">
 					<view class="text">
 						预约费
 					</view>
 					<view class="ipt">
-						<input type="text" v-model="orderInfo.appointmentFee" placeholder="0.00" class="input"
+						<input type="text" v-model="appointmentFee" placeholder="0.00" class="input"
 							placeholder-style="color:#C7CDD3" @input="checkAndUpdate('appointmentFee')">
 						元
 					</view>
 				</view>
+				<view class="ipt_box" style="width:100%;margin-top: 6rpx;">
+					<view class="width:10% ;">
+						
+					</view>
+					<view  style="color: #ccc;margin-left: auto; font-size: 24rpx;">
+						最大可退款金额:{{orderInfo.appointmentFee}}元
+					</view>
+					
+				</view>
 				<view class="ipt_box">
 					<view class="text">
 						原因
@@ -520,7 +559,11 @@
 				showload:false,
 				showfzhc:false,
 				showgj:false,
-				deviceInfos:{}
+				deviceInfos:{},
+				dispatchFee:0,
+				manageFee:0,
+				ridingFee:0,
+				appointmentFee:0,
 
 			}
 		},
@@ -1124,7 +1167,19 @@
 					appointmentFee: this.orderInfo.appointmentFee,
 					reason: this.orderInfo.reason
 				}
-
+				if (
+				       data.dispatchFee > this.orderInfo.dispatchFee ||
+				       data.manageFee > this.orderInfo.manageFee ||
+				       data.ridingFee > this.orderInfo.ridingFee ||
+				       data.appointmentFee > this.orderInfo.appointmentFee
+				   ) {
+				       uni.showToast({
+				           title: '退款金额不能大于实际支付金额',
+				           icon: 'none',
+				           duration: 2000
+				       });
+				       return; // 阻止请求的发送
+				   }
 				this.$u.put('/appVerify/order/refund', data).then((res) => {
 					if (res.code === 200) {
 						// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
diff --git a/pages_admin/worke/woke_deviceMgmt.vue b/pages_admin/worke/woke_deviceMgmt.vue
index a9c0819..6dce150 100644
--- a/pages_admin/worke/woke_deviceMgmt.vue
+++ b/pages_admin/worke/woke_deviceMgmt.vue
@@ -212,11 +212,17 @@
 		},
 
 		onLoad() {
+			// if(uni.getStorageSync('adminAreaid')){
+			// 	this.areaId = uni.getStorageSync('adminAreaid')
+			// 		this.getDevice()
+			// }
+		
+		},
+		onShow() {
 			if(uni.getStorageSync('adminAreaid')){
 				this.areaId = uni.getStorageSync('adminAreaid')
 					this.getDevice()
 			}
-		
 		},
 		computed: {
 			isAllSelected() {