From 8a899e63502939dbf034b90ba46741e0faa9023c Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 08 五月 2026 18:49:32 +0800
Subject: [PATCH] 管理端bug修改

---
 app/pages/order-detail/order-detail.vue |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/app/pages/order-detail/order-detail.vue b/app/pages/order-detail/order-detail.vue
index 1b35417..5e481af 100644
--- a/app/pages/order-detail/order-detail.vue
+++ b/app/pages/order-detail/order-detail.vue
@@ -306,6 +306,7 @@
 				locationTimer: null,
 				distance: 0,
 				duration: 0,
+				isWithinOperationRadius: true,
 				statusTextMap: {
 					2: '寰呮帴鍗�',
 					3: '寰呭彇璐�',
@@ -450,18 +451,52 @@
 			this.topFixedHeight = uni.upx2px(500 + 92)
 			if (this.orderId) {
 				this.getOrderDetail()
+				this.initOperationRadius()
 			}
 		},
+
 		onUnload() {
 			if (this.locationTimer) {
 				clearInterval(this.locationTimer)
 				this.locationTimer = null
 			}
 		},
+
 		methods: {
 			handleBack() {
 				uni.navigateBack({ delta: 1 });
 			},
+
+			initOperationRadius() {
+				uni.getLocation({
+					type: 'gcj02',
+					success: (res) => {
+						this.$u.api.checkDriverOperationRadius({
+							lat: res.latitude,
+							lng: res.longitude,
+							orderId: this.orderId
+						}).then(res => {
+							if (res.code === 200) {
+								this.isWithinOperationRadius = res.data
+								if (!this.isWithinOperationRadius) {
+									uni.showToast({
+										title: '鎮ㄥ綋鍓嶄綅缃笌鏀惰揣鍦板潃璺濈瓒呭嚭鑼冨洿锛岃鍦ㄥ湴鍧�闄勮繎閲嶆柊鎷嶇収',
+										icon: 'none'
+									})
+								}
+							}
+						})
+					},
+					fail: () => {
+						this.isWithinOperationRadius = false
+						uni.showToast({
+							title: '鎮ㄥ綋鍓嶄綅缃潈闄愭病鏈夊紑鍚紝璇峰厛寮�鍚悗鍐嶆潵鎿嶄綔',
+							icon: 'none'
+						})
+					}
+				})
+			},
+
 			getOrderDetail() {
 				this.$u.api.orderDetail({ orderId: this.orderId }).then(res => {
 					if (res.code === 200) {
@@ -599,6 +634,13 @@
 				}
 
 				if (action === 'pickup' || action === 'deliver') {
+					if (!this.isWithinOperationRadius) {
+						uni.showToast({
+							title: '鎮ㄥ綋鍓嶄綅缃笌鏀惰揣鍦板潃璺濈瓒呭嚭鑼冨洿锛岃鍦ㄥ湴鍧�闄勮繎閲嶆柊鎷嶇収',
+							icon: 'none'
+						})
+						return
+					}
 					this.uploadedPhotos = []
 					this.photoRemark = ''
 					this.photoPopupMode = action

--
Gitblit v1.9.3