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