Commit ea81e68480f56898fa6263ac65586a138947778d

Authored by Eric Fernandez
1 parent eb556b1660
Exists in master

validación correcta

Showing 2 changed files with 3 additions and 4 deletions   Show diff stats
src/js/controller.js
1 angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaController', [ 1 angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaController', [
2 '$scope', 'focaLogisticaPedidoRutaService', '$location', '$uibModal', '$filter', 2 '$scope', 'focaLogisticaPedidoRutaService', '$location', '$uibModal', '$filter',
3 'focaModalService', 'focaBotoneraLateralService', '$interval', 3 'focaModalService', 'focaBotoneraLateralService', '$interval',
4 function($scope, focaLogisticaPedidoRutaService, $location, $uibModal, $filter, 4 function($scope, focaLogisticaPedidoRutaService, $location, $uibModal, $filter,
5 focaModalService, focaBotoneraLateralService, $interval 5 focaModalService, focaBotoneraLateralService, $interval
6 ) { 6 ) {
7 $scope.actividad = 'Logistica'; 7 $scope.actividad = 'Logistica';
8 8
9 //Datos Pantalla 9 //Datos Pantalla
10 $scope.titulo = 'Logistica de Pedidos'; 10 $scope.titulo = 'Logistica de Pedidos';
11 var transportista = { 11 var transportista = {
12 label: 'Unidad', 12 label: 'Unidad',
13 image: 'abmChofer.png' 13 image: 'abmChofer.png'
14 }; 14 };
15 var fecha = { 15 var fecha = {
16 label: 'Fecha Reparto', 16 label: 'Fecha Reparto',
17 image: 'fechaDeReparto.png' 17 image: 'fechaDeReparto.png'
18 }; 18 };
19 $scope.botonera = [fecha, transportista]; 19 $scope.botonera = [fecha, transportista];
20 var cabecera = ''; 20 var cabecera = '';
21 $scope.now = new Date(); 21 $scope.now = new Date();
22 $scope.idVendedor = 0; 22 $scope.idVendedor = 0;
23 $scope.marcadores = []; 23 $scope.marcadores = [];
24 $scope.vehiculos = []; 24 $scope.vehiculos = [];
25 getSeguimiento(); 25 getSeguimiento();
26 $scope.arrastrando = false; 26 $scope.arrastrando = false;
27 $scope.general = function() { 27 $scope.general = function() {
28 $scope.idVendedor = 0; 28 $scope.idVendedor = 0;
29 getSeguimiento(); 29 getSeguimiento();
30 }; 30 };
31 31
32 //SETEO BOTONERA LATERAL 32 //SETEO BOTONERA LATERAL
33 focaBotoneraLateralService.showSalir(true); 33 focaBotoneraLateralService.showSalir(true);
34 focaBotoneraLateralService.showPausar(false); 34 focaBotoneraLateralService.showPausar(false);
35 focaBotoneraLateralService.showGuardar(false); 35 focaBotoneraLateralService.showGuardar(false);
36 36
37 37
38 38
39 $scope.general = function() { 39 $scope.general = function() {
40 $scope.idVendedor = 0; 40 $scope.idVendedor = 0;
41 getSeguimiento(); 41 getSeguimiento();
42 $scope.$broadcast('removeCabecera', cabecera); 42 $scope.$broadcast('removeCabecera', cabecera);
43 $scope.$broadcast('addCabecera', { 43 $scope.$broadcast('addCabecera', {
44 label: 'General', 44 label: 'General',
45 valor: '' 45 valor: ''
46 }); 46 });
47 }; 47 };
48 48
49 $scope.cargar = function(idVehiculo, punto) { 49 $scope.cargar = function(idVehiculo, punto) {
50 if(!eligioFecha()) return; 50 if(!eligioFecha()) return;
51 var idRemito; 51 var idRemito;
52 if(punto === -1) { 52 if(punto === -1) {
53 idRemito = -1; 53 idRemito = -1;
54 }else { 54 }else {
55 idRemito = JSON.parse(punto).notaPedido.remito.id; 55 idRemito = JSON.parse(punto).notaPedido.remito.id;
56 } 56 }
57 var modalInstance = $uibModal.open( 57 var modalInstance = $uibModal.open(
58 { 58 {
59 ariaLabelledBy: 'Busqueda de Vehiculo', 59 ariaLabelledBy: 'Busqueda de Vehiculo',
60 templateUrl: 'foca-detalle-vehiculo.html', 60 templateUrl: 'foca-detalle-vehiculo.html',
61 controller: 'focaDetalleVehiculo', 61 controller: 'focaDetalleVehiculo',
62 size: 'lg', 62 size: 'lg',
63 resolve: { 63 resolve: {
64 idVehiculo: function() {return idVehiculo;}, 64 idVehiculo: function() {return idVehiculo;},
65 idRemito: function() {return idRemito;}, 65 idRemito: function() {return idRemito;},
66 fechaReparto: function() {return $scope.fechaReparto;} 66 fechaReparto: function() {return $scope.fechaReparto;}
67 } 67 }
68 } 68 }
69 ); 69 );
70 modalInstance.result.then(function() { 70 modalInstance.result.then(function() {
71 }, function() { 71 }, function() {
72 }); 72 });
73 }; 73 };
74 74
75 $scope.quitarVehiculo = function(vehiculo) { 75 $scope.quitarVehiculo = function(vehiculo) {
76 if(!eligioFecha() || vehiculoEnUso(vehiculo)) return; 76 if(!eligioFecha() || vehiculoEnUso(vehiculo)) return;
77 focaModalService.confirm('Esta seguro que desea eliminar el vehículo ' + 77 focaModalService.confirm('Esta seguro que desea eliminar el vehículo ' +
78 vehiculo.codigo + '?').then(function() { 78 vehiculo.codigo + '?').then(function() {
79 eliminarVehiculo(vehiculo); 79 eliminarVehiculo(vehiculo);
80 }); 80 });
81 }; 81 };
82 82
83 $scope.hacerHojaRuta = function(vehiculo) { 83 $scope.hacerHojaRuta = function(vehiculo) {
84 if(!eligioFecha() || vehiculoEnUso(vehiculo)) return; 84 if(!eligioFecha() || vehiculoEnUso(vehiculo)) return;
85 var modalInstance = $uibModal.open( 85 var modalInstance = $uibModal.open(
86 { 86 {
87 ariaLabelledBy: 'Creación hoja ruta', 87 ariaLabelledBy: 'Creación hoja ruta',
88 templateUrl: 'foca-modal-cerrar-vehiculo.html', 88 templateUrl: 'foca-modal-cerrar-vehiculo.html',
89 controller: 'focaModalCerrarVehiculo', 89 controller: 'focaModalCerrarVehiculo',
90 size: 'lg', 90 size: 'lg',
91 resolve: { 91 resolve: {
92 idVehiculo: function() {return vehiculo.id;}, 92 idVehiculo: function() {return vehiculo.id;},
93 fechaReparto: function() {return $scope.fechaReparto;} 93 fechaReparto: function() {return $scope.fechaReparto;}
94 } 94 }
95 } 95 }
96 ); 96 );
97 modalInstance.result.then(function() { 97 modalInstance.result.then(function() {
98 98
99 }, function() { 99 }, function() {
100 //usar cuando se cancela el modal 100 //usar cuando se cancela el modal
101 }); 101 });
102 }; 102 };
103 103
104 $scope.arrastra = function() { 104 $scope.arrastra = function() {
105 $scope.arrastrando = true; 105 $scope.arrastrando = true;
106 $scope.$digest(); 106 $scope.$digest();
107 }; 107 };
108 108
109 $scope.noArrastra = function() { 109 $scope.noArrastra = function() {
110 $scope.arrastrando = false; 110 $scope.arrastrando = false;
111 $scope.$digest(); 111 $scope.$digest();
112 }; 112 };
113 113
114 $scope.individual = function() { 114 $scope.individual = function() {
115 $scope.idVendedor = -1; 115 $scope.idVendedor = -1;
116 }; 116 };
117 117
118 $scope.mostrarDetalle = function() { 118 $scope.mostrarDetalle = function() {
119 $scope.detalle = true; 119 $scope.detalle = true;
120 }; 120 };
121 121
122 $scope.salir = function() { 122 $scope.salir = function() {
123 $location.path('/'); 123 $location.path('/');
124 }; 124 };
125 125
126 $scope.search = function() { 126 $scope.search = function() {
127 getSeguimiento(); 127 getSeguimiento();
128 }; 128 };
129 129
130 $scope.fecha = function() { 130 $scope.fecha = function() {
131 getSeguimiento(); 131 getSeguimiento();
132 }; 132 };
133 133
134 $scope.seleccionarUnidad = function() { 134 $scope.seleccionarUnidad = function() {
135 var modalInstance = $uibModal.open( 135 var modalInstance = $uibModal.open(
136 { 136 {
137 ariaLabelledBy: 'Busqueda de Transportista', 137 ariaLabelledBy: 'Busqueda de Transportista',
138 templateUrl: 'modal-proveedor.html', 138 templateUrl: 'modal-proveedor.html',
139 controller: 'focaModalProveedorCtrl', 139 controller: 'focaModalProveedorCtrl',
140 size: 'lg', 140 size: 'lg',
141 resolve: { 141 resolve: {
142 transportista: function() { 142 transportista: function() {
143 return true; 143 return true;
144 } 144 }
145 } 145 }
146 } 146 }
147 ); 147 );
148 modalInstance.result.then(function(transportista) { 148 modalInstance.result.then(function(transportista) {
149 $scope.seleccionarVehiculo(transportista.COD); 149 $scope.seleccionarVehiculo(transportista.COD);
150 }); 150 });
151 }; 151 };
152 152
153 $scope.seleccionarVehiculo = function(idTransportista) { 153 $scope.seleccionarVehiculo = function(idTransportista) {
154 var query = '/vehiculo/transportista/' + idTransportista; 154 var query = '/vehiculo/transportista/' + idTransportista;
155 var columnas = { 155 var columnas = {
156 nombre: ['Código', 'tractor', 'Semi', 'Capacidad'], 156 nombre: ['Código', 'tractor', 'Semi', 'Capacidad'],
157 propiedad: ['codigo', 'tractor', 'semi', 'capacidadTotalCisternas'] 157 propiedad: ['codigo', 'tractor', 'semi', 'capacidadTotalCisternas']
158 }; 158 };
159 var titulo = 'Búsqueda de vehiculos'; 159 var titulo = 'Búsqueda de vehiculos';
160 focaModalService.modal(columnas, query, titulo).then( 160 focaModalService.modal(columnas, query, titulo).then(
161 function(vehiculo) { 161 function(vehiculo) {
162 var existe = $filter('filter')($scope.vehiculos, {id: vehiculo.id}); 162 var existe = $filter('filter')($scope.vehiculos, {id: vehiculo.id});
163 if(existe.length) { 163 if(existe.length) {
164 focaModalService.alert('El vehiculo ya ha sido cargado'); 164 focaModalService.alert('El vehiculo ya ha sido cargado');
165 return; 165 return;
166 } 166 }
167 if(!vehiculo.cisternas.length) { 167 if(!vehiculo.cisternas.length) {
168 focaModalService.alert('El vehiculo no tiene cisternas'); 168 focaModalService.alert('El vehiculo no tiene cisternas');
169 return; 169 return;
170 } 170 }
171 $scope.vehiculos.push(vehiculo); 171 $scope.vehiculos.push(vehiculo);
172 }, function() { 172 }, function() {
173 // funcion ejecutada cuando se cancela el modal 173 // funcion ejecutada cuando se cancela el modal
174 }); 174 });
175 }; 175 };
176 176
177 $scope.seleccionarFechaReparto = function() { 177 $scope.seleccionarFechaReparto = function() {
178 focaModalService.modalFecha('Fecha de reparto').then(function(fecha) { 178 focaModalService.modalFecha('Fecha de reparto').then(function(fecha) {
179 $scope.$broadcast('addCabecera',{ 179 $scope.$broadcast('addCabecera',{
180 label: 'Fecha:', 180 label: 'Fecha:',
181 valor: fecha.toLocaleDateString() 181 valor: fecha.toLocaleDateString()
182 }); 182 });
183 $scope.fechaReparto = fecha; 183 $scope.fechaReparto = fecha;
184 focaLogisticaPedidoRutaService.setFechaReparto(fecha); 184 focaLogisticaPedidoRutaService.setFechaReparto(fecha);
185 focaLogisticaPedidoRutaService.getUnidadesByFecha(fecha).then(function(res) { 185 focaLogisticaPedidoRutaService.getUnidadesByFecha(fecha).then(function(res) {
186 $scope.vehiculos = res.data; 186 $scope.vehiculos = res.data;
187 }); 187 });
188 }); 188 });
189 }; 189 };
190 190
191 function getSeguimiento() { 191 function getSeguimiento() {
192 var desde = new Date('1900/01/01'); 192 var desde = new Date('1900/01/01');
193 var hasta = new Date('2099/01/01'); 193 var hasta = new Date('2099/01/01');
194 if($scope.fechaDesde) { 194 if($scope.fechaDesde) {
195 var fechaDesde = $scope.fechaDesde; 195 var fechaDesde = $scope.fechaDesde;
196 desde = new Date(new Date(fechaDesde.setHours(0)).setMinutes(0)); 196 desde = new Date(new Date(fechaDesde.setHours(0)).setMinutes(0));
197 desde = new Date(desde); 197 desde = new Date(desde);
198 } 198 }
199 if($scope.fechaHasta) { 199 if($scope.fechaHasta) {
200 var fechaHasta = $scope.fechaHasta; 200 var fechaHasta = $scope.fechaHasta;
201 hasta = new Date(new Date(fechaHasta.setHours(0)).setMinutes(0)); 201 hasta = new Date(new Date(fechaHasta.setHours(0)).setMinutes(0));
202 hasta = hasta.setDate(hasta.getDate() + 1); 202 hasta = hasta.setDate(hasta.getDate() + 1);
203 hasta = new Date(hasta); 203 hasta = new Date(hasta);
204 } 204 }
205 var datos = { 205 var datos = {
206 actividad: $scope.actividad, 206 actividad: $scope.actividad,
207 idUsuario: $scope.idVendedor, 207 idUsuario: $scope.idVendedor,
208 fechaDesde: desde, 208 fechaDesde: desde,
209 fechaHasta: hasta, 209 fechaHasta: hasta,
210 asignacion: $scope.filtroEstado ? true : ($scope.filtroEstado !== undefined ? 210 asignacion: $scope.filtroEstado ? true : ($scope.filtroEstado !== undefined ?
211 false : undefined) 211 false : undefined)
212 }; 212 };
213 213
214 $scope.datosBuscados = { 214 $scope.datosBuscados = {
215 actividad: $scope.actividad, 215 actividad: $scope.actividad,
216 individual: $scope.idVendedor ? true : false 216 individual: $scope.idVendedor ? true : false
217 }; 217 };
218 218
219 focaLogisticaPedidoRutaService.obtenerActividad(datos).then(function(datos) { 219 focaLogisticaPedidoRutaService.obtenerActividad(datos).then(function(datos) {
220 if(JSON.stringify(datos.data) !== JSON.stringify($scope.marcadores)) { 220 if(JSON.stringify(datos.data) !== JSON.stringify($scope.marcadores)) {
221 $scope.marcadores = datos.data; 221 $scope.marcadores = datos.data;
222 } 222 }
223 }); 223 });
224 } 224 }
225 225
226 function eliminarVehiculo(vehiculo) { 226 function eliminarVehiculo(vehiculo) {
227 focaLogisticaPedidoRutaService.getRemitos(vehiculo.id).then(function(res) { 227 focaLogisticaPedidoRutaService.getRemitos(vehiculo.id).then(function(res) {
228 if(!focaLogisticaPedidoRutaService.obtenerRemitosDeCarga(res.data).length) { 228 if(!focaLogisticaPedidoRutaService.obtenerRemitosDeCarga(res.data).length) {
229 $scope.vehiculos.splice($scope.vehiculos.indexOf(vehiculo), 1); 229 $scope.vehiculos.splice($scope.vehiculos.indexOf(vehiculo), 1);
230 }else { 230 }else {
231 focaModalService.alert('No ha sido posible eliminar el vehiculo porque ' + 231 focaModalService.alert('No ha sido posible eliminar el vehiculo porque ' +
232 'tiene remitos asociados').then(function() { 232 'tiene remitos asociados').then(function() {
233 $scope.hacerHojaRuta(vehiculo); 233 $scope.hacerHojaRuta(vehiculo);
234 }); 234 });
235 } 235 }
236 }); 236 });
237 } 237 }
238 238
239 function eligioFecha() { 239 function eligioFecha() {
240 if(!$scope.fechaReparto) { 240 if(!$scope.fechaReparto) {
241 focaModalService.alert('Primero seleccione fecha de reparto'); 241 focaModalService.alert('Primero seleccione fecha de reparto');
242 return false; 242 return false;
243 } 243 }
244 return true; 244 return true;
245 } 245 }
246 246
247 function vehiculoEnUso(vehiculo) { 247 function vehiculoEnUso(vehiculo) {
248 $scope.fechaReparto.setHours(0, 0, 0, 0);
249 var idUsuario = focaLogisticaPedidoRutaService.idUsuario; 248 var idUsuario = focaLogisticaPedidoRutaService.idUsuario;
250 for(var i = 0; i < vehiculo.cisternas.length; i++) { 249 for(var i = 0; i < vehiculo.cisternas.length; i++) {
251 for(var j = 0; j < vehiculo.cisternas[i].cisternasCarga.length; j++) { 250 for(var j = 0; j < vehiculo.cisternas[i].cisternasCarga.length; j++) {
252 var cisternaCarga = vehiculo.cisternas[i].cisternasCarga[j]; 251 var cisternaCarga = vehiculo.cisternas[i].cisternasCarga[j];
253 if(cisternaCarga.fechaReparto.substring(0, 10) === $scope.fechaReparto 252 if(cisternaCarga.fechaReparto.substring(0, 10) === $scope.fechaReparto
254 .toISOString().substring(0, 10) && cisternaCarga.idUsuarioProceso !== 253 .toISOString().substring(0, 10) && cisternaCarga.idUsuarioProceso &&
255 idUsuario) 254 cisternaCarga.idUsuarioProceso !== idUsuario)
256 { 255 {
257 focaModalService.alert('El vehículo está siendo usado por otro usuario'); 256 focaModalService.alert('El vehículo está siendo usado por otro usuario');
258 return true; 257 return true;
259 } 258 }
260 } 259 }
261 } 260 }
262 return false; 261 return false;
263 } 262 }
264 // TODO: descomentar en produccion 263 // TODO: descomentar en produccion
265 // $interval(function() { 264 // $interval(function() {
266 // getSeguimiento(); 265 // getSeguimiento();
267 // }, 5000); 266 // }, 5000);
268 } 267 }
269 ]); 268 ]);
270 269
1 angular.module('focaLogisticaPedidoRuta') 1 angular.module('focaLogisticaPedidoRuta')
2 .factory( 2 .factory(
3 'focaLogisticaPedidoRutaService', [ 3 'focaLogisticaPedidoRutaService', [
4 '$http', 4 '$http',
5 '$cookies', 5 '$cookies',
6 'API_ENDPOINT', 6 'API_ENDPOINT',
7 '$filter', 7 '$filter',
8 function($http, $cookies, API_ENDPOINT, $filter) { 8 function($http, $cookies, API_ENDPOINT, $filter) {
9 var url = API_ENDPOINT.URL; 9 var url = API_ENDPOINT.URL;
10 return { 10 return {
11 idUsuario: $cookies.get('vendedorCobrador'), 11 idUsuario: $cookies.get('vendedorCobrador'),
12 obtenerActividad: function(parametros) { 12 obtenerActividad: function(parametros) {
13 return $http.post(url + '/seguimiento/filtros', parametros); 13 return $http.post(url + '/seguimiento/filtros', parametros);
14 }, 14 },
15 numeroHojaRuta: function() { 15 numeroHojaRuta: function() {
16 return $http.get(url + '/hoja-ruta/numero-siguiente'); 16 return $http.get(url + '/hoja-ruta/numero-siguiente');
17 }, 17 },
18 getRemitos: function(idVehiculo) { 18 getRemitos: function(idVehiculo) {
19 return $http.get(url + '/remito/sin-hoja-ruta/' +idVehiculo); 19 return $http.get(url + '/remito/sin-hoja-ruta/' + idVehiculo);
20 }, 20 },
21 cerrarDistribuicion: function(remitos) { 21 cerrarDistribuicion: function(remitos) {
22 return $http.post(url + '/vehiculo/cierre-distribuicion', remitos); 22 return $http.post(url + '/vehiculo/cierre-distribuicion', remitos);
23 }, 23 },
24 desasociarRemitos: function(remitos, idVehiculo, sinRemitos) { 24 desasociarRemitos: function(remitos, idVehiculo, sinRemitos) {
25 var idsRemitos = []; 25 var idsRemitos = [];
26 for (var i = 0; i < remitos.length; i++) { 26 for (var i = 0; i < remitos.length; i++) {
27 idsRemitos.push(remitos[i].id); 27 idsRemitos.push(remitos[i].id);
28 } 28 }
29 return $http.post(url + '/vehiculo/desasociar-remitos', 29 return $http.post(url + '/vehiculo/desasociar-remitos',
30 { 30 {
31 idsRemitos: idsRemitos, 31 idsRemitos: idsRemitos,
32 idVehiculo: idVehiculo, 32 idVehiculo: idVehiculo,
33 vehiculoSinRemitos: sinRemitos 33 vehiculoSinRemitos: sinRemitos
34 }); 34 });
35 }, 35 },
36 obtenerRemitosDeCarga: function(remitos) { 36 obtenerRemitosDeCarga: function(remitos) {
37 var remitosRes = []; 37 var remitosRes = [];
38 for(var i = 0; i < remitos.cisternas.length; i++) { 38 for(var i = 0; i < remitos.cisternas.length; i++) {
39 procesoCistena(remitos.cisternas[i], this.fecha.toISOString()); 39 procesoCistena(remitos.cisternas[i], this.fecha.toISOString());
40 } 40 }
41 function procesoCistena(cisterna, fecha) { 41 function procesoCistena(cisterna, fecha) {
42 for(var j = 0; j < cisterna.cisternasCarga.length; j++) { 42 for(var j = 0; j < cisterna.cisternasCarga.length; j++) {
43 for(var k = 0; k < cisterna.cisternasCarga[j].cisternaMovimientos 43 for(var k = 0; k < cisterna.cisternasCarga[j].cisternaMovimientos
44 .length; k++) 44 .length; k++)
45 { 45 {
46 if(cisterna.cisternasCarga[j].fechaReparto.substring(0, 10) === 46 if(cisterna.cisternasCarga[j].fechaReparto.substring(0, 10) ===
47 fecha.substring(0, 10)) 47 fecha.substring(0, 10))
48 { 48 {
49 procesoMovimiento(cisterna.cisternasCarga[j] 49 procesoMovimiento(cisterna.cisternasCarga[j]
50 .cisternaMovimientos[k]); 50 .cisternaMovimientos[k]);
51 } 51 }
52 } 52 }
53 } 53 }
54 } 54 }
55 function procesoMovimiento(movimiento) { 55 function procesoMovimiento(movimiento) {
56 if(!movimiento.anulado && movimiento.remito && 56 if(!movimiento.anulado && movimiento.remito &&
57 !movimiento.remito.idHojaRuta) { 57 !movimiento.remito.idHojaRuta) {
58 var remito = movimiento.remito; 58 var remito = movimiento.remito;
59 var yaEstaCargado = $filter('filter')(remitosRes, {id: remito.id}); 59 var yaEstaCargado = $filter('filter')(remitosRes, {id: remito.id});
60 if(!yaEstaCargado.length && movimiento.metodo === 'carga') { 60 if(!yaEstaCargado.length && movimiento.metodo === 'carga') {
61 remitosRes.push(remito); 61 remitosRes.push(remito);
62 } 62 }
63 } 63 }
64 } 64 }
65 return remitosRes; 65 return remitosRes;
66 }, 66 },
67 getVehiculosByIdUsuario: function() { 67 getVehiculosByIdUsuario: function() {
68 return $http.get(url + '/vehiculo/usuario/' + this.idUsuario); 68 return $http.get(url + '/vehiculo/usuario/' + this.idUsuario);
69 }, 69 },
70 getUnidadesByFecha: function() { 70 getUnidadesByFecha: function() {
71 return $http.post(url + '/vehiculo/listar/fecha', 71 return $http.post(url + '/vehiculo/listar/fecha',
72 {fecha: this.fecha}); 72 {fecha: this.fecha});
73 }, 73 },
74 setFechaReparto: function(fechaReparto) { 74 setFechaReparto: function(fechaReparto) {
75 this.fecha = fechaReparto; 75 this.fecha = fechaReparto;
76 }, 76 },
77 obtenerVehiculoById: function(idVehiculo) { 77 obtenerVehiculoById: function(idVehiculo) {
78 return $http.get(url + '/vehiculo/' + idVehiculo); 78 return $http.get(url + '/vehiculo/' + idVehiculo);
79 } 79 }
80 }; 80 };
81 }]); 81 }]);
82 82