Commit d04993a93d34f31035edf271a1d9da82e7a0ec1f
Exists in
master
and in
2 other branches
Merge branch 'master' into 'master'
Master See merge request modulos-npm/foca-hoja-ruta!12
Showing
2 changed files
Show diff stats
src/js/controller.js
1 | 1 | angular.module('focaHojaRuta') |
2 | 2 | .controller('listaHojaRutaCtrl', |
3 | - [ | |
4 | - '$scope', '$filter', '$uibModal', 'hojaRutaService', 'focaSeguimientoService', | |
3 | + ['$scope', '$filter', '$uibModal', 'hojaRutaService', 'focaSeguimientoService', | |
5 | 4 | function($scope, $filter, $uibModal, hojaRutaService, focaSeguimientoService) { |
6 | 5 | hojaRutaService.getHojasRuta().then(function(res) { |
7 | 6 | var hojaRuta = res.data.pop(); |
8 | 7 | $scope.hojasRuta = hojaRuta; |
9 | - $scope.puntoVenta = rellenar(hojaRuta.sucursal, 4); | |
10 | - $scope.comprobante = rellenar(hojaRuta.numeroHojaRuta, 8); | |
8 | + $scope.puntoVenta = hojaRuta.sucursal; | |
9 | + $scope.comprobante = hojaRuta.numeroHojaRuta; | |
11 | 10 | addCabecera('Transportista:', hojaRuta.transportista[0].nombre); |
12 | 11 | addCabecera('Chofer:', hojaRuta.chofer[0].nombre); |
13 | 12 | addCabecera('Vehículo:', hojaRuta.vehiculo[0].tractor); |
... | ... | @@ -75,14 +74,14 @@ angular.module('focaHojaRuta') |
75 | 74 | // } |
76 | 75 | // } |
77 | 76 | |
78 | - function rellenar(relleno, longitud) { | |
77 | + $scope.rellenar = function(relleno, longitud) { | |
79 | 78 | relleno = '' + relleno; |
80 | 79 | while (relleno.length < longitud) { |
81 | 80 | relleno = '0' + relleno; |
82 | 81 | } |
83 | 82 | |
84 | 83 | return relleno; |
85 | - } | |
84 | + }; | |
86 | 85 | } |
87 | 86 | ]); |
88 | 87 |
src/views/lista-hoja-ruta.html
... | ... | @@ -6,8 +6,8 @@ |
6 | 6 | <div class="col-12 col-sm-4 nota-pedido"> |
7 | 7 | <h5>Hojas de ruta</h5> |
8 | 8 | </div> |
9 | - <div class="col-5 col-sm-4 numero-pedido" | |
10 | - >Nº {{puntoVenta}}-{{comprobante}} | |
9 | + <div class="col-5 col-sm-4 numero-pedido"> | |
10 | + Nº <span ng-bind="[puntoVenta, comprobante] | comprobante"></span> | |
11 | 11 | </div> |
12 | 12 | <div class="col-7 col-sm-4 text-right"> |
13 | 13 | Fecha: |
... | ... | @@ -60,28 +60,30 @@ |
60 | 60 | </div> |
61 | 61 | </div> |
62 | 62 | <div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2"> |
63 | - <div class="row grilla-articulo d-sm-flex"> | |
63 | + <div class="row grilla-articulo"> | |
64 | 64 | <table class="table tabla-articulo table-striped table-sm table-dark"> |
65 | 65 | <thead> |
66 | 66 | <tr class="d-flex"> |
67 | - <th>#</th> | |
68 | - <th>Razon Social</th> | |
69 | - <th>Domicilio</th> | |
70 | - <th>#Remito</th> | |
71 | - <th>Litros</th> | |
72 | - <th></th> | |
67 | + <th class="col-auto">#</th> | |
68 | + <th class="col">Número</th> | |
69 | + <th class="col">Razon Social</th> | |
70 | + <th class="col">Domicilio</th> | |
71 | + <th class="col text-right">Cantidad</th> | |
72 | + <th style="width: 50px"> </th> | |
73 | 73 | </tr> |
74 | 74 | </thead> |
75 | 75 | <tbody class="tabla-articulo-body"> |
76 | 76 | <tr |
77 | - ng-repeat="(key, remito) in hojasRuta.remito" class="d-flex" | |
77 | + ng-repeat="(key, remito) in hojasRuta.remito" | |
78 | 78 | > |
79 | 79 | <td ng-bind="key + 1"></td> |
80 | + <td | |
81 | + ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante" | |
82 | + ></td> | |
80 | 83 | <td ng-bind="remito.nombreCliente"></td> |
81 | 84 | <td ng-bind="remito.domicilioStamp"></td> |
82 | - <td ng-bind="remito.numeroRemito"></td> | |
83 | - <td ng-bind="remito.remitoCarga"></td> | |
84 | - <td> | |
85 | + <td ng-bind="remito.carga"></td> | |
86 | + <td > | |
85 | 87 | <button |
86 | 88 | class="btn btn-secondary" |
87 | 89 | type="button" |
... | ... | @@ -92,6 +94,7 @@ |
92 | 94 | </tr> |
93 | 95 | </tbody> |
94 | 96 | </table> |
97 | + | |
95 | 98 | </div> |
96 | 99 | </div> |
97 | 100 | </div> |