salix/modules/order/front/volume/index.html

60 lines
2.3 KiB
HTML

<vn-crud-model auto-load="false"
vn-id="model"
url="/order/api/OrderRows"
filter="::$ctrl.filter"
link="{orderFk: $ctrl.$stateParams.id}"
limit="20"
data="rows" on-data-change="$ctrl.onDataChange()">
</vn-crud-model>
<mg-ajax path="/order/api/Orders/{{$ctrl.$stateParams.id}}/getTotalVolume" options="mgEdit"></mg-ajax>
<vn-vertical>
<vn-card pad-large>
<vn-vertical>
<vn-horizontal>
<vn-title vn-two>Volume</vn-title>
<div class="totalBox">
<vn-label-value label="Total"
value="{{::edit.model.totalVolume}}">
</vn-label-value>
<vn-label-value label="Cajas"
value="{{::edit.model.totalBoxes}}">
</vn-label-value>
</div>
</vn-horizontal>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th field="itemFk" default-order="ASC" number>Item</vn-th>
<vn-th>Description</vn-th>
<vn-th field="quantity" number>Quantity</vn-th>
<vn-th number>m³ per quantity</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="row in rows">
<vn-td number>
<span
ng-click="$ctrl.showDescriptor($event, row.itemFk)"
pointer class="link">
{{::row.itemFk}}
</span>
</vn-td>
<vn-td><vn-fetched-tags max-length="6" item="row.item"/></vn-td>
<vn-td number>{{::row.quantity}}</vn-td>
<vn-td number>{{::row.volume | number:3}}</vn-td>
</vn-tr>
</vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table>
</vn-vertical>
<vn-pagination
model="model"
scroll-selector="ui-view">
</vn-pagination>
</vn-card>
</vn-vertical>
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>