Commit 8cf02a3814c3d6282ef0185b284d83e14556cd50
1 parent
3eae97634e
Exists in
master
Borrado spinner.
Showing
2 changed files
with
0 additions
and
7 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; | ||
21 | hojaRutaService.getHojaRuta(loginData.chofer) | 20 | hojaRutaService.getHojaRuta(loginData.chofer) |
22 | .then(function (res) { | 21 | .then(function (res) { |
23 | console.log(res.data); | 22 | console.log(res.data); |
24 | abrilModalHojasDeRuta(res.data); | 23 | abrilModalHojasDeRuta(res.data); |
25 | }); | 24 | }); |
26 | } | 25 | } |
27 | function abrilModalHojasDeRuta(hojasDeRuta) { | 26 | function abrilModalHojasDeRuta(hojasDeRuta) { |
28 | hojasDeRuta.forEach(function (hojaRuta) { | 27 | hojasDeRuta.forEach(function (hojaRuta) { |
29 | hojaRuta.comprobante = (hojaRuta.abierta ? 'RA ' : '') + | 28 | hojaRuta.comprobante = (hojaRuta.abierta ? 'RA ' : '') + |
30 | $filter('comprobante') | 29 | $filter('comprobante') |
31 | ([hojaRuta.sucursal, hojaRuta.numeroHojaRuta]); | 30 | ([hojaRuta.sucursal, hojaRuta.numeroHojaRuta]); |
32 | }); | 31 | }); |
33 | $scope.showLoading = false; | ||
34 | focaModalService.modal(parametrosModalHojasDeRuta(hojasDeRuta)) | 32 | focaModalService.modal(parametrosModalHojasDeRuta(hojasDeRuta)) |
35 | .then(function (hojaRuta) { | 33 | .then(function (hojaRuta) { |
36 | if (hojaRuta) { | 34 | if (hojaRuta) { |
37 | $scope.hojaRuta = hojaRuta; | 35 | $scope.hojaRuta = hojaRuta; |
38 | $scope.puntoVenta = hojaRuta.sucursal; | 36 | $scope.puntoVenta = hojaRuta.sucursal; |
39 | $scope.comprobante = hojaRuta.numeroHojaRuta; | 37 | $scope.comprobante = hojaRuta.numeroHojaRuta; |
40 | addCabecera('Transportista:', hojaRuta.transportista.NOM); | 38 | addCabecera('Transportista:', hojaRuta.transportista.NOM); |
41 | addCabecera('Chofer:', hojaRuta.chofer.nombre); | 39 | addCabecera('Chofer:', hojaRuta.chofer.nombre); |
42 | addCabecera('Vehículo:', hojaRuta.vehiculo.tractor); | 40 | addCabecera('Vehículo:', hojaRuta.vehiculo.tractor); |
43 | $localStorage.hojaRuta = JSON.stringify($scope.hojaRuta); | 41 | $localStorage.hojaRuta = JSON.stringify($scope.hojaRuta); |
44 | } else { | 42 | } else { |
45 | focaModalService.alert('Sin hoja de ruta asignada'); | 43 | focaModalService.alert('Sin hoja de ruta asignada'); |
46 | $location.path('/'); | 44 | $location.path('/'); |
47 | } | 45 | } |
48 | // if (!$scope.estadoRed) { | 46 | // if (!$scope.estadoRed) { |
49 | // getLSHojaRuta(); | 47 | // getLSHojaRuta(); |
50 | // } | 48 | // } |
51 | }) | 49 | }) |
52 | .catch(function (e) { | 50 | .catch(function (e) { |
53 | console.info(e); | 51 | console.info(e); |
54 | $location.path('/'); | 52 | $location.path('/'); |
55 | }); | 53 | }); |
56 | } | 54 | } |
57 | $scope.$watch('hojaRuta', function (nuevoValor) { | 55 | $scope.$watch('hojaRuta', function (nuevoValor) { |
58 | $localStorage.hojaRuta = JSON.stringify(nuevoValor); | 56 | $localStorage.hojaRuta = JSON.stringify(nuevoValor); |
59 | }, true); | 57 | }, true); |
60 | $scope.verDetalle = function (remito) { | 58 | $scope.verDetalle = function (remito) { |
61 | var modalInstance = $uibModal.open( | 59 | var modalInstance = $uibModal.open( |
62 | { | 60 | { |
63 | ariaLabelledBy: 'Detalle hoja ruta', | 61 | ariaLabelledBy: 'Detalle hoja ruta', |
64 | templateUrl: 'modal-detalle-hoja-ruta.html', | 62 | templateUrl: 'modal-detalle-hoja-ruta.html', |
65 | controller: 'focaModalDetalleHojaRutaController', | 63 | controller: 'focaModalDetalleHojaRutaController', |
66 | resolve: { | 64 | resolve: { |
67 | parametros: { | 65 | parametros: { |
68 | remito: remito, | 66 | remito: remito, |
69 | } | 67 | } |
70 | }, | 68 | }, |
71 | size: 'lg' | 69 | size: 'lg' |
72 | } | 70 | } |
73 | ); | 71 | ); |
74 | modalInstance.result | 72 | modalInstance.result |
75 | .then(function (data) { console.log(data); }) | 73 | .then(function (data) { console.log(data); }) |
76 | .catch(function (e) { console.info(e); }); | 74 | .catch(function (e) { console.info(e); }); |
77 | }; | 75 | }; |
78 | $scope.salir = function () { | 76 | $scope.salir = function () { |
79 | $location.path('/'); | 77 | $location.path('/'); |
80 | }; | 78 | }; |
81 | $scope.terminarHojaRuta = function () { | 79 | $scope.terminarHojaRuta = function () { |
82 | focaModalService | 80 | focaModalService |
83 | .confirm('¿Desea terminar la hoja de ruta? No podra realizar ninguna ' + | 81 | .confirm('¿Desea terminar la hoja de ruta? No podra realizar ninguna ' + |
84 | 'otra descarga ni modificación') | 82 | 'otra descarga ni modificación') |
85 | .then(function () { $scope.datosExtraCierre(terminar); }) | 83 | .then(function () { $scope.datosExtraCierre(terminar); }) |
86 | .catch(function (e) { console.info('Modal ', e); }); | 84 | .catch(function (e) { console.info('Modal ', e); }); |
87 | function terminar(datosExtraCierre) { | 85 | function terminar(datosExtraCierre) { |
88 | $scope.hojaRuta = angular.extend({}, $scope.hojaRuta, datosExtraCierre); | 86 | $scope.hojaRuta = angular.extend({}, $scope.hojaRuta, datosExtraCierre); |
89 | //limpio objeto para guardar | 87 | //limpio objeto para guardar |
90 | delete $scope.hojaRuta.chofer; | 88 | delete $scope.hojaRuta.chofer; |
91 | delete $scope.hojaRuta.remitos; | 89 | delete $scope.hojaRuta.remitos; |
92 | delete $scope.hojaRuta.transportista; | 90 | delete $scope.hojaRuta.transportista; |
93 | delete $scope.hojaRuta.vehiculo; | 91 | delete $scope.hojaRuta.vehiculo; |
94 | 92 | ||
95 | $scope.hojaRuta.fechaCreacion = | 93 | $scope.hojaRuta.fechaCreacion = |
96 | $scope.hojaRuta.fechaCreacion.slice(0, 19).replace('T', ' '); | 94 | $scope.hojaRuta.fechaCreacion.slice(0, 19).replace('T', ' '); |
97 | $scope.hojaRuta.fechaReparto = | 95 | $scope.hojaRuta.fechaReparto = |
98 | $scope.hojaRuta.fechaReparto.slice(0, 19).replace('T', ' '); | 96 | $scope.hojaRuta.fechaReparto.slice(0, 19).replace('T', ' '); |
99 | $scope.hojaRuta.estado = 2; | 97 | $scope.hojaRuta.estado = 2; |
100 | hojaRutaService.terminarHojaRuta($scope.hojaRuta).then( | 98 | hojaRutaService.terminarHojaRuta($scope.hojaRuta).then( |
101 | function () { | 99 | function () { |
102 | focaModalService.alert( | 100 | focaModalService.alert( |
103 | 'Hoja de ruta ' + | 101 | 'Hoja de ruta ' + |
104 | $filter('comprobante')([$scope.puntoVenta, | 102 | $filter('comprobante')([$scope.puntoVenta, |
105 | $scope.comprobante]) + ' cerrada con éxito'); | 103 | $scope.comprobante]) + ' cerrada con éxito'); |
106 | $location.path('/'); | 104 | $location.path('/'); |
107 | } | 105 | } |
108 | ); | 106 | ); |
109 | } | 107 | } |
110 | }; | 108 | }; |
111 | $scope.datosExtraCierre = function (terminar) { | 109 | $scope.datosExtraCierre = function (terminar) { |
112 | var modalInstance = $uibModal.open( | 110 | var modalInstance = $uibModal.open( |
113 | { | 111 | { |
114 | templateUrl: 'focaDatosExtra.html', | 112 | templateUrl: 'focaDatosExtra.html', |
115 | controller: 'focaModalDatosExtraCierre', | 113 | controller: 'focaModalDatosExtraCierre', |
116 | } | 114 | } |
117 | ); | 115 | ); |
118 | modalInstance.result.then(terminar); | 116 | modalInstance.result.then(terminar); |
119 | }; | 117 | }; |
120 | $scope.modalDescargas = function () { | 118 | $scope.modalDescargas = function () { |
121 | delete $scope.hojaRuta.remitos[0].cliente; | 119 | delete $scope.hojaRuta.remitos[0].cliente; |
122 | var remito = $scope.hojaRuta.remitos[0]; | 120 | var remito = $scope.hojaRuta.remitos[0]; |
123 | var msg = ''; | 121 | var msg = ''; |
124 | var mostrarMensaje = true; | 122 | var mostrarMensaje = true; |
125 | for (var i = 0; i < remito.cisternas.length; i++) { | 123 | for (var i = 0; i < remito.cisternas.length; i++) { |
126 | if (remito.cisternas[i].cisternaCarga.cantidad <= 0) | 124 | if (remito.cisternas[i].cisternaCarga.cantidad <= 0) |
127 | msg += 'Cisterna ' + remito.cisternas[i].cisternaCarga.articulo.DetArt + | 125 | msg += 'Cisterna ' + remito.cisternas[i].cisternaCarga.articulo.DetArt + |
128 | ' esta vacía.\n'; | 126 | ' esta vacía.\n'; |
129 | else | 127 | else |
130 | mostrarMensaje = false; | 128 | mostrarMensaje = false; |
131 | } | 129 | } |
132 | if (mostrarMensaje === true) { | 130 | if (mostrarMensaje === true) { |
133 | focaModalService.alert(msg); | 131 | focaModalService.alert(msg); |
134 | return; | 132 | return; |
135 | } | 133 | } |
136 | var modalInstance = $uibModal.open( | 134 | var modalInstance = $uibModal.open( |
137 | { | 135 | { |
138 | templateUrl: 'foca-modal-descarga.html', | 136 | templateUrl: 'foca-modal-descarga.html', |
139 | controller: 'focaModalDescargaCtrl', | 137 | controller: 'focaModalDescargaCtrl', |
140 | resolve: { | 138 | resolve: { |
141 | remito: function () { return remito; } | 139 | remito: function () { return remito; } |
142 | }, | 140 | }, |
143 | } | 141 | } |
144 | ); | 142 | ); |
145 | modalInstance.result.then(function (data) { | 143 | modalInstance.result.then(function (data) { |
146 | console.log(data); | 144 | console.log(data); |
147 | }); | 145 | }); |
148 | }; | 146 | }; |
149 | $scope.articulosDescargados = function (articulosRemito) { | 147 | $scope.articulosDescargados = function (articulosRemito) { |
150 | for (var i = 0; i < articulosRemito.length; i++) { | 148 | for (var i = 0; i < articulosRemito.length; i++) { |
151 | if (articulosRemito[i].cantidadDescargada > 0) continue; | 149 | if (articulosRemito[i].cantidadDescargada > 0) continue; |
152 | else return false; | 150 | else return false; |
153 | } | 151 | } |
154 | return true; | 152 | return true; |
155 | }; | 153 | }; |
156 | $scope.estaPendiente = function () { | 154 | $scope.estaPendiente = function () { |
157 | if ($scope.hojaRuta.abierta) { | 155 | if ($scope.hojaRuta.abierta) { |
158 | $scope.terminarHojaRuta(); | 156 | $scope.terminarHojaRuta(); |
159 | return; | 157 | return; |
160 | } | 158 | } |
161 | var pendiente = false; | 159 | var pendiente = false; |
162 | $scope.hojaRuta.remitos.forEach(function (remito) { | 160 | $scope.hojaRuta.remitos.forEach(function (remito) { |
163 | if (pendiente === false) { | 161 | if (pendiente === false) { |
164 | var aDescargado = false; | 162 | var aDescargado = false; |
165 | for (var i = 0; i < remito.articulosRemito.length; i++) { | 163 | for (var i = 0; i < remito.articulosRemito.length; i++) { |
166 | if (remito.articulosRemito[i].cantidadDescargada > 0) | 164 | if (remito.articulosRemito[i].cantidadDescargada > 0) |
167 | aDescargado = true; | 165 | aDescargado = true; |
168 | } | 166 | } |
169 | pendiente = (!aDescargado && remito.rechazado == null) ? true : false; | 167 | pendiente = (!aDescargado && remito.rechazado == null) ? true : false; |
170 | } | 168 | } |
171 | }); | 169 | }); |
172 | if (pendiente) { | 170 | if (pendiente) { |
173 | focaModalService.alert('Todavia hay remitos pendientes'); | 171 | focaModalService.alert('Todavia hay remitos pendientes'); |
174 | return; | 172 | return; |
175 | } | 173 | } |
176 | $scope.terminarHojaRuta(); | 174 | $scope.terminarHojaRuta(); |
177 | }; | 175 | }; |
178 | $rootScope.$on('estadoRed', function (event, value) { | 176 | $rootScope.$on('estadoRed', function (event, value) { |
179 | $scope.estadoRed = value; | 177 | $scope.estadoRed = value; |
180 | }); | 178 | }); |
181 | function addCabecera(label, valor) { | 179 | function addCabecera(label, valor) { |
182 | var propiedad = $filter('filter')($scope.cabecera, { label: label }, true); | 180 | var propiedad = $filter('filter')($scope.cabecera, { label: label }, true); |
183 | if (propiedad.length === 1) propiedad[0].valor = valor; | 181 | if (propiedad.length === 1) propiedad[0].valor = valor; |
184 | else $scope.cabecera.push({ label: label, valor: valor }); | 182 | else $scope.cabecera.push({ label: label, valor: valor }); |
185 | } | 183 | } |
186 | // function getLSHojaRuta() { | 184 | // function getLSHojaRuta() { |
187 | // var hojaRuta = JSON.parse($localStorage.hojaRuta || null); | 185 | // var hojaRuta = JSON.parse($localStorage.hojaRuta || null); |
188 | // if (hojaRuta) { | 186 | // if (hojaRuta) { |
189 | // $scope.hojaRuta = hojaRuta; | 187 | // $scope.hojaRuta = hojaRuta; |
190 | // delete $localStorage.hojaRuta; | 188 | // delete $localStorage.hojaRuta; |
191 | // } | 189 | // } |
192 | // } | 190 | // } |
193 | function parametrosModalHojasDeRuta(datos) { | 191 | function parametrosModalHojasDeRuta(datos) { |
194 | var parametrosModal = { | 192 | var parametrosModal = { |
195 | data: datos, | 193 | data: datos, |
196 | columnas: [ | 194 | columnas: [ |
197 | { | 195 | { |
198 | propiedad: 'comprobante', | 196 | propiedad: 'comprobante', |
199 | nombre: 'Número' | 197 | nombre: 'Número' |
200 | }, | 198 | }, |
201 | { | 199 | { |
202 | propiedad: 'fechaReparto', | 200 | propiedad: 'fechaReparto', |
203 | nombre: 'Fecha', | 201 | nombre: 'Fecha', |
204 | filtro: { | 202 | filtro: { |
205 | nombre: 'date', | 203 | nombre: 'date', |
206 | parametro: 'yyyy-MM-dd' | 204 | parametro: 'yyyy-MM-dd' |
207 | } | 205 | } |
208 | } | 206 | } |
209 | ], | 207 | ], |
210 | titulo: 'Selecciona hoja de ruta', | 208 | titulo: 'Selecciona hoja de ruta', |
211 | size: 'md' | 209 | size: 'md' |
212 | }; | 210 | }; |
213 | return parametrosModal; | 211 | return parametrosModal; |
214 | } | 212 | } |
215 | } | 213 | } |
216 | ] | 214 | ] |
217 | ); | 215 | ); |
218 | 216 |
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> | ||
171 | 166 |