56 lines
2.2 KiB
HTML
56 lines
2.2 KiB
HTML
<mg-ajax path="/order/api/Orders/{{patch.params.id}}/updateBasicData" options="vnPatch"></mg-ajax>
|
|
<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-title>Basic data</vn-title>
|
|
<vn-horizontal>
|
|
<vn-autocomplete
|
|
disabled="$ctrl.order.rows.length || $ctrl.order.isConfirmed"
|
|
vn-one
|
|
url="/api/Clients"
|
|
label="Client"
|
|
search-function="{or: [{id: {regexp: $search}}, {name: {regexp: $search}}]}"
|
|
show-field="name"
|
|
value-field="id"
|
|
field="$ctrl.order.clientFk">
|
|
<tpl-item>{{id}}: {{name}}</tpl-item>
|
|
</vn-autocomplete>
|
|
<vn-autocomplete
|
|
vn-one
|
|
disabled="$ctrl.order.rows.length || $ctrl.order.isConfirmed"
|
|
url="/api/Companies"
|
|
label="Company"
|
|
show-field="code"
|
|
value-field="id"
|
|
field="$ctrl.order.companyFk">
|
|
</vn-autocomplete>
|
|
<vn-date-picker
|
|
vn-one
|
|
disabled="$ctrl.order.rows.length || $ctrl.order.isConfirmed"
|
|
label="Landed"
|
|
model="$ctrl.order.landed"
|
|
ini-options="{enableTime: false}">
|
|
</vn-date-picker>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-textarea
|
|
vn-three
|
|
disabled="$ctrl.order.rows.length || $ctrl.order.isConfirmed"
|
|
label="Observation"
|
|
field="$ctrl.order.note">
|
|
</vn-textarea>
|
|
</vn-horizontal>
|
|
<vn-horizontal ng-if="$ctrl.order.rows.length|| $ctrl.order.isConfirmed" class="disabledForm">
|
|
<span class="disabled" translate>This form has been disabled because there are lines in this order or it's confirmed</span>
|
|
</vn-horizontal>
|
|
</vn-card>
|
|
<vn-button-bar>
|
|
<vn-submit disabled="$ctrl.order.rows.length || $ctrl.order.isConfirmed" label="Save"></vn-submit>
|
|
</vn-button-bar>
|
|
</form>
|