From 1e40a94e41a811a30b49150b5feabe9b7797948a Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期二, 14 五月 2024 08:23:06 +0800
Subject: [PATCH] #

---
 pages/tzsk/AGV/AGVPakinBing.vue |   49 ++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 38 insertions(+), 11 deletions(-)

diff --git a/pages/tzsk/AGV/AGVPakinBing.vue b/pages/tzsk/AGV/AGVPakinBing.vue
index d3c5147..b81b91c 100644
--- a/pages/tzsk/AGV/AGVPakinBing.vue
+++ b/pages/tzsk/AGV/AGVPakinBing.vue
@@ -4,12 +4,12 @@
 			<view class="item">
 				<view class="code-decs">鏂欑鐮�:</view>
 				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
-					@input="barcodeInput()">
+					@input="barcodeInput()" readonly>
 			</view>
 			<view class="item">
 				<view class="code-decs">鏆傚瓨浣�:</view>
 				<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="stationCode" :focus="stationCodeFocus"
-					@input="stationCodeInput()">
+					@input="stationCodeInput()" readonly>
 				<view class="item-right">
 					<button></button>
 					<!-- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text> -->
@@ -17,9 +17,9 @@
 				</view>
 			</view>
 		</view>
-		<!-- <view class="mat-list-title">
+		<view class="mat-list-title">
 			鍟嗗搧鍒楄〃
-		</view> -->
+		</view>
 		<scroll-view>
 			<view class="list" v-for="(item,i) in dataList" :key="i">
 				<view class="list-left">
@@ -132,6 +132,10 @@
 					@confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
 			</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>
 
@@ -159,16 +163,37 @@
 				matFocus: false,
 				matData: '',
 				removeNum: 0,
+				hide: true,
+				hidebg: 'kb-bgtr'
 			}
 		},
 		onLoad() {
-
+			// #ifdef APP
+			setInterval(()=>{
+				if (this.hide) {
+					uni.hideKeyboard()
+				} else {
+					
+				}
+			},20)
+			// #endif
+		},
+		onBackPress() {
+			this.hide = false
 		},
 		onShow() {
 			this.baseUrl = uni.getStorageSync('baseUrl');
 			this.token = uni.getStorageSync('token');
 		},
 		methods: {
+			hideKeyboard() {
+				this.hide = this.hide ? false : true
+				if (this.hide) {
+					this.hidebg = 'kb-bgtr'
+				} else {
+					this.hidebg = 'kb-bgfa'
+				}
+			},
 			messageToggle(type) {
 				this.msgType1 = type
 				this.$refs.message.open()
@@ -176,7 +201,7 @@
 			stationCodeInput() {
 				setTimeout(() => {
 					var len = this.stationCode.length
-					if (len != 15) {
+					if (len != 7) {
 						this.stationCode = ''
 						this.stationCodeFocus = true
 						uni.showToast({
@@ -192,10 +217,9 @@
 			// barcode input 浜嬩欢
 			barcodeInput() {
 				// 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
-				this.barcode = this.barcode.split('_')[1]
 				setTimeout(() => {
 					var len = this.barcode.length
-					if (len != 10) {
+					if (len != 6) {
 						uni.showToast({
 							title: '鏂欑鐮佹湁璇閲嶈瘯',
 							icon: "none",
@@ -470,10 +494,13 @@
 <style>
 	@import url('../../../static/css/wms.css/wms.css');
 
+	.list:first-child {
+		margin-top: 280rpx;
+	}
 	.code {
 		width: 100%;
 		position: fixed;
-		min-height: 200rpx;
+		min-height: 140rpx;
 		background-color: #FFF;
 		z-index: 10;
 	}
@@ -481,7 +508,7 @@
 	.item {
 		display: flex;
 		align-items: center;
-		height: 100rpx;
+		height: 70rpx;
 		margin-left: 20rpx;
 		border-bottom: 1px solid #DCDFE6;
 	}
@@ -513,7 +540,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