Commit c0506d190fe2f9c08e882b2d33611731f723fd4b
Exists in
master
and in
1 other branch
Merge branch 'master' into 'develop'
Cambio de aspecto de botón. See merge request !10
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 | <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="12" ng-show="!ingreso"> |
| 54 | <input | 54 | <button |
| 55 | class="form-control form-control-sm" | 55 | class="form-control form-control-sm btn-rounded" |
| 56 | type="text" | 56 | type="text" |
| 57 | placeholder="Selección manual" | ||
| 58 | readonly | 57 | readonly |
| 59 | ng-click="ingreso = !ingreso" | 58 | 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 | > | 59 | > |
| 74 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 60 | <i class="fa fa-plus left" aria-hidden="true"></i> |
| 61 | Crear Precio-Condición de forma manual | ||
| 75 | </button> | 62 | </button> |
| 76 | </td> | 63 | </td> |
| 77 | </tr> | 64 | </tr> |
| 78 | <tr class="selectable" | 65 | <tr class="selectable" |
| 79 | ng-repeat="(key, precioCondicion) in currentPagePrecioCondicion"> | 66 | ng-repeat="(key, precioCondicion) in currentPagePrecioCondicion"> |
| 80 | <td ng-bind="precioCondicion.id | rellenarDigitos: 4: 0" | 67 | <td ng-bind="precioCondicion.id | rellenarDigitos: 4: 0" |
| 81 | ng-click="select(precioCondicion)"></td> | 68 | ng-click="select(precioCondicion)"></td> |
| 82 | <td ng-bind="precioCondicion.nombre" | 69 | <td ng-bind="precioCondicion.nombre" |
| 83 | ng-click="select(precioCondicion)"></td> | 70 | ng-click="select(precioCondicion)"></td> |
| 84 | <td ng-bind="precioCondicion.idListaPrecio" | 71 | <td ng-bind="precioCondicion.idListaPrecio" |
| 85 | ng-click="select(precioCondicion)"></td> | 72 | ng-click="select(precioCondicion)"></td> |
| 86 | <td ng-bind="precioCondicion.plazos" | 73 | <td ng-bind="precioCondicion.plazos" |
| 87 | ng-click="select(precioCondicion)"></td> | 74 | ng-click="select(precioCondicion)"></td> |
| 88 | <td> | 75 | <td> |
| 89 | <button | 76 | <button |
| 90 | type="button" | 77 | type="button" |
| 91 | class="btn btn-sm p-1 float-right" | 78 | class="btn btn-sm p-1 float-right" |
| 92 | title="Seleccionar" | 79 | title="Seleccionar" |
| 93 | ng-class="{ | 80 | ng-class="{ |
| 94 | 'btn-secondary': selectedPrecioCondicion != key + 1, | 81 | 'btn-secondary': selectedPrecioCondicion != key + 1, |
| 95 | 'btn-primary': selectedPrecioCondicion == key + 1 | 82 | 'btn-primary': selectedPrecioCondicion == key + 1 |
| 96 | }" | 83 | }" |
| 97 | foca-focus="selectedPrecioCondicion == {{key + 1}}" | 84 | foca-focus="selectedPrecioCondicion == {{key + 1}}" |
| 98 | ng-keydown="itemProducto($event.keyCode)" | 85 | ng-keydown="itemProducto($event.keyCode)" |
| 99 | ng-click="select(precioCondicion)" | 86 | ng-click="select(precioCondicion)" |
| 100 | > | 87 | > |
| 101 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 88 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
| 102 | </button> | 89 | </button> |
| 103 | <button | 90 | <button |
| 104 | type="button" | 91 | type="button" |
| 105 | class="btn btn-sm p-1 float-right btn-secondary mr-2" | 92 | class="btn btn-sm p-1 float-right btn-secondary mr-2" |
| 106 | title="Ver lista precio" | 93 | title="Ver lista precio" |
| 107 | ng-click="verListaPrecio(precioCondicion.idListaPrecio)" | 94 | ng-click="verListaPrecio(precioCondicion.idListaPrecio)" |
| 108 | > | 95 | > |
| 109 | <i class="fa fa-eye" aria-hidden="true"></i> | 96 | <i class="fa fa-eye" aria-hidden="true"></i> |
| 110 | </button> | 97 | </button> |
| 111 | </td> | 98 | </td> |
| 112 | </tr> | 99 | </tr> |
| 113 | </tbody> | 100 | </tbody> |
| 114 | </table> | 101 | </table> |
| 115 | 102 | ||
| 116 | <table class="table table-striped table-sm" ng-show="ingreso"> | 103 | <table class="table table-striped table-sm" ng-show="ingreso"> |
| 117 | <thead> | 104 | <thead> |
| 118 | <tr> | 105 | <tr> |
| 119 | <th>Item</th> | 106 | <th>Item</th> |
| 120 | <th>Días</th> | 107 | <th>Días</th> |
| 121 | <th></th> | 108 | <th></th> |
| 122 | </tr> | 109 | </tr> |
| 123 | </thead> | 110 | </thead> |
| 124 | <tbody> | 111 | <tbody> |
| 125 | <tr> | 112 | <tr> |
| 126 | <td> | 113 | <td> |
| 127 | <input | 114 | <input |
| 128 | type="number" | 115 | type="number" |
| 129 | class="form-control text-right" | 116 | class="form-control text-right" |
| 130 | ng-model="plazoACargar.item" | 117 | ng-model="plazoACargar.item" |
| 131 | readonly | 118 | readonly |
| 132 | /> | 119 | /> |
| 133 | </td> | 120 | </td> |
| 134 | <td> | 121 | <td> |
| 135 | <input | 122 | <input |
| 136 | type="number" | 123 | type="number" |
| 137 | class="form-control text-right" | 124 | class="form-control text-right" |
| 138 | min="0" | 125 | min="0" |
| 139 | ng-model="plazoACargar.dias" | 126 | ng-model="plazoACargar.dias" |
| 140 | ng-keypress="agregarPlazo($event.keyCode)" | 127 | ng-keypress="agregarPlazo($event.keyCode)" |
| 141 | foca-focus="ingreso" | 128 | foca-focus="ingreso" |
| 142 | /> | 129 | /> |
| 143 | </td> | 130 | </td> |
| 144 | <td class="text-center"> | 131 | <td class="text-center"> |
| 145 | <button | 132 | <button |
| 146 | class="btn btn-outline-secondary" | 133 | class="btn btn-outline-secondary" |
| 147 | title="Agregar" | 134 | title="Agregar" |
| 148 | ng-click="agregarPlazo(13)" | 135 | ng-click="agregarPlazo(13)" |
| 149 | > | 136 | > |
| 150 | <i class="fa fa-save"></i> | 137 | <i class="fa fa-save"></i> |
| 151 | </button> | 138 | </button> |
| 152 | </td> | 139 | </td> |
| 153 | </tr> | 140 | </tr> |
| 154 | <tr ng-repeat="(key, plazo) in plazosNuevos"> | 141 | <tr ng-repeat="(key, plazo) in plazosNuevos"> |
| 155 | <td class="text-right" ng-bind="key + 1"></td> | 142 | <td class="text-right" ng-bind="key + 1"></td> |
| 156 | <td class="text-right" ng-bind="plazo.dias"></td> | 143 | <td class="text-right" ng-bind="plazo.dias"></td> |
| 157 | <td class="text-center"> | 144 | <td class="text-center"> |
| 158 | <button | 145 | <button |
| 159 | class="btn btn-outline-secondary" | 146 | class="btn btn-outline-secondary" |
| 160 | title="Eliminar" | 147 | title="Eliminar" |
| 161 | ng-click="quitarPlazo(key)" | 148 | ng-click="quitarPlazo(key)" |
| 162 | > | 149 | > |
| 163 | <i class="fa fa-trash"></i> | 150 | <i class="fa fa-trash"></i> |
| 164 | </button> | 151 | </button> |
| 165 | </td> | 152 | </td> |
| 166 | </tr> | 153 | </tr> |
| 167 | </tbody> | 154 | </tbody> |
| 168 | </table> | 155 | </table> |
| 169 | </div> | 156 | </div> |
| 170 | <div class="modal-footer py-1"> | 157 | <div class="modal-footer py-1"> |
| 171 | <nav ng-show="currentPagePrecioCondicion.length > 0 && !ingreso" class="mr-auto"> | 158 | <nav ng-show="currentPagePrecioCondicion.length > 0 && !ingreso" class="mr-auto"> |
| 172 | <ul class="pagination pagination-sm mb-0"> | 159 | <ul class="pagination pagination-sm mb-0"> |
| 173 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 160 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
| 174 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 161 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
| 175 | <span aria-hidden="true">«</span> | 162 | <span aria-hidden="true">«</span> |
| 176 | <span class="sr-only">Anterior</span> | 163 | <span class="sr-only">Anterior</span> |
| 177 | </a> | 164 | </a> |
| 178 | </li> | 165 | </li> |
| 179 | <li | 166 | <li |
| 180 | class="page-item" | 167 | class="page-item" |
| 181 | ng-repeat="pagina in paginas" | 168 | ng-repeat="pagina in paginas" |
| 182 | ng-class="{'active': pagina == currentPage}" | 169 | ng-class="{'active': pagina == currentPage}" |
| 183 | > | 170 | > |
| 184 | <a | 171 | <a |
| 185 | class="page-link" | 172 | class="page-link" |
| 186 | href="javascript:void();" | 173 | href="javascript:void();" |
| 187 | ng-click="selectPage(pagina)" | 174 | ng-click="selectPage(pagina)" |
| 188 | ng-bind="pagina" | 175 | ng-bind="pagina" |
| 189 | ></a> | 176 | ></a> |
| 190 | </li> | 177 | </li> |
| 191 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 178 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
| 192 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | 179 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> |
| 193 | <span aria-hidden="true">»</span> | 180 | <span aria-hidden="true">»</span> |
| 194 | <span class="sr-only">Siguiente</span> | 181 | <span class="sr-only">Siguiente</span> |
| 195 | </a> | 182 | </a> |
| 196 | </li> | 183 | </li> |
| 197 | </ul> | 184 | </ul> |
| 198 | </nav> | 185 | </nav> |
| 199 | <button | 186 | <button |
| 200 | ng-show="!ingreso" | 187 | ng-show="!ingreso" |
| 201 | class="btn btn-sm btn-secondary" | 188 | class="btn btn-sm btn-secondary" |
| 202 | type="button" | 189 | type="button" |
| 203 | ng-click="cancel()" | 190 | ng-click="cancel()" |
| 204 | >Cancelar | 191 | >Cancelar |
| 205 | </button> | 192 | </button> |
| 206 | <button | 193 | <button |
| 207 | ng-show="ingreso" | 194 | ng-show="ingreso" |
| 208 | ng-disabled="plazosNuevos.length === 0" | 195 | ng-disabled="plazosNuevos.length === 0" |
| 209 | class="btn btn-sm btn-primary" | 196 | class="btn btn-sm btn-primary" |
| 210 | type="button" | 197 | type="button" |
| 211 | ng-click="select(plazosNuevos)" | 198 | ng-click="select(plazosNuevos)" |
| 212 | >Aceptar | 199 | >Aceptar |
| 213 | </button> | 200 | </button> |
| 214 | <button | 201 | <button |
| 215 | ng-show="ingreso" | 202 | ng-show="ingreso" |
| 216 | class="btn btn-sm btn-secondary" | 203 | class="btn btn-sm btn-secondary" |
| 217 | type="button" | 204 | type="button" |
| 218 | ng-click="volver()" | 205 | ng-click="volver()" |
| 219 | >Volver | 206 | >Volver |
| 220 | </button> | 207 | </button> |
| 221 | </div> | 208 | </div> |