From c8751bab03209de5528ed253b5542b1d3c5ff169 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期二, 13 一月 2026 10:39:24 +0800
Subject: [PATCH] #

---
 pages/listing/matnrPalletising.vue |   34 +++++++++++++++++++---------------
 common/request.js                  |   11 +++++++++--
 2 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/common/request.js b/common/request.js
index d0bc13c..11c481a 100644
--- a/common/request.js
+++ b/common/request.js
@@ -26,14 +26,21 @@
 			},
 			method: method, //'GET','POST'
 			dataType: 'json',
+			timeout: 30000, // 30绉掕秴鏃�
 			success: (res) => {
 				!hideLoading && uni.hideLoading()
 				resolve(res.data)
 
 			},
 			fail: (res) => {
-				// !hideLoading && toast("缃戠粶涓嶇粰鍔涳紝璇风◢鍚庡啀璇晘")
-				//wx.hideLoading()
+				!hideLoading && uni.hideLoading()
+				// 鍒ゆ柇鏄惁涓鸿秴鏃堕敊璇�
+				const isTimeout = res.errMsg && (res.errMsg.includes('timeout') || res.errMsg.includes('瓒呮椂'))
+				uni.showToast({
+					title: isTimeout ? '缃戠粶璇锋眰瓒呮椂锛岃妫�鏌ョ綉缁滆繛鎺�' : '缃戠粶璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯',
+					icon: 'none',
+					duration: 3000
+				})
 				reject(res)
 			}
 		})
diff --git a/pages/listing/matnrPalletising.vue b/pages/listing/matnrPalletising.vue
index 41857e1..26b8c3c 100644
--- a/pages/listing/matnrPalletising.vue
+++ b/pages/listing/matnrPalletising.vue
@@ -475,8 +475,9 @@
 				this.submitConfirm(this.agvStationInput);
 			},
 		// 鎻愪氦缁勬墭璇锋眰
-		async submitConfirm(agvStation) {
-			this.repeatClick = true				
+	async submitConfirm(agvStation) {
+		this.repeatClick = true				
+		try {
 			const newArr = this.list.map(item => {
 				
 				return {
@@ -519,21 +520,24 @@
 					position: 'top'
 				})
 			}
+		} finally {
+			// 鏃犺璇锋眰鎴愬姛杩樻槸澶辫触锛岄兘閲婃斁鎸夐挳閿佸畾
 			this.repeatClick = false
-		},
+		}
+	},
 		async getRece() {
-			const {
-				code,
-				data,
-				msg
-			} = await request('/areas/receipt', {}, 'get')
-			if (code === 200) {
-				this.range = data.map(item => ({
-					value: item.id,
-					text: item.warehouseId$ + "-- " + item.name
-				}));
-			}
-		},
+		const {
+			code,
+			data,
+			msg
+		} = await request('/areas/receipt', {}, 'get')
+		if (code === 200) {
+			this.range = data.map(item => ({
+				value: item.id,
+				text: item.warehouseId$ + "-- " + item.name
+			}));
+		}
+	},
 		}
 	}
 </script>

--
Gitblit v1.9.1