61 lines
1.6 KiB
HTML
61 lines
1.6 KiB
HTML
<vn-crud-model
|
|
auto-load="true"
|
|
url="Warehouses"
|
|
data="warehouses"
|
|
order="name">
|
|
</vn-crud-model>
|
|
<vn-autocomplete
|
|
vn-focus
|
|
vn-id="client"
|
|
url="Clients"
|
|
label="Client"
|
|
search-function="{or: [{id: $search}, {name: {like: '%'+ $search +'%'}}]}"
|
|
show-field="name"
|
|
value-field="id"
|
|
ng-model="$ctrl.clientId"
|
|
vn-name="client"
|
|
order="id">
|
|
<tpl-item>
|
|
<div>{{::name}}</div>
|
|
<div class="text-secondary text-caption">#{{::id}}</div>
|
|
</tpl-item>
|
|
</vn-autocomplete>
|
|
<vn-autocomplete
|
|
disabled="!$ctrl.clientId"
|
|
url="{{ $ctrl.clientId ? 'Clients/'+ $ctrl.clientId +'/addresses' : null }}"
|
|
fields="['nickname', 'street', 'city']"
|
|
where="{isActive: true}"
|
|
ng-model="$ctrl.addressId"
|
|
vn-name="address"
|
|
show-field="nickname"
|
|
value-field="id"
|
|
label="Address">
|
|
<tpl-item>
|
|
<div>{{::nickname}}</div>
|
|
<div class="text-secondary text-caption">{{::street}}, {{::city}}</div>
|
|
</tpl-item>
|
|
</vn-autocomplete>
|
|
<vn-date-picker
|
|
label="Landed"
|
|
ng-model="$ctrl.landed"
|
|
vn-name="landed">
|
|
</vn-date-picker>
|
|
<vn-autocomplete
|
|
disabled="!$ctrl.warehouseId && (!$ctrl.clientId || !$ctrl.landed)"
|
|
ng-model="$ctrl.warehouseId"
|
|
vn-name="warehouse"
|
|
data="warehouses"
|
|
show-field="name"
|
|
value-field="id"
|
|
label="Warehouse">
|
|
</vn-autocomplete>
|
|
<vn-autocomplete
|
|
disabled="!$ctrl.clientId || !$ctrl.landed || !$ctrl.warehouseId"
|
|
data="$ctrl.agencies"
|
|
label="Agency"
|
|
show-field="agencyMode"
|
|
value-field="agencyModeFk"
|
|
ng-model="$ctrl.agencyModeId"
|
|
vn-name="agencyMode">
|
|
</vn-autocomplete>
|