salix/modules/travel/front/extra-community/index.html

193 lines
7.9 KiB
HTML
Raw Normal View History

2021-05-12 10:11:27 +00:00
<vn-crud-model
2020-11-11 11:34:07 +00:00
vn-id="model"
2020-11-13 08:30:40 +00:00
url="Travels/extraCommunityFilter"
filter="::$ctrl.filter"
2020-11-20 14:05:57 +00:00
data="travels"
2022-03-28 09:57:19 +00:00
order="shipped ASC, landed ASC, travelFk, loadPriority, agencyModeFk, evaNotes"
2021-05-12 10:11:27 +00:00
limit="20"
auto-load="true">
2020-11-11 11:34:07 +00:00
</vn-crud-model>
2020-11-13 08:30:40 +00:00
<vn-portal slot="topbar">
<vn-searchbar
vn-focus
2020-11-20 14:05:57 +00:00
panel="vn-extra-community-search-panel"
2021-01-19 12:06:10 +00:00
info="Search by travel id or reference"
placeholder="Search by extra community travel"
2020-11-20 14:05:57 +00:00
suggested-filter="$ctrl.defaultFilter"
filter="$ctrl.defaultFilter"
2020-11-13 08:30:40 +00:00
auto-state="false"
model="model">
</vn-searchbar>
</vn-portal>
<vn-card class="travel-list scrollable">
<smart-table
model="model"
options="$ctrl.smartTableOptions">
<slot-actions>
<section>
<vn-tool-bar class="vn-mb-md">
<vn-button
disabled="!$ctrl.hasDateRange"
icon="picture_as_pdf"
ng-click="$ctrl.showReport()"
vn-tooltip="Open as PDF">
</vn-button>
</vn-tool-bar>
</section>
</slot-actions>
<slot-table>
<table>
<thead>
<tr>
<th field="id" shrink>
<span translate>Id</span>
</th>
<th field="cargoSupplierFk" expand>
<span translate>Supplier</span>
</th>
<th field="agencyModeFk" expand>
2022-09-14 10:45:40 +00:00
<span translate>Agency</span>
</th>
<th field="ref">
<span translate>Reference</span>
</th>
<th field="stickers" number>
<span translate>Packages</span>
</th>
<th field="kg" number>
<span translate>Bl. KG</span>
</th>
<th field="loadedKg" number>
<span translate>Phy. KG</span>
</th>
<th field="volumeKg" number>
<span translate>Vol. KG</span>
</th>
<th
field="warehouseOutFk"
translate-attr="{title: 'Warehouse Out'}">
<span translate>Wh. Out</span>
</th>
<th field="shipped">
<span translate>W. Shipped</span>
</th>
<th
field="warehouseInFk"
translate-attr="{title: 'Warehouse In'}">
<span translate>Wh. In</span>
</th>
<th field="landed">
<span translate>W. Landed</span>
</th>
</tr>
</thead>
<tbody
ng-repeat="travel in travels"
class="vn-mb-md"
vn-droppable="$ctrl.onDrop($event)"
ng-attr-id="{{::travel.id}}"
vn-stop-click>
<tr
class="header"
vn-anchor="::{
state: 'travel.card.basicData',
params: {id: travel.id}
}">
<td vn-click-stop>
<span
class="link"
2020-11-20 14:05:57 +00:00
ng-click="travelDescriptor.show($event, travel.id)">
{{::travel.id}}
</span>
</td>
<td expand vn-click-stop>
<span
class="link"
ng-click="supplierDescriptor.show($event, travel.cargoSupplierFk)">
{{::travel.cargoSupplierNickname}}
</span>
</td>
<td expand>{{::travel.agencyModeName}}</td>
<td
name="reference"
expand
vn-click-stop>
<vn-textfield
class="dense td-editable"
ng-model="travel.ref"
on-change="$ctrl.save(travel.id, {ref: value})">
</vn-textfield>
</vn-icon>
</td>
<td number>{{::travel.stickers}}</td>
<td
name="lockedKg"
expand
vn-click-stop>
<vn-input-number
number
class="td-editable number"
ng-model="travel.kg"
on-change="$ctrl.save(travel.id, {kg: value})"
min="0">
</vn-input-number>
</td>
<td number>{{::travel.loadedKg}}</td>
<td number>{{::travel.volumeKg}}</td>
<td expand>{{::travel.warehouseOutName}}</td>
<td expand>{{::travel.shipped | date: 'dd/MM/yyyy'}}</td>
<td expand>{{::travel.warehouseInName}}</td>
<td expand>{{::travel.landed | date: 'dd/MM/yyyy'}}</td>
</tr>
<tr
ng-repeat="entry in travel.entries"
draggable
2020-11-20 14:05:57 +00:00
ng-attr-id="{{::entry.id}}"
ng-click="$event.preventDefault()">
<td>
2020-11-20 14:05:57 +00:00
<span class="link"
ng-click="entryDescriptor.show($event, entry.id)">
{{::entry.id}}
</span>
</td>
<td>
<span
class="link"
ng-click="supplierDescriptor.show($event, entry.supplierFk)">
{{::entry.supplierName}}
</span>
</td>
<td></td>
<td expand>{{::entry.ref}}</td>
<td number>{{::entry.stickers}}</td>
<td number></td>
<td number>{{::entry.loadedkg}}</td>
<td number>{{::entry.volumeKg}}</td>
<td>
2021-01-08 09:16:38 +00:00
<span ng-if="::entry.notes" vn-tooltip="{{::entry.notes}}">
2020-11-20 14:05:57 +00:00
{{::entry.notes}}
</span>
</td>
<td>
2021-01-08 09:16:38 +00:00
<span ng-if="::entry.evaNotes" vn-tooltip="{{::entry.evaNotes}}">
2020-11-20 14:05:57 +00:00
{{::entry.evaNotes}}
</span>
</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</slot-table>
</smart-table>
</vn-card>
2020-11-20 14:05:57 +00:00
<vn-travel-descriptor-popover
vn-id="travelDescriptor">
</vn-travel-descriptor-popover>
<vn-entry-descriptor-popover
vn-id="entryDescriptor">
</vn-entry-descriptor-popover>
<vn-supplier-descriptor-popover
vn-id="supplierDescriptor">
</vn-supplier-descriptor-popover>