Commit 83ef82c677029418e5191fa207e9992ec000fd38
1 parent
1645741a50
Exists in
master
and in
2 other branches
cambios cantidad y otros en views
Showing
2 changed files
with
21 additions
and
18 deletions
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 = $scope.rellenar(hojaRuta.sucursal, 4); | |
9 | + $scope.comprobante = $scope.rellenar(hojaRuta.numeroHojaRuta, 8); | |
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); |
13 | + console.info(hojaRuta.remito); | |
14 | 14 | }); |
15 | 15 | $scope.cabecera = []; |
16 | 16 | $scope.showCabecera = true; |
... | ... | @@ -68,14 +68,14 @@ angular.module('focaHojaRuta') |
68 | 68 | // } |
69 | 69 | // } |
70 | 70 | |
71 | - function rellenar(relleno, longitud) { | |
71 | + $scope.rellenar = function(relleno, longitud) { | |
72 | 72 | relleno = '' + relleno; |
73 | 73 | while (relleno.length < longitud) { |
74 | 74 | relleno = '0' + relleno; |
75 | 75 | } |
76 | 76 | |
77 | 77 | return relleno; |
78 | - } | |
78 | + }; | |
79 | 79 | } |
80 | 80 | ]); |
81 | 81 |
src/views/lista-hoja-ruta.html
... | ... | @@ -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 | - <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> | |
66 | + <tr> | |
67 | + <th class="col">#</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">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="rellenar(remito.numeroRemito, 4) + '-' + rellenar(remito.numeroRemito, 8)" | |
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> |