2019-10-24 22:53:53 +00:00
|
|
|
<mg-ajax path="Items/new" options="vnPost"></mg-ajax>
|
2017-12-20 11:40:29 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="$ctrl.item"
|
|
|
|
form="form"
|
|
|
|
save="post">
|
|
|
|
</vn-watcher>
|
2019-11-10 10:08:44 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
|
|
|
<vn-card class="vn-pa-lg">
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Temporal name"
|
|
|
|
ng-model="$ctrl.item.provisionalName"
|
|
|
|
vn-focus>
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete vn-one
|
|
|
|
url="ItemTypes"
|
|
|
|
label="Type"
|
|
|
|
fields="['code', 'name']"
|
|
|
|
value-field="id"
|
|
|
|
ng-model="$ctrl.item.typeFk"
|
|
|
|
search-function="{or: [{code: {like: $search +'%'}}, {name: {like: '%'+ $search +'%'}}]}">
|
|
|
|
<tpl-item style="display: flex;">
|
|
|
|
<div style="width: 3em; padding-right: 1em;">{{::code}}</div>
|
|
|
|
<div>{{::name}}</div>
|
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-autocomplete vn-one
|
|
|
|
url="Intrastats"
|
|
|
|
label="Intrastat"
|
|
|
|
show-field="description"
|
|
|
|
value-field="id"
|
|
|
|
ng-model="$ctrl.item.intrastatFk"
|
|
|
|
search-function="{or: [{id: {like: $search +'%'}}, {description: {like: '%'+ $search +'%'}}]}">
|
|
|
|
<tpl-item style="display: flex;">
|
|
|
|
<div style="width: 6em; text-align: right; padding-right: 1em;">{{::id}}</div>
|
|
|
|
<div>{{::description}}</div>
|
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete vn-one
|
|
|
|
url="Origins"
|
|
|
|
label="Origin"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
ng-model="$ctrl.item.originFk">
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
|
|
|
<vn-submit
|
|
|
|
label="Create">
|
|
|
|
</vn-submit>
|
|
|
|
<vn-button
|
|
|
|
label="Cancel"
|
|
|
|
ui-sref="item.index">
|
|
|
|
</vn-button>
|
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|