solveConflicts_test_to_dev #957
|
@ -11,6 +11,20 @@ defineProps({
|
|||
required: true,
|
||||
},
|
||||
});
|
||||
const handleSalesModelValue = (val) => ({
|
||||
or: [
|
||||
{ id: val },
|
||||
{ name: val },
|
||||
{ nickname: { like: '%' + val + '%' } },
|
||||
{ code: { like: `${val}%` } },
|
||||
],
|
||||
});
|
||||
|
||||
const exprBuilder = (param, value) => {
|
||||
return {
|
||||
and: [{ active: { neq: false } }, handleSalesModelValue(value)],
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -52,14 +66,18 @@ defineProps({
|
|||
<QItem class="q-mb-sm">
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
url="Workers/activeWithInheritedRole"
|
||||
:filter="{ where: { role: 'salesPerson' } }"
|
||||
url="Workers/search"
|
||||
:params="{
|
||||
departmentCodes: ['VT'],
|
||||
}"
|
||||
auto-load
|
||||
:label="t('Salesperson')"
|
||||
:expr-builder="exprBuilder"
|
||||
v-model="params.salesPersonFk"
|
||||
@update:model-value="searchFn()"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
sort-by="nickname ASC"
|
||||
emit-value
|
||||
map-options
|
||||
use-input
|
||||
|
@ -68,7 +86,18 @@ defineProps({
|
|||
outlined
|
||||
rounded
|
||||
:input-debounce="0"
|
||||
/>
|
||||
>
|
||||
<template #option="{ itemProps, opt }">
|
||||
<QItem v-bind="itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ opt.name }}</QItemLabel>
|
||||
<QItemLabel caption>
|
||||
{{ opt.nickname }},{{ opt.code }}
|
||||
</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template></VnSelect
|
||||
>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem class="q-mb-sm">
|
||||
|
|
Loading…
Reference in New Issue