salix/modules/client/front/consumption-search-panel/index.html

87 lines
2.9 KiB
HTML
Raw Permalink Normal View History

2020-06-12 07:18:19 +00:00
<div class="search-panel">
<form class="vn-pa-lg" ng-submit="$ctrl.onSearch()">
<vn-horizontal>
<vn-textfield vn-focus
vn-one
label="General search"
ng-model="filter.search"
vn-focus>
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="Item id"
ng-model="filter.itemId">
</vn-textfield>
<vn-autocomplete
vn-one
ng-model="filter.buyerId"
url="Workers/activeWithRole"
2020-06-12 07:18:19 +00:00
search-function="{firstName: $search}"
value-field="id"
2021-05-17 05:24:24 +00:00
where="{role: {inq: ['logistic', 'buyer']}}"
2020-06-12 07:18:19 +00:00
label="Buyer">
<tpl-item>{{nickname}}</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete vn-one
ng-model="filter.typeId"
url="ItemTypes"
show-field="name"
value-field="id"
label="Type"
fields="['categoryFk']"
include="'category'">
<tpl-item>
<div>{{name}}</div>
<div class="text-caption text-secondary">
{{category.name}}
</div>
</tpl-item>
</vn-autocomplete>
<vn-autocomplete vn-one
url="ItemCategories"
label="Category"
show-field="name"
value-field="id"
ng-model="filter.categoryId">
</vn-autocomplete>
</vn-horizontal>
2020-10-05 05:53:03 +00:00
<vn-horizontal>
<vn-autocomplete vn-one
url="Campaigns/latest"
label="Campaign"
translate-fields="['code']"
show-field="code"
value-field="id"
ng-model="filter.campaign"
order="dated DESC"
selection="$ctrl.campaignSelection"
2020-10-05 12:45:39 +00:00
search-function="{dated: {like: '%'+ $search +'%'}}">
2020-10-05 05:53:03 +00:00
<tpl-item>
{{code}} {{dated | date: 'yyyy'}}
</tpl-item>
</vn-autocomplete>
</vn-horizontal>
2020-06-12 07:18:19 +00:00
<vn-horizontal>
<vn-date-picker
vn-one
label="From"
2020-11-06 07:21:25 +00:00
ng-model="filter.from"
on-change="$ctrl.onChangeDate(value)">
2020-06-12 07:18:19 +00:00
</vn-date-picker>
<vn-date-picker
vn-one
label="To"
2020-11-06 07:21:25 +00:00
ng-model="filter.to"
on-change="$ctrl.onChangeDate(value)">
2020-06-12 07:18:19 +00:00
</vn-date-picker>
</vn-horizontal>
<vn-horizontal class="vn-mt-lg">
<vn-submit label="Search"></vn-submit>
</vn-horizontal>
</form>
</div>