Commit 092d40741a050f232a5c42cb2c31cebc8f03a1e5
1 parent
d9a84d9f88
Exists in
master
detalles para demo
Showing
8 changed files
with
24 additions
and
48 deletions
Show diff stats
gulpfile.js
src/js/app.js
src/js/controller.js
| ... | ... | @@ -260,9 +260,8 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo |
| 260 | 260 | } |
| 261 | 261 | return false; |
| 262 | 262 | } |
| 263 | - // TODO: descomentar en produccion | |
| 264 | - // $interval(function() { | |
| 265 | - // getSeguimiento(); | |
| 266 | - // }, 5000); | |
| 263 | + $interval(function() { | |
| 264 | + getSeguimiento(); | |
| 265 | + }, 5000); | |
| 267 | 266 | } |
| 268 | 267 | ]); |
src/js/controllerCerrarVehiculo.js
| ... | ... | @@ -16,9 +16,10 @@ angular.module('focaLogisticaPedidoRuta') |
| 16 | 16 | focaLogisticaPedidoRutaService.obtenerVehiculoById(idVehiculo).then(function(res) { |
| 17 | 17 | $scope.vehiculo = res.data; |
| 18 | 18 | }); |
| 19 | - focaLogisticaPedidoRutaService.getRemitos(idVehiculo).then(function(res) { | |
| 20 | - $scope.remitos = focaLogisticaPedidoRutaService.obtenerRemitosDeCarga(res.data); | |
| 21 | - }); | |
| 19 | + focaLogisticaPedidoRutaService.getRemitosByIdVehiculo(idVehiculo, 1, 1).then( | |
| 20 | + function(res) { | |
| 21 | + $scope.remitos = res.data; | |
| 22 | + }); | |
| 22 | 23 | focaLogisticaPedidoRutaService.numeroHojaRuta().then(function(res) { |
| 23 | 24 | $scope.sucursal = res.data.sucursal; |
| 24 | 25 | $scope.numero = res.data.numeroHojaRuta; |
src/js/osm-directive.js
| ... | ... | @@ -71,10 +71,10 @@ angular.module('focaLogisticaPedidoRuta').directive('focaLogistica', function() |
| 71 | 71 | } |
| 72 | 72 | $scope.markers.push( |
| 73 | 73 | L.marker( |
| 74 | - [marcador.latitud, marcador.longitud], | |
| 75 | - {icon: icon, draggable: true}) | |
| 74 | + [marcador.latitud, marcador.longitud], {icon: icon}) | |
| 76 | 75 | .addTo($scope.map) |
| 77 | 76 | .bindPopup(observacion) |
| 77 | + .bindTooltip('Haga click para seleccionar') | |
| 78 | 78 | ); |
| 79 | 79 | //abre marcador del primer punto |
| 80 | 80 | //$scope.markers[0].openPopup(); |
src/js/service.js
| ... | ... | @@ -33,36 +33,10 @@ angular.module('focaLogisticaPedidoRuta') |
| 33 | 33 | vehiculoSinRemitos: sinRemitos |
| 34 | 34 | }); |
| 35 | 35 | }, |
| 36 | - obtenerRemitosDeCarga: function(remitos) { | |
| 37 | - var remitosRes = []; | |
| 38 | - for(var i = 0; i < remitos.cisternas.length; i++) { | |
| 39 | - procesoCistena(remitos.cisternas[i], this.fecha.toISOString()); | |
| 40 | - } | |
| 41 | - function procesoCistena(cisterna, fecha) { | |
| 42 | - for(var j = 0; j < cisterna.cisternasCarga.length; j++) { | |
| 43 | - for(var k = 0; k < cisterna.cisternasCarga[j].cisternaMovimientos | |
| 44 | - .length; k++) | |
| 45 | - { | |
| 46 | - if(cisterna.cisternasCarga[j].fechaReparto.substring(0, 10) === | |
| 47 | - fecha.substring(0, 10)) | |
| 48 | - { | |
| 49 | - procesoMovimiento(cisterna.cisternasCarga[j] | |
| 50 | - .cisternaMovimientos[k]); | |
| 51 | - } | |
| 52 | - } | |
| 53 | - } | |
| 54 | - } | |
| 55 | - function procesoMovimiento(movimiento) { | |
| 56 | - if(!movimiento.anulado && movimiento.remito && | |
| 57 | - !movimiento.remito.idHojaRuta) { | |
| 58 | - var remito = movimiento.remito; | |
| 59 | - var yaEstaCargado = $filter('filter')(remitosRes, {id: remito.id}); | |
| 60 | - if(!yaEstaCargado.length && movimiento.metodo === 'carga') { | |
| 61 | - remitosRes.push(remito); | |
| 62 | - } | |
| 63 | - } | |
| 64 | - } | |
| 65 | - return remitosRes; | |
| 36 | + getRemitosByIdVehiculo: function(idVehiculo, sinConfirmar, sinHojaRuta) { | |
| 37 | + return $http.get(url + '/vehiculo/obtener/remitos/' + | |
| 38 | + idVehiculo + '/' + this.fecha.toISOString().substring(0, 10) + | |
| 39 | + '/' + sinConfirmar + '/' + sinHojaRuta); | |
| 66 | 40 | }, |
| 67 | 41 | getVehiculosByIdUsuario: function() { |
| 68 | 42 | return $http.get(url + '/vehiculo/usuario/' + this.idUsuario); |
src/views/foca-logistica-pedido-ruta.html
| ... | ... | @@ -105,7 +105,12 @@ |
| 105 | 105 | <span class="progress-right"> |
| 106 | 106 | <span class="progress-bar"></span> |
| 107 | 107 | </span> |
| 108 | - <div class="progress-value">{{vehiculo.codigo}}</div> | |
| 108 | + <div class="progress-value">{{vehiculo.codigo}} | |
| 109 | + <br> | |
| 110 | + <small> | |
| 111 | + {{vehiculo.transportista.NOM.trim()}} | |
| 112 | + </small> | |
| 113 | + </div> | |
| 109 | 114 | </div> |
| 110 | 115 | </div> |
| 111 | 116 | <div class="row ml-2"> |
| ... | ... | @@ -115,7 +120,7 @@ |
| 115 | 120 | width="100%"> |
| 116 | 121 | </div> |
| 117 | 122 | <div class="col-3" |
| 118 | - uib-tooltip="Cerrar distribuición" | |
| 123 | + uib-tooltip="Confirmar distribuición" | |
| 119 | 124 | ng-click="hacerHojaRuta(vehiculo)"></div> |
| 120 | 125 | <div class="col-3"> |
| 121 | 126 | <i |
src/views/foca-modal-cerrar-vehiculo.html
| 1 | 1 | <div class="modal-header"> |
| 2 | - <h4>Cerrar distribución vehículo</h4> | |
| 2 | + <h4>Confirmar distribución vehículo</h4> | |
| 3 | 3 | <div class="row"> |
| 4 | 4 | <div class="col-6 row"> |
| 5 | 5 | <label class="col-3 mt-2">Fecha:</label> |
| ... | ... | @@ -65,7 +65,8 @@ |
| 65 | 65 | type="checkbox" |
| 66 | 66 | ng-model="remito.checked" |
| 67 | 67 | class="custom-control-input" |
| 68 | - id="{{remito.id}}"> | |
| 68 | + id="{{remito.id}}" | |
| 69 | + ng-disabled="remito.idHojaRuta"> | |
| 69 | 70 | <label class="custom-control-label" for="{{remito.id}}"></label> |
| 70 | 71 | </div> |
| 71 | 72 | </td> |