salix/modules/item/front/request/index.html

140 lines
6.8 KiB
HTML
Raw Normal View History

2019-10-22 11:44:36 +00:00
<vn-crud-model auto-load="true"
2019-04-05 13:20:12 +00:00
vn-id="model"
url="/ticket/api/TicketRequests/filter"
2019-04-05 13:20:12 +00:00
limit="20"
data="requests"
2019-10-22 12:20:50 +00:00
order="shipped DESC, isOk ASC">
2019-04-05 13:20:12 +00:00
</vn-crud-model>
<form name="form">
<div class="vn-ma-md">
<vn-card class="vn-pa-md vn-list">
2019-10-22 11:44:36 +00:00
<vn-searchbar vn-one vn-focus
auto-load="false"
panel="vn-request-search-panel"
on-search="$ctrl.onSearch($params)"
info="Search request by id or alias"
suggested-filter="$ctrl.filter.where">
</vn-searchbar>
2019-04-05 13:20:12 +00:00
</vn-card>
2019-10-22 11:44:36 +00:00
<vn-data-viewer model="model" class="vn-my-md">
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th field="ticketFk" number>Ticket ID</vn-th>
<vn-th field="shipped">Shipped</vn-th>
<vn-th field="warehouse">Warehouse</vn-th>
<vn-th field="salesPersonNickname">SalesPerson</vn-th>
<vn-th field="description">Description</vn-th>
<vn-th field="quantity" number editable>Requested</vn-th>
<vn-th field="price" number>Price</vn-th>
<vn-th field="atenderNickname">Atender</vn-th>
<vn-th field="itemFk">Item</vn-th>
<vn-th field="saleQuantity">Achieved</vn-th>
<vn-th field="description">Concept</vn-th>
<vn-th field="isOk">State</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="request in requests">
<vn-td number>
<span class="link"
ng-click="$ctrl.showTicketDescriptor($event, request.ticketFk)">
{{request.ticketFk}}
</span>
</vn-td>
<vn-td>
<span title="{{::request.shipped | date: 'dd/MM/yyyy'}}"
class="chip {{$ctrl.compareDate(request.shipped)}}">
{{::request.shipped | date: 'dd/MM/yyyy'}}
</span>
</vn-td>
<vn-td>{{::request.warehouse}}</vn-td>
<vn-td>
<span
class="link"
ng-click="$ctrl.showWorkerDescriptor($event, request.salesPersonFk)">
{{::request.salesPersonNickname}}
</span>
</vn-td>
<vn-td title="{{::request.description}}">{{::request.description}}</vn-td>
<vn-td number>{{::request.quantity}}</vn-td>
<vn-td number>{{::request.price | currency: 'EUR':2}}</vn-td>
<vn-td>
<span
class="link"
ng-click="$ctrl.showWorkerDescriptor($event, request.attenderFk)">
{{::request.atenderNickname}}
</span>
</vn-td>
<vn-td-editable disabled="request.isOk != null" number>
<text>{{request.itemFk}}</text>
<field>
<vn-input-number class="dense" vn-focus
ng-model="request.itemFk">
</vn-input-number>
</field>
</vn-td-editable>
<vn-td-editable disabled="!request.itemFk || request.isOk != null" number>
<text number>{{request.saleQuantity}}</text>
<field>
<vn-input-number class="dense" vn-focus
ng-model="request.saleQuantity"
on-change="$ctrl.changeQuantity(request)">
</vn-input-number>
</field>
</vn-td-editable>
<vn-td>
<span
class="link"
ng-click="$ctrl.showItemDescriptor($event, request.itemFk)"
title="{{request.itemDescription}}">
{{request.itemDescription}}
</span>
</vn-td>
<vn-td>{{$ctrl.getState(request.isOk)}}</vn-td>
<vn-td>
<vn-icon
ng-if="request.response.length"
ranslate-attr="{title: request.response}"
icon="insert_drive_file">
</vn-icon>
<vn-icon-button
ng-if="request.isOk != 0"
icon="thumb_down"
ng-click="$ctrl.showDenyReason($event, request)"
translate-attr="{title: 'Discard'}">
</vn-icon-button>
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-card>
</vn-data-viewer>
2019-04-05 13:20:12 +00:00
</div>
</form>
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>
2019-04-05 13:20:12 +00:00
<vn-ticket-descriptor-popover
vn-id="ticketDescriptor">
</vn-ticket-descriptor-popover>
<vn-item-descriptor-popover
vn-id="itemDescriptor">
</vn-item-descriptor-popover>
2019-04-05 13:20:12 +00:00
<vn-dialog
vn-id="denyReason"
2019-10-22 11:44:36 +00:00
on-response="$ctrl.denyRequest(response)">
2019-04-05 13:20:12 +00:00
<tpl-body>
2019-10-22 11:44:36 +00:00
<h5 class="vn-pa-md" translate>Specify the reasons to deny this request</h5>
<vn-horizontal class="vn-pa-md">
2019-04-05 13:20:12 +00:00
<vn-textarea
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.denyObservation">
2019-04-05 13:20:12 +00:00
</vn-textarea>
</vn-horizontal>
</tpl-body>
2019-10-22 11:44:36 +00:00
<tpl-buttons>
<input type="button" response="CANCEL" translate-attr="{value: 'Cancel'}"/>
<button response="ACCEPT" translate>Save</button>
</tpl-buttons>
2019-04-05 13:20:12 +00:00
</vn-dialog>