From 597fc3077ad5acdde2e8dd5ef41f502ce7558445 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期四, 25 七月 2024 19:12:16 +0800
Subject: [PATCH] #

---
 pages/order/orderPutOn.vue |   52 ++++++++++++++--------------------------------------
 1 files changed, 14 insertions(+), 38 deletions(-)

diff --git a/pages/order/orderPutOn.vue b/pages/order/orderPutOn.vue
index 0f36504..5d537d6 100644
--- a/pages/order/orderPutOn.vue
+++ b/pages/order/orderPutOn.vue
@@ -222,12 +222,8 @@
 				that.matnr = matnr[1]
 				uni.request({
 					url: that.baseUrl + '/mat/auth',
-					data: {
-						matnr: that.matnr
-					},
-					header: {
-						'token': uni.getStorageSync('token')
-					},
+					data: { matnr: that.matnr },
+					header: { 'token': uni.getStorageSync('token') },
 					success(result) {
 						result = result.data
 						if (result.code === 200 && result.data) {
@@ -253,22 +249,12 @@
 								},
 							});
 						} else if (result.code == 403) {
-							uni.showToast({
-								title: result.msg,
-								icon: "none",
-								position: 'top'
-							})
+							uni.showToast({ title: result.msg, icon: "none", position: 'top' })
 							setTimeout(() => {
-								uni.reLaunch({
-									url: '../login/login'
-								});
+								uni.reLaunch({ url: '../login/login' });
 							}, 1000);
 						} else {
-							uni.showToast({
-								title: result.msg,
-								icon: "none",
-								position: 'top'
-							})
+							uni.showToast({ title: result.msg, icon: "none", position: 'top' })
 						}
 			
 					}
@@ -340,19 +326,16 @@
 				uni.vibrateShort();
 				let that = this;
 				if (that.barcode === '') {
-					this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
-					this.messageToggle('error')
+					uni.showToast({ title:"璇锋壂鎻忔墭鐩樻潯鐮�", icon: "error", position: 'center' })
 					return;
 				}
 				if (that.dataList.length === 0) {
-					this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
-					this.messageToggle('error')
+					uni.showToast({ title:"璇锋坊鍔犲晢鍝佸垪琛�", icon: "error", position: 'center' })
 					return;
 				}
 				for (var i = 0; i < that.dataList.length; i++) {
 					if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') {
-						this.messageText = that.dataList[i].matnr + '缁勬墭鏁伴噺涓嶈兘涓�0'
-						this.messageToggle('error')
+						uni.showToast({ title: that.dataList[i].matnr + '缁勬墭鏁伴噺涓嶈兘涓�0', icon: "error", position: 'center' })
 						return;
 					}
 				}
@@ -363,26 +346,21 @@
 						combMats: that.dataList
 					}),
 					method: 'POST',
-					header: {
-						'token': uni.getStorageSync('token')
-					},
+					header: { 'token': uni.getStorageSync('token') },
 					success(result) {
 						var res = result.data
 						if (res.code === 200) {
 							that.resst();
-							that.messageText = "缁勬墭鎴愬姛"
-							that.messageToggle('success')
+							uni.showToast({ title:"缁勬墭鎴愬姛", icon: "success", position: 'center' })
 						} else if (res.code == 403) {
-							that.messageText = res.msg
-							that.messageToggle('error')
+							uni.showToast({ title: res.msg, icon: "none", position: 'top' })
 							setTimeout(() => {
 								uni.reLaunch({
 									url: '../login/login'
 								});
 							}, 1000);
 						} else {
-							that.messageText = res.msg
-							that.messageToggle('error')
+							uni.showToast({ title: res.msg, icon: "none", position: 'top' })
 						}
 					}
 				});
@@ -428,16 +406,14 @@
 			},
 			// 纭绉婚櫎
 			removeConfirm(i) {
-				this.messageText = "绉婚櫎鎴愬姛"
-				this.messageToggle('success')
+				uni.showToast({ title: "绉婚櫎鎴愬姛", icon: "success", position: 'top' })
 				this.dataList.splice(this.removeNum, 1)
 			},
 			reviseConfirm() {
 				this.dataList[this.rowNum].anfme = this.count
 				this.dataList[this.rowNum].batch = this.batch
 				this.dataList[this.rowNum].weight = this.weight
-				this.messageText = "淇敼鎴愬姛"
-				this.messageToggle('success')
+				uni.showToast({ title: "淇敼鎴愬姛", icon: "success", position: 'top' })
 				this.$refs.revise.close()
 				this.$forceUpdate() // 寮哄埗鍒锋柊
 			},

--
Gitblit v1.9.1