salix/modules/ticket/front/package/index.html

61 lines
2.0 KiB
HTML
Raw Normal View History

2018-11-27 14:02:54 +00:00
<vn-crud-model
vn-id="model"
url="TicketPackagings"
fields="['id', 'ticketFk', 'packagingFk', 'quantity', 'created']"
link="{ticketFk: $ctrl.$stateParams.id}"
data="packages" on-data-change="$ctrl.onDataChange()"
auto-load="true">
</vn-crud-model>
2018-03-21 10:08:59 +00:00
<vn-watcher
vn-id="watcher"
data="packages"
2018-03-21 10:08:59 +00:00
form="form">
</vn-watcher>
2019-10-11 15:38:04 +00:00
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
2019-10-11 15:38:04 +00:00
<vn-horizontal ng-repeat="package in packages track by $index">
<vn-autocomplete
vn-one
vn-focus
url="Packagings/listPackaging"
2019-10-11 15:38:04 +00:00
label="Package"
show-field="name"
value-field="packagingFk"
search-function="{or: [{itemFk: $search}, {'name': {like: '%'+ $search +'%'}}]}"
ng-model="package.packagingFk">
<tpl-item>{{itemFk}} : {{name}}</tpl-item>
</vn-autocomplete>
<vn-input-number
vn-one
step="1"
label="Quantity"
ng-model="package.quantity"
rule="TicketPackaging">
</vn-input-number>
<vn-date-picker
vn-one
label="Added"
ng-model="package.created"
disabled="true"
ng-readonly="true">
</vn-date-picker>
<vn-auto>
<vn-icon-button
pointer
vn-tooltip="Remove package"
icon="delete"
ng-click="model.remove($index)">
</vn-icon-button>
</vn-auto>
</vn-horizontal>
<vn-icon-button
vn-tooltip="Add package"
vn-bind="+"
icon="add_circle"
ng-click="$ctrl.add()">
</vn-icon-button>
2018-03-21 10:08:59 +00:00
</vn-card>
<vn-button-bar>
<vn-submit label="Save"></vn-submit>
</vn-button-bar>
</form>