From 248ef3ba3de9994dc83d2b36690542893f9fb6e6 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期四, 28 十一月 2024 16:26:06 +0800
Subject: [PATCH] #

---
 pages/phyz/stationManage/pickAgain.vue |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/pages/phyz/stationManage/pickAgain.vue b/pages/phyz/stationManage/pickAgain.vue
index f4d44ab..73c71ca 100644
--- a/pages/phyz/stationManage/pickAgain.vue
+++ b/pages/phyz/stationManage/pickAgain.vue
@@ -36,7 +36,7 @@
 		</view>
 		<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
 		<view class="buttom">
-			<button size="mini" type="primary" @click="confirmPick('warn')">纭鎷f枡</button>
+			<button size="mini" type="primary" @click="confirmPick('warn')" :disabled="pickAgaDis">纭鎷f枡</button>
 		</view>
 	</view>
 </template>
@@ -53,7 +53,8 @@
 				maxCount: 0,
 				wrkNo: '',
 				locNo: '',
-				pickedAnfme: 0
+				pickedAnfme: 0,
+				pickAgaDis: false
 			}
 		},
 		onShow() {
@@ -64,7 +65,7 @@
 			const eventChannel = this.getOpenerEventChannel();
 			// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
 			eventChannel.on('item', function(data) {
-				console.log(data);
+				// console.log(data);
 				_this.pickList = data.wrkDetls
 				_this.wrkNo = data.wrkDetls[0].wrkNo
 				_this.locNo = data.item.sourceLocNo
@@ -85,7 +86,7 @@
 					method: 'GET',
 					success(res) {
 						res = res.data
-						console.log(res);
+						// console.log(res);
 						if (res.code === 200) {
 							_this.chosed(_this.pickList,res.data.records)
 							return
@@ -120,18 +121,21 @@
 						} else {
 							uni.showToast({ title: res.msg, icon: "error", position: 'top' })
 						}
-					}
+					},
 				})
 			},
 			// 宸查�夋嫞鏂欏垪琛�
 			chosed(wrkDetls,locDetls) {
+				console.log(wrkDetls,locDetls);
 				let isfl = false, enbleList = []
 				for (let locDetl of locDetls) {
 					locDetl['color'] = 'order-sts-start'
 					locDetl['pickedAnfme'] = 0
 					locDetl['count'] = 0
 					for (let wrkDetl of wrkDetls) {
-						if (wrkDetl.threeCode == locDetl.threeCode && wrkDetl.matnr == locDetl.matnr) {
+						console.log(wrkDetl);
+						if (wrkDetl.threeCode.replace(/\s/g, "") == locDetl.threeCode.replace(/\s/g, "") && wrkDetl.matnr == locDetl.matnr) {
+							console.log(wrkDetl);
 							locDetl['pickedAnfme'] = wrkDetl.anfme
 							if (locDetl.stock == -1) {
 								locDetl.stock = 0
@@ -187,6 +191,7 @@
 			},
 			// 纭鍐嶆鎷f枡
 			confirmPick() {
+				this.pickAgaDis = true
 				let _this = this
 				uni.request({
 					url: `${_this.baseUrl}/agvMobile/pick/again/auth`,
@@ -198,8 +203,8 @@
 					}),
 					method: 'POST',
 					success(res) {
+						_this.pickAgaDis = false
 						res = res.data
-						console.log(res);
 						if  (res.code === 200) {
 							_this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: 1});
 							setTimeout(()=>{
@@ -213,6 +218,9 @@
 						}
 					}
 				})
+			},
+			fail(res) {
+				_this.pickAgaDis = false
 			}
 		}
 	}

--
Gitblit v1.9.1