forked from verdnatura/salix-front
perf: CustomerBasicData.salesPersonFk
This commit is contained in:
parent
eb8690a422
commit
6ffd985575
|
@ -16,6 +16,21 @@ const { t } = useI18n();
|
||||||
const businessTypes = ref([]);
|
const businessTypes = ref([]);
|
||||||
const contactChannels = ref([]);
|
const contactChannels = ref([]);
|
||||||
const title = ref();
|
const title = ref();
|
||||||
|
const handleSalesModelValue = (val) => {
|
||||||
|
if (salesPersonFilter.value.and.length == 0) salesPersonFilter.value.and.push = [];
|
||||||
|
|
||||||
|
salesPersonFilter.value.and[1] = {
|
||||||
|
or: [
|
||||||
|
{ name: val },
|
||||||
|
{ nickname: { like: '%' + val + '%' } },
|
||||||
|
{ code: { like: `${val}%` } },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const salesPersonFilter = ref({
|
||||||
|
and: [{ active: { neq: false } }],
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -96,9 +111,11 @@ const title = ref();
|
||||||
:params="{
|
:params="{
|
||||||
departmentCodes: ['VT', 'shopping'],
|
departmentCodes: ['VT', 'shopping'],
|
||||||
}"
|
}"
|
||||||
|
:where="salesPersonFilter"
|
||||||
:fields="['id', 'nickname']"
|
:fields="['id', 'nickname']"
|
||||||
sort-by="nickname ASC"
|
sort-by="nickname ASC"
|
||||||
:rules="validate('client.salesPersonFk')"
|
:rules="validate('client.salesPersonFk')"
|
||||||
|
@filter="handleSalesModelValue"
|
||||||
emit-value
|
emit-value
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue