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

73 lines
2.4 KiB
HTML
Raw Normal View History

<mg-ajax path="Orders/{{patch.params.id}}/updateBasicData" options="vnPatch"></mg-ajax>
2019-02-06 13:56:36 +00:00
<vn-crud-model
vn-id="address-model"
url="Addresses"
2019-02-06 13:56:36 +00:00
data="address"
order="nickname"
autoload = "false">
</vn-crud-model>
2018-11-30 10:45:17 +00:00
<vn-watcher
vn-id="watcher"
data="$ctrl.order"
form="form"
save="patch">
</vn-watcher>
2018-12-14 11:56:21 +00:00
<form name="form" ng-submit="watcher.submit()" compact>
<vn-card class="vn-pa-lg">
2018-11-30 10:45:17 +00:00
<vn-horizontal>
<vn-autocomplete
vn-one
url="Clients"
2018-11-30 10:45:17 +00:00
label="Client"
2019-02-06 13:56:36 +00:00
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
2018-11-30 10:45:17 +00:00
show-field="name"
value-field="id"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.order.clientFk"
2019-02-06 13:56:36 +00:00
selection="$ctrl.selection"
fields="['defaultAddressFk']">
<tpl-item>{{::id}}: {{::name}}</tpl-item>
2018-11-30 10:45:17 +00:00
</vn-autocomplete>
<vn-autocomplete
vn-one
2019-02-19 07:42:36 +00:00
fields="['id', 'nickname']"
2019-02-06 13:56:36 +00:00
data="address"
label="Address"
2019-02-19 07:42:36 +00:00
search-function="$search"
2019-02-06 13:56:36 +00:00
show-field="nickname"
2018-11-30 10:45:17 +00:00
value-field="id"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.order.addressFk">
2019-02-06 13:56:36 +00:00
<tpl-item>{{::nickname}}</tpl-item>
2018-11-30 10:45:17 +00:00
</vn-autocomplete>
2019-02-06 13:56:36 +00:00
</vn-horizontal>
<vn-horizontal>
2018-11-30 10:45:17 +00:00
<vn-date-picker
vn-one
label="Landed"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.order.landed">
2018-11-30 10:45:17 +00:00
</vn-date-picker>
2019-02-06 13:56:36 +00:00
<vn-autocomplete
vn-one
url="AgencyModes"
2019-02-06 13:56:36 +00:00
label="Agency"
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
show-field="name"
value-field="id"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.order.agencyModeFk">
2019-02-06 13:56:36 +00:00
<tpl-item>{{::id}}: {{::name}}</tpl-item>
</vn-autocomplete>
2018-11-30 10:45:17 +00:00
</vn-horizontal>
<vn-horizontal>
<vn-textarea
2019-10-09 22:47:29 +00:00
vn-one
2018-11-30 10:45:17 +00:00
label="Observation"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.order.note"
rule>
2018-11-30 10:45:17 +00:00
</vn-textarea>
</vn-horizontal>
</vn-card>
<vn-button-bar>
2019-01-07 15:53:34 +00:00
<vn-submit label="Save"></vn-submit>
2019-09-18 07:41:25 +00:00
<vn-button label="Undo changes" ng-if="watcher.dataChanged()" ng-click="watcher.loadOriginalData()"></vn-button>
2018-11-30 10:45:17 +00:00
</vn-button-bar>
</form>