salix/modules/order/front/basic-data/index.html

72 lines
2.3 KiB
HTML

<mg-ajax path="/order/api/Orders/{{patch.params.id}}/updateBasicData" options="vnPatch"></mg-ajax>
<vn-crud-model
vn-id="address-model"
url="/api/Addresses"
data="address"
order="nickname"
autoload = "false">
</vn-crud-model>
<vn-watcher
vn-id="watcher"
data="$ctrl.order"
form="form"
save="patch">
</vn-watcher>
<form name="form" ng-submit="watcher.submit()" compact>
<vn-card pad-large>
<vn-horizontal>
<vn-autocomplete
vn-one
url="/api/Clients"
label="Client"
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
show-field="name"
value-field="id"
field="$ctrl.order.clientFk"
selection="$ctrl.selection"
fields="['defaultAddressFk']">
<tpl-item>{{::id}}: {{::name}}</tpl-item>
</vn-autocomplete>
<vn-autocomplete
vn-one
fields="['id', 'nickname']"
data="address"
label="Address"
search-function="$search"
show-field="nickname"
value-field="id"
field="$ctrl.order.addressFk">
<tpl-item>{{::nickname}}</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-date-picker
vn-one
label="Landed"
model="$ctrl.order.landed"
ini-options="{enableTime: false}">
</vn-date-picker>
<vn-autocomplete
vn-one
url="/api/AgencyModes"
label="Agency"
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
show-field="name"
value-field="id"
field="$ctrl.order.agencyModeFk">
<tpl-item>{{::id}}: {{::name}}</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-textarea
vn-three
label="Observation"
field="$ctrl.order.note">
</vn-textarea>
</vn-horizontal>
</vn-card>
<vn-button-bar>
<vn-submit label="Save"></vn-submit>
</vn-button-bar>
</form>