#1174 item.index buscador avanzado mostrar comprador

This commit is contained in:
Gerard 2019-03-05 12:13:46 +01:00
parent 00f9754c1e
commit 32893b49c1
3 changed files with 19 additions and 1 deletions

View File

@ -48,6 +48,11 @@ module.exports = Self => {
type: 'Boolean',
description: 'Whether the the item is o not active',
http: {source: 'query'}
}, {
arg: 'salesPersonFk',
type: 'Integer',
description: 'The buyer of the item',
http: {source: 'query'}
}
],
returns: {
@ -75,6 +80,8 @@ module.exports = Self => {
return {'i.description': {like: `%${value}%`}};
case 'categoryFk':
return {'ic.id': value};
case 'salesPersonFk':
return {'t.workerFk': value};
case 'typeFk':
return {'i.typeFk': value};
case 'isActive':

View File

@ -32,7 +32,7 @@
<vn-th th-id="category">Category</vn-th>
<vn-th th-id="intrastat">Intrastat</vn-th>
<vn-th th-id="origin">Origin</vn-th>
<vn-th th-id="salesperson">Sales person</vn-th>
<vn-th th-id="salesperson">Buyer</vn-th>
<vn-th th-id="density" number>Density</vn-th>
<vn-th th-id="taxClass">Tax class</vn-th>
<vn-th th-id="active" shrink>Active</vn-th>

View File

@ -46,6 +46,17 @@
label="Description"
model="filter.description">
</vn-textfield>
<vn-autocomplete
vn-one
disabled="false"
field="filter.salesPersonFk"
url="/client/api/Clients/activeWorkersWithRole"
show-field="nickname"
search-function="{firstName: $search}"
value-field="id"
where="{role: 'employee'}"
label="Buyer">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-check