feat: refs #7731
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Robert Ferrús 2024-12-17 11:02:51 +01:00
parent 08f247900a
commit 4de85126cd
2 changed files with 14 additions and 16 deletions

View File

@ -22,13 +22,14 @@ function filterFn(val, update) {
countriesOptionCopy.value = JSON.parse( countriesOptionCopy.value = JSON.parse(
JSON.stringify(countriesOption.value) JSON.stringify(countriesOption.value)
); );
} else { return;
}
const exist = countriesOption.value.filter((c) => const exist = countriesOption.value.filter((c) =>
c.code.toLowerCase().includes(val.toLowerCase()) c.code.toLowerCase().includes(val.toLowerCase())
); );
if (exist) return (countriesOptionCopy.value = exist); if (exist) return (countriesOptionCopy.value = exist);
countriesOptionCopy.value = JSON.parse(JSON.stringify([{ code: val }])); countriesOptionCopy.value = JSON.parse(JSON.stringify([{ code: val }]));
}
}, },
(ref) => { (ref) => {
if (val !== '' && ref.options.length > 0) { if (val !== '' && ref.options.length > 0) {
@ -46,8 +47,7 @@ function filterFn(val, update) {
v-model="model" v-model="model"
:input-debounce="0" :input-debounce="0"
:options="countriesOptionCopy" :options="countriesOptionCopy"
@blur="() => handleBlur()" @input-value="(evt) => (lastVal = evt) && handleBlur()"
@input-value="(evt) => (lastVal = evt)"
@filter="filterFn" @filter="filterFn"
option-label="code" option-label="code"
option-value="code" option-value="code"

View File

@ -173,15 +173,13 @@ function handleLocation(data, location) {
}" }"
@update:model-value="(location) => handleLocation(data, location)" @update:model-value="(location) => handleLocation(data, location)"
/> />
<VnSelectVies v-model="data.viesCode" style="max-width: 30%" />
</VnRow> </VnRow>
<VnRow> <VnRow>
<div class="col flex justify-around"> <VnSelectVies v-model="data.viesCode" />
<QCheckbox <QCheckbox
v-model="data.isTrucker" v-model="data.isTrucker"
:label="t('supplier.fiscalData.isTrucker')" :label="t('supplier.fiscalData.isTrucker')"
/> />
</div>
</VnRow> </VnRow>
</template> </template>
</FormModel> </FormModel>