From d8c2e4943409efa3ad1a6e8229d33a1e43247886 Mon Sep 17 00:00:00 2001
From: whycq <whycq>
Date: 星期四, 19 五月 2022 13:49:55 +0800
Subject: [PATCH] #

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

diff --git a/pages/basics/outPakin.vue b/pages/basics/outPakin.vue
index 946f381..3efc5b4 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,7 +93,25 @@
 			const UPORT = uni.getStorageSync('UPORT');
 			this.basePORT = UPORT
 		},
+		onLoad() {
+			setInterval(()=>{
+				uni.hideKeyboard()
+			},20)
+		},
 		methods: {
+			nextInput() {
+				if (this.barcode.length == 8) {
+					this.foucss()
+				}
+			},
+			barcodeFocuss() {
+				let that = this;
+				that.barcodeFocus = false;
+				setTimeout(()=>{
+					that.matnrId = '';
+					that.barcodeFocus = true;
+				}, 100);
+			},
 			foucss() {
 				let that = this;
 				that.focus = false;
@@ -114,6 +132,7 @@
 				this.matnrId = '';
 				this.matList = [];
 				this.barcode = '';
+				this.barcodeFocuss();
 			},
 			removeBarcode() {
 				this.barcode = ''
@@ -162,6 +181,7 @@
 							that.barcode = '';
 							that.matList = '';
 							that.matList = [];
+							that.barcodeFocuss();
 						} else if (res.code == 403) {
 							uni.showToast({title: res.msg, icon: "none", position: 'top'})
 							setTimeout(() => {
@@ -194,7 +214,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 +221,7 @@
 								if(that.matList[i].batch == str[2]) {
 									that.messageToggle('warn');
 									that.messageText = '閲嶅鎵弿';
+									that.foucss();
 									add = false;
 								}
 							}

--
Gitblit v1.9.1