From 9f8c2ee719613a600ddf76f4958c5c860cbe2ac6 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期二, 26 三月 2024 13:08:40 +0800
Subject: [PATCH] #

---
 pages/tzsk/order/orderPutOn.vue |   73 ++++++++++++++++++++++++++----------
 1 files changed, 52 insertions(+), 21 deletions(-)

diff --git a/pages/tzsk/order/orderPutOn.vue b/pages/tzsk/order/orderPutOn.vue
index 0fabc14..4eeea91 100644
--- a/pages/tzsk/order/orderPutOn.vue
+++ b/pages/tzsk/order/orderPutOn.vue
@@ -2,16 +2,16 @@
 	<view>
 		<view class="code">
 			<view class="item">
+				<view class="code-decs">搴撲綅鍙�:</view>
+				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="locNo" :focus="locNoFocus">
+				<button v-show="recommendLocs.length" size="mini" type="primary" @click="toggle('right')">鎺ㄨ崘</button>
+			</view>
+			<view class="item">
 				<view class="code-decs">鎵樼洏鐮�:</view>
 				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus" @input="recommendLoc()">
 				<view class="item-right">
 					<button></button>
 				</view>
-			</view>
-			<view class="item">
-				<view class="code-decs">搴撲綅鍙�:</view>
-				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="locNo" :focus="locNoFocus">
-				<button v-show="recommendLocs.length" size="mini" type="primary" @click="toggle('right')">鎺ㄨ崘</button>
 			</view>
 		</view>
 		<view class="mat-list-title">
@@ -149,6 +149,10 @@
 				</scroll-view>
 			</uni-popup>
 		</view>
+		
+		<view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard">
+			<image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image>
+		</view>
 	</view>
 </template>
 
@@ -179,14 +183,39 @@
 				matData: '',
 				removeNum: 0,
 				type: 'center',
-				recommendLocs: []
+				recommendLocs: [],
+				hide: true,
+				hidebg: 'kb-bgtr'
 			}
 		},
 		onShow() {
 			this.baseUrl = uni.getStorageSync('baseUrl');
 			this.token = uni.getStorageSync('token');
+			this.recommendLoc()
+		},
+		onLoad() {
+			// #ifdef APP
+			setInterval(()=>{
+				if (this.hide) {
+					uni.hideKeyboard()
+				} else {
+					
+				}
+			},20)
+			// #endif
+		},
+		onBackPress() {
+			this.hide = false
 		},
 		methods: {
+			hideKeyboard() {
+				this.hide = this.hide ? false : true
+				if (this.hide) {
+					this.hidebg = 'kb-bgtr'
+				} else {
+					this.hidebg = 'kb-bgfa'
+				}
+			},
 			chose(item) {
 				this.locNo = item
 				this.$refs.popup.close()
@@ -227,16 +256,17 @@
 				that.recommendLocs = []
 				uni.request({
 					url: that.baseUrl + '/mobile/node/recommend/loc',
-					data: {barcode: that.barcode},
+					data: {zpallet: that.barcode},
 					header: {'token': uni.getStorageSync('token')},
 					method: 'POST',
 					success(res) {
-						res = res.data
 						console.log(res);
-						that.recommendLocs.push('DT-C-010202')
-						return
+						res = res.data
+						
+						// that.recommendLocs.push('DT-C-010202')
 						if (res.code == 200 && res.data) {
-							that.recommendLocs = res.data
+							that.recommendLocs.push(res.msg)
+							that.dataList = res.data
 						} 
 					}
 					
@@ -289,11 +319,11 @@
 			comb() {
 				uni.vibrateShort();
 				let that = this;
-				if (that.barcode === '') {
-					this.messageText = "璇锋坊鍔犲簱浣嶇爜"
-					this.messageToggle('error')
-					return;
-				}
+				// if (that.barcode === '') {
+				// 	this.messageText = "璇锋坊鍔犲簱浣嶇爜"
+				// 	this.messageToggle('error')
+				// 	return;
+				// }
 				// if (that.dataList.length === 0) {
 				// 	this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
 				// 	this.messageToggle('error')
@@ -432,12 +462,13 @@
 		display: flex;
 		min-height: 80rpx;
 		background-color: #FFF;
-		margin: auto 20rpx;
+		/* margin: 20rpx 20rpx; */
 		border-radius: 20rpx;
 		box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
+		margin: 20rpx;
 	}
 	.list:first-child {
-		margin-top: 410rpx;
+		margin-top: 280rpx;
 	}
 	.list:last-child {
 		margin-bottom: 120rpx;
@@ -445,14 +476,14 @@
 	.code {
 		width: 100%;
 		position: fixed;
-		min-height: 200rpx;
+		min-height: 140rpx;
 		background-color: #FFF;
 		z-index: 10;
 	}
 	.item {
 		display: flex;
 		align-items: center;
-		height: 100rpx;
+		height: 70rpx;
 		margin-left: 20rpx;
 		border-bottom: 1px solid #DCDFE6;
 	}
@@ -484,7 +515,7 @@
 		width: 100%;
 		background-color: white;
 		position: fixed;
-		margin-top: 200rpx;
+		margin-top: 140rpx;
 		z-index: 9;
 		/* border-top: 1px solid #DCDFE6; */
 		text-align: center;

--
Gitblit v1.9.1