Commit 342d7429498a725ed0cda1ca5ea6d5a48fad86ca
1 parent
6fda5af79c
Exists in
lab
a
Showing
1 changed file
with
49 additions
and
138 deletions
Show diff stats
src/views/foca-modal-remito.html
1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
2 | <div class="row w-100"> | 2 | <div class="row w-100"> |
3 | <div class="col-lg-6"> | 3 | <div class="col-lg-6"> |
4 | <h5 class="modal-title my-1">Búsqueda de Remito</h5> | 4 | <h5 class="modal-title my-1">Búsqueda de Remito</h5> |
5 | </div> | 5 | </div> |
6 | <div class="input-group col-lg-6 pr-0 my-2"> | 6 | <div class="input-group col-lg-6 pr-0 my-2"> |
7 | <div class="mr-4"> | 7 | <div class="mr-4"> |
8 | <input | 8 | <input ladda="searchLoading" type="text" class="form-control form-control-sm" placeholder="CLIENTE" |
9 | ladda="searchLoading" | 9 | ng-model="filtersCliente" ng-change="searchCliente()" ng-keydown="busquedaDown($event.keyCode)" |
10 | type="text" | 10 | ng-keypress="busquedaPress($event.keyCode)" foca-focus="selectedRemito == -1" |
11 | class="form-control form-control-sm" | 11 | ng-focus="selectedRemito = -1" id="search" teclado-virtual> |
12 | placeholder="CLIENTE" | 12 | <button ng-show="filtersCliente.length >= 1" type="button" class="clear-input" |
13 | ng-model="filtersCliente" | 13 | ng-click="filtersCliente = ''"> |
14 | ng-change="searchCliente()" | ||
15 | ng-keydown="busquedaDown($event.keyCode)" | ||
16 | ng-keypress="busquedaPress($event.keyCode)" | ||
17 | foca-focus="selectedRemito == -1" | ||
18 | ng-focus="selectedRemito = -1" | ||
19 | id="search" | ||
20 | teclado-virtual | ||
21 | > | ||
22 | <button | ||
23 | ng-show="filtersCliente.length >= 1" | ||
24 | type="button" | ||
25 | class="clear-input" | ||
26 | ng-click="filtersCliente = ''" | ||
27 | > | ||
28 | <i class="fa fa-times"></i> | 14 | <i class="fa fa-times"></i> |
29 | </button> | 15 | </button> |
30 | </div> | 16 | </div> |
31 | <input | 17 | <input ladda="searchLoading" type="text" class="form-control form-control-sm" placeholder="REMITO" |
32 | ladda="searchLoading" | 18 | ng-model="filtersRemito" ng-change="searchRemito()" ng-keydown="busquedaDown($event.keyCode)" |
33 | type="text" | 19 | ng-keypress="busquedaPress($event.keyCode)" foca-focus="selectedRemito == -1" |
34 | class="form-control form-control-sm" | 20 | ng-focus="selectedRemito = -1" id="search" teclado-virtual> |
35 | placeholder="REMITO" | 21 | <button ng-show="filtersRemito.length >= 1" type="button" class="clear-input" ng-click="filtersRemito = ''"> |
36 | ng-model="filtersRemito" | ||
37 | ng-change="searchRemito()" | ||
38 | ng-keydown="busquedaDown($event.keyCode)" | ||
39 | ng-keypress="busquedaPress($event.keyCode)" | ||
40 | foca-focus="selectedRemito == -1" | ||
41 | ng-focus="selectedRemito = -1" | ||
42 | id="search" | ||
43 | teclado-virtual | ||
44 | > | ||
45 | <button | ||
46 | ng-show="filtersRemito.length >= 1" | ||
47 | type="button" | ||
48 | class="clear-input" | ||
49 | ng-click="filtersRemito = ''" | ||
50 | > | ||
51 | <i class="fa fa-times"></i> | 22 | <i class="fa fa-times"></i> |
52 | </button> | 23 | </button> |
53 | <div class="input-group-append"> | 24 | <div class="input-group-append"> |
54 | <button | 25 | <button ladda="searchLoading" data-spinner-color="#FF0000" class="btn btn-outline-secondary" |
55 | ladda="searchLoading" | 26 | type="button" ng-click="busquedaPress(13)"> |
56 | data-spinner-color="#FF0000" | ||
57 | class="btn btn-outline-secondary" | ||
58 | type="button" | ||
59 | ng-click="busquedaPress(13)" | ||
60 | > | ||
61 | <i class="fa fa-search" aria-hidden="true"></i> | 27 | <i class="fa fa-search" aria-hidden="true"></i> |
62 | </button> | 28 | </button> |
63 | </div> | 29 | </div> |
64 | </div> | 30 | </div> |
65 | </div> | 31 | </div> |
66 | </div> | 32 | </div> |
67 | <div class="modal-body" id="modal-body"> | 33 | <div class="modal-body" id="modal-body"> |
68 | <div class="input-group row"> | 34 | <div class="input-group row"> |
69 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> | 35 | <small class="col-md-2 col-4 text-left my-1">Fecha Desde</small> |
70 | <div class="col-md-4 col-8 input-group mb-3"> | 36 | <div class="col-md-4 col-8 input-group mb-3"> |
71 | <div class="input-group-prepend"> | 37 | <div class="input-group-prepend"> |
72 | <button | 38 | <button class="input-group-text" type="button" ng-click="datepickerOpen = true"> |
73 | class="input-group-text" | ||
74 | type="button" | ||
75 | ng-click="datepickerOpen = true" | ||
76 | > | ||
77 | <i class="fa fa-calendar"></i> | 39 | <i class="fa fa-calendar"></i> |
78 | </button> | 40 | </button> |
79 | </div> | 41 | </div> |
80 | <input | 42 | <input class="form-control form-control-sm" id="inlineFormInputGroup" ladda="searchLoading" type="text" |
81 | class="form-control form-control-sm" | 43 | ng-model="fechaDesde" ng-required="true" uib-datepicker-popup="dd/MM/yyyy" show-button-bar="false" |
82 | id="inlineFormInputGroup" | 44 | is-open="datepickerOpen" on-open-focus="false" ng-focus="datepickerOpen = true" /> |
83 | ladda="searchLoading" | ||
84 | type="text" | ||
85 | ng-model="fechaDesde" | ||
86 | ng-required="true" | ||
87 | uib-datepicker-popup="dd/MM/yyyy" | ||
88 | show-button-bar="false" | ||
89 | is-open="datepickerOpen" | ||
90 | on-open-focus="false" | ||
91 | ng-focus="datepickerOpen = true" | ||
92 | /> | ||
93 | </div> | 45 | </div> |
94 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> | 46 | <small class="col-md-2 col-4 text-left my-1">Fecha Hasta</small> |
95 | <div class="col-md-4 col-8 input-group mb-3"> | 47 | <div class="col-md-4 col-8 input-group mb-3"> |
96 | <div class="input-group-prepend"> | 48 | <div class="input-group-prepend"> |
97 | <button | 49 | <button class="input-group-text" type="button" ng-click="datepicker2Open = true"> |
98 | class="input-group-text" | ||
99 | type="button" | ||
100 | ng-click="datepicker2Open = true" | ||
101 | > | ||
102 | <i class="fa fa-calendar"></i> | 50 | <i class="fa fa-calendar"></i> |
103 | </button> | 51 | </button> |
104 | </div> | 52 | </div> |
105 | <input | 53 | <input class="form-control form-control-sm" id="inlineFormInputGroup" ladda="searchLoading" type="text" |
106 | class="form-control form-control-sm" | 54 | ng-model="fechaHasta" ng-required="true" uib-datepicker-popup="dd/MM/yyyy" show-button-bar="false" |
107 | id="inlineFormInputGroup" | 55 | is-open="datepicker2Open" on-open-focus="false" ng-focus="datepicker2Open = true" /> |
108 | ladda="searchLoading" | ||
109 | type="text" | ||
110 | ng-model="fechaHasta" | ||
111 | ng-required="true" | ||
112 | uib-datepicker-popup="dd/MM/yyyy" | ||
113 | show-button-bar="false" | ||
114 | is-open="datepicker2Open" | ||
115 | on-open-focus="false" | ||
116 | ng-focus="datepicker2Open = true" | ||
117 | /> | ||
118 | </div> | 56 | </div> |
119 | </div> | 57 | </div> |
120 | <table ng-show="primerBusqueda" class="table table-hover table-sm"> | 58 | <table ng-show="primerBusqueda" class="table table-hover table-sm"> |
121 | <thead> | 59 | <thead> |
122 | <tr> | 60 | <tr> |
123 | <th>Fecha</th> | 61 | <th>Fecha</th> |
124 | <th>Cliente</th> | 62 | <th>Cliente</th> |
125 | <th>Comprobante</th> | 63 | <th>Comprobante</th> |
126 | <th>Importe</th> | 64 | <th>Importe</th> |
127 | <th></th> | 65 | <th></th> |
128 | <th></th> | 66 | <th></th> |
129 | </tr> | 67 | </tr> |
130 | </thead> | 68 | </thead> |
131 | <tbody> | 69 | <tbody> |
132 | <tr ng-show="currentPageRemitos.length == 0 && primerBusqueda"> | 70 | <tr ng-show="currentPageRemitos.length == 0 && primerBusqueda"> |
133 | <td colspan="5"> | 71 | <td colspan="5"> |
134 | No se encontraron resultados. | 72 | No se encontraron resultados. |
135 | </td> | 73 | </td> |
136 | </tr> | 74 | </tr> |
137 | <tr class="selectable" | 75 | <tr class="selectable" ng-repeat-start="(key, remito) in currentPageRemitos"> |
138 | ng-repeat-start="(key, remito) in currentPageRemitos" | ||
139 | > | ||
140 | <td ng-bind="remito.fechaRemito | date : 'dd/MM/yyyy'"></td> | 76 | <td ng-bind="remito.fechaRemito | date : 'dd/MM/yyyy'"></td> |
141 | <td ng-bind="remito.nombreCliente"></td> | 77 | <td ng-bind="remito.nombreCliente"></td> |
142 | <td ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"></td> | 78 | <td ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"></td> |
143 | <td ng-bind="remito.total | number: 2"></td> | 79 | <td ng-bind="remito.total | number: 2"></td> |
144 | <td> | 80 | <td> |
145 | <button | 81 | <button type="button" class="btn btn-secondary btn-xs p-1" |
146 | type="button" | 82 | ng-click="isCollapsed = !isCollapsed ; verProductos = remito.articulosRemito"><i |
147 | class="btn btn-secondary btn-xs p-1" | 83 | class="fa fa-eye"></i> |
148 | ng-click="isCollapsed = !isCollapsed ; verProductos = remito.articulosRemito" | ||
149 | ><i class="fa fa-eye"></i> | ||
150 | </button> | 84 | </button> |
151 | </td> | 85 | </td> |
152 | <td> | 86 | <td> |
153 | <button ng-click="select(remito);" | 87 | <button ng-click="select(remito);" type="button" class="btn btn-xs p-1 float-right" ng-class="{ |
154 | type="button" | ||
155 | class="btn btn-xs p-1 float-right" | ||
156 | ng-class="{ | ||
157 | 'btn-secondary': selectedRemito != key, | 88 | 'btn-secondary': selectedRemito != key, |
158 | 'btn-primary': selectedRemito == key | 89 | 'btn-primary': selectedRemito == key |
159 | }" | 90 | }" foca-focus="selectedRemito == {{key}}" ng-keydown="itemRemito($event.keyCode)"> |
160 | foca-focus="selectedRemito == {{key}}" | ||
161 | ng-keydown="itemRemito($event.keyCode)" | ||
162 | > | ||
163 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 91 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
164 | </button> | 92 | </button> |
165 | </td> | 93 | </td> |
166 | </tr> | 94 | </tr> |
167 | <tr ng-repeat-end uib-collapse="!isCollapsed"> | 95 | <tr ng-repeat-end uib-collapse="!isCollapsed"> |
168 | <td colspan="6"> | 96 | <td colspan="6"> |
169 | <table class="table table-sm"> | 97 | <table class="table table-sm"> |
170 | <thead> | 98 | <thead> |
171 | <tr> | 99 | <tr> |
172 | <th>Código</th> | 100 | <th>Código</th> |
173 | <th>Descripción</th> | 101 | <th>Descripción</th> |
174 | <th>Cantidad</th> | 102 | <th>Cantidad</th> |
175 | </tr> | 103 | </tr> |
176 | </thead> | 104 | </thead> |
177 | <tbody> | 105 | <tbody> |
178 | <tr ng-repeat="(key, articulo) in verProductos"> | 106 | <tr ng-repeat="(key, articulo) in verProductos"> |
179 | <td>{{articulo.codigo}}</td> | 107 | <td>{{articulo.codigo}}</td> |
180 | <td>{{articulo.descripcion}}</td> | 108 | <td>{{articulo.descripcion}}</td> |
181 | <td>{{articulo.cantidad}}</td> | 109 | <td>{{articulo.cantidad}}</td> |
182 | </tr> | 110 | </tr> |
183 | </tbody> | 111 | </tbody> |
184 | </table> | 112 | </table> |
185 | </td> | 113 | </td> |
186 | </tr> | 114 | </tr> |
187 | </tbody> | 115 | </tbody> |
188 | </table> | 116 | </table> |
189 | </div> | 117 | </div> |
190 | <div class="modal-footer py-1"> | 118 | <div class="modal-footer py-1"> |
191 | <nav ng-show="currentPageRemitos.length > 0 && primerBusqueda" class="mr-auto"> | 119 | <nav ng-show="currentPageRemitos.length > 0 && primerBusqueda" class="mr-auto"> |
192 | <ul class="pagination pagination-sm justify-content mb-0"> | 120 | <ul class="pagination pagination-sm justify-content mb-0"> |
193 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 121 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
194 | <a | 122 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
195 | class="page-link" | 123 | <span aria-hidden="true">«</span> |
196 | href="javascript:void();" | 124 | <span class="sr-only">Anterior</span> |
197 | ng-click="selectPage(currentPage - 1)" | 125 | </a> |
198 | > | 126 | </li> |
199 | <span aria-hidden="true">«</span> | 127 | <li class="page-item" ng-repeat="pagina in paginas" ng-class="{'active': pagina == currentPage}"> |
200 | <span class="sr-only">Anterior</span> | 128 | <a class="page-link" href="javascript:void();" ng-click="selectPage(pagina)" ng-bind="pagina"></a> |
201 | </a> | 129 | </li> |
202 | </li> | 130 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
203 | <li | 131 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> |
204 | class="page-item" | 132 | <span aria-hidden="true">»</span> |
205 | ng-repeat="pagina in paginas" | 133 | <span class="sr-only">Siguiente</span> |
206 | ng-class="{'active': pagina == currentPage}" | 134 | </a> |
207 | > | 135 | </li> |
208 | <a | 136 | </ul> |
209 | class="page-link" | 137 | </nav> |
210 | href="javascript:void();" | ||
211 | ng-click="selectPage(pagina)" | ||
212 | ng-bind="pagina" | ||
213 | ></a> | ||
214 | </li> | ||
215 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | ||
216 | <a | ||
217 | class="page-link" | ||
218 | href="javascript:void();" | ||
219 | ng-click="selectPage(currentPage + 1)" | ||
220 | > | ||
221 | <span aria-hidden="true">»</span> | ||
222 | <span class="sr-only">Siguiente</span> | ||
223 | </a> | ||
224 | </li> | ||
225 | </ul> | ||
226 | </nav> | ||
227 | <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> | 138 | <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> |
228 | </div> | 139 | </div> |
140 |