modal-busqueda-productos.html
5.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<div class="modal-header py-1">
<div class="row w-100">
<div class="col-lg-6">
<h5 class="modal-title my-1">Búsqueda de Productos</h5>
</div>
<div class="input-group col-lg-6 pr-0 my-2">
<input
ladda="searchLoading"
type="text"
class="form-control form-control-sm"
id="search"
placeholder="Busqueda"
ng-model="filters"
ng-change="search()"
ng-keydown="busquedaDown($event.keyCode)"
ng-keypress="busquedaPress($event.keyCode)"
foca-focus="selectedProducto == -1"
ng-focus="selectedProducto = -1"
teclado-virtual
>
<div class="input-group-append">
<button
ladda="searchLoading"
data-spinner-color="#FF0000"
class="btn btn-outline-secondary"
type="button"
title="Buscar"
ng-click="busquedaPress(13)"
>
<i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</div>
</div>
<div class="row">
<div class="col my-1 d-flex justify-content-end">
<div class="custom-control custom-checkbox mt-auto">
<input
type="checkbox"
class="custom-control-input"
id="check"
ng-click="changeProductsData()"
ng-checked="buscarTodos">
<label class="custom-control-label disable-selection" for="check">
Buscar en todos los artículos disponibles
</label>
</div>
</div>
</div>
</div>
<div class="modal-body" id="modal-body">
<div ng-show="!primerBusqueda">
Debe realizar una primer búsqueda.
</div>
<table ng-show="primerBusqueda" class="table table-striped table-sm">
<thead>
<tr>
<th ng-hide="soloMostrar">Código</th>
<th>Descripción</th>
<th class="text-right">P. Lista</th>
<th class="text-right" ng-show="useAllProducts">P. Base</th>
<th ng-hide="soloMostrar"></th>
</tr>
</thead>
<tbody>
<tr ng-show="currentPageProductos.length == 0 && primerBusqueda">
<td colspan="5">
No se encontraron resultados.
</td>
</tr>
<tr class="selectable"
ng-repeat="(key,producto) in currentPageProductos"
ng-click="select(producto)">
<td ng-bind="producto.sector + '-' + producto.codigo"
ng-hide="soloMostrar"></td>
<td ng-bind="producto.descripcion"></td>
<td class="text-right">{{producto.precioBase == producto.precio ? '' : producto.precio}}</td>
<td class="text-right" ng-bind="producto.precioBase | number: 2" ng-show="useAllProducts"></td>
<td class="d-md-none text-primary">
<i class="fa fa-circle-thin" aria-hidden="true"></i>
</td>
<td class="d-none d-md-table-cell">
<button
type="button"
class="btn btn-xs p-1 float-right"
title="Seleccionar"
ng-class="{
'btn-secondary': selectedProducto != key,
'btn-primary': selectedProducto == key
}"
foca-focus="selectedProducto == {{key}}"
ng-keydown="itemProducto($event.keyCode)"
ng-hide="soloMostrar">
<i class="fa fa-circle-thin" aria-hidden="true"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer py-1">
<nav ng-show="currentPageProductos.length > 0 && primerBusqueda" class="mr-auto">
<ul class="pagination pagination-sm justify-content mb-0">
<li class="page-item" ng-class="{'disabled': currentPage == 1}">
<a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)">
<span aria-hidden="true">«</span>
<span class="sr-only">Anterior</span>
</a>
</li>
<li
class="page-item"
ng-repeat="pagina in paginas"
ng-class="{'active': pagina == currentPage}"
>
<a
class="page-link"
href="javascript:void();"
ng-click="selectPage(pagina)"
ng-bind="pagina"
></a>
</li>
<li class="page-item" ng-class="{'disabled': currentPage == lastPage}">
<a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)">
<span aria-hidden="true">»</span>
<span class="sr-only">Siguiente</span>
</a>
</li>
</ul>
</nav>
<button class="btn btn-sm btn-secondary my-1" type="button" ng-click="cancel()">Volver</button>
</div>