creacion de item con busqueda por codigo de tipo y de intrastat

This commit is contained in:
Javi Gallego 2018-03-21 08:59:18 +01:00
parent 256b872dd5
commit cec2b2a3a5
3 changed files with 24 additions and 8 deletions

View File

@ -16,16 +16,20 @@
<vn-autocomplete vn-one <vn-autocomplete vn-one
url="/item/api/ItemTypes" url="/item/api/ItemTypes"
label="Type" label="Type"
show-field="name" select-fields=["code","name"]
value-field="id" value-field="id"
field="$ctrl.item.typeFk"> field="$ctrl.item.typeFk"
where="{or: [{code: {regexp: 'search'}}, {name: {regexp: 'search'}}]}">
<tpl-item>{{code}} : {{name}}</tpl-item>
</vn-autocomplete> </vn-autocomplete>
<vn-autocomplete vn-one <vn-autocomplete vn-one
url="/item/api/Intrastats" url="/item/api/Intrastats"
label="Intrastat" label="Intrastat"
value-field="id"
show-field="description" show-field="description"
field="$ctrl.item.intrastatFk"> value-field="id"
field="$ctrl.item.intrastatFk"
where="{or: [{id: {regexp: 'search'}}, {description: {regexp: 'search'}}]}">
<tpl-item>{{id}} : {{description}}</tpl-item>
</vn-autocomplete> </vn-autocomplete>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>

View File

@ -0,0 +1,9 @@
import FilterList from 'core/src/lib/filter-list';
export default class FilterTicketList extends FilterList {
constructor($scope, $timeout, $state) {
super($scope, $timeout, $state);
this.modelName = 'ticketFk';
}
}
FilterTicketList.$inject = ['$scope', '$timeout', '$state'];

View File

@ -12,6 +12,9 @@
"id": true, "id": true,
"description": "Identifier" "description": "Identifier"
}, },
"code": {
"type": "String"
},
"name": { "name": {
"type": "String" "type": "String"
}, },