From aeaace1cf0c48cc9b2dffbc5d5ab9eb4ecfad4a1 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期二, 16 八月 2022 19:30:19 +0800
Subject: [PATCH] Merge branch 'hylywms' of http://47.97.1.152:5880/r/~whycq/wms-app into hylywms

---
 pages/basics/pakin.vue |   37 ++++++++++++++++++++++++-------------
 1 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/pages/basics/pakin.vue b/pages/basics/pakin.vue
index 33d2310..9a70f1f 100644
--- a/pages/basics/pakin.vue
+++ b/pages/basics/pakin.vue
@@ -9,7 +9,7 @@
 				<view class="square-content">
 					<view class="content-input">
 						<input v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆" maxlength="10" 
-						:focus="barcodeFocus" @input="barcodeInput" placeholder-style="line-height:  85rpx;">
+						:focus="barcodeFocus" @confirm="barcodeInput()" placeholder-style="line-height:  85rpx;">
 						<uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
 					</view>
 				</view>
@@ -116,6 +116,7 @@
 	export default {
 		data() {
 			return {
+				commonUrl:null,
 				barcode: '',
 				barcodeFocus:true,
 				focus:false,
@@ -146,19 +147,29 @@
 			this.baseIP = UIP;
 			const UPORT = uni.getStorageSync('UPORT');
 			this.basePORT = UPORT
+			const PROJ = uni.getStorageSync('UPROJ');
+			this.baseUrl = PROJ
+			this.getUrl()
 		},
 		methods: {
+			// 鑾峰彇url
+			getUrl() {
+				this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
+			},
 			// barcode input 浜嬩欢
 			barcodeInput() {
-				var len = this.barcode.length
-				if (len != 8) {
-					uni.showToast({title: '鎵樼洏鐮佹湁璇閲嶈瘯', icon: "none", position: 'top'});
-					this.barcodeFocuss()
-					return;
-				}
-				if (len == 8) {
-					this.focuss()
-				}
+				// 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
+				setTimeout(()=>{
+					var len = this.barcode.length
+					if (len != 8) {
+						uni.showToast({title: '鎵樼洏鐮佹湁璇閲嶈瘯', icon: "none", position: 'top'});
+						this.barcodeFocuss()
+						return;
+					}
+					if (len == 8) {
+						this.focuss()
+					}
+				},100)
 			},
 			// 鎵樼洏鐮佹湁璇噸缃�
 			barcodeFocuss() {
@@ -227,7 +238,7 @@
 				}
 				uni.showLoading();
 				uni.request({
-				    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/comb/auth',
+				    url: that.commonUrl + '/mobile/comb/auth',
 				    data: JSON.stringify({
 						barcode: that.barcode,
 						combMats: that.matList
@@ -273,7 +284,7 @@
 					},
 					success: function(res) {
 					    // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�   鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
-					    res.eventChannel.emit('acceptDataFromOpenerPage', {baseIP:that.baseIP, basePORT:that.basePORT })
+					    res.eventChannel.emit('acceptDataFromOpenerPage', {commonUrl:that.commonUrl })
 					},
 					
 				});
@@ -282,7 +293,7 @@
 			findMat() {
 				let that = this
 				uni.request({
-				    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/auth',
+				    url: that.commonUrl + '/mat/auth',
 				    data: {
 						matnr:that.matnr
 				    },

--
Gitblit v1.9.1