From c6fe15bb4eab7708a8465e0574dce6d72293bb14 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期一, 15 八月 2022 14:52:15 +0800 Subject: [PATCH] # --- pages/basics/checkout.vue | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/pages/basics/checkout.vue b/pages/basics/checkout.vue index dd4f473..90c67b3 100644 --- a/pages/basics/checkout.vue +++ b/pages/basics/checkout.vue @@ -9,7 +9,7 @@ <view class="square-content"> <view class="content-input"> <input v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆" maxlength="8" - @input="findBarcode()" :focus="barcodeFocus" @focus="focuss" > + @input="findBarcode()" :focus="barcodeFocus" > <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons> </view> </view> @@ -22,7 +22,7 @@ <view class="square-content"> <view class="content-input-combox" style="width: 94%;"> <input style="width: 90%;" type="text" v-model="matnr" placeholder="鎵爜 / 杈撳叆" @input="findMat()":focus="focus" - @focus="focuss"> + > <!-- @focus="focuss" --> <uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr()"></uni-icons> </view> @@ -132,7 +132,12 @@ // this.listLen = this.matList.length; }, focuss() { - // uni.hideKeyboard() + let that = this; + that.barcodeFocus = false; + setTimeout(()=>{ + that.barcode = '' + that.barcodeFocus = true; + }, 100); }, resst() { this.matList = [] @@ -231,6 +236,7 @@ }, 1000); } else { uni.showToast({title: res.msg, icon: "none",position: 'top'}) + that.focuss() } } @@ -239,6 +245,14 @@ }, findMat() { let that = this + if(that.barcode == '') { + uni.showToast({title: '璇峰厛鎵弿鎵樼洏鐮侊紒', icon: "none",position: 'top'}) + that.focuss() + setTimeout(function() { + that.matnr = '' + }, 100); + return; + } uni.request({ url: that.commonUrl + '/mobile/pakout/confirm/pick/auth', data: { -- Gitblit v1.9.1