Commit a9c8c8f443221845af89548b7adcd5ddd7853de2
1 parent
e4c0f65364
Exists in
master
and in
2 other branches
Cambio de imagen en Fecha Entrega
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/js/service.js
| 1 | angular.module('focaCrearHojaRuta') | 1 | angular.module('focaCrearHojaRuta') |
| 2 | .service('focaCrearHojaRutaService', ['$http', 'API_ENDPOINT', | 2 | .service('focaCrearHojaRutaService', ['$http', 'API_ENDPOINT', |
| 3 | function($http, API_ENDPOINT) { | 3 | function($http, API_ENDPOINT) { |
| 4 | var route = API_ENDPOINT.URL; | 4 | var route = API_ENDPOINT.URL; |
| 5 | return { | 5 | return { |
| 6 | crearHojaRuta: function(hojaRuta) { | 6 | crearHojaRuta: function(hojaRuta) { |
| 7 | return $http.post(route + '/hoja-ruta', hojaRuta); | 7 | return $http.post(route + '/hoja-ruta', hojaRuta); |
| 8 | }, | 8 | }, |
| 9 | obtenerHojaRuta: function() { | 9 | obtenerHojaRuta: function() { |
| 10 | return $http.get(route +'/hoja-ruta'); | 10 | return $http.get(route +'/hoja-ruta'); |
| 11 | }, | 11 | }, |
| 12 | setHojaRuta: function(hojaRuta) { | 12 | setHojaRuta: function(hojaRuta) { |
| 13 | this.hojaRuta = hojaRuta; | 13 | this.hojaRuta = hojaRuta; |
| 14 | }, | 14 | }, |
| 15 | clearHojaRuta: function() { | 15 | clearHojaRuta: function() { |
| 16 | this.hojaRuta = undefined; | 16 | this.hojaRuta = undefined; |
| 17 | }, | 17 | }, |
| 18 | getHojaRuta: function() { | 18 | getHojaRuta: function() { |
| 19 | return this.hojaRuta; | 19 | return this.hojaRuta; |
| 20 | }, | 20 | }, |
| 21 | getArticulosByIdHojaRuta: function(id) { | 21 | getArticulosByIdHojaRuta: function(id) { |
| 22 | return $http.get(route+'/articulos/hoja-ruta/'+id); | 22 | return $http.get(route+'/articulos/hoja-ruta/'+id); |
| 23 | }, | 23 | }, |
| 24 | crearArticulosParaHojaRuta: function(articuloHojaRuta) { | 24 | crearArticulosParaHojaRuta: function(articuloHojaRuta) { |
| 25 | return $http.post(route + '/articulos/hoja-ruta', | 25 | return $http.post(route + '/articulos/hoja-ruta', |
| 26 | {articuloHojaRuta: articuloHojaRuta}); | 26 | {articuloHojaRuta: articuloHojaRuta}); |
| 27 | }, | 27 | }, |
| 28 | getDomiciliosByIdHojaRuta: function(id) { | 28 | getDomiciliosByIdHojaRuta: function(id) { |
| 29 | return $http.get(route +'/hoja-ruta/' + id + '/domicilios'); | 29 | return $http.get(route +'/hoja-ruta/' + id + '/domicilios'); |
| 30 | }, | 30 | }, |
| 31 | getDomiciliosByIdCliente: function(id) { | 31 | getDomiciliosByIdCliente: function(id) { |
| 32 | var idTipoEntrega = 2;//Solo traigo los domicilios que tienen tipo 2 (tipo entrega) | 32 | var idTipoEntrega = 2;//Solo traigo los domicilios que tienen tipo 2 (tipo entrega) |
| 33 | return $http.get(route + '/domicilio/tipo/' + idTipoEntrega + '/cliente/' + id ); | 33 | return $http.get(route + '/domicilio/tipo/' + idTipoEntrega + '/cliente/' + id ); |
| 34 | }, | 34 | }, |
| 35 | getPrecioCondicion: function() { | 35 | getPrecioCondicion: function() { |
| 36 | return $http.get(route + '/precio-condicion'); | 36 | return $http.get(route + '/precio-condicion'); |
| 37 | }, | 37 | }, |
| 38 | getPrecioCondicionById: function(id) { | 38 | getPrecioCondicionById: function(id) { |
| 39 | return $http.get(route + '/precio-condicion/' + id); | 39 | return $http.get(route + '/precio-condicion/' + id); |
| 40 | }, | 40 | }, |
| 41 | getPlazoPagoByPrecioCondicion: function(id) { | 41 | getPlazoPagoByPrecioCondicion: function(id) { |
| 42 | return $http.get(route + '/plazo-pago/precio-condicion/' + id); | 42 | return $http.get(route + '/plazo-pago/precio-condicion/' + id); |
| 43 | }, | 43 | }, |
| 44 | crearFlete: function(flete) { | 44 | crearFlete: function(flete) { |
| 45 | return $http.post(route + '/flete', {flete : flete}); | 45 | return $http.post(route + '/flete', {flete : flete}); |
| 46 | }, | 46 | }, |
| 47 | crearPlazosParaHojaRuta: function(plazos) { | 47 | crearPlazosParaHojaRuta: function(plazos) { |
| 48 | return $http.post(route + '/plazo-pago/hoja-ruta', plazos); | 48 | return $http.post(route + '/plazo-pago/hoja-ruta', plazos); |
| 49 | }, | 49 | }, |
| 50 | getCotizacionByIdMoneda: function(id) { | 50 | getCotizacionByIdMoneda: function(id) { |
| 51 | return $http.get(route + '/moneda/' + id); | 51 | return $http.get(route + '/moneda/' + id); |
| 52 | }, | 52 | }, |
| 53 | crearEstadoParaHojaRuta: function(estado) { | 53 | crearEstadoParaHojaRuta: function(estado) { |
| 54 | return $http.post(route + '/estado', {estado: estado}); | 54 | return $http.post(route + '/estado', {estado: estado}); |
| 55 | }, | 55 | }, |
| 56 | getNumeroHojaRuta: function() { | 56 | getNumeroHojaRuta: function() { |
| 57 | return $http.get(route + '/hoja-ruta/numero-siguiente'); | 57 | return $http.get(route + '/hoja-ruta/numero-siguiente'); |
| 58 | }, | 58 | }, |
| 59 | getRemitosByIdVehiculo: function(idVehiculo, fechaReparto, sinConfirmar) { | 59 | getRemitosByIdVehiculo: function(idVehiculo, fechaReparto, sinConfirmar) { |
| 60 | var noCofirmados = sinConfirmar ? '/sinConfirmar' : ''; | 60 | var noCofirmados = sinConfirmar ? '/sinConfirmar' : ''; |
| 61 | return $http.get(route + '/vehiculo/obtener/remitos/' + | 61 | return $http.get(route + '/vehiculo/obtener/remitos/' + |
| 62 | idVehiculo + '/' + fechaReparto.toISOString().substring(0, 10) + noCofirmados); | 62 | idVehiculo + '/' + fechaReparto.toISOString().substring(0, 10) + noCofirmados); |
| 63 | }, | 63 | }, |
| 64 | desasociarRemitos: function(idsRemitos, idVehiculo, sinRemitos) { | 64 | desasociarRemitos: function(idsRemitos, idVehiculo, sinRemitos) { |
| 65 | return $http.post(route + '/vehiculo/desasociar-remitos', | 65 | return $http.post(route + '/vehiculo/desasociar-remitos', |
| 66 | { | 66 | { |
| 67 | idsRemitos: idsRemitos, | 67 | idsRemitos: idsRemitos, |
| 68 | idVehiculo: idVehiculo, | 68 | idVehiculo: idVehiculo, |
| 69 | vehiculoSinRemitos: sinRemitos | 69 | vehiculoSinRemitos: sinRemitos |
| 70 | }); | 70 | }); |
| 71 | }, | 71 | }, |
| 72 | getParametros: function() { | 72 | getParametros: function() { |
| 73 | return $http.get(API_ENDPOINT.URL + '/parametros/hojaRuta'); | 73 | return $http.get(API_ENDPOINT.URL + '/parametros/hojaRuta'); |
| 74 | }, | 74 | }, |
| 75 | getBotonera: function() { | 75 | getBotonera: function() { |
| 76 | return [ | 76 | return [ |
| 77 | { | 77 | { |
| 78 | label: 'Fecha Entrega', | 78 | label: 'Fecha Entrega', |
| 79 | image: 'fechaDeReparto.png' | 79 | image: 'FechaEntrega.png' |
| 80 | }, | 80 | }, |
| 81 | { | 81 | { |
| 82 | label: 'Transportista', | 82 | label: 'Transportista', |
| 83 | image: 'transportista.png' | 83 | image: 'transportista.png' |
| 84 | }, | 84 | }, |
| 85 | { | 85 | { |
| 86 | label: 'Chofer', | 86 | label: 'Chofer', |
| 87 | image: 'chofer.png' | 87 | image: 'chofer.png' |
| 88 | }, | 88 | }, |
| 89 | { | 89 | { |
| 90 | label: 'Vehiculo', | 90 | label: 'Vehiculo', |
| 91 | image: 'vehiculos.png' | 91 | image: 'vehiculos.png' |
| 92 | }, | 92 | }, |
| 93 | { | 93 | { |
| 94 | label: 'Tarifario', | 94 | label: 'Tarifario', |
| 95 | image: 'tarifario.png' | 95 | image: 'tarifario.png' |
| 96 | }, | 96 | }, |
| 97 | { | 97 | { |
| 98 | label: 'Remitos', | 98 | label: 'Remitos', |
| 99 | image: 'remito.png' | 99 | image: 'remito.png' |
| 100 | }, | 100 | }, |
| 101 | { | 101 | { |
| 102 | label: 'Vehiculos precargados', | 102 | label: 'Vehiculos precargados', |
| 103 | image: 'vehiculos.png' | 103 | image: 'vehiculos.png' |
| 104 | }, | 104 | }, |
| 105 | { | 105 | { |
| 106 | label: 'Datos extra', | 106 | label: 'Datos extra', |
| 107 | image: 'tarifario.png' | 107 | image: 'tarifario.png' |
| 108 | } | 108 | } |
| 109 | ]; | 109 | ]; |
| 110 | } | 110 | } |
| 111 | }; | 111 | }; |
| 112 | }]); | 112 | }]); |
| 113 | 113 |