From f2e9b22a4cd54705700ebb69f5f04de6a7eccce8 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 09 七月 2025 21:14:31 +0800
Subject: [PATCH] no message

---
 pages/pakin/putOn.vue |   38 +++++++++++++++++++++++---------------
 1 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/pages/pakin/putOn.vue b/pages/pakin/putOn.vue
index 05309ac..f022d3d 100644
--- a/pages/pakin/putOn.vue
+++ b/pages/pakin/putOn.vue
@@ -105,21 +105,21 @@
 			fetchGoods() {
 				let that = this 
 				setTimeout(() => {
-					if (that.barcode.length < 1) {
-						return
-					}else if (that.barcode.length != 8) {
-						this.messageToggle('error', '鎷栫洏鐮佷负8浣嶉殢鏈烘暟瀛楋紒锛�')
-						return
-					} 
-				}, 500)
-				
-				this.getMatnrBybarcode()
+					that.getMatnrBybarcode()
+				}, 800)
 			},
 
 			/**
 			 * 鏍规嵁鎷栫洏鐮佹媺鍙栧凡缁勬嫋鏁版嵁
 			 */
 			getMatnrBybarcode() {
+				if (this.barcode.length < 1) {
+					return
+				}
+				// if (this.barcode.length != 8) {
+				// 	this.messageToggle('error', '鎷栫洏鐮佷负8浣嶉殢鏈烘暟瀛楋紒锛�')
+				// 	return
+				// } 
 				let that = this
 				uni.request({
 					url: that.baseUrl + '/pda/barcode/matnr/' + that.barcode,
@@ -131,7 +131,6 @@
 						if (result.code === 200) {
 							that.dataList = result.data
 						}
-						console.log(result)
 					}	
 				})
 			},
@@ -150,7 +149,8 @@
 			
 			comb() {
 				uni.vibrateShort();
-				let that = this;
+				let that = this;
+				this.$toast.loading('涓婃灦涓�...')
 				uni.request({
 					url: that.baseUrl + '/pda/matnr/in/barcode',
 					data: JSON.stringify({
@@ -161,10 +161,10 @@
 					header: {
 						'token': uni.getStorageSync('token')
 					},
-					success(result) {
+					success(result) {
+						that.$toast.hideLoading()
 						var res = result.data
-						if (res.code === 200) {
-							that.resst();
+						if (res.code === 200) {
 							that.messageToggle('success', '涓婃灦鎴愬姛锛侊紒')
 						} else if (res.code == 403) {
 							that.messageText = res.msg
@@ -177,7 +177,14 @@
 						} else {
 							that.messageText = res.msg
 							that.messageToggle('error')
-						}
+						}
+						
+					},
+					fail() {
+						that.$toast.hideLoading()
+					},
+					complete() {
+						that.resst()
 					}
 				});
 			},
@@ -187,6 +194,7 @@
 			},
 			
 			resst() {
+				this.dataList = []
 				this.barcode = ''
 				this.locno = ''
 			},

--
Gitblit v1.9.1