Commit 5fa8100a871a40c7c24e361ed22a81004ad44cbc

Authored by Eric Fernandez
1 parent ec43821953
Exists in master

ver detalle de carga

src/js/controller.js
... ... @@ -38,7 +38,12 @@ angular.module('focaLogisticaPedidoRuta') .controller('focaLogisticaPedidoRutaCo
38 38 };
39 39  
40 40 $scope.cargar = function(idVehiculo, punto) {
41   - var idRemito = JSON.parse(punto).notaPedido.remito.id;
  41 + var idRemito;
  42 + if (punto === -1) {
  43 + idRemito = -1;
  44 + }else {
  45 + idRemito = JSON.parse(punto).notaPedido.remito.id;
  46 + }
42 47 var modalInstance = $uibModal.open(
43 48 {
44 49 ariaLabelledBy: 'Busqueda de Vehiculo',
src/js/controllerDetalleVehiculo.js
... ... @@ -11,6 +11,7 @@ angular.module('focaLogisticaPedidoRuta')
11 11 focaLogisticaPedidoRutaService
12 12 ) {
13 13 //seteo variables
  14 + $scope.idRemito = idRemito;
14 15 $scope.articulos = [];
15 16 $scope.vehiculo = {};
16 17 $scope.remito = {};
... ... @@ -21,16 +22,18 @@ angular.module('focaLogisticaPedidoRuta')
21 22 $scope.vehiculo = res.data;
22 23 }
23 24 );
24   - focaLogisticaPedidoRutaService.obtenerRemitoById(idRemito).then(
25   - function(res) {
26   - $scope.remito = res.data;
27   - if($scope.remito.idUsuarioProceso) {
28   - focaModalService.alert('El remito esta siendo cargado por otro usario');
29   - $uibModalInstance.close();
  25 + if (idRemito !== -1) {
  26 + focaLogisticaPedidoRutaService.obtenerRemitoById(idRemito).then(
  27 + function(res) {
  28 + $scope.remito = res.data;
  29 + if($scope.remito.idUsuarioProceso) {
  30 + focaModalService.alert('El remito esta siendo cargado por otro usario');
  31 + $uibModalInstance.close();
  32 + }
  33 + $scope.articulos = res.data.articulosRemito;
30 34 }
31   - $scope.articulos = res.data.articulosRemito;
32   - }
33   - );
  35 + );
  36 + }
34 37 $scope.aceptar = function() {
35 38 $scope.cargando = true;
36 39 var cisternaCargas = [];
src/js/osm-directive.js
... ... @@ -42,12 +42,6 @@ angular.module('focaLogisticaPedidoRuta').directive('focaLogistica', function()
42 42 observacion += '<br/>Distancia a casa central: ' +
43 43 marcador.distancia + 'km';
44 44 }
45   - // }else {
46   - // observacion += 'Cantidad de remitos: ' +
47   - // marcador.cantidad + '<br/>';
48   - // observacion += 'Total Vendido: ' +
49   - // $filter('currency')(marcador.total, '$');
50   - // }
51 45 observacion += '<br/>';
52 46 observacion += '<i class="fa fa-map-marker fa-3x" aria-hidden="true"'+
53 47 'class="form-control" ondragend="dropEnd()" ondragstart=\'drag(event, '+
src/views/foca-detalle-vehiculo.html
... ... @@ -3,16 +3,18 @@
3 3 Vehículo <strong ng-bind="vehiculo.tractor"></strong>
4 4 Transportista <strong ng-bind="vehiculo.transportista.NOM"></strong>
5 5 <br>
6   - Remito Nº
7   - <strong ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"></strong>
8   - , Cliente
9   - <strong ng-bind="remito.nombreCliente"></strong>
10   - , Domicilio
11   - <strong ng-bind="remito.domicilioStamp"></strong>
  6 + <div ng-show="idRemito !== -1">
  7 + <span>Remito Nº</span>
  8 + <strong ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"></strong>
  9 + <span>, Cliente</span>
  10 + <strong ng-bind="remito.nombreCliente"></strong>
  11 + <span>, Domicilio</span>
  12 + <strong ng-bind="remito.domicilioStamp"></strong>
  13 + </div>
12 14 </div>
13 15 <div class="modal-body">
14 16 <div>
15   - <table class="table table-sm">
  17 + <table class="table table-sm" ng-show="idRemito !== -1">
16 18 <thead>
17 19 <tr>
18 20 <th></th>
src/views/foca-logistica-pedido-ruta.html
... ... @@ -52,6 +52,12 @@
52 52 foca-focus="idVendedor == -1"
53 53 >
54 54 </div>
  55 + <div>
  56 + <img src="img/marker-icon-2x-blue.png">
  57 + <strong>Asignado</strong>
  58 + <img src="img/marker-icon-2x-red.png">
  59 + <strong>Sin asignar</strong>
  60 + </div>
55 61 </div>
56 62 <div class="row">
57 63 <div
... ... @@ -71,15 +77,22 @@
71 77 <div class="progress-value">{{vehiculo.codigo}}</div>
72 78 </div>
73 79 </div>
74   - <div class="row px-4">
75   - <div class="text-left col-6 ml-1 position-absolute">
  80 + <div class="row col-5">
  81 + <div class="col-4">
76 82 <img
77 83 src="img/hojaRutaVolante.png"
78   - width="34%"
  84 + width="80%%"
79 85 uib-tooltip="Confeccionar hoja de ruta"
80 86 ng-click="hacerHojaRuta(vehiculo)">
81 87 </div>
82   - <div class="text-right ml-5 col-6 position-absolute">
  88 + <div class="col-4">
  89 + <i
  90 + class="fa fa-eye fa-2x"
  91 + uib-tooltip="Ver cisternas"
  92 + ng-click="cargar(vehiculo.id, -1)">
  93 + </i>
  94 + </div>
  95 + <div class="col-4">
83 96 <i
84 97 class="fa fa-trash fa-2x"
85 98 uib-tooltip="Eliminar vehiculo"
... ... @@ -87,7 +100,7 @@
87 100 </div>
88 101 </div>
89 102 <div
90   - class="col-12 mt-5 border border-dark text-center"
  103 + class="col-4 ml-1 border border-dark text-center"
91 104 ng-show="arrastrando"
92 105 id="{{vehiculo.id}}"
93 106 ondrop="drop(event)"