From 0d248a85132ffb06b70d1a659ac5cafc815e2258 Mon Sep 17 00:00:00 2001
From: whycq <123456>
Date: 星期六, 23 四月 2022 15:17:04 +0800
Subject: [PATCH] #

---
 pages/basics/checkout.vue |   68 +++++++++++++++++++++++-----------
 1 files changed, 46 insertions(+), 22 deletions(-)

diff --git a/pages/basics/checkout.vue b/pages/basics/checkout.vue
index fc747d0..26730c1 100644
--- a/pages/basics/checkout.vue
+++ b/pages/basics/checkout.vue
@@ -7,7 +7,7 @@
 					<text class="title">鎵樼洏鏉$爜</text>
 				</view>
 				<view class="box-buttom">
-					<input v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆">
+					<input v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆" maxlength="8" @input="findBarcode()">
 					<view class="search-icon">
 						<uni-icons type="closeempty" size="20" color="#a5a5a5" @click="removeBarcode()"></uni-icons>
 					</view>
@@ -54,7 +54,7 @@
 				<button class="cu-btn lg" @click="resst()">閲嶇疆</button>
 			</view>
 			<view>
-				<button class="cu-btn lg pakin-btn bg-blue" @click="comb()">缁勬墭</button>
+				<button class="cu-btn lg pakin-btn bg-blue" @click="comb()">纭</button>
 			</view>
 		</view>
 	</view>
@@ -166,7 +166,7 @@
 			findMat() {
 				let that = this
 				uni.request({
-				    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/auth',
+				    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/pakout/query/auth',
 				    data: {
 						matnr:that.matnr
 				    },
@@ -174,29 +174,53 @@
 						'token':uni.getStorageSync('token')
 				    },
 					success(result) {
-						uni.vibrateShort();
-						let res = result.data
-						if (res.code === 200 && res.data) {
-							that.matData = res.data
-							uni.navigateTo({
-								url: "matQuery",
-								events: {
-								    // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
-								    matList: function(data) {
-										that.matList.push(data.data)
-								    },
-								  },
-								  success: function(res) {
-								    // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
-								    res.eventChannel.emit('matData', { data: that.matData })
-								  }
-							});
-						}
+						console.log(result)
 						
 					}
 				});
 			},
-		
+			findBarcode() {
+				let that = this
+				uni.request({
+				    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/pakout/query/auth',
+				    data: {
+						barcode:that.barcode
+				    },
+				    header: {
+						'token':uni.getStorageSync('token')
+				    },
+					success(result) {
+						console.log(result)
+						
+					}
+				});
+				
+			},
+			getOutBound() {         // 鑾峰彇鍑哄簱鍙�
+				let that = this
+				uni.request({
+					url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/available/take/check/site',
+					method: 'POST',
+					header: {
+						'token':uni.getStorageSync('token')
+					},
+					success(result) {
+						var res = result.data
+						if (res.code === 200) {
+							that.staNoList = 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'})
+						}
+					},
+				});
+			}, // getOutBound
 			change(e) {
 				console.log('褰撳墠妯″紡锛�' + e.type + ',鐘舵�侊細' + e.show);
 			},

--
Gitblit v1.9.1