This commit is contained in:
parent
08f247900a
commit
4de85126cd
|
@ -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"
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue