Commit 822c9f371ae5aa6e2458e2da5da117746bcba97e
1 parent
74ee796c04
Exists in
master
and in
2 other branches
cambio en el panel de busqueda-accede directamente a la busqueda de remito
Showing
3 changed files
with
39 additions
and
95 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -154,23 +154,44 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo |
| 154 | 154 | }); |
| 155 | 155 | }; |
| 156 | 156 | |
| 157 | - $scope.busquedaAvanzada = function () { | |
| 157 | + // $scope.busquedaAvanzada = function () { | |
| 158 | + // var modalInstance = $uibModal.open( | |
| 159 | + // { | |
| 160 | + // ariaLabelledBy: 'Busqueda Avanzada', | |
| 161 | + // templateUrl: 'foca-modal-busqueda-avanzada.html', | |
| 162 | + // controller: 'focaModalBusquedaAvanzadaController', | |
| 163 | + // resolve: { | |
| 164 | + // parametrosModal: function () { | |
| 165 | + // return { | |
| 166 | + // remitos: $scope.marcadores | |
| 167 | + // }; | |
| 168 | + // } | |
| 169 | + // } | |
| 170 | + // } | |
| 171 | + // ); | |
| 172 | + // modalInstance.result.then(function(data) { | |
| 173 | + // actualizarMarcadores(data); | |
| 174 | + // }, function () { | |
| 175 | + // // funcion ejecutada cuando se cancela el modal | |
| 176 | + // } | |
| 177 | + // ); | |
| 178 | + // }; | |
| 179 | + | |
| 180 | + $scope.seleccionarRemito = function () { | |
| 158 | 181 | var modalInstance = $uibModal.open( |
| 159 | 182 | { |
| 160 | - ariaLabelledBy: 'Busqueda Avanzada', | |
| 161 | - templateUrl: 'foca-modal-busqueda-avanzada.html', | |
| 162 | - controller: 'focaModalBusquedaAvanzadaController', | |
| 163 | - resolve: { | |
| 164 | - parametrosModal: function () { | |
| 165 | - return { | |
| 166 | - remitos: $scope.marcadores | |
| 167 | - }; | |
| 168 | - } | |
| 169 | - } | |
| 183 | + ariaLabelledBy: 'Busqueda de Remito', | |
| 184 | + templateUrl: 'foca-modal-remito.html', | |
| 185 | + controller: 'focaModalRemitoController', | |
| 186 | + size: 'lg', | |
| 187 | + resolve: { usadoPor: function () { return 'remito'; } } | |
| 170 | 188 | } |
| 171 | 189 | ); |
| 172 | - modalInstance.result.then(function(data) { | |
| 173 | - actualizarMarcadores(data); | |
| 190 | + modalInstance.result.then(function(remito) { | |
| 191 | + $scope.remito = remito; | |
| 192 | + $scope.remito.numero = $filter('rellenarDigitos')(remito.lugar, 4) + '-' + | |
| 193 | + $filter('rellenarDigitos')(remito.numeroRemito, 6); | |
| 194 | + $scope.cliente = remito.cliente.NOM; | |
| 174 | 195 | }, function () { |
| 175 | 196 | // funcion ejecutada cuando se cancela el modal |
| 176 | 197 | } |
src/views/foca-logistica-pedido-ruta.html
| ... | ... | @@ -79,18 +79,17 @@ |
| 79 | 79 | <strong>Asignado</strong> |
| 80 | 80 | </div> |
| 81 | 81 | <div class="pt-4"> |
| 82 | - <button | |
| 83 | - ladda="searchLoading" | |
| 84 | - class="btn btn-outline-light" | |
| 82 | + <button | |
| 83 | + ladda="searchLoading" | |
| 84 | + class="btn btn-outline-secondary form-control" | |
| 85 | 85 | type="button" |
| 86 | - ng-click="busquedaAvanzada()" | |
| 87 | - > | |
| 86 | + ng-click="seleccionarRemito()"> | |
| 88 | 87 | <span class="text-dark text-truncate"> |
| 89 | 88 | Búsqueda Avanzada |
| 90 | 89 | <i class="fa fa-search" aria-hidden="true"></i> |
| 91 | 90 | </span> |
| 92 | 91 | </button> |
| 93 | - </div> | |
| 92 | + </div> | |
| 94 | 93 | </div> |
| 95 | 94 | </div> |
| 96 | 95 | <div class="row px-5"> |
src/views/foca-modal-busqueda-avanzada.html
| ... | ... | @@ -1,76 +0,0 @@ |
| 1 | -<div class="modal-header"> | |
| 2 | - <div class="row"> | |
| 3 | - <div class="col-12"> | |
| 4 | - <h5>Búsqueda avanzada:</h5> | |
| 5 | - </div> | |
| 6 | - </div> | |
| 7 | -</div> | |
| 8 | -<div class="modal-body"> | |
| 9 | - <div class="row"> | |
| 10 | - <div class="col-12"> | |
| 11 | - <h6>Remitos del cliente:</h6> | |
| 12 | - </div> | |
| 13 | - <div class="col-12"> | |
| 14 | - <div class="input-group"> | |
| 15 | - <input | |
| 16 | - class="form-control" | |
| 17 | - ng-model="cliente" | |
| 18 | - ng-keypress="seleccionarCliente($event.keyCode)" | |
| 19 | - placeholder="Ingrese un cliente" | |
| 20 | - /> | |
| 21 | - <button | |
| 22 | - ng-show="cliente !== ''" | |
| 23 | - type="button" | |
| 24 | - class="clear-input" | |
| 25 | - ng-click="cliente = '';" | |
| 26 | - ><i class="fa fa-times"></i> | |
| 27 | - </button> | |
| 28 | - <div class="input-group-append"> | |
| 29 | - <button | |
| 30 | - ladda="searchLoading" | |
| 31 | - class="btn btn-outline-secondary form-control" | |
| 32 | - type="button" | |
| 33 | - ng-click="seleccionarCliente(13)"> | |
| 34 | - <i class="fa fa-search" aria-hidden="true"></i> | |
| 35 | - </button> | |
| 36 | - </div> | |
| 37 | - </div> | |
| 38 | - </div> | |
| 39 | - </div> | |
| 40 | - <div class="row pt-3"> | |
| 41 | - <div class="col-12"> | |
| 42 | - <h6>Remito Nº</h6> | |
| 43 | - </div> | |
| 44 | - <div class="col-12"> | |
| 45 | - <div class="input-group"> | |
| 46 | - <input | |
| 47 | - class="form-control" | |
| 48 | - ng-model="remito.numero" | |
| 49 | - ng-click="seleccionarRemito()" | |
| 50 | - readonly/> | |
| 51 | - <div class="input-group-append"> | |
| 52 | - <button | |
| 53 | - ladda="searchLoading" | |
| 54 | - class="btn btn-outline-secondary form-control" | |
| 55 | - type="button" | |
| 56 | - ng-click="seleccionarRemito()"> | |
| 57 | - <i class="fa fa-search" aria-hidden="true"></i> | |
| 58 | - </button> | |
| 59 | - </div> | |
| 60 | - </div> | |
| 61 | - </div> | |
| 62 | - </div> | |
| 63 | -</div> | |
| 64 | -<div class="modal-footer py-1"> | |
| 65 | - <button | |
| 66 | - class="btn btn-sm btn-secondary" | |
| 67 | - type="button" | |
| 68 | - data-dismiss="modal" | |
| 69 | - ng-click="cancel()">Cancelar | |
| 70 | - </button> | |
| 71 | - <button | |
| 72 | - class="btn btn-sm btn-primary" | |
| 73 | - type="button" | |
| 74 | - ng-click="buscar()">Buscar | |
| 75 | - </button> | |
| 76 | -</div> |