From f0aa0f9247de70d1cee3f4957b1be8416640e320 Mon Sep 17 00:00:00 2001
From: whycq <123456>
Date: 星期三, 11 五月 2022 23:25:14 +0800
Subject: [PATCH] #

---
 pages/basics/checkout.vue |   38 +++++++++++++++++++++++++++++---------
 1 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/pages/basics/checkout.vue b/pages/basics/checkout.vue
index ed0eb69..aba9c37 100644
--- a/pages/basics/checkout.vue
+++ b/pages/basics/checkout.vue
@@ -98,6 +98,11 @@
 			this.getOutBound();
 		},
 		methods: {
+			messageToggle(type) {
+				this.msgType = type
+				this.messageText = `杩欐槸涓�鏉�${type}娑堟伅鎻愮ず`
+				this.$refs.message.open()
+			},
 			choseStaNo() {
 				for (var i = 0;i < this.staNoList.length; i++) {
 					if (this.desc == this.staNoList[i].desc) {
@@ -204,20 +209,35 @@
 						'token':uni.getStorageSync('token')
 				    },
 					success(result) {
-						
 						var res = result.data;
-						if(res.data) {
-							for(let i = 0;i<that.matList.length;i++) {
-								for (let j = 0;j < res.data.length; j++) {
-									if(JSON.stringify(that.matList[i]) === JSON.stringify(res.data[j])) {
-										res.data.splice(j,1)
+						if(res.code === 200 ) {
+							if(res.data) {
+								for(let i = 0;i<that.matList.length;i++) {
+									for (let j = 0;j < res.data.length; j++) {
+										if(JSON.stringify(that.matList[i]) === JSON.stringify(res.data[j])) {
+											res.data.splice(j,1)
+										}
 									}
 								}
+								that.matList = res.data.concat(that.matList)
+								that.listLen = that.matList.length;
+								that.focus = false;
+								that.$nextTick(function() {
+									that.focus = true;
+								});
+								that.matnr = ''
 							}
-							that.matList = res.data.concat(that.matList)
-							that.listLen = that.matList.length;
-							// that.matList = that.matList.concat(res.data)
+						} else if (res.code == 403) {
+							uni.showToast({title: res.msg, icon: "none", position: 'top'})
+							setTimeout(() => {
+								uni.reLaunch({
+									url: '../login/login'
+								});
+							}, 1000);
+						} else {
+							uni.showToast({title: res.msg, icon: "none",position: 'top'})
 						}
+						
 					}
 				});
 			},

--
Gitblit v1.9.1