From 0868fd176a6e83400c8f2fd7c118f564b71259a9 Mon Sep 17 00:00:00 2001
From: whycq <whycq>
Date: 星期四, 19 五月 2022 13:35:47 +0800
Subject: [PATCH] #

---
 pages/basics/outPakin.vue |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/pages/basics/outPakin.vue b/pages/basics/outPakin.vue
index 946f381..9a7720d 100644
--- a/pages/basics/outPakin.vue
+++ b/pages/basics/outPakin.vue
@@ -9,7 +9,7 @@
 				<view class="square-content">
 					<view class="content-input">
 						<input readonly="value" v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆" maxlength="8"
-						:focus="barcodeFocus">
+						:focus="barcodeFocus" @input="nextInput">
 						<uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
 					</view>
 				</view>
@@ -93,13 +93,24 @@
 			const UPORT = uni.getStorageSync('UPORT');
 			this.basePORT = UPORT
 		},
+		onLoad() {
+			setInterval(()=>{
+				uni.hideKeyboard()
+			},20)
+		},
 		methods: {
+			nextInput() {
+				if (this.barcode.length == 8) {
+					this.foucss()
+				}
+			},
 			foucss() {
 				let that = this;
 				that.focus = false;
 				setTimeout(()=>{
 					that.matnrId = '';
 					that.focus = true;
+					
 				}, 100);
 			},
 			clear() {
@@ -111,6 +122,7 @@
 				this.$refs.message.open()
 			},
 			resst() {
+				this.barcodeFocus = true
 				this.matnrId = '';
 				this.matList = [];
 				this.barcode = '';
@@ -194,7 +206,6 @@
 						let res = result.data
 						if (res.code === 200 && res.data) {
 							let add = true;
-							
 							let mat = res.data;
 							mat['batch'] = str[2];
 							mat['anfme'] = 1
@@ -202,6 +213,7 @@
 								if(that.matList[i].batch == str[2]) {
 									that.messageToggle('warn');
 									that.messageText = '閲嶅鎵弿';
+									that.foucss();
 									add = false;
 								}
 							}

--
Gitblit v1.9.1