Commit 8c18bb142a9dc8ef6c81d2cbcd8d2219bf09f671
Exists in
master
Merge branch 'develop' into 'master'
Develop See merge request !64
Showing
4 changed files
Show diff stats
src/js/controller.js
... | ... | @@ -19,7 +19,8 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
19 | 19 | |
20 | 20 | function config() { |
21 | 21 | |
22 | - $scope.botoneraPrincipal = focaCrearHojaRutaService.getBotones(); | |
22 | + $scope.botoneraPrincipal ? false : $scope.botoneraPrincipal = | |
23 | + focaCrearHojaRutaService.getBotones(); | |
23 | 24 | $scope.botonera = []; |
24 | 25 | $scope.datepickerAbierto = false; |
25 | 26 | $scope.show = false; |
... | ... | @@ -46,15 +47,25 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
46 | 47 | |
47 | 48 | var parametros = JSON.parse(res.data[0].jsonText); |
48 | 49 | |
49 | - if ($localStorage.hojaRuta) { | |
50 | - $timeout(function () { getLSHojaRuta(); }); | |
50 | + $timeout(function () { | |
51 | + getLSBotoneraPrincipal(); | |
52 | + }); | |
53 | + | |
54 | + if ($localStorage.data) { | |
55 | + $timeout(function () { | |
56 | + getLSHojaRuta(); | |
57 | + }); | |
58 | + | |
51 | 59 | } else { |
52 | 60 | for (var property in parametros) { |
53 | 61 | $scope.hojaRuta[property] = parametros[property]; |
54 | 62 | $scope.inicial[property] = parametros[property]; |
55 | 63 | } |
56 | 64 | //Setear Hoja de Ruta |
57 | - //setearHojaRuta($scope.hojaRuta); | |
65 | + | |
66 | + if ($scope.remitoAbierto || $scope.cargaRemito || $scope.precargado) { | |
67 | + setearHojaRuta($scope.hojaRuta); | |
68 | + } | |
58 | 69 | } |
59 | 70 | }); |
60 | 71 | init(); |
... | ... | @@ -84,41 +95,24 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
84 | 95 | console.info(err); |
85 | 96 | } |
86 | 97 | ); |
87 | - setearFecha(new Date()); | |
88 | 98 | $scope.inicial = angular.copy($scope.hojaRuta); |
89 | 99 | } |
90 | 100 | |
91 | - // $scope.$watch('hojaRuta', function(newValue) { | |
92 | - | |
93 | - // // Seteo checked en remitos | |
94 | - // if ($scope.hojaRuta.remitosTabla.length) { | |
95 | - // $filter('filter')($scope.botonera, { | |
96 | - // label: 'Remitos', | |
97 | - // })[0].checked = true; | |
98 | - // } else { | |
99 | - // $filter('filter')($scope.botonera, { | |
100 | - // label: 'Remitos', | |
101 | - // })[0].checked = false; | |
102 | - // } | |
103 | - | |
104 | - // focaBotoneraLateralService.setPausarData({ | |
105 | - // label: 'hojaRuta', | |
106 | - // val: newValue | |
107 | - // }); | |
108 | - // }, true); | |
101 | + $scope.$watchGroup(['hojaRuta','precargado','cargaRemito','remitoAbierto'], function(newValues) { | |
102 | + focaBotoneraLateralService.setPausarData( | |
103 | + { | |
104 | + label: 'data', | |
105 | + val: newValues | |
106 | + } | |
107 | + ); | |
108 | + }); | |
109 | 109 | |
110 | 110 | $scope.seleccionarRemitoAbierto = function () { |
111 | 111 | $scope.remitoAbierto = true; |
112 | 112 | $scope.cargaRemito = false; |
113 | 113 | $scope.precargado = false; |
114 | 114 | |
115 | - var isBotoneraDirty = $scope.botonera.find(function (boton) { | |
116 | - return boton.checked; | |
117 | - }); | |
118 | - | |
119 | - config(); | |
120 | - | |
121 | - if (isBotoneraDirty) { | |
115 | + if (!angular.equals($scope.hojaRuta, $scope.inicial)) { | |
122 | 116 | $scope.$broadcast('cleanCabecera'); |
123 | 117 | focaModalService.confirm('Se perderan los cambios') |
124 | 118 | .then(function () { |
... | ... | @@ -127,8 +121,10 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
127 | 121 | $filter('filter')($scope.botoneraPrincipal, { |
128 | 122 | label: 'Remito Abierto', |
129 | 123 | })[0].checked = true; |
130 | - $scope.botonera = focaCrearHojaRutaService.getBotonFecha(); | |
131 | - | |
124 | + | |
125 | + config(); | |
126 | + | |
127 | + $scope.botonera = focaCrearHojaRutaService.getRemitoAbierto(); | |
132 | 128 | }); |
133 | 129 | } else { |
134 | 130 | $scope.$broadcast('cleanCabecera'); |
... | ... | @@ -136,25 +132,19 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
136 | 132 | $filter('filter')($scope.botoneraPrincipal, { |
137 | 133 | label: 'Remito Abierto', |
138 | 134 | })[0].checked = true; |
139 | - $scope.botonera = focaCrearHojaRutaService.getBotonFecha(); | |
140 | - | |
135 | + | |
136 | + config(); | |
137 | + | |
138 | + $scope.botonera = focaCrearHojaRutaService.getRemitoAbierto(); | |
141 | 139 | } |
142 | - | |
143 | - $scope.botonera = focaCrearHojaRutaService.getRemitoAbierto(); | |
144 | 140 | }; |
145 | 141 | |
146 | 142 | $scope.seleccionarCargarRemitos = function () { |
147 | 143 | $scope.cargaRemito = true; |
148 | 144 | $scope.remitoAbierto = false; |
149 | 145 | $scope.precargado = false; |
150 | - | |
151 | - var isBotoneraDirty = $scope.botonera.find(function (boton) { | |
152 | - return boton.checked; | |
153 | - }); | |
154 | 146 | |
155 | - config(); | |
156 | - | |
157 | - if (isBotoneraDirty) { | |
147 | + if (!angular.equals($scope.hojaRuta, $scope.inicial)) { | |
158 | 148 | $scope.$broadcast('cleanCabecera'); |
159 | 149 | focaModalService.confirm('Se perderan los cambios') |
160 | 150 | .then(function () { |
... | ... | @@ -164,7 +154,10 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
164 | 154 | $filter('filter')($scope.botoneraPrincipal, { |
165 | 155 | label: 'Cargar Remitos', |
166 | 156 | })[0].checked = true; |
167 | - $scope.botonera = focaCrearHojaRutaService.getBotonFecha(); | |
157 | + | |
158 | + config(); | |
159 | + // $scope.botonera = focaCrearHojaRutaService.getBotonFecha(); | |
160 | + $scope.botonera = focaCrearHojaRutaService.getBotoneraCargarRemito(); | |
168 | 161 | }); |
169 | 162 | } else { |
170 | 163 | $scope.$broadcast('cleanCabecera'); |
... | ... | @@ -172,7 +165,9 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
172 | 165 | $filter('filter')($scope.botoneraPrincipal, { |
173 | 166 | label: 'Cargar Remitos', |
174 | 167 | })[0].checked = true; |
175 | - $scope.botonera = focaCrearHojaRutaService.getBotonFecha(); | |
168 | + config(); | |
169 | + // $scope.botonera = focaCrearHojaRutaService.getBotonFecha(); | |
170 | + $scope.botonera = focaCrearHojaRutaService.getBotoneraCargarRemito(); | |
176 | 171 | } |
177 | 172 | $scope.precargado = false; |
178 | 173 | }; |
... | ... | @@ -181,13 +176,8 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
181 | 176 | $scope.precargado = true; |
182 | 177 | $scope.cargaRemito = false; |
183 | 178 | $scope.remitoAbierto = false; |
184 | - var isBotoneraDirty = $scope.botonera.find(function (boton) { | |
185 | - return boton.checked; | |
186 | - }); | |
187 | - | |
188 | - config(); | |
189 | 179 | |
190 | - if (isBotoneraDirty) { | |
180 | + if (!angular.equals($scope.hojaRuta, $scope.inicial)) { | |
191 | 181 | focaModalService.confirm('Se perderan los cambios') |
192 | 182 | .then(function () { |
193 | 183 | $scope.$broadcast('cleanCabecera'); |
... | ... | @@ -196,7 +186,10 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
196 | 186 | $filter('filter')($scope.botoneraPrincipal, { |
197 | 187 | label: 'Precargado', |
198 | 188 | })[0].checked = true; |
199 | - $scope.botonera = focaCrearHojaRutaService.getBotonFecha(); | |
189 | + | |
190 | + config(); | |
191 | + | |
192 | + $scope.botonera = focaCrearHojaRutaService.getBotoneraPrecargado(); | |
200 | 193 | }); |
201 | 194 | } else { |
202 | 195 | $scope.$broadcast('cleanCabecera'); |
... | ... | @@ -204,11 +197,14 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
204 | 197 | $filter('filter')($scope.botoneraPrincipal, { |
205 | 198 | label: 'Precargado', |
206 | 199 | })[0].checked = true; |
207 | - $scope.botonera = focaCrearHojaRutaService.getBotonFecha(); | |
200 | + | |
201 | + config(); | |
202 | + | |
203 | + $scope.botonera = focaCrearHojaRutaService.getBotoneraPrecargado(); | |
208 | 204 | } |
209 | 205 | }; |
210 | 206 | |
211 | - $scope.quitarArticulo = function (key ,articulo) { | |
207 | + $scope.quitarArticulo = function (key) { | |
212 | 208 | $scope.articulos.splice(key, 1); |
213 | 209 | }; |
214 | 210 | |
... | ... | @@ -271,7 +267,7 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
271 | 267 | return true; |
272 | 268 | |
273 | 269 | } |
274 | - | |
270 | + | |
275 | 271 | function getImporte(propiedad) { |
276 | 272 | var importe = 0; |
277 | 273 | |
... | ... | @@ -301,7 +297,8 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
301 | 297 | cuitCliente: $scope.hojaRuta.cliente.CUIT, |
302 | 298 | idVendedor: $cookies.get('vendedorCobrador'), |
303 | 299 | idProveedor: $scope.hojaRuta.proveedor.COD, |
304 | - idDomicilio: $scope.hojaRuta.idDomicilio || $scope.hojaRuta.domicilio.id, | |
300 | + idDomicilio: $scope.hojaRuta.idDomicilio || | |
301 | + $scope.hojaRuta.domicilio.id, | |
305 | 302 | idCotizacion: $scope.hojaRuta.cotizacion.ID, |
306 | 303 | domicilioStamp: $scope.hojaRuta.domicilioStamp, |
307 | 304 | observaciones: $scope.hojaRuta.observaciones, |
... | ... | @@ -361,7 +358,8 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
361 | 358 | guardarHojaRuta(data.data.id); |
362 | 359 | |
363 | 360 | }, function (error) { |
364 | - focaModalService.alert(error.data || 'Hubo un error al crear el remito'); | |
361 | + focaModalService.alert( | |
362 | + error.data || 'Hubo un error al crear el remito'); | |
365 | 363 | focaBotoneraLateralService.endGuardar(); |
366 | 364 | $scope.saveLoading = false; |
367 | 365 | console.info(error); |
... | ... | @@ -379,14 +377,17 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
379 | 377 | idChofer: $scope.hojaRuta.chofer.id, |
380 | 378 | idVehiculo: $scope.hojaRuta.vehiculo.id, |
381 | 379 | proveedor: $scope.hojaRuta.proveedor.id, |
382 | - fechaReparto: | |
383 | - new Date($scope.hojaRuta.fechaReparto).toISOString().substring(0, 10), | |
380 | + fechaReparto: new Date($scope.hojaRuta.fechaReparto) | |
381 | + .toISOString() | |
382 | + .substring(0, 10), | |
384 | 383 | estado: 0, |
385 | 384 | abierta: 1 |
386 | 385 | }, |
387 | 386 | remitos: [{id: idRemito}] |
388 | - } | |
389 | - save2.hojaRuta = angular.extend({}, save2.hojaRuta, $scope.hojaRuta.datosExtra); | |
387 | + }; | |
388 | + | |
389 | + save2.hojaRuta = angular | |
390 | + .extend({}, save2.hojaRuta, $scope.hojaRuta.datosExtra); | |
390 | 391 | focaCrearHojaRutaService.crearHojaRuta(save2).then( |
391 | 392 | function (data) { |
392 | 393 | var remitoNumero; |
... | ... | @@ -405,7 +406,10 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
405 | 406 | config(); |
406 | 407 | }, |
407 | 408 | function (error) { |
408 | - focaModalService.alert('Hubo un error al crear la hoja de ruta'); | |
409 | + | |
410 | + focaModalService | |
411 | + .alert('Hubo un error al crear la hoja de ruta'); | |
412 | + | |
409 | 413 | console.info(error); |
410 | 414 | } |
411 | 415 | ); |
... | ... | @@ -980,7 +984,7 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
980 | 984 | $filter('filter')($scope.botonera, { |
981 | 985 | label: 'Detalle de Carga', |
982 | 986 | })[0].checked = true; |
983 | - }, function () { | |
987 | + }, function () { | |
984 | 988 | //se ejecuta cuando se cancela el modal |
985 | 989 | }); |
986 | 990 | }; |
... | ... | @@ -998,22 +1002,6 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
998 | 1002 | label: 'Fecha de entrega: ', |
999 | 1003 | valor: fecha.toLocaleDateString() |
1000 | 1004 | }); |
1001 | - //habilitar los otros botones | |
1002 | - var temp = []; | |
1003 | - if ($scope.botonera.length > 1) { | |
1004 | - limpiarBotonera($scope.botonera); | |
1005 | - } else if ($scope.precargado) { | |
1006 | - temp = focaCrearHojaRutaService.getBotoneraPrecargado(); | |
1007 | - modalVehiculos(true); | |
1008 | - } else if ($scope.cargaRemito && $scope.precargado === false) { | |
1009 | - temp = focaCrearHojaRutaService.getBotoneraCargarRemito(); | |
1010 | - } else { | |
1011 | - temp = focaCrearHojaRutaService.getBotoneraCargarRemito(); | |
1012 | - modalVehiculos(true); | |
1013 | - } | |
1014 | - temp.forEach(function (e) { | |
1015 | - $scope.botonera.push(e); | |
1016 | - }); | |
1017 | 1005 | |
1018 | 1006 | $filter('filter')($scope.botonera, { |
1019 | 1007 | label: 'Fecha Entrega', |
... | ... | @@ -1236,12 +1224,46 @@ angular.module('focaCrearHojaRuta').controller('hojaRutaCtrl', |
1236 | 1224 | } |
1237 | 1225 | |
1238 | 1226 | function getLSHojaRuta() { |
1239 | - var hojaRuta = JSON.parse($localStorage.hojaRuta || null); | |
1227 | + if ($localStorage.data === undefined) return; | |
1228 | + | |
1229 | + var hojaRuta = (JSON.parse($localStorage.data))[0] || null; | |
1240 | 1230 | if (hojaRuta) { |
1241 | 1231 | setearHojaRuta(hojaRuta); |
1242 | - delete $localStorage.hojaRuta; | |
1232 | + delete $localStorage.data; | |
1233 | + } | |
1234 | + } | |
1235 | + | |
1236 | + function getLSBotoneraPrincipal() { | |
1237 | + if ($localStorage.data === undefined) return; | |
1238 | + | |
1239 | + var precargado = (JSON.parse($localStorage.data))[1] || null; | |
1240 | + var cargaRemito = (JSON.parse($localStorage.data))[2] || null; | |
1241 | + var remitoAbierto = (JSON.parse($localStorage.data))[3] || null; | |
1242 | + if (remitoAbierto) { | |
1243 | + $scope.remitoAbierto = remitoAbierto; | |
1244 | + $filter('filter')($scope.botoneraPrincipal, { | |
1245 | + label: 'Remito Abierto' | |
1246 | + })[0].checked = $scope.remitoAbierto; | |
1247 | + $scope.botonera = focaCrearHojaRutaService.getRemitoAbierto(); | |
1248 | + } | |
1249 | + if (precargado) { | |
1250 | + $scope.precargado = precargado; | |
1251 | + $filter('filter')($scope.botoneraPrincipal, { | |
1252 | + label: 'Precargados' | |
1253 | + })[0].checked = $scope.precargado; | |
1254 | + $scope.botonera = focaCrearHojaRutaService.getBotonFecha(); | |
1255 | + Array.prototype.push.apply($scope.botonera,focaCrearHojaRutaService.getBotoneraPrecargado()); | |
1256 | + } | |
1257 | + if (cargaRemito) { | |
1258 | + $scope.cargaRemito = cargaRemito; | |
1259 | + $filter('filter')($scope.botoneraPrincipal, { | |
1260 | + label: 'Cargar Remitos' | |
1261 | + })[0].checked = $scope.cargaRemito; | |
1262 | + $scope.botonera = focaCrearHojaRutaService.getBotonFecha(); | |
1263 | + Array.prototype.push.apply($scope.botonera,focaCrearHojaRutaService.getBotoneraCargarRemito()); | |
1243 | 1264 | } |
1244 | 1265 | } |
1266 | + | |
1245 | 1267 | function addArrayCabecera(array) { |
1246 | 1268 | for (var i = 0; i < array.length; i++) { |
1247 | 1269 | $scope.$broadcast('addCabecera', { |
src/js/controllerDetalles.js
1 | 1 | angular.module('focaCrearHojaRuta') |
2 | 2 | .controller('focaModalDetalleController', [ |
3 | 3 | '$scope', '$timeout', '$uibModalInstance', 'focaModalService', |
4 | - 'focaCrearHojaRutaService', 'hojasRutas', '$uibModal', '$filter', | |
4 | + 'focaCrearHojaRutaService', 'hojasRutas', | |
5 | 5 | function ($scope, $timeout, $uibModalInstance, focaModalService, |
6 | - focaCrearHojaRutaService, hojasRutas, $uibModal, $filter) { | |
6 | + focaCrearHojaRutaService, hojasRutas) { | |
7 | 7 | |
8 | 8 | $scope.mostrar = false; |
9 | 9 | $scope.articulos = []; |
... | ... | @@ -144,23 +144,21 @@ angular.module('focaCrearHojaRuta') |
144 | 144 | }; |
145 | 145 | |
146 | 146 | $scope.cancel = function () { |
147 | - var validarCisternas = validarArticulos(); | |
148 | - if (validarCisternas !== undefined) { | |
149 | - $uibModalInstance.dismiss(null); | |
150 | - } | |
147 | + $uibModalInstance.dismiss(null); | |
151 | 148 | }; |
152 | 149 | |
153 | 150 | function validarArticulos () { |
154 | - var cisternasFilter = $scope.hojasRutas.vehiculo.cisternas.filter(function (cisterna) { | |
155 | - return parseInt(cisterna.disponible) > 0 || cisterna.articuloSeleccionado; | |
156 | - }); | |
151 | + var cisternasFilter = $scope.hojasRutas.vehiculo.cisternas | |
152 | + .filter(function (cisterna) { | |
153 | + return parseInt(cisterna.disponible) > 0 || cisterna.articuloSeleccionado; | |
154 | + }); | |
157 | 155 | |
158 | 156 | var cisternasIncompletas = cisternasFilter.filter(function(cisterna) { |
159 | 157 | return (cisterna.articuloSeleccionado && !cisterna.disponible) || |
160 | 158 | (!cisterna.articuloSeleccionado && cisterna.disponible); |
161 | 159 | }); |
162 | 160 | |
163 | - if (cisternasIncompletas.length || !cisternasFilter.length) { | |
161 | + if (cisternasIncompletas.length > 0 && cisternasFilter.length > 0 ) { | |
164 | 162 | focaModalService.alert('Ingrese todos los campos para completar el remito'); |
165 | 163 | cisternasFilter = undefined; |
166 | 164 | } |
src/js/service.js
... | ... | @@ -8,9 +8,8 @@ angular.module('focaCrearHojaRuta') |
8 | 8 | return $http.post(route + '/hoja-ruta', hojaRuta); |
9 | 9 | }, |
10 | 10 | crearRemito: function(remito) { |
11 | - console.log('Crear remito-----: ', remito); | |
12 | 11 | // TODO: Cambiar para usar el servicio /remito |
13 | - return $http.post(route + '/remito', remito); | |
12 | + return $http.post(route + '/remito/guardar', remito); | |
14 | 13 | }, |
15 | 14 | obtenerHojaRuta: function() { |
16 | 15 | return $http.get(route +'/hoja-ruta'); |
... | ... | @@ -176,17 +175,12 @@ angular.module('focaCrearHojaRuta') |
176 | 175 | return $http.get(API_ENDPOINT.URL + '/punto-descarga/' + |
177 | 176 | idDomicilio + '/' + idCliente); |
178 | 177 | }, |
179 | - getBotonFecha : function () { | |
178 | + getBotoneraPrecargado: function () { | |
180 | 179 | return [ |
181 | 180 | { |
182 | 181 | label: 'Fecha Entrega', |
183 | 182 | image: 'FechaEntrega.png' |
184 | 183 | }, |
185 | - ]; | |
186 | - }, | |
187 | - getBotoneraPrecargado: function () { | |
188 | - return [ | |
189 | - | |
190 | 184 | { |
191 | 185 | label: 'Transportista', |
192 | 186 | image: 'transportista.png' |
... | ... | @@ -196,7 +190,7 @@ angular.module('focaCrearHojaRuta') |
196 | 190 | image: 'chofer.png' |
197 | 191 | }, |
198 | 192 | { |
199 | - label: 'Vehiculo', | |
193 | + label: 'VehiculosPrecargados', | |
200 | 194 | image: 'vehiculos.png' |
201 | 195 | }, |
202 | 196 | { |
... | ... | @@ -212,6 +206,10 @@ angular.module('focaCrearHojaRuta') |
212 | 206 | getBotoneraCargarRemito: function () { |
213 | 207 | return [ |
214 | 208 | { |
209 | + label: 'Fecha Entrega', | |
210 | + image: 'FechaEntrega.png' | |
211 | + }, | |
212 | + { | |
215 | 213 | label: 'Transportista', |
216 | 214 | image: 'transportista.png' |
217 | 215 | }, |
src/views/hoja-ruta.html
... | ... | @@ -24,9 +24,8 @@ |
24 | 24 | </div> |
25 | 25 | <div class="row"> |
26 | 26 | <div class="col"> |
27 | - <!-- PC --> | |
28 | 27 | <div class="row grilla-articulo align-items-end d-none d-sm-flex"> |
29 | - <table class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom"> | |
28 | + <table ng-show="remitoAbierto" class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom"> | |
30 | 29 | <thead> |
31 | 30 | <tr class="d-flex"> |
32 | 31 | <th class="">#</th> |
... | ... | @@ -193,6 +192,79 @@ |
193 | 192 | </tr> |
194 | 193 | </tfoot> |
195 | 194 | </table> |
195 | + <table ng-hide="remitoAbierto" class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom"> | |
196 | + <thead> | |
197 | + <tr class="d-flex"> | |
198 | + <th class="col-auto">#</th> | |
199 | + <th class="col-2">Remito</th> | |
200 | + <th class="col">Cliente</th> | |
201 | + <th class="col">Direcciรณn</th> | |
202 | + <th class="col-auto"></th> | |
203 | + <th class="col-auto"> | |
204 | + <button | |
205 | + class="btn btn-outline-light selectable" | |
206 | + ng-click="show = !show; masMenos()" | |
207 | + > | |
208 | + <i | |
209 | + class="fa fa-chevron-down" | |
210 | + ng-show="show" | |
211 | + aria-hidden="true" | |
212 | + > | |
213 | + </i> | |
214 | + <i | |
215 | + class="fa fa-chevron-up" | |
216 | + ng-hide="show" | |
217 | + aria-hidden="true"> | |
218 | + </i> | |
219 | + </button> | |
220 | + </th> | |
221 | + </tr> | |
222 | + </thead> | |
223 | + <tbody class="tabla-articulo-body"> | |
224 | + <tr | |
225 | + ng-repeat="(key, remito) in hojaRuta.remitosTabla" | |
226 | + class="d-flex" | |
227 | + ng-show="show || key == hojaRuta.remitosTabla.length - 1" | |
228 | + > | |
229 | + <td ng-bind="key + 1" class="col-auto"></td> | |
230 | + <td | |
231 | + class="col-2" | |
232 | + >{{remito.sucursal | rellenarDigitos: 4}}-{{remito.numeroRemito | rellenarDigitos: 8}}</td> | |
233 | + <th class="col" ng-bind="remito.nombreCliente"></th> | |
234 | + <th class="col" ng-bind="remito.domicilioStamp"></th> | |
235 | + <td class="text-center col-auto"> | |
236 | + <button | |
237 | + class="btn btn-outline-light" | |
238 | + ng-click="verProductosRemito(remito.id)" | |
239 | + title="Ver productos" | |
240 | + > | |
241 | + <i class="fa fa-eye"></i> | |
242 | + </button> | |
243 | + </td> | |
244 | + <td class="text-center col-auto"> | |
245 | + <button | |
246 | + class="btn btn-outline-light" | |
247 | + ng-click="desasociarRemito(key, remito.id)" | |
248 | + title="Eliminar"> | |
249 | + <i class="fa fa-trash"></i> | |
250 | + </button> | |
251 | + </td> | |
252 | + </tr> | |
253 | + </tbody> | |
254 | + <tfoot> | |
255 | + <tr class="d-flex"> | |
256 | + <td class="col-auto px-1"> | |
257 | + <strong>Remitos:</strong> | |
258 | + <a ng-bind="hojaRuta.remitosTabla.length"></a> | |
259 | + </td> | |
260 | + <td class="col"></td> | |
261 | + <td class="col-auto px-1"> | |
262 | + <strong>Cantidad:</strong> | |
263 | + <a ng-bind="hojaRuta.litros"></a> | |
264 | + </td> | |
265 | + </tr> | |
266 | + </tfoot> | |
267 | + </table> | |
196 | 268 | </div> |
197 | 269 | </div> |
198 | 270 | </div> |