From a3d469e35e7142c5955899166164d38762c1dcd6 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Fri, 18 Aug 2023 13:56:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=A8=E7=AE=B1=E6=89=AB=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/WarehouseManage/InStoreConfirm.vue | 13 ++++++++----- pages/WarehouseManage/InStoreSplit.vue | 13 ++++++++----- pages/WarehouseManage/ReturngoodsInStore.vue | 13 ++++++++----- pages/WarehouseManage/ScrapInStore.vue | 13 ++++++++----- 4 files changed, 32 insertions(+), 20 deletions(-) diff --git a/pages/WarehouseManage/InStoreConfirm.vue b/pages/WarehouseManage/InStoreConfirm.vue index c5f284d..65a633f 100644 --- a/pages/WarehouseManage/InStoreConfirm.vue +++ b/pages/WarehouseManage/InStoreConfirm.vue @@ -9,7 +9,7 @@ - + @@ -146,14 +146,17 @@ this.disabled1 = false } }, - onKeyInput ($event) { - if ($event.target.value.length !== 14) { - this.$nextTick(function(){ + onKeyInput (event) { + var value = event.detail.value + value=value.replace(/[^\w\.\/]/ig,'') + if (value.length !== 14) { + this.$nextTick(() => { this.val1 = '' - uni.hideKeyboard() }) + uni.hideKeyboard() return } + uni.hideKeyboard() this._boxQuery(this.val1) }, onFocus () { diff --git a/pages/WarehouseManage/InStoreSplit.vue b/pages/WarehouseManage/InStoreSplit.vue index 575f12f..a3e8edd 100644 --- a/pages/WarehouseManage/InStoreSplit.vue +++ b/pages/WarehouseManage/InStoreSplit.vue @@ -9,7 +9,7 @@ - + @@ -145,14 +145,17 @@ this.disabled1 = false } }, - onKeyInput ($event) { - if ($event.target.value.length !== 14) { - this.$nextTick(function(){ + onKeyInput (event) { + var value = event.detail.value + value=value.replace(/[^\w\.\/]/ig,'') + if (value.length !== 14) { + this.$nextTick(() => { this.val1 = '' - uni.hideKeyboard() }) + uni.hideKeyboard() return } + uni.hideKeyboard() this._boxQuery(this.val1) }, onFocus () { diff --git a/pages/WarehouseManage/ReturngoodsInStore.vue b/pages/WarehouseManage/ReturngoodsInStore.vue index fec722d..22a966c 100644 --- a/pages/WarehouseManage/ReturngoodsInStore.vue +++ b/pages/WarehouseManage/ReturngoodsInStore.vue @@ -9,7 +9,7 @@ - + @@ -132,14 +132,17 @@ this.disabled = false } }, - onKeyInput ($event) { - if ($event.target.value.length !== 14) { - this.$nextTick(function(){ + onKeyInput (event) { + var value = event.detail.value + value=value.replace(/[^\w\.\/]/ig,'') + if (value.length !== 14) { + this.$nextTick(() => { this.val1 = '' - uni.hideKeyboard() }) + uni.hideKeyboard() return } + uni.hideKeyboard() this._boxQuery(this.val1) }, onFocus () { diff --git a/pages/WarehouseManage/ScrapInStore.vue b/pages/WarehouseManage/ScrapInStore.vue index 99bdaf8..c4eff85 100644 --- a/pages/WarehouseManage/ScrapInStore.vue +++ b/pages/WarehouseManage/ScrapInStore.vue @@ -9,7 +9,7 @@ - + @@ -124,14 +124,17 @@ this.disabled = false } }, - onKeyInput ($event) { - if ($event.target.value.length !== 14) { - this.$nextTick(function(){ + onKeyInput (event) { + var value = event.detail.value + value=value.replace(/[^\w\.\/]/ig,'') + if (value.length !== 14) { + this.$nextTick(() => { this.val1 = '' - uni.hideKeyboard() }) + uni.hideKeyboard() return } + uni.hideKeyboard() this._boxQuery(this.val1) }, onFocus () {