From b806c4ad52a661a1e5f0695650ec1a7e42f01633 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 20 五月 2026 23:08:48 +0800
Subject: [PATCH] 提交

---
 small-program/shop/pages/write-off-a/write-off-a.vue |  103 ++++++++++++++++++++++++++++++++-------------------
 1 files changed, 64 insertions(+), 39 deletions(-)

diff --git a/small-program/shop/pages/write-off-a/write-off-a.vue b/small-program/shop/pages/write-off-a/write-off-a.vue
index db5cecf..47806ff 100644
--- a/small-program/shop/pages/write-off-a/write-off-a.vue
+++ b/small-program/shop/pages/write-off-a/write-off-a.vue
@@ -7,6 +7,7 @@
 				<view class="nr-status-type"  v-if="info.type === 1">鍚屽煄瀵勯��</view>
 				<view class="nr-status-type1"  v-if="info.type === 1 && info.isUrgent === 0">鏍囬�熻揪</view>
 				<view class="nr-status-type1"  v-if="info.type === 1 && info.isUrgent === 1">鏋侀�熻揪</view>
+				<view class="nr-status-type2" v-if="info.exceptionStatus === 1">寮傚父杞瓨</view>
 			</view>
 			<view class="item" style="padding: 10rpx;" v-if="info.type ===1 && info.status===4">
 				<map name="mapAddr"></map>
@@ -200,7 +201,7 @@
 				<view class="tc-contemt">
 					<view class="tc-contemt-title" >纭鍙栦欢</view>
 					<view class="input-c">
-						<view class="input-label">鎷嶇収鍙栦欢<text style="color: red;">*</text><text style="color: #666666;">锛堟渶澶�3寮犵収鐗囷級</text></view>
+						<view class="input-label">鎷嶇収鍙栦欢<text style="color: red;" v-if="info.type === 1">*</text><text style="color: #666666;">锛堟渶澶�3寮犵収鐗囷級</text></view>
 						<view class="upload-row">
 							<view class="upload-box" @click="chooseAndUploadImage1(3)">
 								<view class="upload-plus">+</view>
@@ -349,7 +350,8 @@
 			this.checkRadiusAndGetDetail()
 		},
 		methods:{
-			confirmPickup() {
+			async confirmPickup() {
+				await this.checkRadiusAndGetDetail()
 				if (!this.inRadius) {
 					uni.showToast({
 						title: '鎮ㄥ綋鍓嶄綅缃笌鏀惰揣鍦板潃璺濈瓒呭嚭鑼冨洿锛岃鍦ㄥ湴鍧�闄勮繎閲嶆柊鎷嶇収',
@@ -359,8 +361,8 @@
 				}
 				this.show1 = true
 			},
-			// 纭鏀朵欢鏍搁攢
-			confirmWriteOff() {
+			async confirmWriteOff() {
+				await this.checkRadiusAndGetDetail()
 				if (!this.inRadius) {
 					uni.showToast({
 						title: '鎮ㄥ綋鍓嶄綅缃笌鏀惰揣鍦板潃璺濈瓒呭嚭鑼冨洿锛岃鍦ㄥ湴鍧�闄勮繎閲嶆柊鎷嶇収',
@@ -371,32 +373,36 @@
 				this.show0 = true
 			},
 			async checkRadiusAndGetDetail() {
-				uni.getLocation({
-					type: 'gcj02',
-					success: async (res) => {
-						const radiusRes = await this.$u.api.checkShopOperationRadius({
-							lat: res.latitude,
-							lng: res.longitude,
-							orderId: this.id
-						})
-						if (radiusRes.code === 200) {
-							if (!radiusRes.data) {
-								uni.showToast({
-									title: '鎮ㄥ綋鍓嶄綅缃笌鏀惰揣鍦板潃璺濈瓒呭嚭鑼冨洿锛岃鍦ㄥ湴鍧�闄勮繎閲嶆柊鎷嶇収',
-									icon: 'none'
-								})
+				return new Promise((resolve) => {
+					uni.getLocation({
+						type: 'gcj02',
+						success: async (res) => {
+							const radiusRes = await this.$u.api.checkShopOperationRadius({
+								lat: res.latitude,
+								lng: res.longitude,
+								orderId: this.id
+							})
+							if (radiusRes.code === 200) {
+								if (!radiusRes.data) {
+									uni.showToast({
+										title: '鎮ㄥ綋鍓嶄綅缃笌鏀惰揣鍦板潃璺濈瓒呭嚭鑼冨洿锛岃鍦ㄥ湴鍧�闄勮繎閲嶆柊鎷嶇収',
+										icon: 'none'
+									})
+								}
+								this.inRadius = radiusRes.data
 							}
-							this.inRadius = radiusRes.data
+							this.getOrderDetail0()
+							resolve()
+						},
+						fail: () => {
+							uni.showToast({
+								title: '璇峰厛鎵撳紑浣嶇疆鏈嶅姟',
+								icon: 'none'
+							})
+							this.getOrderDetail0()
+							resolve()
 						}
-						this.getOrderDetail0()
-					},
-					fail: () => {
-						uni.showToast({
-							title: '璇峰厛鎵撳紑浣嶇疆鏈嶅姟',
-							icon: 'none'
-						})
-						this.getOrderDetail0()
-					}
+					})
 				})
 			},
 			// // 瀹氫綅
@@ -614,17 +620,19 @@
 				} 
 			}, 
 			async storeOutOrderDo(){
-				uni.showToast({
-					title: '鎿嶄綔鎴愬姛',
-					icon: 'success'
-				})
 				var that =this
-				if (!this.form1.images || this.form1.images.length == 0) {
-					uni.showToast({
-						title:'璇蜂笂浼犲彇浠跺浘鐗�',
-						icon: 'warn'
-					})
-					return
+				if (this.info.type === 1) {
+					if (!this.form1.images || this.form1.images.length == 0) {
+						uni.showToast({
+							title: '璇蜂笂浼犲彇浠跺浘鐗�',
+							icon: 'warn'
+						})
+						return
+					}
+				} else {
+					if (!this.form1.images || this.form1.images.length == 0) {
+						delete this.form1.images
+					}
 				}
 				let res = await that.$u.api.storeOutOrder(this.form1);
 				if (res.code === 200 ) { 
@@ -677,6 +685,10 @@
 						})
 						return
 					}
+				} else {
+					if (!this.form.images || this.form.images.length == 0) {
+						delete this.form.images
+					}
 				}
 				let res = await that.$u.api.shopVerifyOrder(this.form);
 				if (res.code === 200 ) { 
@@ -685,7 +697,7 @@
 						icon: 'success'
 					})
 					  uni.$emit('updateOrder',{info:this.info,delete:0})
-					  that.printerOrder()
+					//   that.printerOrder()
 					 setTimeout(function(){
 						 that.getOrderDetail()
 					 },1000) 
@@ -1021,6 +1033,19 @@
 					color: #10B2FA;
 					margin-left: 16rpx;
 				}
+				.nr-status-type2 {
+					width: 158rpx;
+					height: 38rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					background: #FFFFFF;
+					border-radius: 8rpx;
+					font-weight: 400;
+					font-size: 24rpx;
+					color: #FF0000;
+					margin-left: 16rpx;
+				}
 			}
 			.nr-desc {
 				font-weight: 400;

--
Gitblit v1.9.3