Commit 4e19c1dcbc1ed99135cc5d33903bb2c245ca2e72
Exists in
master
and in
1 other branch
Merge branch 'develop' into 'master'
Develop See merge request !12
Showing
1 changed file
Show diff stats
src/views/modal-precio-condicion.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 ng-show="!ingreso" class="modal-title my-1">Búsqueda de Precio-Condición</h5> | 4 | <h5 ng-show="!ingreso" class="modal-title my-1">Búsqueda de Precio-Condición</h5> |
5 | <h5 ng-show="ingreso" class="modal-title my-1">Nuevos Plazos</h5> | 5 | <h5 ng-show="ingreso" class="modal-title my-1">Nuevos Plazos</h5> |
6 | </div> | 6 | </div> |
7 | <div class="input-group col-lg-6 pr-0 my-2" ng-show="!ingreso"> | 7 | <div class="input-group col-lg-6 pr-0 my-2" ng-show="!ingreso"> |
8 | <button | ||
9 | class="btn btn-outline-debo mr-2" | ||
10 | ng-click="ingreso = true" | ||
11 | ng-show="!ingreso" | ||
12 | title="Nuevo"> | ||
13 | <i class="fa fa-plus" aria-hidden="true"></i> | ||
14 | </button> | ||
8 | <input | 15 | <input |
9 | type="text" | 16 | type="text" |
10 | class="form-control form-control-sm" | 17 | class="form-control form-control-sm" |
11 | id="search" | 18 | id="search" |
12 | placeholder="Busqueda" | 19 | placeholder="Busqueda" |
13 | ng-model="filters" | 20 | ng-model="filters" |
14 | ng-change="search()" | 21 | ng-change="search()" |
15 | ng-keydown="busquedaDown($event.keyCode)" | 22 | ng-keydown="busquedaDown($event.keyCode)" |
16 | ng-keypress="busquedaPress($event.keyCode)" | 23 | ng-keypress="busquedaPress($event.keyCode)" |
17 | foca-focus="selectedPrecioCondicion == -1" | 24 | foca-focus="selectedPrecioCondicion == -1" |
18 | ng-focus="selectedPrecioCondicion = -1" | 25 | ng-focus="selectedPrecioCondicion = -1" |
19 | teclado-virtual | 26 | teclado-virtual |
20 | > | 27 | > |
21 | <div class="input-group-append"> | 28 | <div class="input-group-append"> |
22 | <button | 29 | <button |
23 | class="btn btn-outline-secondary" | 30 | class="btn btn-outline-secondary" |
24 | type="button" | 31 | type="button" |
25 | title="Buscar" | 32 | title="Buscar" |
26 | ng-click="busquedaPress(13)"> | 33 | ng-click="busquedaPress(13)"> |
27 | <i class="fa fa-search" aria-hidden="true"></i> | 34 | <i class="fa fa-search" aria-hidden="true"></i> |
28 | </button> | 35 | </button> |
29 | </div> | 36 | </div> |
30 | </div> | 37 | </div> |
31 | </div> | 38 | </div> |
32 | </div> | 39 | </div> |
33 | <div class="modal-body" id="modal-body"> | 40 | <div class="modal-body" id="modal-body"> |
34 | 41 | ||
35 | 42 | ||
36 | <table ng-show="!ingreso" class="table table-striped table-sm"> | 43 | <table ng-show="!ingreso" class="table table-striped table-sm"> |
37 | <thead> | 44 | <thead> |
38 | <tr> | 45 | <tr> |
39 | <th>Código</th> | 46 | <th>Código</th> |
40 | <th>Nombre</th> | 47 | <th>Nombre</th> |
41 | <th>Lista Precio</th> | 48 | <th>Lista Precio</th> |
42 | <th>Plazos</th> | 49 | <th>Plazos</th> |
43 | <th></th> | 50 | <th></th> |
44 | </tr> | 51 | </tr> |
45 | </thead> | 52 | </thead> |
46 | <tbody> | 53 | <tbody> |
47 | <tr ng-show="currentPagePrecioCondicion.length == 0"> | 54 | <tr ng-show="currentPagePrecioCondicion.length == 0"> |
48 | <td colspan="6"> | 55 | <td colspan="6"> |
49 | No se encontraron resultados. | 56 | No se encontraron resultados. |
50 | </td> | 57 | </td> |
51 | </tr> | 58 | </tr> |
52 | <tr> | ||
53 | <td colspan="4" ng-show="!ingreso"> | ||
54 | <input | ||
55 | class="form-control form-control-sm" | ||
56 | type="text" | ||
57 | placeholder="Selección manual" | ||
58 | readonly | ||
59 | ng-click="ingreso = !ingreso" | ||
60 | /> | ||
61 | </td> | ||
62 | <td colspan="1" ng-show="!ingreso"> | ||
63 | <button | ||
64 | type="button" | ||
65 | class="btn btn-sm p-1 float-right" | ||
66 | ng-class="{ | ||
67 | 'btn-secondary': selectedPrecioCondicion != 0, | ||
68 | 'btn-primary': selectedPrecioCondicion == 0 | ||
69 | }" | ||
70 | foca-focus="selectedPrecioCondicion == 0" | ||
71 | ng-keydown="itemProducto($event.keyCode)" | ||
72 | ng-click="ingreso = !ingreso" | ||
73 | > | ||
74 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | ||
75 | </button> | ||
76 | </td> | ||
77 | </tr> | ||
78 | <tr class="selectable" | 59 | <tr class="selectable" |
79 | ng-repeat="(key, precioCondicion) in currentPagePrecioCondicion"> | 60 | ng-repeat="(key, precioCondicion) in currentPagePrecioCondicion"> |
80 | <td ng-bind="precioCondicion.id | rellenarDigitos: 4: 0" | 61 | <td ng-bind="precioCondicion.id | rellenarDigitos: 4: 0" |
81 | ng-click="select(precioCondicion)"></td> | 62 | ng-click="select(precioCondicion)"></td> |
82 | <td ng-bind="precioCondicion.nombre" | 63 | <td ng-bind="precioCondicion.nombre" |
83 | ng-click="select(precioCondicion)"></td> | 64 | ng-click="select(precioCondicion)"></td> |
84 | <td ng-bind="precioCondicion.idListaPrecio" | 65 | <td ng-bind="precioCondicion.idListaPrecio" |
85 | ng-click="select(precioCondicion)"></td> | 66 | ng-click="select(precioCondicion)"></td> |
86 | <td ng-bind="precioCondicion.plazos" | 67 | <td ng-bind="precioCondicion.plazos" |
87 | ng-click="select(precioCondicion)"></td> | 68 | ng-click="select(precioCondicion)"></td> |
88 | <td> | 69 | <td> |
89 | <button | 70 | <button |
90 | type="button" | 71 | type="button" |
91 | class="btn btn-sm p-1 float-right" | 72 | class="btn btn-sm p-1 float-right" |
92 | title="Seleccionar" | 73 | title="Seleccionar" |
93 | ng-class="{ | 74 | ng-class="{ |
94 | 'btn-secondary': selectedPrecioCondicion != key + 1, | 75 | 'btn-secondary': selectedPrecioCondicion != key + 1, |
95 | 'btn-primary': selectedPrecioCondicion == key + 1 | 76 | 'btn-primary': selectedPrecioCondicion == key + 1 |
96 | }" | 77 | }" |
97 | foca-focus="selectedPrecioCondicion == {{key + 1}}" | 78 | foca-focus="selectedPrecioCondicion == {{key + 1}}" |
98 | ng-keydown="itemProducto($event.keyCode)" | 79 | ng-keydown="itemProducto($event.keyCode)" |
99 | ng-click="select(precioCondicion)" | 80 | ng-click="select(precioCondicion)" |
100 | > | 81 | > |
101 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 82 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
102 | </button> | 83 | </button> |
103 | <button | 84 | <button |
104 | type="button" | 85 | type="button" |
105 | class="btn btn-sm p-1 float-right btn-secondary mr-2" | 86 | class="btn btn-sm p-1 float-right btn-secondary mr-2" |
106 | title="Ver lista precio" | 87 | title="Ver lista precio" |
107 | ng-click="verListaPrecio(precioCondicion.idListaPrecio)" | 88 | ng-click="verListaPrecio(precioCondicion.idListaPrecio)" |
108 | > | 89 | > |
109 | <i class="fa fa-eye" aria-hidden="true"></i> | 90 | <i class="fa fa-eye" aria-hidden="true"></i> |
110 | </button> | 91 | </button> |
111 | </td> | 92 | </td> |
112 | </tr> | 93 | </tr> |
113 | </tbody> | 94 | </tbody> |
114 | </table> | 95 | </table> |
115 | 96 | ||
116 | <table class="table table-striped table-sm" ng-show="ingreso"> | 97 | <table class="table table-striped table-sm" ng-show="ingreso"> |
117 | <thead> | 98 | <thead> |
118 | <tr> | 99 | <tr> |
119 | <th>Item</th> | 100 | <th>Item</th> |
120 | <th>Días</th> | 101 | <th>Días</th> |
121 | <th></th> | 102 | <th></th> |
122 | </tr> | 103 | </tr> |
123 | </thead> | 104 | </thead> |
124 | <tbody> | 105 | <tbody> |
125 | <tr> | 106 | <tr> |
126 | <td> | 107 | <td> |
127 | <input | 108 | <input |
128 | type="number" | 109 | type="number" |
129 | class="form-control text-right" | 110 | class="form-control text-right" |
130 | ng-model="plazoACargar.item" | 111 | ng-model="plazoACargar.item" |
131 | readonly | 112 | readonly |
132 | /> | 113 | /> |
133 | </td> | 114 | </td> |
134 | <td> | 115 | <td> |
135 | <input | 116 | <input |
136 | type="number" | 117 | type="number" |
137 | class="form-control text-right" | 118 | class="form-control text-right" |
138 | min="0" | 119 | min="0" |
139 | ng-model="plazoACargar.dias" | 120 | ng-model="plazoACargar.dias" |
140 | ng-keypress="agregarPlazo($event.keyCode)" | 121 | ng-keypress="agregarPlazo($event.keyCode)" |
141 | foca-focus="ingreso" | 122 | foca-focus="ingreso" |
142 | /> | 123 | /> |
143 | </td> | 124 | </td> |
144 | <td class="text-center"> | 125 | <td class="text-center"> |
145 | <button | 126 | <button |
146 | class="btn btn-outline-secondary" | 127 | class="btn btn-outline-secondary" |
147 | title="Agregar" | 128 | title="Agregar" |
148 | ng-click="agregarPlazo(13)" | 129 | ng-click="agregarPlazo(13)" |
149 | > | 130 | > |
150 | <i class="fa fa-save"></i> | 131 | <i class="fa fa-save"></i> |
151 | </button> | 132 | </button> |
152 | </td> | 133 | </td> |
153 | </tr> | 134 | </tr> |
154 | <tr ng-repeat="(key, plazo) in plazosNuevos"> | 135 | <tr ng-repeat="(key, plazo) in plazosNuevos"> |
155 | <td class="text-right" ng-bind="key + 1"></td> | 136 | <td class="text-right" ng-bind="key + 1"></td> |
156 | <td class="text-right" ng-bind="plazo.dias"></td> | 137 | <td class="text-right" ng-bind="plazo.dias"></td> |
157 | <td class="text-center"> | 138 | <td class="text-center"> |
158 | <button | 139 | <button |
159 | class="btn btn-outline-secondary" | 140 | class="btn btn-outline-secondary" |
160 | title="Eliminar" | 141 | title="Eliminar" |
161 | ng-click="quitarPlazo(key)" | 142 | ng-click="quitarPlazo(key)" |
162 | > | 143 | > |
163 | <i class="fa fa-trash"></i> | 144 | <i class="fa fa-trash"></i> |
164 | </button> | 145 | </button> |
165 | </td> | 146 | </td> |
166 | </tr> | 147 | </tr> |
167 | </tbody> | 148 | </tbody> |
168 | </table> | 149 | </table> |
169 | </div> | 150 | </div> |
170 | <div class="modal-footer py-1"> | 151 | <div class="modal-footer py-1"> |
171 | <nav ng-show="currentPagePrecioCondicion.length > 0 && !ingreso" class="mr-auto"> | 152 | <nav ng-show="currentPagePrecioCondicion.length > 0 && !ingreso" class="mr-auto"> |
172 | <ul class="pagination pagination-sm mb-0"> | 153 | <ul class="pagination pagination-sm mb-0"> |
173 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 154 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
174 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 155 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
175 | <span aria-hidden="true">«</span> | 156 | <span aria-hidden="true">«</span> |
176 | <span class="sr-only">Anterior</span> | 157 | <span class="sr-only">Anterior</span> |
177 | </a> | 158 | </a> |
178 | </li> | 159 | </li> |
179 | <li | 160 | <li |
180 | class="page-item" | 161 | class="page-item" |
181 | ng-repeat="pagina in paginas" | 162 | ng-repeat="pagina in paginas" |
182 | ng-class="{'active': pagina == currentPage}" | 163 | ng-class="{'active': pagina == currentPage}" |
183 | > | 164 | > |
184 | <a | 165 | <a |
185 | class="page-link" | 166 | class="page-link" |
186 | href="javascript:void();" | 167 | href="javascript:void();" |
187 | ng-click="selectPage(pagina)" | 168 | ng-click="selectPage(pagina)" |
188 | ng-bind="pagina" | 169 | ng-bind="pagina" |
189 | ></a> | 170 | ></a> |
190 | </li> | 171 | </li> |
191 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 172 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
192 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | 173 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> |
193 | <span aria-hidden="true">»</span> | 174 | <span aria-hidden="true">»</span> |
194 | <span class="sr-only">Siguiente</span> | 175 | <span class="sr-only">Siguiente</span> |
195 | </a> | 176 | </a> |
196 | </li> | 177 | </li> |
197 | </ul> | 178 | </ul> |
198 | </nav> | 179 | </nav> |
199 | <button | 180 | <button |
200 | ng-show="!ingreso" | 181 | ng-show="!ingreso" |
201 | class="btn btn-sm btn-secondary" | 182 | class="btn btn-sm btn-secondary" |
202 | type="button" | 183 | type="button" |
203 | ng-click="cancel()" | 184 | ng-click="cancel()" |
204 | >Cancelar | 185 | >Cancelar |
205 | </button> | 186 | </button> |
206 | <button | 187 | <button |
207 | ng-show="ingreso" | 188 | ng-show="ingreso" |
208 | ng-disabled="plazosNuevos.length === 0" | 189 | ng-disabled="plazosNuevos.length === 0" |
209 | class="btn btn-sm btn-primary" | 190 | class="btn btn-sm btn-primary" |
210 | type="button" | 191 | type="button" |
211 | ng-click="select(plazosNuevos)" | 192 | ng-click="select(plazosNuevos)" |
212 | >Aceptar | 193 | >Aceptar |
213 | </button> | 194 | </button> |
214 | <button | 195 | <button |
215 | ng-show="ingreso" | 196 | ng-show="ingreso" |