From cf6eaa9135091c6add388c8de0c6d897e34d53aa Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期一, 21 八月 2023 10:19:04 +0800 Subject: [PATCH] # --- pages/basics/pakin.vue | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pages/basics/pakin.vue b/pages/basics/pakin.vue index fc4e53c..5f92f1e 100644 --- a/pages/basics/pakin.vue +++ b/pages/basics/pakin.vue @@ -9,7 +9,7 @@ <view class="square-content"> <view class="content-input"> <input v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆" - :focus="barcodeFocus" @confirm="barcodeInput()" placeholder-style="line-height: 85rpx;"> + :focus="barcodeFocus" @input="barcodeInput()" placeholder-style="line-height: 85rpx;"> <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons> </view> </view> @@ -149,7 +149,7 @@ memo: '', ck1: true, ck2: false, - frozen: 0, + frozen: 1, } }, onShow() { @@ -191,7 +191,7 @@ setTimeout(()=>{ var len = this.barcode.length if (len != 8) { - uni.showToast({title: '鎵樼洏鐮佹湁璇閲嶈瘯', icon: "none", position: 'top'}); + uni.showToast({title: '鎵樼洏鐮�'+this.barcode+'鏈夎璇烽噸璇�', icon: "none", position: 'top'}); this.barcodeFocuss() return; } @@ -324,7 +324,13 @@ that.matnr = '' }, findMat() { - let that = this + let that = this + let len = that.matnr.length + let bat = '' + if (len == 26 || len == 25) { + bat = that.matnr.substring(18,22) + that.matnr = that.matnr.substring(3,16) + that.matnr.substring(16,17) + } for (var i = 0; i < that.matList.length; i++) { if (that.matnr == that.matList[i].matnr) { uni.showToast({title: that.matnr + "褰撳墠鐗╂枡鎻愬彇锛岃鍕块噸澶嶆壂鎻�!", icon: "none",position: 'top'}) @@ -349,7 +355,7 @@ if (res.code === 200 && res.data) { that.matData = res.data that.matnr = '' - that.matData['batch'] = '' + that.matData['batch'] = bat uni.navigateTo({ url: "matQuery", events: { -- Gitblit v1.9.1