salix/modules/ticket/front/create/card.html

48 lines
1.3 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"
order="id">
<tpl-item>{{id}}: {{name}}</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"
show-field="nickname"
value-field="id"
label="Address">
<tpl-item>{{nickname}}: {{street}}, {{city}}</tpl-item>
</vn-autocomplete>
<vn-date-picker
label="Landed"
ng-model="$ctrl.landed">
</vn-date-picker>
<vn-autocomplete
disabled="!$ctrl.warehouseId && (!$ctrl.clientId || !$ctrl.landed)"
ng-model="$ctrl.warehouseId"
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-autocomplete>