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

81 lines
2.5 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
2020-09-17 18:12:52 +00:00
autoload="true"
url="Addresses"
2019-02-06 13:56:36 +00:00
data="address"
order="nickname"
2020-09-17 18:12:52 +00:00
vn-id="address-model">
2019-02-06 13:56:36 +00:00
</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>
2019-11-10 10:08:44 +00:00
<form name="form" ng-submit="watcher.submit()" class="vn-w-md">
<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
label="Notes"
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>
2020-12-13 12:55:54 +00:00
<vn-submit
2020-12-15 15:16:02 +00:00
disabled="!watcher.dataChanged()"
2020-12-13 12:55:54 +00:00
label="Save">
</vn-submit>
<vn-button
2020-12-15 15:16:02 +00:00
class="cancel"
2020-12-13 12:55:54 +00:00
label="Undo changes"
2020-12-15 15:16:02 +00:00
disabled="!watcher.dataChanged()"
2020-12-13 12:55:54 +00:00
ng-click="watcher.loadOriginalData()">
</vn-button>
2018-11-30 10:45:17 +00:00
</vn-button-bar>
</form>