From 4de85126cd2eb1f4039615b374901c5cda76e8dc Mon Sep 17 00:00:00 2001 From: robert Date: Tue, 17 Dec 2024 11:02:51 +0100 Subject: [PATCH] feat: refs #7731 --- src/components/common/VnSelectVies.vue | 18 +++++++++--------- src/pages/Supplier/Card/SupplierFiscalData.vue | 12 +++++------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/components/common/VnSelectVies.vue b/src/components/common/VnSelectVies.vue index c42b9a8ad..4ac25bc75 100644 --- a/src/components/common/VnSelectVies.vue +++ b/src/components/common/VnSelectVies.vue @@ -22,13 +22,14 @@ function filterFn(val, update) { countriesOptionCopy.value = JSON.parse( JSON.stringify(countriesOption.value) ); - } else { - const exist = countriesOption.value.filter((c) => - c.code.toLowerCase().includes(val.toLowerCase()) - ); - if (exist) return (countriesOptionCopy.value = exist); - countriesOptionCopy.value = JSON.parse(JSON.stringify([{ code: val }])); + return; } + + const exist = countriesOption.value.filter((c) => + c.code.toLowerCase().includes(val.toLowerCase()) + ); + if (exist) return (countriesOptionCopy.value = exist); + countriesOptionCopy.value = JSON.parse(JSON.stringify([{ code: val }])); }, (ref) => { if (val !== '' && ref.options.length > 0) { @@ -46,8 +47,7 @@ function filterFn(val, update) { v-model="model" :input-debounce="0" :options="countriesOptionCopy" - @blur="() => handleBlur()" - @input-value="(evt) => (lastVal = evt)" + @input-value="(evt) => (lastVal = evt) && handleBlur()" @filter="filterFn" option-label="code" option-value="code" @@ -73,7 +73,7 @@ function filterFn(val, update) { es: - viesTip: El campo puede contener valores que no este en la lista + viesTip: El campo puede contener valores que no este en la lista en: viesTip: The field may contain value that are not in the list diff --git a/src/pages/Supplier/Card/SupplierFiscalData.vue b/src/pages/Supplier/Card/SupplierFiscalData.vue index abf7a572e..31de4ee75 100644 --- a/src/pages/Supplier/Card/SupplierFiscalData.vue +++ b/src/pages/Supplier/Card/SupplierFiscalData.vue @@ -173,15 +173,13 @@ function handleLocation(data, location) { }" @update:model-value="(location) => handleLocation(data, location)" /> - -
- -
+ +