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