Commit 287af29b0965b4bba6d395b8bc5126996e4659a2
1 parent
8c0920d722
Exists in
master
Auto stash before merge of "master" and "upstream/master"
Showing
4 changed files
with
34 additions
and
5 deletions
Show diff stats
index.html
... | ... | @@ -41,6 +41,10 @@ |
41 | 41 | <script src="src/etc/develop.js"></script> |
42 | 42 | </head> |
43 | 43 | <body> |
44 | + <style> | |
45 | + .active{color:#fff;text-decoration:none;outline:0;background-color:#337ab7}.btn-xs{padding:.15rem .5rem;font-size:.8rem;line-height:1.5;border-radius:.2rem}.no-border-bottom{border-bottom:0 !important}.no-border-top{border-top:0 !important}.no-border{border:0 !important}.margin-bottom-mobile{margin-bottom:2.5em !important}.tamaño-boton{width:44px}.modal-content{height:auto;max-height:100%;border-radius:0}.modal-dialog{width:100%;height:100%;margin:0;padding:0}.botonera .btn{margin-bottom:5px}.botonera-lateral>.row{height:420px}.botonera-principal menuitem{display:inline-block;height:130px;text-align:center;width:180px}.botonera-principal button{background-image:url("../img/botonera.png");border-radius:12px;border-width:0;height:90px;position:relative;width:90px}.botonera-principal button span{left:0;position:absolute;text-align:center;top:90px;width:100%;font-size:12px;color:#777777}.botonera-principal-menu{padding-left:90px}.botonera-principal-logo{width:80%;opacity:.8}.botonera-principal-vacio button{background-position:-4380px 0}.botonera-principal-vacio button:hover{background-position:-4380px -90px}.botonera-principal-abrir-turno button{background-position:0 0}.botonera-principal-abrir-turno button:hover{background-position:0 -90px}.botonera-principal-cerrar-turno button{background-position:-90px 0}.botonera-principal-cerrar-turno button:hover{background-position:-90px -90px}.botonera-principal-caja button{background-position:-180px 0}.botonera-principal-caja button:hover{background-position:-180px -90px}.botonera-principal-facturador button{background-position:-270px 0px}.botonera-principal-facturador button:hover{background-position:-270px -90px}.botonera-principal-nota-pedido button{background-position:-1250px 0px}.botonera-principal-nota-pedido button:hover{background-position:-1250px -90px}.botonera-secundaria{background-color:rgba(0,0,0,0.8)}.botonera-secundaria .row{border-radius:5px;overflow:hidden}.botonera-secundaria .btn{border-radius:0;margin-right:1px;width:calc(100% - 1px);margin-bottom:1px}body{background-color:#cccccc}.contenedor{background-image:radial-gradient(circle at 50% 50%, #ebecf1, #abaec3)}@media (min-width: 768px){.contenedor{min-height:600px;min-width:800px}}.grilla-articulo{background-color:rgba(0,0,0,0.8)}@media (min-width: 768px){.grilla-articulo{height:430px}}.lista{background-color:rgba(0,0,0,0.8);padding:10px}.lista tr{background:linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.5))}.lista tbody td{border-top:none;color:#ffffff}.lista thead th{border-bottom:1px solid #ffffff;border-top:none;color:#ffffff;font-family:sans-serif;font-size:12px}.lista .boton-accion{background:none;color:#ffffff;border:1px solid #ffffff;border-radius:30px;padding:5px 7px}.lista .boton-accion i{font-size:16px}.login{background-color:#bdbdbd;border:1px solid #000000;border-radius:3px;height:155px;left:calc(50% - 130px);opacity:0.7;position:absolute;text-align:center;top:190px;width:260px}.login-titulo{border-bottom:1px solid #ffffff;padding:5px 0}.login-campo label{display:block;font-size:12px;margin:5px 0 0}.login-campo input:focus{outline:3px solid #ff9900}.panel-informativo{background:linear-gradient(#ccc, #eee);min-height:32px}.panel-informativo .form-group{margin-bottom:5px}.panel-informativo .form-control-xs{height:calc(1.6rem);padding:.25rem .5rem;font-size:.8rem;line-height:1.3;border-radius:.2rem}.panel-informativo .label{font-size:.8em}.panel-informativo .valor{font-size:.8em}@media (max-width: 576px){.panel-informativo .nota-pedido{text-align:center}}@media (min-width: 576px){.panel-informativo .numero-pedido{text-align:center}}.table-nonfluid{width:auto}.table-celda-total{color:#000000;background-color:#FF9900}.keyboard{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:62%;height:60%;margin-left:13%;margin-top:-19%;position:absolute}.keyboard table{border-spacing:10px;border-collapse:separate;z-index:100000}.keyboard table td{touch-action:none}.keyboard .letter{background-color:#bdbdbd;box-shadow:2px 2px 3px #555555;width:47px;height:50px;text-align:center;font-family:"arial";cursor:pointer;color:#000;font-size:22px}.keyboard .letter:hover{background-color:#fafafa}.keyboard .letter:active{background-color:#999;color:#fff}.keyboard .number{background-color:#bdbdbd;box-shadow:2px 2px 3px #555555;width:47px;height:35px;text-align:center;font-family:"arial";cursor:pointer;color:#000;font-size:22px}.keyboard .number:hover{background-color:#fafafa}.keyboard .number:active{background-color:#999;color:#fff}.keyboard .margin{width:40px;height:50px}.teclado-activar{background-color:#17d236}.boton-activar-teclado{margin-top:-10%;position:absolute;z-index:100000}.tabla-articulo{max-height:420px}.tabla-articulo tr{display:inline-table;table-layout:fixed}.tabla-articulo tbody{overflow-y:auto;max-height:280px;display:block}.acciones-mobile{line-height:2.5em;color:orange;font-size:1.25em}.swiper-container{height:400px}.swiper-slide{background:transparent;height:400px;text-align:unset;-webkit-align-items:unset;align-items:unset}.crear-nota-pedido-fecha input[type="date"]::-webkit-clear-button{display:none} | |
46 | + | |
47 | + </style> | |
44 | 48 | <div ng-view class="container-fluid"></div> |
45 | 49 | </body> |
46 | 50 | </html> |
package.json
... | ... | @@ -22,7 +22,13 @@ |
22 | 22 | "peerDependencies": { |
23 | 23 | "foca-busqueda-cliente": "git+https://debo.suite.repo/modulos-npm/foca-busqueda-cliente.git", |
24 | 24 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas.git", |
25 | + "foca-modal": "git+https://debo.suite.repo/modulos-npm/foca-modal.git", | |
25 | 26 | "foca-modal-busqueda-productos": "git+https://debo.suite.repo/modulos-npm/foca-modal-busqueda-productos", |
27 | + "foca-modal-cotizacion": "git+https://debo.suite.repo/modulos-npm/foca-modal-cotizacion.git", | |
28 | + "foca-modal-domicilio": "git+https://debo.suite.repo/modulos-npm/foca-modal-domicilio.git", | |
29 | + "foca-modal-flete": "git+https://debo.suite.repo/modulos-npm/foca-modal-flete", | |
30 | + "foca-modal-moneda": "git+https://debo.suite.repo/modulos-npm/foca-modal-moneda.git", | |
31 | + "foca-modal-precio-condiciones": "git+https://debo.suite.repo/modulos-npm/foca-modal-precio-condiciones.git", | |
26 | 32 | "foca-modal-proveedor": "git+https://debo.suite.repo/modulos-npm/foca-modal-proveedor.git", |
27 | 33 | "foca-modal-vendedores": "git+https://debo.suite.repo/modulos-npm/foca-modal-vendedores.git", |
28 | 34 | "foca-seguimiento": "git+https://debo.suite.repo/modulos-npm/foca-seguimiento.git" |
... | ... | @@ -46,7 +52,7 @@ |
46 | 52 | "foca-seguimiento": "git+https://debo.suite.repo/modulos-npm/foca-seguimiento.git", |
47 | 53 | "font-awesome": "^4.7.0", |
48 | 54 | "gulp": "^3.9.1", |
49 | - "gulp-angular-templatecache": "^2.2.2", | |
55 | + "gulp-angular-templatecache": "^2.2.3", | |
50 | 56 | "gulp-clean": "^0.4.0", |
51 | 57 | "gulp-concat": "^2.6.1", |
52 | 58 | "gulp-connect": "^5.6.1", |
... | ... | @@ -60,7 +66,7 @@ |
60 | 66 | "jasmine-core": "^3.3.0", |
61 | 67 | "jquery": "^3.3.1", |
62 | 68 | "jshint": "^2.9.6", |
63 | - "ladda": "1.0.6", | |
69 | + "ladda": "^1.0.6", | |
64 | 70 | "pre-commit": "^1.2.2", |
65 | 71 | "pump": "^3.0.0", |
66 | 72 | "ui-bootstrap4": "^3.0.5" |
src/js/controller.js
... | ... | @@ -56,9 +56,8 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
56 | 56 | $scope.showCabecera = true; |
57 | 57 | |
58 | 58 | $scope.now = new Date(); |
59 | - $scope.puntoVenta = Math.round(Math.random() * 10000); | |
60 | - $scope.comprobante = Math.round(Math.random() * 1000000); | |
61 | - | |
59 | + $scope.puntoVenta = '0000'; | |
60 | + $scope.comprobante = '00000000'; | |
62 | 61 | $scope.articulosTabla = []; |
63 | 62 | $scope.idLista = undefined; |
64 | 63 | //La pantalla solo se usa para cargar pedidos |
... | ... | @@ -69,6 +68,13 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
69 | 68 | $scope.precioCondiciones = res.data; |
70 | 69 | } |
71 | 70 | ); |
71 | + | |
72 | + crearNotaPedidoService.getNumeroNotaPedido().then( | |
73 | + function(res) { | |
74 | + $scope.puntoVenta = rellenar(res.data.sucursal, 4); | |
75 | + $scope.comprobante = rellenar(res.data.numeroNotaPedido, 8); | |
76 | + } | |
77 | + ); | |
72 | 78 | //La pantalla solo se usa para cargar pedidos |
73 | 79 | // if (notaPedidoTemp !== undefined) { |
74 | 80 | // notaPedidoTemp.fechaCarga = new Date(notaPedidoTemp.fechaCarga); |
... | ... | @@ -166,6 +172,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
166 | 172 | data.data.id, $scope.notaPedido.cotizacion.COTIZACION); |
167 | 173 | focaSeguimientoService.guardarPosicion('crear nota pedido', ''); |
168 | 174 | var plazos = $scope.plazosPagos; |
175 | + | |
169 | 176 | for(var j = 0; j < plazos.length; j++) { |
170 | 177 | var json = { |
171 | 178 | idPedido: data.data.id, |
... | ... | @@ -580,6 +587,15 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
580 | 587 | $scope.cabecera.splice($scope.cabecera.indexOf(propiedad[0]), 1); |
581 | 588 | } |
582 | 589 | } |
590 | + | |
591 | + function rellenar(relleno, longitud) { | |
592 | + relleno = '' + relleno; | |
593 | + while (relleno.length < longitud) { | |
594 | + relleno = '0' + relleno; | |
595 | + } | |
596 | + | |
597 | + return relleno; | |
598 | + } | |
583 | 599 | } |
584 | 600 | ] |
585 | 601 | ) |
src/js/service.js
... | ... | @@ -51,6 +51,9 @@ angular.module('focaCrearNotaPedido') |
51 | 51 | }, |
52 | 52 | crearEstadoParaNotaPedido: function(estado) { |
53 | 53 | return $http.post(route + '/estado', {estado: estado}); |
54 | + }, | |
55 | + getNumeroNotaPedido: function() { | |
56 | + return $http.get(route + '/nota-pedido/numero-siguiente'); | |
54 | 57 | } |
55 | 58 | }; |
56 | 59 | }]); |