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 () {