2019-04-05 13:20:12 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
2019-04-18 09:02:28 +00:00
|
|
|
url="/ticket/api/TicketRequests/filter"
|
2019-04-05 13:20:12 +00:00
|
|
|
limit="20"
|
|
|
|
data="requests"
|
|
|
|
auto-load="false">
|
|
|
|
</vn-crud-model>
|
|
|
|
<form name="form">
|
|
|
|
<div margin-medium>
|
|
|
|
<vn-card pad-medium-h class="vn-list">
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-searchbar
|
|
|
|
panel="vn-request-search-panel"
|
|
|
|
on-search="$ctrl.onSearch($params)"
|
|
|
|
vn-one
|
|
|
|
vn-focus>
|
|
|
|
</vn-searchbar>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-card>
|
2019-04-18 09:02:28 +00:00
|
|
|
<vn-card margin-medium-v>
|
2019-04-05 13:20:12 +00:00
|
|
|
<vn-table model="model" auto-load="false">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th number field="ticketFk">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>
|
2019-04-09 11:47:13 +00:00
|
|
|
<vn-th field="quantity" number editable>Quantity</vn-th>
|
|
|
|
<vn-th field="price" number>Price</vn-th>
|
2019-04-05 13:20:12 +00:00
|
|
|
<vn-th field="atenderNickname">Atender</vn-th>
|
2019-04-18 09:02:28 +00:00
|
|
|
<vn-th field="itemFk">Item</vn-th>
|
2019-04-05 13:20:12 +00:00
|
|
|
<vn-th field="description">Concept</vn-th>
|
2019-04-18 09:02:28 +00:00
|
|
|
<vn-th number>Quantity</vn-th>
|
2019-04-05 13:20:12 +00:00
|
|
|
<vn-th>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>
|
2019-04-18 09:02:28 +00:00
|
|
|
<vn-td>
|
|
|
|
<span title="{{::request.shipped | dateTime: 'dd/MM/yyyy'}}"
|
|
|
|
class="chip {{$ctrl.compareDate(request.shipped)}}">
|
|
|
|
{{::request.shipped | dateTime: 'dd/MM/yyyy'}}
|
|
|
|
</span>
|
2019-04-05 13:20:12 +00:00
|
|
|
</vn-td>
|
|
|
|
<vn-td>{{::request.warehouse}}</vn-td>
|
2019-04-18 09:02:28 +00:00
|
|
|
<vn-td>
|
|
|
|
<span
|
|
|
|
class="link"
|
2019-04-25 12:24:02 +00:00
|
|
|
ng-click="$ctrl.showWorkerDescriptor($event, request.salesPersonFk)">
|
2019-04-18 09:02:28 +00:00
|
|
|
{{::request.salesPersonNickname}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td>
|
|
|
|
<span
|
|
|
|
class="link"
|
|
|
|
ng-click="$ctrl.showItemDescriptor($event, request.itemFk)">
|
|
|
|
{{::request.description}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2019-04-09 11:47:13 +00:00
|
|
|
<vn-td number>{{::request.quantity}}</vn-td>
|
2019-04-18 09:02:28 +00:00
|
|
|
<vn-td number>{{::request.price | currency: 'EUR':2}}</vn-td>
|
|
|
|
<vn-td>
|
|
|
|
<span
|
|
|
|
class="link"
|
2019-04-25 12:24:02 +00:00
|
|
|
ng-click="$ctrl.showWorkerDescriptor($event, request.atenderFk)">
|
2019-04-18 09:02:28 +00:00
|
|
|
{{::request.atenderNickname}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2019-04-09 11:47:13 +00:00
|
|
|
<vn-td-editable number>
|
2019-04-05 13:20:12 +00:00
|
|
|
<text>{{request.itemFk}}</text>
|
|
|
|
<field>
|
2019-04-09 11:47:13 +00:00
|
|
|
<vn-input-number vn-focus
|
2019-04-05 13:20:12 +00:00
|
|
|
model="request.itemFk"
|
2019-04-09 11:47:13 +00:00
|
|
|
on-change="$ctrl.confirmRequest(request)">
|
|
|
|
</vn-input-number>
|
2019-04-05 13:20:12 +00:00
|
|
|
</field>
|
|
|
|
</vn-td-editable>
|
|
|
|
<vn-td>{{::request.itemDescription}}</vn-td>
|
2019-04-09 11:47:13 +00:00
|
|
|
<vn-td-editable disabled="!request.saleFk && request.itemFk" number>
|
|
|
|
<text number>{{request.saleQuantity}}</text>
|
2019-04-05 13:20:12 +00:00
|
|
|
<field>
|
2019-04-09 11:47:13 +00:00
|
|
|
<vn-input-number vn-focus
|
2019-04-05 13:20:12 +00:00
|
|
|
model="request.saleQuantity"
|
2019-04-09 11:47:13 +00:00
|
|
|
on-change="$ctrl.changeQuantity(request)">
|
|
|
|
</vn-input-number>
|
2019-04-05 13:20:12 +00:00
|
|
|
</field>
|
|
|
|
</vn-td-editable>
|
|
|
|
<vn-td>{{::$ctrl.getState(request.isOk)}}</vn-td>
|
|
|
|
<vn-td>
|
|
|
|
<vn-icon-button
|
|
|
|
disabled="request.isOk === 0"
|
|
|
|
number
|
|
|
|
icon="thumb_down"
|
|
|
|
ng-click="$ctrl.showDenyReason($event, request.id)"
|
|
|
|
vn-tooltip="Discard">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
|
|
|
</vn-card>
|
|
|
|
<vn-pagination model="model"></vn-pagination>
|
|
|
|
</div>
|
|
|
|
</form>
|
2019-04-18 09:02:28 +00:00
|
|
|
<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>
|
2019-04-18 09:02:28 +00:00
|
|
|
<vn-item-descriptor-popover
|
|
|
|
vn-id="itemDescriptor">
|
|
|
|
</vn-item-descriptor-popover>
|
2019-04-05 13:20:12 +00:00
|
|
|
<vn-dialog
|
|
|
|
vn-id="denyReason"
|
|
|
|
class="modal-form">
|
|
|
|
<tpl-body>
|
|
|
|
<vn-horizontal class="header">
|
|
|
|
<h5><span translate>Indicate the reasons to deny this request</span></h5>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal pad-medium>
|
|
|
|
<vn-textarea
|
|
|
|
model="$ctrl.denyObservation">
|
|
|
|
</vn-textarea>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal pad-medium>
|
|
|
|
<vn-button
|
|
|
|
label="Save"
|
|
|
|
ng-click="$ctrl.denyRequest()">
|
|
|
|
</vn-button>
|
|
|
|
</vn-horizontal>
|
|
|
|
</tpl-body>
|
|
|
|
</vn-dialog>
|