Commit fecdeaebd8f310a678d56d9fd05bd5a49ca8a7f9

Authored by Jose Pinto
Exists in master

Merge branch 'master' into 'develop'

Master(efernandez)

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