From 8fcd7a67e4391a5f1fbdb590c2a3f913aeb2a0a0 Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期二, 31 三月 2026 14:11:23 +0800
Subject: [PATCH] PP平库功能上线,PDA优化,部分问题点优化

---
 代码管理/淮安PDA/pages/stash/ProEmptyBack.vue |   40 ++++++++++++++++++++++++++++++++--------
 1 files changed, 32 insertions(+), 8 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/ProEmptyBack.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/ProEmptyBack.vue"
index 4d9cd85..4d3491c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/ProEmptyBack.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/ProEmptyBack.vue"
@@ -11,7 +11,16 @@
 						@input="addressInput" />
 				</uni-forms-item>
 				<uni-forms-item>
-					<button @click="InEmpty" type="primary" size="default" style="margin-top: 2%;">绌烘鍥炲簱</button>
+					<!-- 绌烘鍥炲簱鎸夐挳娣诲姞绂佺敤鐘舵�佸拰鏂囧瓧鎻愮ず -->
+					<button 
+						@click="InEmpty" 
+						type="primary" 
+						size="default" 
+						style="margin-top: 2%;"
+						:disabled="isSubmitting"
+					>
+						{{ isSubmitting ? '鎻愪氦涓�...' : '绌烘鍥炲簱' }}
+					</button>
 				</uni-forms-item>
 			</uni-forms>
 		</view>
@@ -25,10 +34,12 @@
 		data() {
 			return {
 				focus: false,
-				focusStart:false,
+				focusStart: false,
 				barcode: "",
 				address: "",
-				WarehouseId: ""
+				WarehouseId: "",
+				// 鏂板锛氶槻閲嶅鐐瑰嚮鐘舵�佸彉閲�
+				isSubmitting: false
 			}
 		},
 		onShow() {},
@@ -36,15 +47,11 @@
 			
 		},
 		methods: {
-			// voiceSpeech(src) {
-			// 	innerAudioContext.src = src; // '../../static/success.mp3';
-			// 	innerAudioContext.play();
-			// },
 			barcodeInput() {
 				this.$nextTick(function(x) {
 					if (this.barcode.length > 0) {
 						this.focus = true;
-						this.focusStart=true;
+						this.focusStart = true;
 					}
 				})
 			},
@@ -56,6 +63,7 @@
 				})
 			},
 			InEmpty() {
+				// 1. 鍓嶇疆鏍¢獙
 				if (this.barcode == "") {
 					this.$refs.uToast.show({
 						title: "璇锋壂鎻忔墭鐩樼爜",
@@ -70,6 +78,13 @@
 					})
 					return;
 				}
+				
+				// 2. 闃叉閲嶅鐐瑰嚮锛氳姹備腑鍒欑洿鎺ヨ繑鍥�
+				if (this.isSubmitting) return;
+				
+				// 3. 鏍囪涓鸿姹備腑锛岀鐢ㄦ寜閽�
+				this.isSubmitting = true;
+
 				this.$u.post('/api/Task/EmptyBackTask?barcode=' + this.barcode + '&startPoint=' + this.address).then(
 					res => {
 						if (res.status) {
@@ -85,6 +100,15 @@
 								type: "error"
 							})
 						}
+					}).catch(err => {
+						// 鎹曡幏璇锋眰寮傚父锛屾彁绀洪敊璇�
+						this.$refs.uToast.show({
+							title: err.message || "璇锋眰澶辫触",
+							type: "error"
+						})
+					}).finally(() => {
+						// 4. 璇锋眰瀹屾垚锛堟垚鍔�/澶辫触/寮傚父锛夋仮澶嶆寜閽姸鎬�
+						this.isSubmitting = false;
 					})
 			}
 		}

--
Gitblit v1.9.3