Commit b9513452f3ed3b72bbd0118ce5e2d035f3313ad4
1 parent
6b9369a8dc
Exists in
master
Agregado modal para seleccionar una hoja de ruta.
Showing
3 changed files
with
71 additions
and
41 deletions
Show diff stats
src/js/controller.js
1 | angular.module('focaHojaRuta') | 1 | angular.module('focaHojaRuta') |
2 | .controller('listaHojaRutaCtrl', | 2 | .controller('listaHojaRutaCtrl', |
3 | [ | 3 | [ |
4 | '$scope', '$location', '$filter', '$uibModal', 'hojaRutaService', | 4 | '$scope', '$location', '$filter', '$uibModal', 'hojaRutaService', |
5 | 'focaLoginService', 'focaModalService', '$rootScope', '$localStorage', | 5 | 'focaLoginService', 'focaModalService', '$rootScope', '$localStorage', |
6 | function ($scope, $location, $filter, $uibModal, hojaRutaService, | 6 | function ($scope, $location, $filter, $uibModal, hojaRutaService, |
7 | focaLoginService, focaModalService, $rootScope, $localStorage) { | 7 | focaLoginService, focaModalService, $rootScope, $localStorage) { |
8 | 8 | ||
9 | var loginData = focaLoginService.getLoginData(); | 9 | var loginData = focaLoginService.getLoginData(); |
10 | config(); | 10 | config(); |
11 | init(); | 11 | init(); |
12 | function config() { | 12 | function config() { |
13 | $scope.cabecera = []; | 13 | $scope.cabecera = []; |
14 | $scope.showCabecera = true; | 14 | $scope.showCabecera = true; |
15 | $scope.now = new Date(); | 15 | $scope.now = new Date(); |
16 | $scope.puntoVenta = '0000'; | 16 | $scope.puntoVenta = '0000'; |
17 | $scope.comprobante = '00000000'; | 17 | $scope.comprobante = '00000000'; |
18 | } | 18 | } |
19 | function init() { | 19 | function init() { |
20 | $scope.showLoading = true; | ||
20 | hojaRutaService.getHojaRuta(loginData.chofer) | 21 | hojaRutaService.getHojaRuta(loginData.chofer) |
21 | .then(function (res) { | 22 | .then(function (res) { |
22 | if (res.data) { | 23 | console.log(res.data); |
23 | var hojaRuta = res.data; | 24 | abrilModalHojasDeRuta(res.data); |
25 | }); | ||
26 | } | ||
27 | function abrilModalHojasDeRuta(hojasDeRuta) { | ||
28 | hojasDeRuta.forEach(function (hojaRuta) { | ||
29 | hojaRuta.comprobante = (hojaRuta.abierta ? 'RA ' : '') + | ||
30 | $filter('comprobante') | ||
31 | ([hojaRuta.sucursal, hojaRuta.numeroHojaRuta]); | ||
32 | }); | ||
33 | $scope.showLoading = false; | ||
34 | focaModalService.modal(parametrosModalHojasDeRuta(hojasDeRuta)) | ||
35 | .then(function (hojaRuta) { | ||
36 | console.log(hojaRuta); | ||
37 | if (hojaRuta) { | ||
24 | $scope.hojaRuta = hojaRuta; | 38 | $scope.hojaRuta = hojaRuta; |
25 | $scope.puntoVenta = hojaRuta.sucursal; | 39 | $scope.puntoVenta = hojaRuta.sucursal; |
26 | $scope.comprobante = hojaRuta.numeroHojaRuta; | 40 | $scope.comprobante = hojaRuta.numeroHojaRuta; |
27 | addCabecera('Transportista:', hojaRuta.transportista.NOM); | 41 | addCabecera('Transportista:', hojaRuta.transportista.NOM); |
28 | addCabecera('Chofer:', hojaRuta.chofer.nombre); | 42 | addCabecera('Chofer:', hojaRuta.chofer.nombre); |
29 | addCabecera('Vehículo:', hojaRuta.vehiculo.tractor); | 43 | addCabecera('Vehículo:', hojaRuta.vehiculo.tractor); |
44 | $localStorage.hojaRuta = JSON.stringify($scope.hojaRuta); | ||
30 | } else { | 45 | } else { |
31 | focaModalService.alert('Sin hoja de ruta asignada'); | 46 | focaModalService.alert('Sin hoja de ruta asignada'); |
32 | $location.path('/'); | 47 | $location.path('/'); |
33 | } | 48 | } |
34 | watch(); | 49 | // if (!$scope.estadoRed) { |
35 | if (!$scope.estadoRed) { | 50 | // getLSHojaRuta(); |
36 | getLSHojaRuta(); | 51 | // } |
37 | } | 52 | }) |
53 | .catch(function (e) { | ||
54 | console.log(e); | ||
55 | $location.path('/'); | ||
38 | }); | 56 | }); |
39 | } | 57 | } |
40 | function watch() { | 58 | $scope.$watch('hojaRuta', function (nuevoValor) { |
41 | $scope.$watch('hojaRuta', function (nuevoValor) { | 59 | $localStorage.hojaRuta = JSON.stringify(nuevoValor); |
42 | $localStorage.hojaRuta = JSON.stringify(nuevoValor); | 60 | }, true); |
43 | }, true); | ||
44 | } | ||
45 | $scope.verDetalle = function (remito) { | 61 | $scope.verDetalle = function (remito) { |
46 | var modalInstance = $uibModal.open( | 62 | var modalInstance = $uibModal.open( |
47 | { | 63 | { |
48 | ariaLabelledBy: 'Detalle hoja ruta', | 64 | ariaLabelledBy: 'Detalle hoja ruta', |
49 | templateUrl: 'modal-detalle-hoja-ruta.html', | 65 | templateUrl: 'modal-detalle-hoja-ruta.html', |
50 | controller: 'focaModalDetalleHojaRutaController', | 66 | controller: 'focaModalDetalleHojaRutaController', |
51 | resolve: { | 67 | resolve: { |
52 | parametros: { | 68 | parametros: { |
53 | remito: remito, | 69 | remito: remito, |
54 | } | 70 | } |
55 | }, | 71 | }, |
56 | size: 'lg' | 72 | size: 'lg' |
57 | } | 73 | } |
58 | ); | 74 | ); |
59 | modalInstance.result | 75 | modalInstance.result |
60 | .then(function (data) { | 76 | .then(function (data) { console.log(data); }) |
61 | //funcion se ejecuta cuando se carga pantalla | ||
62 | console.log(data); | ||
63 | }) | ||
64 | .catch(function (e) { console.info(e); }); | 77 | .catch(function (e) { console.info(e); }); |
65 | }; | 78 | }; |
66 | $scope.rellenar = function (relleno, longitud) { | ||
67 | relleno = '' + relleno; | ||
68 | while (relleno.length < longitud) { | ||
69 | relleno = '0' + relleno; | ||
70 | } | ||
71 | |||
72 | return relleno; | ||
73 | }; | ||
74 | $scope.salir = function () { | 79 | $scope.salir = function () { |
75 | $location.path('/'); | 80 | $location.path('/'); |
76 | }; | 81 | }; |
77 | $scope.terminarHojaRuta = function () { | 82 | $scope.terminarHojaRuta = function () { |
78 | focaModalService | 83 | focaModalService |
79 | .confirm('¿Desea terminar la hoja de ruta? No podra realizar ninguna ' + | 84 | .confirm('¿Desea terminar la hoja de ruta? No podra realizar ninguna ' + |
80 | 'otra descarga ni modificación') | 85 | 'otra descarga ni modificación') |
81 | .then(function () { $scope.datosExtraCierre(terminar); }); | 86 | .then(function () { $scope.datosExtraCierre(terminar); }) |
87 | .catch(function (e) { console.log('Modal ', e); }); | ||
82 | function terminar(datosExtraCierre) { | 88 | function terminar(datosExtraCierre) { |
83 | $scope.hojaRuta = angular.extend({}, $scope.hojaRuta, datosExtraCierre); | 89 | $scope.hojaRuta = angular.extend({}, $scope.hojaRuta, datosExtraCierre); |
84 | //limpio objeto para guardar | 90 | //limpio objeto para guardar |
85 | delete $scope.hojaRuta.chofer; | 91 | delete $scope.hojaRuta.chofer; |
86 | delete $scope.hojaRuta.remitos; | 92 | delete $scope.hojaRuta.remitos; |
87 | delete $scope.hojaRuta.transportista; | 93 | delete $scope.hojaRuta.transportista; |
88 | delete $scope.hojaRuta.vehiculo; | 94 | delete $scope.hojaRuta.vehiculo; |
89 | 95 | ||
90 | $scope.hojaRuta.fechaCreacion = | 96 | $scope.hojaRuta.fechaCreacion = |
91 | $scope.hojaRuta.fechaCreacion.slice(0, 19).replace('T', ' '); | 97 | $scope.hojaRuta.fechaCreacion.slice(0, 19).replace('T', ' '); |
92 | $scope.hojaRuta.fechaReparto = | 98 | $scope.hojaRuta.fechaReparto = |
93 | $scope.hojaRuta.fechaReparto.slice(0, 19).replace('T', ' '); | 99 | $scope.hojaRuta.fechaReparto.slice(0, 19).replace('T', ' '); |
94 | $scope.hojaRuta.estado = 2; | 100 | $scope.hojaRuta.estado = 2; |
95 | hojaRutaService.terminarHojaRuta($scope.hojaRuta).then( | 101 | hojaRutaService.terminarHojaRuta($scope.hojaRuta).then( |
96 | function () { | 102 | function () { |
97 | focaModalService.alert( | 103 | focaModalService.alert( |
98 | 'Hoja de ruta ' + | 104 | 'Hoja de ruta ' + |
99 | $filter('comprobante')([$scope.puntoVenta, | 105 | $filter('comprobante')([$scope.puntoVenta, |
100 | $scope.comprobante]) + ' cerrada con éxito'); | 106 | $scope.comprobante]) + ' cerrada con éxito'); |
101 | $location.path('/'); | 107 | $location.path('/'); |
102 | } | 108 | } |
103 | ); | 109 | ); |
104 | } | 110 | } |
105 | }; | 111 | }; |
106 | $scope.datosExtraCierre = function (terminar) { | 112 | $scope.datosExtraCierre = function (terminar) { |
107 | var modalInstance = $uibModal.open( | 113 | var modalInstance = $uibModal.open( |
108 | { | 114 | { |
109 | templateUrl: 'focaDatosExtra.html', | 115 | templateUrl: 'focaDatosExtra.html', |
110 | controller: 'focaModalDatosExtraCierre', | 116 | controller: 'focaModalDatosExtraCierre', |
111 | } | 117 | } |
112 | ); | 118 | ); |
113 | modalInstance.result.then(terminar); | 119 | modalInstance.result.then(terminar); |
114 | }; | 120 | }; |
115 | $scope.modalDescargas = function () { | 121 | $scope.modalDescargas = function () { |
116 | delete $scope.hojaRuta.remitos[0].cliente; | 122 | delete $scope.hojaRuta.remitos[0].cliente; |
117 | var remito = $scope.hojaRuta.remitos[0]; | 123 | var remito = $scope.hojaRuta.remitos[0]; |
118 | var msg = ''; | 124 | var msg = ''; |
119 | var mostrarMensaje = true; | 125 | var mostrarMensaje = true; |
120 | for (var i = 0; i < remito.cisternas.length; i++) { | 126 | for (var i = 0; i < remito.cisternas.length; i++) { |
121 | if (remito.cisternas[i].cisternaCarga.cantidad <= 0) | 127 | if (remito.cisternas[i].cisternaCarga.cantidad <= 0) |
122 | msg += 'Cisterna ' + remito.cisternas[i].cisternaCarga.articulo.DetArt + | 128 | msg += 'Cisterna ' + remito.cisternas[i].cisternaCarga.articulo.DetArt + |
123 | ' esta vacía.\n'; | 129 | ' esta vacía.\n'; |
124 | else | 130 | else |
125 | mostrarMensaje = false; | 131 | mostrarMensaje = false; |
126 | } | 132 | } |
127 | if (mostrarMensaje === true) { | 133 | if (mostrarMensaje === true) { |
128 | focaModalService.alert(msg); | 134 | focaModalService.alert(msg); |
129 | return; | 135 | return; |
130 | } | 136 | } |
131 | var modalInstance = $uibModal.open( | 137 | var modalInstance = $uibModal.open( |
132 | { | 138 | { |
133 | templateUrl: 'foca-modal-descarga.html', | 139 | templateUrl: 'foca-modal-descarga.html', |
134 | controller: 'focaModalDescargaCtrl', | 140 | controller: 'focaModalDescargaCtrl', |
135 | resolve: { | 141 | resolve: { |
136 | remito: function () { return remito; } | 142 | remito: function () { return remito; } |
137 | }, | 143 | }, |
138 | } | 144 | } |
139 | ); | 145 | ); |
140 | modalInstance.result.then(function (data) { | 146 | modalInstance.result.then(function (data) { |
141 | console.log(data); | 147 | console.log(data); |
142 | }); | 148 | }); |
143 | }; | 149 | }; |
144 | $scope.articulosDescargados = function (articulosRemito) { | 150 | $scope.articulosDescargados = function (articulosRemito) { |
145 | for (var i = 0; i < articulosRemito.length; i++) { | 151 | for (var i = 0; i < articulosRemito.length; i++) { |
146 | if (articulosRemito[i].cantidadDescargada > 0) continue; | 152 | if (articulosRemito[i].cantidadDescargada > 0) continue; |
147 | else return false; | 153 | else return false; |
148 | } | 154 | } |
149 | return true; | 155 | return true; |
150 | }; | 156 | }; |
151 | $scope.estaPendiente = function () { | 157 | $scope.estaPendiente = function () { |
158 | if ($scope.hojaRuta.abierta) { | ||
159 | $scope.terminarHojaRuta(); | ||
160 | return; | ||
161 | } | ||
152 | var pendiente = false; | 162 | var pendiente = false; |
153 | $scope.hojaRuta.remitos.forEach(function (remito) { | 163 | $scope.hojaRuta.remitos.forEach(function (remito) { |
154 | if (pendiente === false) { | 164 | if (pendiente === false) { |
155 | var aDescargado = false; | 165 | var aDescargado = false; |
156 | for (var i = 0; i < remito.articulosRemito.length; i++) { | 166 | for (var i = 0; i < remito.articulosRemito.length; i++) { |
157 | if (remito.articulosRemito[i].cantidadDescargada > 0) | 167 | if (remito.articulosRemito[i].cantidadDescargada > 0) |
158 | aDescargado = true; | 168 | aDescargado = true; |
159 | } | 169 | } |
160 | pendiente = (!aDescargado && remito.rechazado == null) ? true : false; | 170 | pendiente = (!aDescargado && remito.rechazado == null) ? true : false; |
161 | } | 171 | } |
162 | }); | 172 | }); |
163 | if (pendiente) { | 173 | if (pendiente) { |
164 | focaModalService.alert('Todavia hay remitos pendientes'); | 174 | focaModalService.alert('Todavia hay remitos pendientes'); |
165 | return; | 175 | return; |
166 | } | 176 | } |
167 | $scope.terminarHojaRuta(); | 177 | $scope.terminarHojaRuta(); |
168 | }; | 178 | }; |
169 | $rootScope.$on('estadoRed', function (event, value) { | 179 | $rootScope.$on('estadoRed', function (event, value) { |
170 | $scope.estadoRed = value; | 180 | $scope.estadoRed = value; |
171 | }); | 181 | }); |
172 | function addCabecera(label, valor) { | 182 | function addCabecera(label, valor) { |
173 | var propiedad = $filter('filter')($scope.cabecera, { label: label }, true); | 183 | var propiedad = $filter('filter')($scope.cabecera, { label: label }, true); |
174 | if (propiedad.length === 1) { | 184 | if (propiedad.length === 1) propiedad[0].valor = valor; |
175 | propiedad[0].valor = valor; | 185 | else $scope.cabecera.push({ label: label, valor: valor }); |
176 | } else { | ||
177 | $scope.cabecera.push({ label: label, valor: valor }); | ||
178 | } | ||
179 | } | 186 | } |
180 | function getLSHojaRuta() { | 187 | // function getLSHojaRuta() { |
181 | 188 | // var hojaRuta = JSON.parse($localStorage.hojaRuta || null); | |
182 | var hojaRuta = JSON.parse($localStorage.hojaRuta || null); | 189 | // if (hojaRuta) { |
183 | 190 | // $scope.hojaRuta = hojaRuta; | |
184 | if (hojaRuta) { | 191 | // delete $localStorage.hojaRuta; |
185 | console.log('getLSHojaRuta() => ', hojaRuta); | 192 | // } |
186 | $scope.hojaRuta = hojaRuta; | 193 | // } |
187 | delete $localStorage.hojaRuta; | 194 | function parametrosModalHojasDeRuta(datos) { |
188 | } | 195 | var parametrosModal = { |
196 | data: datos, | ||
197 | columnas: [ | ||
198 | { | ||
199 | propiedad: 'comprobante', | ||
200 | nombre: 'Número' | ||
201 | }, | ||
202 | { | ||
203 | propiedad: 'fechaReparto', |
src/js/service.js
1 | angular.module('focaHojaRuta') | 1 | angular.module('focaHojaRuta') |
2 | .factory('hojaRutaService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { | 2 | .factory('hojaRutaService', ['$http', 'API_ENDPOINT', function($http, API_ENDPOINT) { |
3 | var route = API_ENDPOINT.URL; | 3 | var route = API_ENDPOINT.URL; |
4 | return { | 4 | return { |
5 | getHojaRuta: function(chofer) { | 5 | getHojaRuta: function(id) { |
6 | return $http.get(route + '/hoja-ruta/chofer/' + chofer); | 6 | return $http.get(route + '/hoja-ruta/chofer/' + id); |
7 | }, | 7 | }, |
8 | terminarHojaRuta: function(hojaRuta) { | 8 | terminarHojaRuta: function(hojaRuta) { |
9 | return $http.post(route + '/hoja-ruta/terminar', {hojaRuta: hojaRuta}); | 9 | return $http.post(route + '/hoja-ruta/terminar', {hojaRuta: hojaRuta}); |
10 | } | 10 | } |
11 | }; | 11 | }; |
12 | }]); | 12 | }]); |
13 | 13 |
src/views/lista-hoja-ruta.html
1 | <div class="row mx-0"> | 1 | <div class="row mx-0"> |
2 | <div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2"> | 2 | <div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2"> |
3 | <div class="row p-1 panel-informativo"> | 3 | <div class="row p-1 panel-informativo"> |
4 | <div class="col-12"> | 4 | <div class="col-12"> |
5 | <div class="row"> | 5 | <div class="row"> |
6 | <div class="col-12 col-sm-4 nota-pedido"> | 6 | <div class="col-12 col-sm-4 nota-pedido"> |
7 | <h5>Hojas de ruta</h5> | 7 | <h5>Hojas de ruta</h5> |
8 | </div> | 8 | </div> |
9 | <div class="col-5 col-sm-4 numero-pedido"> | 9 | <div class="col-5 col-sm-4 numero-pedido"> |
10 | Nº <span ng-bind="[puntoVenta, comprobante] | comprobante"></span> | 10 | Nº <span ng-bind="[puntoVenta, comprobante] | comprobante"></span> |
11 | </div> | 11 | </div> |
12 | <div class="col-7 col-sm-4 text-right"> | 12 | <div class="col-7 col-sm-4 text-right"> |
13 | Fecha: | 13 | Fecha: |
14 | <span | 14 | <span |
15 | ng-show="!datepickerAbierto" | 15 | ng-show="!datepickerAbierto" |
16 | ng-bind="now | date:'dd/MM/yyyy HH:mm'" | 16 | ng-bind="now | date:'dd/MM/yyyy HH:mm'" |
17 | ng-click="datepickerAbierto = true" | 17 | ng-click="datepickerAbierto = true" |
18 | > | 18 | > |
19 | </span> | 19 | </span> |
20 | <input | 20 | <input |
21 | ng-show="datepickerAbierto" | 21 | ng-show="datepickerAbierto" |
22 | type="date" | 22 | type="date" |
23 | ng-model="now" | 23 | ng-model="now" |
24 | ng-change="datepickerAbierto = false" | 24 | ng-change="datepickerAbierto = false" |
25 | ng-blur="datepickerAbierto = false" | 25 | ng-blur="datepickerAbierto = false" |
26 | class="form-control form-control-sm col-8 float-right" | 26 | class="form-control form-control-sm col-8 float-right" |
27 | foca-focus="datepickerAbierto" | 27 | foca-focus="datepickerAbierto" |
28 | hasta-hoy | 28 | hasta-hoy |
29 | /> | 29 | /> |
30 | </div> | 30 | </div> |
31 | </div> | 31 | </div> |
32 | <div class="row"> | 32 | <div class="row"> |
33 | <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera"> | 33 | <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera"> |
34 | <span class="label" ng-bind="cab.label"></span> | 34 | <span class="label" ng-bind="cab.label"></span> |
35 | <span class="valor" ng-bind="cab.valor"></span> | 35 | <span class="valor" ng-bind="cab.valor"></span> |
36 | </div> | 36 | </div> |
37 | </div> | 37 | </div> |
38 | </div> | 38 | </div> |
39 | </div> | 39 | </div> |
40 | <div class="row p-1 botonera-secundaria"> | 40 | <div class="row p-1 botonera-secundaria"> |
41 | <div class="col-12"> | 41 | <div class="col-12"> |
42 | <div class="row"> | 42 | <div class="row"> |
43 | <div class="col-6 col-sm-3 px-0 py-0" ng-repeat="boton in botonera"> | 43 | <div class="col-6 col-sm-3 px-0 py-0" ng-repeat="boton in botonera"> |
44 | <button | 44 | <button |
45 | type="button" | 45 | type="button" |
46 | class="btn btn-default btn-block btn-xs text-left py-2" | 46 | class="btn btn-default btn-block btn-xs text-left py-2" |
47 | ng-click="boton.accion()" | 47 | ng-click="boton.accion()" |
48 | ng-class="{'d-none d-sm-block': boton.texto == ''}" | 48 | ng-class="{'d-none d-sm-block': boton.texto == ''}" |
49 | > | 49 | > |
50 | <i | 50 | <i |
51 | class="fa fa-arrow-circle-right" | 51 | class="fa fa-arrow-circle-right" |
52 | ng-show="boton.texto != ''" | 52 | ng-show="boton.texto != ''" |
53 | ></i> | 53 | ></i> |
54 | | 54 | |
55 | {{boton.texto}} | 55 | {{boton.texto}} |
56 | </button> | 56 | </button> |
57 | </div> | 57 | </div> |
58 | </div> | 58 | </div> |
59 | </div> | 59 | </div> |
60 | </div> | 60 | </div> |
61 | </div> | 61 | </div> |
62 | <div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2 mb-5"> | 62 | <div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2 mb-5"> |
63 | <div ng-hide="hojaRuta.abierta" class="row"> | 63 | <div ng-hide="hojaRuta.abierta" class="row"> |
64 | <div class="col p-0"> | 64 | <div class="col p-0"> |
65 | <table class="table table-striped table-sm table-dark"> | 65 | <table class="table table-striped table-sm table-dark"> |
66 | <thead> | 66 | <thead> |
67 | <tr> | 67 | <tr> |
68 | <th class="align-middle">#</th> | 68 | <th class="align-middle">#</th> |
69 | <th class="align-middle">Número</th> | 69 | <th class="align-middle">Número</th> |
70 | <th class="align-middle">Razon Social</th> | 70 | <th class="align-middle">Razon Social</th> |
71 | <th class="align-middle" colspan="2">Domicilio</th> | 71 | <th class="align-middle" colspan="2">Domicilio</th> |
72 | </tr> | 72 | </tr> |
73 | </thead> | 73 | </thead> |
74 | <tbody class="tabla-articulo-body"> | 74 | <tbody class="tabla-articulo-body"> |
75 | <tr | 75 | <tr |
76 | ng-repeat="(key, remito) in hojaRuta.remitos" | 76 | ng-repeat="(key, remito) in hojaRuta.remitos" |
77 | > | 77 | > |
78 | <td class="align-middle" ng-bind="key + 1"></td> | 78 | <td class="align-middle" ng-bind="key + 1"></td> |
79 | <td | 79 | <td |
80 | class="align-middle" | 80 | class="align-middle" |
81 | ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante" | 81 | ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante" |
82 | ></td> | 82 | ></td> |
83 | <td class="align-middle" ng-bind="remito.nombreCliente"></td> | 83 | <td class="align-middle" ng-bind="remito.nombreCliente"></td> |
84 | <td class="align-middle" ng-bind="remito.domicilioStamp"></td> | 84 | <td class="align-middle" ng-bind="remito.domicilioStamp"></td> |
85 | <td class="align-middle"> | 85 | <td class="align-middle"> |
86 | <div class="btn-group-vertical"> | 86 | <div class="btn-group-vertical"> |
87 | <button | 87 | <button |
88 | class="btn btn-secondary my-1 rounded" | 88 | class="btn btn-secondary my-1 rounded" |
89 | type="button" | 89 | type="button" |
90 | ng-click="verDetalle(remito)"> | 90 | ng-click="verDetalle(remito)"> |
91 | <i class="fa fa-search" aria-hidden="true"></i> | 91 | <i class="fa fa-search" aria-hidden="true"></i> |
92 | </button> | 92 | </button> |
93 | <button | 93 | <button |
94 | ng-show="articulosDescargados(remito.articulosRemito)" | 94 | ng-show="articulosDescargados(remito.articulosRemito)" |
95 | class="btn btn-secondary my-1 rounded" | 95 | class="btn btn-secondary my-1 rounded" |
96 | type="button"> | 96 | type="button"> |
97 | <i class="fa fa-check fa-lg foca-text-success" aria-hidden="true"></i> | 97 | <i class="fa fa-check fa-lg foca-text-success" aria-hidden="true"></i> |
98 | </button> | 98 | </button> |
99 | <button | 99 | <button |
100 | ng-show="remito.rechazado" | 100 | ng-show="remito.rechazado" |
101 | class="btn btn-secondary my-1 rounded" | 101 | class="btn btn-secondary my-1 rounded" |
102 | type="button"> | 102 | type="button"> |
103 | <i class="fa fa-remove fa-lg foca-text-danger" aria-hidden="true"></i> | 103 | <i class="fa fa-remove fa-lg foca-text-danger" aria-hidden="true"></i> |
104 | </button> | 104 | </button> |
105 | </div> | 105 | </div> |
106 | </td> | 106 | </td> |
107 | </tr> | 107 | </tr> |
108 | </tbody> | 108 | </tbody> |
109 | </table> | 109 | </table> |
110 | </div> | 110 | </div> |
111 | </div> | 111 | </div> |
112 | <div ng-show="hojaRuta.abierta" class="row grilla-articulo"> | 112 | <div ng-show="hojaRuta.abierta" class="row grilla-articulo"> |
113 | <div class="col p-0"> | 113 | <div class="col p-0"> |
114 | <table class="table table-striped table-sm table-dark"> | 114 | <table class="table table-striped table-sm table-dark"> |
115 | <thead> | 115 | <thead> |
116 | <tr> | 116 | <tr> |
117 | <th colspan="3" class="text-center">Remito abierto Nº | 117 | <th colspan="3" class="text-center">Remito abierto Nº |
118 | {{[hojaRuta.remitos[0].sucursal, hojaRuta.remitos[0].numeroRemito] | comprobante}} | 118 | {{[hojaRuta.remitos[0].sucursal, hojaRuta.remitos[0].numeroRemito] | comprobante}} |
119 | </th> | 119 | </th> |
120 | </tr> | 120 | </tr> |
121 | <tr> | 121 | <tr> |
122 | <th>Cisterna</th> | 122 | <th>Cisterna</th> |
123 | <th>Producto</th> | 123 | <th>Producto</th> |
124 | <th>Disponibles</th> | 124 | <th>Disponibles</th> |
125 | </tr> | 125 | </tr> |
126 | </thead> | 126 | </thead> |
127 | <tbody> | 127 | <tbody> |
128 | <tr ng-repeat="cisterna in hojaRuta.remitos[0].cisternas"> | 128 | <tr ng-repeat="cisterna in hojaRuta.remitos[0].cisternas"> |
129 | <td ng-bind="cisterna.codigo"></td> | 129 | <td ng-bind="cisterna.codigo"></td> |
130 | <td ng-bind="cisterna.cisternaCarga.articulo.DetArt"></td> | 130 | <td ng-bind="cisterna.cisternaCarga.articulo.DetArt"></td> |
131 | <td ng-bind="cisterna.cisternaCarga.cantidad"></td> | 131 | <td ng-bind="cisterna.cisternaCarga.cantidad"></td> |
132 | </tr> | 132 | </tr> |
133 | </tbody> | 133 | </tbody> |
134 | </table> | 134 | </table> |
135 | </div> | 135 | </div> |
136 | <table class="table table-striped table-sm table-dark"> | 136 | <table class="table table-striped table-sm table-dark"> |
137 | <thead> | 137 | <thead> |
138 | <tr> | 138 | <tr> |
139 | <th>Descarga en cliente</th> | 139 | <th>Descarga en cliente</th> |
140 | <th> | 140 | <th> |
141 | <button class="btn btn-outline-debo" ng-click="modalDescargas()"> | 141 | <button class="btn btn-outline-debo" ng-click="modalDescargas()"> |
142 | <i class="fa fa-plus"></i> | 142 | <i class="fa fa-plus"></i> |
143 | </button> | 143 | </button> |
144 | </th> | 144 | </th> |
145 | </tr> | 145 | </tr> |
146 | <tr></tr> | 146 | <tr></tr> |
147 | </thead> | 147 | </thead> |
148 | <tbody> | 148 | <tbody> |
149 | <tr ng-repeat="remito in remitos"></tr> | 149 | <tr ng-repeat="remito in remitos"></tr> |
150 | </tbody> | 150 | </tbody> |
151 | </table> | 151 | </table> |
152 | </div> | 152 | </div> |
153 | </div> | 153 | </div> |
154 | <div class="row d-md-none fixed-bottom"> | 154 | <div class="row d-md-none fixed-bottom"> |
155 | <div class="w-100 bg-dark d-flex px-3 acciones-mobile"> | 155 | <div class="w-100 bg-dark d-flex px-3 acciones-mobile"> |
156 | <span class="ml-3 text-muted" ng-click="salir()">Salir</span> | 156 | <span class="ml-3 text-muted" ng-click="salir()">Salir</span> |
157 | <span | 157 | <span |
158 | class="mr-3 ml-auto" | 158 | class="mr-3 ml-auto" |
159 | ng-click="estaPendiente()" | 159 | ng-click="estaPendiente()" |
160 | ladda="saveLoading" | 160 | ladda="saveLoading" |
161 | data-style="expand-left" | 161 | data-style="expand-left" |
162 | >Terminar</span> | 162 | >Terminar</span> |
163 | </div> | 163 | </div> |
164 | </div> | 164 | </div> |
165 | </div> | 165 | </div> |
166 | <div ng-show="showLoading == true" class="cover-spin align-items-center justify-content-center"> | ||
167 | <div class="spinner-border foca-text-danger m-2" style="width: 3rem; height: 3rem;" role="status"> | ||
168 | </div> | ||
169 | <strong>Cargando informacion...</strong> | ||
170 | </div> | ||
166 | 171 |