salix/modules/ticket/front/expedition/index.html

184 lines
6.8 KiB
HTML
Raw Normal View History

2019-02-10 21:52:35 +00:00
<vn-crud-model
2018-07-17 06:44:31 +00:00
vn-id="model"
url="Expeditions/filter"
2020-03-18 07:35:59 +00:00
link="{ticketFk: $ctrl.$params.id}"
2018-07-17 06:44:31 +00:00
limit="20"
2019-10-11 15:38:04 +00:00
data="expeditions"
order="created DESC"
auto-load="true">
2018-07-17 06:44:31 +00:00
</vn-crud-model>
<vn-card class="vn-pa-lg">
<smart-table model="model"
view-config-id="expeditionIndex"
options="$ctrl.smartTableOptions"
expr-builder="$ctrl.exprBuilder(param, value)">
<slot-actions>
2022-09-22 12:58:38 +00:00
<vn-button icon="keyboard_arrow_down"
2022-09-23 06:50:11 +00:00
label="Move"
2022-09-22 12:58:38 +00:00
ng-click="moreOptions.show($event)"
2022-10-07 08:47:54 +00:00
disabled="!$ctrl.totalChecked">
2022-09-22 12:58:38 +00:00
</vn-button>
<vn-button
2022-10-07 08:47:54 +00:00
disabled="!$ctrl.checked.length"
2022-10-06 08:18:19 +00:00
ng-click="removeConfirm.show()"
2022-09-22 12:58:38 +00:00
icon="delete"
vn-tooltip="Delete expedition">
</vn-button>
</slot-actions>
2023-05-18 13:33:54 +00:00
<slot-table>
<table>
<thead>
<tr>
<th shrink>
<multi-check
model="model">
</multi-check>
</th>
<th field="expeditionFk" number>
<span translate>Expedition</span>
</th>
<th field="itemFk" number>
<span translate>Item</span>
</th>
<th field="packageItemName">
<span translate>Name</span>
</th>
<th field="freightItemName">
<span translate>Package Type</span>
</th>
<th field="counter" number>
<span translate>Counter</span>
</th>
<th field="externalId" number>
<span translate>externalId</span>
</th>
<th field="created" expand>
<span translate>Created</span>
</th>
<th field="state" expand>
<span translate>State</span>
</th>
2023-05-18 13:33:54 +00:00
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="expedition in expeditions">
<td shrink>
<vn-check tabindex="-1"
ng-model="expedition.checked">
</vn-check>
</td>
<td number expand>{{expedition.id}}</td>
<td number>
<span
ng-class="{link: expedition.packagingItemFk}"
ng-click="itemDescriptor.show($event, expedition.packagingItemFk)">
{{expedition.packagingItemFk}}
</span>
</td>
<td>{{::expedition.packageItemName}}</td>
<td>{{::expedition.freightItemName}}</td>
<td number>{{::expedition.counter}}</td>
<td expand>{{::expedition.externalId}}</td>
<td shrink-datetime>{{::expedition.created | date:'dd/MM/yyyy HH:mm'}}</td>
<td>{{::expedition.state}}</td>
<td>
<vn-icon-button
vn-click-stop="$ctrl.showLog(expedition)"
vn-tooltip="Status log"
icon="history">
</vn-icon-button>
</td>
</tr>
</tbody>
</table>
2023-05-18 13:33:54 +00:00
</slot-table>
</smart-table>
</vn-card>
<vn-item-descriptor-popover
vn-id="item-descriptor"
warehouse-fk="$ctrl.ticket.warehouseFk",
ticket-fk="$ctrl.ticket.id">
2018-09-04 10:01:44 +00:00
</vn-item-descriptor-popover>
<vn-worker-descriptor-popover
vn-id="worker-descriptor">
</vn-worker-descriptor-popover>
2022-10-06 08:18:19 +00:00
<vn-confirm
vn-id="removeConfirm"
message="Are you sure you want to delete this expedition?"
2018-09-04 09:57:41 +00:00
question="Delete expedition"
2022-10-06 08:18:19 +00:00
on-accept="$ctrl.onRemove()">
2022-05-04 08:35:31 +00:00
</vn-confirm>
2022-05-04 09:27:03 +00:00
2022-05-04 08:35:31 +00:00
<vn-popup vn-id="statusLog">
<vn-crud-model
2022-10-18 10:37:06 +00:00
vn-id="modelExpeditionStates"
2022-05-04 08:35:31 +00:00
url="ExpeditionStates/filter"
link="{expeditionFk: $ctrl.expedition.id}"
data="expeditionStates"
order="created DESC"
auto-load="true">
</vn-crud-model>
2022-10-18 10:37:06 +00:00
<vn-data-viewer model="modelExpeditionStates">
2022-05-04 08:35:31 +00:00
<vn-card class="vn-w-md">
2022-10-18 10:37:06 +00:00
<vn-table model="modelExpeditionStates">
2022-05-04 08:35:31 +00:00
<vn-thead>
<vn-tr>
<vn-th field="state">State</vn-th>
<vn-th field="worker">Worker</vn-th>
<vn-th field="created">Created</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="expeditionState in expeditionStates">
2022-05-12 06:47:17 +00:00
<vn-td>{{::expeditionState.state}}</vn-td>
2022-05-04 08:35:31 +00:00
<vn-td expand>
<span
ng-class="{'link': expeditionState.workerFk}"
ng-click="workerDescriptor.show($event, expeditionState.workerFk)">
{{::expeditionState.name || 'System' | translate}}
</span>
</vn-td>
<vn-td shrink-datetime>{{::expeditionState.created | date:'dd/MM/yyyy HH:mm'}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-card>
</vn-data-viewer>
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>
2022-09-23 06:50:11 +00:00
</vn-popup>
<vn-menu vn-id="moreOptions">
<vn-item translate
2022-10-18 09:47:22 +00:00
name="withoutRoute"
ng-click="selectLanded.show('withoutRoute')">
2022-09-23 06:50:11 +00:00
New ticket without route
</vn-item>
<vn-item translate
2022-10-18 09:47:22 +00:00
name="withRoute"
ng-click="selectLanded.show('withRoute')">
2022-09-23 06:50:11 +00:00
New ticket with route
</vn-item>
2022-10-03 13:18:07 +00:00
</vn-menu>
<vn-dialog
2022-10-18 09:47:22 +00:00
vn-id="selectLanded"
on-accept="$ctrl.createTicket($ctrl.landed, $ctrl.newRoute)">
2022-10-03 13:18:07 +00:00
<tpl-body>
2022-10-18 09:47:22 +00:00
<vn-date-picker
label="Landed"
ng-model="$ctrl.landed">
</vn-date-picker>
2022-10-03 13:18:07 +00:00
<vn-textfield
2022-10-18 09:47:22 +00:00
ng-show="selectLanded.data == 'withRoute'"
label="Route id"
2022-10-18 09:47:22 +00:00
ng-model="$ctrl.newRoute">
2022-10-03 13:18:07 +00:00
</vn-textfield>
</tpl-body>
<tpl-buttons>
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
<button response="accept" translate>Accept</button>
</tpl-buttons>
</vn-dialog>