Commit dccee8a6d61ca5ad7a64834942d68df3b4721fbf
Exists in
master
and in
2 other branches
Merge branch 'master' into 'develop'
Master(benjamin) See merge request !53
Showing
3 changed files
Show diff stats
src/js/controller.js
... | ... | @@ -154,23 +154,21 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo |
154 | 154 | }); |
155 | 155 | }; |
156 | 156 | |
157 | - $scope.busquedaAvanzada = function () { | |
157 | + $scope.seleccionarRemito = function () { | |
158 | 158 | var modalInstance = $uibModal.open( |
159 | 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 | - } | |
160 | + ariaLabelledBy: 'Busqueda de Remito', | |
161 | + templateUrl: 'foca-modal-remito.html', | |
162 | + controller: 'focaModalRemitoController', | |
163 | + size: 'lg', | |
164 | + resolve: { usadoPor: function () { return 'remito'; } } | |
170 | 165 | } |
171 | 166 | ); |
172 | - modalInstance.result.then(function(data) { | |
173 | - actualizarMarcadores(data); | |
167 | + modalInstance.result.then(function(remito) { | |
168 | + $scope.remito = remito; | |
169 | + $scope.remito.numero = $filter('rellenarDigitos')(remito.lugar, 4) + '-' + | |
170 | + $filter('rellenarDigitos')(remito.numeroRemito, 6); | |
171 | + $scope.cliente = remito.cliente.NOM; | |
174 | 172 | }, function () { |
175 | 173 | // funcion ejecutada cuando se cancela el modal |
176 | 174 | } |
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
... | ... | @@ -2,10 +2,17 @@ |
2 | 2 | <div class="row"> |
3 | 3 | <div class="col-12"> |
4 | 4 | <h5>Búsqueda avanzada:</h5> |
5 | + <button | |
6 | + ladda="searchLoading" | |
7 | + class="btn btn-outline-secondary form-control" | |
8 | + type="button" | |
9 | + ng-click="seleccionarRemito()"> | |
10 | + <i class="fa fa-search" aria-hidden="true"></i> | |
11 | + </button> | |
5 | 12 | </div> |
6 | 13 | </div> |
7 | 14 | </div> |
8 | -<div class="modal-body"> | |
15 | +<div class="modal-body"> --> | |
9 | 16 | <div class="row"> |
10 | 17 | <div class="col-12"> |
11 | 18 | <h6>Remitos del cliente:</h6> |
... | ... | @@ -30,7 +37,7 @@ |
30 | 37 | ladda="searchLoading" |
31 | 38 | class="btn btn-outline-secondary form-control" |
32 | 39 | type="button" |
33 | - ng-click="seleccionarCliente(13)"> | |
40 | + ng-click="seleccionarCliente()"> | |
34 | 41 | <i class="fa fa-search" aria-hidden="true"></i> |
35 | 42 | </button> |
36 | 43 | </div> |