Commit a4c70cb02c0bf6dd2b832c63e4bec71bc3d4632c
Exists in
master
and in
2 other branches
Merge remote-tracking branch 'origin/master'
Showing
6 changed files
Show diff stats
gulpfile.js
... | ... | @@ -40,7 +40,7 @@ gulp.task('uglify', ['templates'], function() { |
40 | 40 | ]), |
41 | 41 | concat('foca-crear-hoja-ruta.js'), |
42 | 42 | replace('src/views/', ''), |
43 | - replace("'ngRoute', 'focaModalRemito', 'ui.bootstrap'", ''), | |
43 | + replace("'ngRoute','focaModalRemito','ui.bootstrap','focaBotoneraLateral'", ''), | |
44 | 44 | gulp.dest(paths.tmp), |
45 | 45 | rename('foca-crear-hoja-ruta.min.js'), |
46 | 46 | uglify(), |
package.json
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | "compile": "gulp uglify", |
9 | 9 | "gulp-pre-commit": "gulp pre-commit", |
10 | 10 | "postinstall": "npm run compile && gulp clean-post-install", |
11 | - "install-dev": "npm install -D jasmine-core pre-commit angular angular-ladda ladda@1.0.6 angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-uglify jquery jshint pump git+https://debo.suite.repo/modulos-npm/foca-directivas.git git+https://debo.suite.repo/modulos-npm/foca-modal-remito.git" | |
11 | + "install-dev": "npm install -D jasmine-core pre-commit angular angular-ladda ladda@1.0.6 angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-uglify jquery jshint pump git+http://git.focasoftware.com/npm/foca-botonera-facturador.git git+http://git.focasoftware.com/npm/foca-directivas.git git+http://git.focasoftware.com/npm/foca-modal-remito.git" | |
12 | 12 | }, |
13 | 13 | "pre-commit": [ |
14 | 14 | "gulp-pre-commit" |
... | ... | @@ -24,8 +24,9 @@ |
24 | 24 | "angular-ladda": "^0.4.3", |
25 | 25 | "angular-route": "^1.7.5", |
26 | 26 | "bootstrap": "^4.1.3", |
27 | - "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas.git", | |
28 | - "foca-modal-remito": "git+https://debo.suite.repo/modulos-npm/foca-modal-remito.git", | |
27 | + "foca-botonera-facturador": "git+http://git.focasoftware.com/npm/foca-botonera-facturador.git", | |
28 | + "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git", | |
29 | + "foca-modal-remito": "git+http://git.focasoftware.com/npm/foca-modal-remito.git", | |
29 | 30 | "font-awesome": "^4.7.0", |
30 | 31 | "gulp": "^3.9.1", |
31 | 32 | "gulp-angular-templatecache": "^2.2.5", |
src/js/app.js
1 | -angular.module('focaCrearHojaRuta', ['ngRoute', 'focaModalRemito', 'ui.bootstrap'/*, | |
2 | - 'focaBusquedaProductos', | |
1 | +angular.module('focaCrearHojaRuta', [ | |
2 | + 'ngRoute', | |
3 | + 'focaModalRemito', | |
4 | + 'ui.bootstrap', | |
5 | + 'focaBotoneraLateral', | |
6 | + /*'focaBusquedaProductos', | |
3 | 7 | 'focaModalProveedor', |
4 | 8 | 'focaBusquedaCliente', |
5 | 9 | 'focaModalPrecioCondicion', |
src/js/controller.js
1 | 1 | angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
2 | 2 | [ |
3 | - '$scope', '$uibModal', '$location', '$filter', 'crearHojaRutaService', 'focaModalService', | |
4 | - function($scope, $uibModal, $location, $filter, crearHojaRutaService, focaModalService) { | |
5 | - $scope.botonera = [ | |
6 | - {texto: 'Transportista', accion: function() {$scope.seleccionarProveedor();}}, | |
7 | - {texto: 'Chofer', accion: function() {$scope.seleccionarChofer();}}, | |
8 | - {texto: 'Vehiculo', accion: function() {$scope.seleccionarVehiculo();}}, | |
9 | - {texto: 'Tarifario', accion: function() {$scope.seleccionarTarifario();}}, | |
10 | - {texto: 'Remitos', accion: function() {$scope.seleccionarRemito();}}, | |
11 | - {texto: '', accion: function() {}}, | |
12 | - {texto: '', accion: function() {}}, | |
13 | - {texto: '', accion: function() {}} | |
14 | - ]; | |
3 | + '$scope', | |
4 | + '$uibModal', | |
5 | + '$location', | |
6 | + '$filter', | |
7 | + '$timeout', | |
8 | + 'crearHojaRutaService', | |
9 | + 'focaModalService', | |
10 | + 'focaBotoneraLateralService', | |
11 | + function($scope, $uibModal, $location, $filter, $timeout, | |
12 | + crearHojaRutaService, focaModalService, focaBotoneraLateralService) { | |
13 | + | |
14 | + $scope.botonera = crearHojaRutaService.getBotonera(); | |
15 | 15 | $scope.datepickerAbierto = false; |
16 | 16 | |
17 | 17 | $scope.show = false; |
... | ... | @@ -34,7 +34,6 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
34 | 34 | } |
35 | 35 | }; |
36 | 36 | |
37 | - $scope.cabecera = []; | |
38 | 37 | $scope.showCabecera = true; |
39 | 38 | |
40 | 39 | $scope.now = new Date(); |
... | ... | @@ -45,6 +44,13 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
45 | 44 | //La pantalla solo se usa para cargar pedidos |
46 | 45 | //var hojaRutaTemp = crearHojaRutaService.getHojaRuta(); |
47 | 46 | |
47 | + //SETEO BOTONERA LATERAL | |
48 | + $timeout(function() { | |
49 | + focaBotoneraLateralService.showSalir(true); | |
50 | + focaBotoneraLateralService.showPausar(true); | |
51 | + focaBotoneraLateralService.showGuardar(true, $scope.crearHojaRuta); | |
52 | + }); | |
53 | + | |
48 | 54 | crearHojaRutaService.getNumeroHojaRuta().then( |
49 | 55 | function(res) { |
50 | 56 | $scope.puntoVenta = $scope.rellenar(res.data.sucursal, 4); |
... | ... | @@ -165,7 +171,7 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
165 | 171 | }; |
166 | 172 | |
167 | 173 | $scope.remitosTabla = []; |
168 | - $scope.cabecera = []; | |
174 | + $scope.$broadcast('cleanCabecera'); | |
169 | 175 | |
170 | 176 | crearHojaRutaService.getNumeroHojaRuta().then(function(res) { |
171 | 177 | $scope.comprobante = $scope.rellenar(res.data.numeroHojaRuta, 8); |
... | ... | @@ -178,7 +184,7 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
178 | 184 | ); |
179 | 185 | }; |
180 | 186 | |
181 | - $scope.seleccionarProveedor = function() { | |
187 | + $scope.seleccionarTransportista = function() { | |
182 | 188 | var modalInstance = $uibModal.open( |
183 | 189 | { |
184 | 190 | ariaLabelledBy: 'Busqueda de Transportista', |
... | ... | @@ -196,7 +202,10 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
196 | 202 | function(proveedor) { |
197 | 203 | console.info($scope.hojaRuta); |
198 | 204 | $scope.hojaRuta.transportista.codigo = proveedor.COD; |
199 | - addCabecera('Transportista:', proveedor.NOM); | |
205 | + $scope.$broadcast('addCabecera', { | |
206 | + label: 'Transportista:', | |
207 | + valor: proveedor.NOM | |
208 | + }); | |
200 | 209 | }, function() { |
201 | 210 | |
202 | 211 | } |
... | ... | @@ -216,7 +225,10 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
216 | 225 | modalInstance.result.then( |
217 | 226 | function(chofer) { |
218 | 227 | $scope.hojaRuta.chofer = chofer; |
219 | - addCabecera('Chofer: ', chofer.nombre); | |
228 | + $scope.$broadcast('addCabecera', { | |
229 | + label: 'Chofer:', | |
230 | + valor: chofer.nombre | |
231 | + }); | |
220 | 232 | }, function() { |
221 | 233 | // funcion ejecutada cuando se cancela el modal |
222 | 234 | } |
... | ... | @@ -236,9 +248,18 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
236 | 248 | modalInstance.result.then( |
237 | 249 | function(vehiculo) { |
238 | 250 | $scope.hojaRuta.vehiculo = vehiculo; |
239 | - addCabecera('Tractor: ', vehiculo.tractor); | |
240 | - addCabecera('Semi: ', vehiculo.semi); | |
241 | - addCabecera('Capacidad: ', vehiculo.capacidad); | |
251 | + $scope.$broadcast('addCabecera', { | |
252 | + label: 'Tractor:', | |
253 | + valor: vehiculo.tractor | |
254 | + }); | |
255 | + $scope.$broadcast('addCabecera', { | |
256 | + label: 'Semi:', | |
257 | + valor: vehiculo.semi | |
258 | + }); | |
259 | + $scope.$broadcast('addCabecera', { | |
260 | + label: 'Capacidad:', | |
261 | + valor: vehiculo.capacidad | |
262 | + }); | |
242 | 263 | }, function() { |
243 | 264 | // funcion ejecutada cuando se cancela el modal |
244 | 265 | } |
... | ... | @@ -263,14 +284,17 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
263 | 284 | modalInstance.result.then( |
264 | 285 | function(tarifario) { |
265 | 286 | $scope.hojaRuta.tarifario = tarifario; |
266 | - addCabecera('Tarifario: ', tarifario.costo); | |
287 | + $scope.$broadcast('addCabecera', { | |
288 | + label: 'Tarifario:', | |
289 | + valor: tarifario.costo | |
290 | + }); | |
267 | 291 | }, function() { |
268 | 292 | // funcion ejecutada cuando se cancela el modal |
269 | 293 | } |
270 | 294 | ); |
271 | 295 | }; |
272 | 296 | |
273 | - $scope.seleccionarRemito = function() { | |
297 | + $scope.seleccionarRemitos = function() { | |
274 | 298 | var modalInstance = $uibModal.open( |
275 | 299 | { |
276 | 300 | ariaLabelledBy: 'Busqueda de Remito', |
... | ... | @@ -392,22 +416,6 @@ angular.module('focaCrearHojaRuta') .controller('hojaRutaCtrl', |
392 | 416 | $scope.hojaRuta.litros = litros; |
393 | 417 | |
394 | 418 | }; |
395 | - | |
396 | - function addCabecera(label, valor) { | |
397 | - var propiedad = $filter('filter')($scope.cabecera, {label: label}, true); | |
398 | - if(propiedad.length === 1) { | |
399 | - propiedad[0].valor = valor; | |
400 | - } else { | |
401 | - $scope.cabecera.push({label: label, valor: valor}); | |
402 | - } | |
403 | - } | |
404 | - | |
405 | - /*function removeCabecera(label) { | |
406 | - var propiedad = $filter('filter')($scope.cabecera, {label: label}, true); | |
407 | - if(propiedad.length === 1){ | |
408 | - $scope.cabecera.splice($scope.cabecera.indexOf(propiedad[0]), 1); | |
409 | - } | |
410 | - }*/ | |
411 | 419 | } |
412 | 420 | ] |
413 | 421 | ) |
src/js/service.js
... | ... | @@ -54,6 +54,9 @@ angular.module('focaCrearHojaRuta') |
54 | 54 | }, |
55 | 55 | getNumeroHojaRuta: function() { |
56 | 56 | return $http.get(route + '/hoja-ruta/numero-siguiente'); |
57 | + }, | |
58 | + getBotonera: function() { | |
59 | + return ['Transportista', 'Chofer', 'Vehiculo', 'Tarifario', 'Remitos']; | |
57 | 60 | } |
58 | 61 | }; |
59 | 62 | }]); |
src/views/hoja-ruta.html
1 | -<div class="crear-nota-pedido"> | |
2 | - <form name="formCrearNota" ng-submit="crearNotaPedido()" class="mb-0"> | |
3 | - <div class="row"> | |
4 | - <div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2"> | |
5 | - <div class="row p-1 panel-informativo"> | |
1 | +<div class="crear-hoja-ruta foca-crear row"> | |
2 | + <foca-cabecera-facturador | |
3 | + titulo="'Hoja de ruta'" | |
4 | + numero="puntoVenta + '-' + comprobante" | |
5 | + fecha="now" | |
6 | + class="mb-0 col-lg-12" | |
7 | + ></foca-cabecera-facturador> | |
8 | + <div class="col-lg-12"> | |
9 | + <div class="row mt-4"> | |
10 | + <div class="col-12 col-md-10 border border-light rounded"> | |
11 | + <div class="row px-5 py-2 botonera-secundaria"> | |
6 | 12 | <div class="col-12"> |
7 | - <div class="row"> | |
8 | - <div class="col-12 col-sm-4 nota-pedido"> | |
9 | - <h5>HOJA DE RUTA</h5> | |
10 | - </div> | |
11 | - <div class="col-5 col-sm-4 numero-pedido" | |
12 | - >Nº {{puntoVenta}}-{{comprobante}} | |
13 | - </div> | |
14 | - <div class="col-7 col-sm-4 text-right"> | |
15 | - Fecha: | |
16 | - <span | |
17 | - ng-show="!datepickerAbierto" | |
18 | - ng-bind="now | date:'dd/MM/yyyy HH:mm'" | |
19 | - ng-click="datepickerAbierto = true" | |
20 | - > | |
21 | - </span> | |
22 | - <input | |
23 | - ng-show="datepickerAbierto" | |
24 | - type="date" | |
25 | - ng-model="now" | |
26 | - ng-change="datepickerAbierto = false" | |
27 | - ng-blur="datepickerAbierto = false" | |
28 | - class="form-control form-control-sm col-8 float-right" | |
29 | - foca-focus="datepickerAbierto" | |
30 | - hasta-hoy | |
31 | - /> | |
32 | - </div> | |
33 | - </div> | |
34 | - <div class="row"> | |
35 | - <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera"> | |
36 | - <span class="label" ng-bind="cab.label"></span> | |
37 | - <span class="valor" ng-bind="cab.valor"></span> | |
38 | - </div> | |
39 | - <a | |
40 | - class="btn col-12 btn-secondary d-sm-none" | |
41 | - ng-show="cabecera.length > 0" | |
42 | - ng-click="showCabecera = !showCabecera" | |
43 | - > | |
44 | - <i | |
45 | - class="fa fa-chevron-down" | |
46 | - ng-hide="showCabecera" | |
47 | - aria-hidden="true" | |
48 | - > | |
49 | - </i> | |
50 | - <i | |
51 | - class="fa fa-chevron-up" | |
52 | - ng-show="showCabecera" | |
53 | - aria-hidden="true"> | |
54 | - </i> | |
55 | - </a> | |
56 | - </div> | |
57 | - </div> | |
58 | - </div> | |
59 | - <div class="row p-1 botonera-secundaria"> | |
60 | - <div class="col-12"> | |
61 | - <div class="row"> | |
62 | - <div class="col-6 col-sm-3 px-0 py-0" ng-repeat="boton in botonera"> | |
63 | - <button | |
64 | - type="button" | |
65 | - class="btn btn-default btn-block btn-xs text-left py-2" | |
66 | - ng-click="boton.accion()" | |
67 | - ng-class="{'d-none d-sm-block': boton.texto == ''}" | |
68 | - > | |
69 | - <i | |
70 | - class="fa fa-arrow-circle-right" | |
71 | - ng-show="boton.texto != ''" | |
72 | - ></i> | |
73 | - | |
74 | - {{boton.texto}} | |
75 | - </button> | |
76 | - </div> | |
77 | - </div> | |
13 | + <foca-botonera-facturador botones="botonera" extra="7" class="row"></foca-botonera-facturador> | |
78 | 14 | </div> |
79 | 15 | </div> |
80 | - </div> | |
81 | - </div> | |
82 | - </form> | |
83 | - <div class="row"> | |
84 | - <div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | |
85 | - <!-- PC --> | |
86 | - <div class="row grilla-articulo align-items-end d-none d-sm-flex"> | |
87 | - <table class="table tabla-articulo table-striped table-sm table-dark"> | |
88 | - <thead> | |
89 | - <tr class="d-flex"> | |
90 | - <th class="col-auto">#</th> | |
91 | - <th class="col-2">Remito</th> | |
92 | - <th class="col">Cliente</th> | |
93 | - <th class="col">Dirección</th> | |
94 | - <th class="text-right" style="width: 80px">Cantidad</th> | |
95 | - <th class="col-auto"> | |
96 | - <button | |
97 | - class="btn btn-outline-secondary selectable" | |
98 | - ng-click="show = !show; masMenos()" | |
99 | - > | |
100 | - <i | |
101 | - class="fa fa-chevron-down" | |
102 | - ng-show="show" | |
103 | - aria-hidden="true" | |
16 | + <!-- PC --> | |
17 | + <div class="row grilla-articulo align-items-end d-none d-sm-flex"> | |
18 | + <table class="table tabla-articulo table-striped table-sm mb-0 rounded-bottom"> | |
19 | + <thead> | |
20 | + <tr class="d-flex"> | |
21 | + <th class="col-auto">#</th> | |
22 | + <th class="col-2">Remito</th> | |
23 | + <th class="col">Cliente</th> | |
24 | + <th class="col">Dirección</th> | |
25 | + <th class="text-right" style="width: 80px">Cantidad</th> | |
26 | + <th class="col-auto"> | |
27 | + <button | |
28 | + class="btn btn-outline-light selectable" | |
29 | + ng-click="show = !show; masMenos()" | |
104 | 30 | > |
105 | - </i> | |
106 | - <i | |
107 | - class="fa fa-chevron-up" | |
108 | - ng-hide="show" | |
109 | - aria-hidden="true"> | |
110 | - </i> | |
111 | - </button> | |
112 | - </th> | |
113 | - </th> | |
114 | - </tr> | |
115 | - </thead> | |
116 | - <tbody class="tabla-articulo-body"> | |
117 | - <tr | |
118 | - ng-repeat="(key, remito) in remitosTabla" | |
119 | - class="d-flex" | |
120 | - ng-show="show || key == remitosTabla.length - 1" | |
121 | - > | |
122 | - <td ng-bind="key + 1" class="col-auto"></td> | |
123 | - <td | |
124 | - class="col-2" | |
125 | - ng-bind="rellenar(remito.sucursal, 4) + '-' + rellenar(remito.numeroRemito, 8)" | |
126 | - ></td> | |
127 | - <th class="col" ng-bind="remito.cliente[0].NOM"></th> | |
128 | - <th class="col" ng-bind="remito.domicilioStamp"></th> | |
129 | - <th class="text-right" ng-bind="remito.litros" style="width: 80px"></th> | |
130 | - <td class="text-center col-auto"> | |
131 | - <button | |
132 | - class="btn btn-outline-secondary" | |
133 | - ng-click="quitarArticulo(key)" | |
134 | - > | |
135 | - <i class="fa fa-trash"></i> | |
136 | - </button> | |
137 | - </td> | |
138 | - </tr> | |
139 | - </tbody> | |
140 | - <tfoot> | |
141 | - <tr class="d-flex"> | |
142 | - <td class="col-auto px-1"> | |
143 | - <strong>Remitos:</strong> | |
144 | - <a ng-bind="remitosTabla.length"></a> | |
145 | - </td> | |
146 | - <td class="col"></td> | |
147 | - <td class="col-auto px-1"> | |
148 | - <strong>Cantidad:</strong> | |
149 | - <a ng-bind="hojaRuta.litros"></a> | |
150 | - </td> | |
151 | - </tr> | |
152 | - </tfoot> | |
153 | - </table> | |
154 | - </div> | |
155 | - | |
156 | - <!-- MOBILE --> | |
157 | - <div class="row d-sm-none"> | |
158 | - <table class="table table-sm table-striped table-dark margin-bottom-mobile"> | |
159 | - <thead> | |
160 | - <tr class="d-flex"> | |
161 | - <th class="">#</th> | |
162 | - <th class="col px-0"> | |
163 | - <div class="d-flex"> | |
164 | - <div class="col-4 px-1">Código</div> | |
165 | - <div class="col-8 px-1">Descripción</div> | |
166 | - </div> | |
167 | - <div class="d-flex"> | |
168 | - <div class="col-3 px-1">Cantidad</div> | |
169 | - <div class="col px-1 text-right">P. Uni.</div> | |
170 | - <div class="col px-1 text-right">Subtotal</div> | |
171 | - </div> | |
172 | - </th> | |
173 | - <th class="text-center tamaño-boton"> | |
174 | - | |
175 | - </th> | |
176 | - </tr> | |
177 | - </thead> | |
178 | - <tbody> | |
179 | - <tr | |
180 | - ng-repeat="(key, articulo) in remitosTabla" | |
181 | - ng-show="show || key == remitosTabla.length - 1" | |
182 | - > | |
183 | - <td class="w-100 align-middle d-flex p-0"> | |
184 | - <div class="align-middle p-1"> | |
185 | - <span ng-bind="key+1" class="align-middle"></span> | |
186 | - </div> | |
187 | - <div class="col px-0"> | |
31 | + <i | |
32 | + class="fa fa-chevron-down" | |
33 | + ng-show="show" | |
34 | + aria-hidden="true" | |
35 | + > | |
36 | + </i> | |
37 | + <i | |
38 | + class="fa fa-chevron-up" | |
39 | + ng-hide="show" | |
40 | + aria-hidden="true"> | |
41 | + </i> | |
42 | + </button> | |
43 | + </th> | |
44 | + </th> | |
45 | + </tr> | |
46 | + </thead> | |
47 | + <tbody class="tabla-articulo-body"> | |
48 | + <tr | |
49 | + ng-repeat="(key, remito) in remitosTabla" | |
50 | + class="d-flex" | |
51 | + ng-show="show || key == remitosTabla.length - 1" | |
52 | + > | |
53 | + <td ng-bind="key + 1" class="col-auto"></td> | |
54 | + <td | |
55 | + class="col-2" | |
56 | + ng-bind="rellenar(remito.sucursal, 4) + '-' + rellenar(remito.numeroRemito, 8)" | |
57 | + ></td> | |
58 | + <th class="col" ng-bind="remito.cliente[0].NOM"></th> | |
59 | + <th class="col" ng-bind="remito.domicilioStamp"></th> | |
60 | + <th class="text-right" ng-bind="remito.litros" style="width: 80px"></th> | |
61 | + <td class="text-center col-auto"> | |
62 | + <button | |
63 | + class="btn btn-outline-light" | |
64 | + ng-click="quitarArticulo(key)" | |
65 | + > | |
66 | + <i class="fa fa-trash"></i> | |
67 | + </button> | |
68 | + </td> | |
69 | + </tr> | |
70 | + </tbody> | |
71 | + <tfoot> | |
72 | + <tr class="d-flex"> | |
73 | + <td class="col-auto px-1"> | |
74 | + <strong>Remitos:</strong> | |
75 | + <a ng-bind="remitosTabla.length"></a> | |
76 | + </td> | |
77 | + <td class="col"></td> | |
78 | + <td class="col-auto px-1"> | |
79 | + <strong>Cantidad:</strong> | |
80 | + <a ng-bind="hojaRuta.litros"></a> | |
81 | + </td> | |
82 | + </tr> | |
83 | + </tfoot> | |
84 | + </table> | |
85 | + </div> | |
86 | + | |
87 | + <!-- MOBILE --> | |
88 | + <div class="row d-sm-none"> | |
89 | + <table class="table table-sm table-striped tabla-articulo margin-bottom-mobile"> | |
90 | + <thead> | |
91 | + <tr class="d-flex"> | |
92 | + <th class="">#</th> | |
93 | + <th class="col px-0"> | |
94 | + <div class="d-flex"> | |
95 | + <div class="col-4 px-1">Código</div> | |
96 | + <div class="col-8 px-1">Descripción</div> | |
97 | + </div> | |
98 | + <div class="d-flex"> | |
99 | + <div class="col-3 px-1">Cantidad</div> | |
100 | + <div class="col px-1 text-right">P. Uni.</div> | |
101 | + <div class="col px-1 text-right">Subtotal</div> | |
102 | + </div> | |
103 | + </th> | |
104 | + <th class="text-center tamaño-boton"> | |
105 | + | |
106 | + </th> | |
107 | + </tr> | |
108 | + </thead> | |
109 | + <tbody> | |
110 | + <tr | |
111 | + ng-repeat="(key, articulo) in remitosTabla" | |
112 | + ng-show="show || key == remitosTabla.length - 1" | |
113 | + > | |
114 | + <td class="w-100 align-middle d-flex p-0"> | |
115 | + <div class="align-middle p-1"> | |
116 | + <span ng-bind="key+1" class="align-middle"></span> | |
117 | + </div> | |
118 | + <div class="col px-0"> | |
119 | + <div class="d-flex"> | |
120 | + <div class="col-4 px-1"> | |
121 | + <span | |
122 | + ng-bind="articulo.sector + '-' + articulo.codigo" | |
123 | + ></span> | |
124 | + </div> | |
125 | + <div class="col-8 px-1"> | |
126 | + <span ng-bind="articulo.descripcion"></span> | |
127 | + </div> | |
128 | + </div> | |
129 | + <div class="d-flex"> | |
130 | + <div class="col-3 px-1"> | |
131 | + <span ng-bind="'x' + articulo.cantidad"></span> | |
132 | + </div> | |
133 | + <div class="col-3 px-1 text-right"> | |
134 | + <span ng-bind="articulo.precio | currency: hojaRuta.moneda.simbolo : 4"></span> | |
135 | + </div> | |
136 | + <div class="col px-1 text-right"> | |
137 | + <span | |
138 | + ng-bind="(articulo.precio * articulo.cantidad) | currency: hojaRuta.moneda.simbolo" | |
139 | + > | |
140 | + </span> | |
141 | + </div> | |
142 | + </div> | |
143 | + </div> | |
144 | + <div class="align-middle p-1"> | |
145 | + <button | |
146 | + class="btn btn-outline-light" | |
147 | + ng-click="quitarArticulo(key)" | |
148 | + > | |
149 | + <i class="fa fa-trash"></i> | |
150 | + </button> | |
151 | + </div> | |
152 | + </td> | |
153 | + </tr> | |
154 | + </tbody> | |
155 | + <tfoot> | |
156 | + <!-- CARGANDO ITEM --> | |
157 | + <tr ng-show="!cargando" class="d-flex"> | |
158 | + <td | |
159 | + class="align-middle p-1" | |
160 | + ng-bind="remitosTabla.length + 1" | |
161 | + ></td> | |
162 | + <td class="col p-0"> | |
188 | 163 | <div class="d-flex"> |
189 | 164 | <div class="col-4 px-1"> |
190 | 165 | <span |
191 | - ng-bind="articulo.sector + '-' + articulo.codigo" | |
166 | + ng-bind="articuloACargar.sectorCodigo" | |
192 | 167 | ></span> |
193 | 168 | </div> |
194 | 169 | <div class="col-8 px-1"> |
195 | - <span ng-bind="articulo.descripcion"></span> | |
170 | + <span ng-bind="articuloACargar.descripcion"></span> | |
196 | 171 | </div> |
197 | 172 | </div> |
198 | 173 | <div class="d-flex"> |
199 | - <div class="col-3 px-1"> | |
200 | - <span ng-bind="'x' + articulo.cantidad"></span> | |
174 | + <div class="col-3 px-1 m-1"> | |
175 | + <input | |
176 | + class="form-control p-1" | |
177 | + type="number" | |
178 | + min="1" | |
179 | + ng-model="articuloACargar.cantidad" | |
180 | + foca-focus="!cargando" | |
181 | + ng-keypress="agregarATabla($event.keyCode)" | |
182 | + style="height: auto; line-height: 1.1em" | |
183 | + > | |
201 | 184 | </div> |
202 | 185 | <div class="col-3 px-1 text-right"> |
203 | - <span ng-bind="articulo.precio | currency: hojaRuta.moneda.simbolo : 4"></span> | |
186 | + <span ng-bind="articuloACargar.precio | currency: hojaRuta.moneda.simbolo : 4"></span> | |
204 | 187 | </div> |
205 | 188 | <div class="col px-1 text-right"> |
206 | 189 | <span |
207 | - ng-bind="(articulo.precio * articulo.cantidad) | currency: hojaRuta.moneda.simbolo" | |
190 | + ng-bind="getSubTotal() | currency: hojaRuta.moneda.simbolo" | |
208 | 191 | > |
209 | 192 | </span> |
210 | 193 | </div> |
211 | 194 | </div> |
212 | - </div> | |
213 | - <div class="align-middle p-1"> | |
195 | + </td> | |
196 | + <td class="text-center align-middle"> | |
214 | 197 | <button |
215 | - class="btn btn-outline-secondary" | |
216 | - ng-click="quitarArticulo(key)" | |
198 | + class="btn btn-outline-light" | |
199 | + ng-click="agregarATabla(13)" | |
217 | 200 | > |
218 | - <i class="fa fa-trash"></i> | |
201 | + <i class="fa fa-save"></i> | |
219 | 202 | </button> |
220 | - </div> | |
221 | - </td> | |
222 | - </tr> | |
223 | - </tbody> | |
224 | - <tfoot> | |
225 | - <!-- CARGANDO ITEM --> | |
226 | - <tr ng-show="!cargando" class="d-flex"> | |
227 | - <td | |
228 | - class="align-middle p-1" | |
229 | - ng-bind="remitosTabla.length + 1" | |
230 | - ></td> | |
231 | - <td class="col p-0"> | |
232 | - <div class="d-flex"> | |
233 | - <div class="col-4 px-1"> | |
234 | - <span | |
235 | - ng-bind="articuloACargar.sectorCodigo" | |
236 | - ></span> | |
237 | - </div> | |
238 | - <div class="col-8 px-1"> | |
239 | - <span ng-bind="articuloACargar.descripcion"></span> | |
240 | - </div> | |
241 | - </div> | |
242 | - <div class="d-flex"> | |
243 | - <div class="col-3 px-1 m-1"> | |
244 | - <input | |
245 | - class="form-control p-1" | |
246 | - type="number" | |
247 | - min="1" | |
248 | - ng-model="articuloACargar.cantidad" | |
249 | - foca-focus="!cargando" | |
250 | - ng-keypress="agregarATabla($event.keyCode)" | |
251 | - style="height: auto; line-height: 1.1em" | |
252 | - > | |
253 | - </div> | |
254 | - <div class="col-3 px-1 text-right"> | |
255 | - <span ng-bind="articuloACargar.precio | currency: hojaRuta.moneda.simbolo : 4"></span> | |
256 | - </div> | |
257 | - <div class="col px-1 text-right"> | |
258 | - <span | |
259 | - ng-bind="getSubTotal() | currency: hojaRuta.moneda.simbolo" | |
260 | - > | |
261 | - </span> | |
262 | - </div> | |
263 | - </div> | |
264 | - </td> | |
265 | - <td class="text-center align-middle"> | |
266 | - <button | |
267 | - class="btn btn-outline-secondary" | |
268 | - ng-click="agregarATabla(13)" | |
269 | - > | |
270 | - <i class="fa fa-save"></i> | |
271 | - </button> | |
272 | - </td> | |
273 | - </tr> | |
274 | - <!-- SELECCIONAR PRODUCTO --> | |
275 | - <tr ng-show="cargando" class="d-flex"> | |
276 | - <td class="col-12"> | |
277 | - <input | |
278 | - placeholder="Seleccione Articulo" | |
279 | - class="form-control form-control-sm" | |
280 | - readonly | |
281 | - ng-click="seleccionarArticulo()" | |
282 | - /> | |
283 | - </td> | |
284 | - </tr> | |
285 | - <!-- TOOGLE EXPANDIR --> | |
286 | - <tr> | |
287 | - <td class="col"> | |
288 | - <button | |
289 | - class="btn btn-outline-secondary selectable w-100" | |
290 | - ng-click="show = !show; masMenos()" | |
291 | - ng-show="remitosTabla.length > 0" | |
292 | - > | |
293 | - <i | |
294 | - class="fa fa-chevron-down" | |
295 | - ng-hide="show" | |
296 | - aria-hidden="true" | |
203 | + </td> | |
204 | + </tr> | |
205 | + <!-- SELECCIONAR PRODUCTO --> | |
206 | + <tr ng-show="cargando" class="d-flex"> | |
207 | + <td class="col-12"> | |
208 | + <input | |
209 | + placeholder="Seleccione Articulo" | |
210 | + class="form-control form-control-sm" | |
211 | + readonly | |
212 | + ng-click="seleccionarArticulo()" | |
213 | + /> | |
214 | + </td> | |
215 | + </tr> | |
216 | + <!-- TOOGLE EXPANDIR --> | |
217 | + <tr> | |
218 | + <td class="col"> | |
219 | + <button | |
220 | + class="btn btn-outline-light selectable w-100" | |
221 | + ng-click="show = !show; masMenos()" | |
222 | + ng-show="remitosTabla.length > 0" | |
297 | 223 | > |
298 | - </i> | |
299 | - <i | |
300 | - class="fa fa-chevron-up" | |
301 | - ng-show="show" | |
302 | - aria-hidden="true"> | |
303 | - </i> | |
304 | - </button> | |
305 | - </td> | |
306 | - </tr> | |
307 | - <!-- FOOTER --> | |
308 | - <tr class="d-flex"> | |
309 | - <td class="align-middle no-border-top" colspan="2"> | |
310 | - <strong>Cantidad Items:</strong> | |
311 | - <a ng-bind="remitosTabla.length"></a> | |
312 | - </td> | |
313 | - <td class="text-right ml-auto table-celda-total no-border-top"> | |
314 | - <h3>Total:</h3> | |
315 | - </td> | |
316 | - <td class="table-celda-total text-right no-border-top"> | |
317 | - <h3>{{getTotal() | currency: hojaRuta.moneda.simbolo}}</h3> | |
318 | - </td> | |
319 | - </tr> | |
320 | - </tfoot> | |
321 | - </table> | |
322 | - </div> | |
323 | - </div> | |
324 | - <div class="col-auto my-2 col-lg-2 botonera-lateral d-none d-md-block"> | |
325 | - <div class="row align-items-end"> | |
326 | - <div class="col-12"> | |
327 | - <button | |
328 | - ng-click="crearHojaRuta()" | |
329 | - type="submit" | |
330 | - title="Crear nota pedido" | |
331 | - class="btn btn-default btn-block mb-2"> | |
332 | - Guardar | |
333 | - </button> | |
334 | - <button | |
335 | - ng-click="salir()" | |
336 | - type="button" | |
337 | - title="Salir" | |
338 | - class="btn btn-default btn-block"> | |
339 | - Salir | |
340 | - </button> | |
224 | + <i | |
225 | + class="fa fa-chevron-down" | |
226 | + ng-hide="show" | |
227 | + aria-hidden="true" | |
228 | + > | |
229 | + </i> | |
230 | + <i | |
231 | + class="fa fa-chevron-up" | |
232 | + ng-show="show" | |
233 | + aria-hidden="true"> | |
234 | + </i> | |
235 | + </button> | |
236 | + </td> | |
237 | + </tr> | |
238 | + <!-- FOOTER --> | |
239 | + <tr class="d-flex"> | |
240 | + <td class="align-middle no-border-top" colspan="2"> | |
241 | + <strong>Cantidad Items:</strong> | |
242 | + <a ng-bind="remitosTabla.length"></a> | |
243 | + </td> | |
244 | + <td class="text-right ml-auto table-celda-total no-border-top"> | |
245 | + <h3>Total:</h3> | |
246 | + </td> | |
247 | + <td class="table-celda-total text-right no-border-top"> | |
248 | + <h3>{{getTotal() | currency: hojaRuta.moneda.simbolo}}</h3> | |
249 | + </td> | |
250 | + </tr> | |
251 | + </tfoot> | |
252 | + </table> | |
341 | 253 | </div> |
342 | 254 | </div> |
343 | 255 | </div> |