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 contactChannels = 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>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -96,9 +111,11 @@ const title = ref();
|
|||
:params="{
|
||||
departmentCodes: ['VT', 'shopping'],
|
||||
}"
|
||||
:where="salesPersonFilter"
|
||||
:fields="['id', 'nickname']"
|
||||
sort-by="nickname ASC"
|
||||
:rules="validate('client.salesPersonFk')"
|
||||
@filter="handleSalesModelValue"
|
||||
emit-value
|
||||
auto-load
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue