Commit c68d9f4cbd7a29ba1f64e4fd893b24e50ba7c1d5
Exists in
master
Merge branch 'master' into 'master'
Master(efernandez) See merge request !1
Showing
23 changed files
Show diff stats
README.md
... | ... | @@ -25,3 +25,7 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protrac |
25 | 25 | ## Further help |
26 | 26 | |
27 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). |
28 | + | |
29 | +## Build Android apk | |
30 | + | |
31 | +Run `cordova run android` | |
28 | 32 | \ No newline at end of file |
config.xml
... | ... | @@ -0,0 +1,27 @@ |
1 | +<?xml version='1.0' encoding='utf-8'?> | |
2 | +<widget id="com.focasoftware.comprobantes" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | |
3 | + <name>Gestión comprobantes</name> | |
4 | + <description> | |
5 | + Gestion de comprobantes | |
6 | + </description> | |
7 | + <author email="dev@cordova.apache.org" href="http://cordova.io"> | |
8 | + Apache Cordova Team | |
9 | + </author> | |
10 | + <icon src="/src/assets/img/logo.png" platform="android" /> | |
11 | + <content src="index.html" /> | |
12 | + <plugin name="cordova-plugin-whitelist" spec="1" /> | |
13 | + <access origin="*" /> | |
14 | + <allow-intent href="http://*/*" /> | |
15 | + <allow-intent href="https://*/*" /> | |
16 | + <allow-intent href="tel:*" /> | |
17 | + <allow-intent href="sms:*" /> | |
18 | + <allow-intent href="mailto:*" /> | |
19 | + <allow-intent href="geo:*" /> | |
20 | + <platform name="android"> | |
21 | + <allow-intent href="market:*" /> | |
22 | + </platform> | |
23 | + <platform name="ios"> | |
24 | + <allow-intent href="itms:*" /> | |
25 | + <allow-intent href="itms-apps:*" /> | |
26 | + </platform> | |
27 | +</widget> |
hooks/README.md
... | ... | @@ -0,0 +1,23 @@ |
1 | +<!-- | |
2 | +# | |
3 | +# Licensed to the Apache Software Foundation (ASF) under one | |
4 | +# or more contributor license agreements. See the NOTICE file | |
5 | +# distributed with this work for additional information | |
6 | +# regarding copyright ownership. The ASF licenses this file | |
7 | +# to you under the Apache License, Version 2.0 (the | |
8 | +# "License"); you may not use this file except in compliance | |
9 | +# with the License. You may obtain a copy of the License at | |
10 | +# | |
11 | +# http://www.apache.org/licenses/LICENSE-2.0 | |
12 | +# | |
13 | +# Unless required by applicable law or agreed to in writing, | |
14 | +# software distributed under the License is distributed on an | |
15 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
16 | +# KIND, either express or implied. See the License for the | |
17 | +# specific language governing permissions and limitations | |
18 | +# under the License. | |
19 | +# | |
20 | +--> | |
21 | +# Cordova Hooks | |
22 | + | |
23 | +Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide. |
package-lock.json
... | ... | @@ -498,6 +498,14 @@ |
498 | 498 | } |
499 | 499 | } |
500 | 500 | }, |
501 | + "@ng-bootstrap/ng-bootstrap": { | |
502 | + "version": "4.2.0", | |
503 | + "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-4.2.0.tgz", | |
504 | + "integrity": "sha512-41Sg9RKgFGfnkWJhzPJIumYbib+GCTZ8N17q3PGfLORqtIN25KUFHGuO8EYOYd+zrDVYe8g4JYZoxQZvxaxm6w==", | |
505 | + "requires": { | |
506 | + "tslib": "^1.9.0" | |
507 | + } | |
508 | + }, | |
501 | 509 | "@ngtools/webpack": { |
502 | 510 | "version": "8.0.0", |
503 | 511 | "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-8.0.0.tgz", |
... | ... | @@ -924,6 +932,14 @@ |
924 | 932 | } |
925 | 933 | } |
926 | 934 | }, |
935 | + "angular2-ladda": { | |
936 | + "version": "2.0.1", | |
937 | + "resolved": "https://registry.npmjs.org/angular2-ladda/-/angular2-ladda-2.0.1.tgz", | |
938 | + "integrity": "sha512-o0etA77PienX2sHD9fGHjGeg5fmzYpnUPVm/92f6fEVuNQ31OaRxFPVJ8S8ZDEWlq6YFpwkv/ytHFz4NAQ6MdQ==", | |
939 | + "requires": { | |
940 | + "ladda": "^2.0.1" | |
941 | + } | |
942 | + }, | |
927 | 943 | "ansi": { |
928 | 944 | "version": "0.3.1", |
929 | 945 | "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", |
... | ... | @@ -3532,6 +3548,11 @@ |
3532 | 3548 | } |
3533 | 3549 | } |
3534 | 3550 | }, |
3551 | + "font-awesome": { | |
3552 | + "version": "4.7.0", | |
3553 | + "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz", | |
3554 | + "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=" | |
3555 | + }, | |
3535 | 3556 | "for-each": { |
3536 | 3557 | "version": "0.3.3", |
3537 | 3558 | "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", |
... | ... | @@ -5532,6 +5553,14 @@ |
5532 | 5553 | "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", |
5533 | 5554 | "dev": true |
5534 | 5555 | }, |
5556 | + "ladda": { | |
5557 | + "version": "2.0.1", | |
5558 | + "resolved": "https://registry.npmjs.org/ladda/-/ladda-2.0.1.tgz", | |
5559 | + "integrity": "sha512-ynRaMdW9y9ABRdTUWa60HSQjtTkoEZMiQDzzYsX8yxIEm7mxL/sxpvoLutYox1XluRif3DxLDg+3Dl1wurjnJg==", | |
5560 | + "requires": { | |
5561 | + "spin.js": "^4.0.0" | |
5562 | + } | |
5563 | + }, | |
5535 | 5564 | "lcid": { |
5536 | 5565 | "version": "2.0.0", |
5537 | 5566 | "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", |
... | ... | @@ -8533,6 +8562,11 @@ |
8533 | 8562 | "chalk": "^2.0.1" |
8534 | 8563 | } |
8535 | 8564 | }, |
8565 | + "spin.js": { | |
8566 | + "version": "4.0.0", | |
8567 | + "resolved": "https://registry.npmjs.org/spin.js/-/spin.js-4.0.0.tgz", | |
8568 | + "integrity": "sha512-uJN9Q4/I4I7PRZAp1c5reoY89thAfvFB5thbJncAwkPjPhqCfUrCooJc8GMN8q8WKFGIMy+JMf477RW7deCInA==" | |
8569 | + }, | |
8536 | 8570 | "split-string": { |
8537 | 8571 | "version": "3.1.0", |
8538 | 8572 | "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", |
package.json
... | ... | @@ -19,7 +19,10 @@ |
19 | 19 | "@angular/platform-browser": "~8.0.0", |
20 | 20 | "@angular/platform-browser-dynamic": "~8.0.0", |
21 | 21 | "@angular/router": "~8.0.0", |
22 | + "@ng-bootstrap/ng-bootstrap": "^4.2.0", | |
23 | + "angular2-ladda": "^2.0.1", | |
22 | 24 | "cordova-android": "^8.0.0", |
25 | + "font-awesome": "^4.7.0", | |
23 | 26 | "rxjs": "~6.4.0", |
24 | 27 | "tslib": "^1.9.0", |
25 | 28 | "zone.js": "~0.9.1" |
... | ... | @@ -53,4 +56,4 @@ |
53 | 56 | "android" |
54 | 57 | ] |
55 | 58 | } |
56 | -} | |
57 | 59 | \ No newline at end of file |
60 | +} |
src/app/app-routing.module.ts
1 | 1 | import { NgModule } from '@angular/core'; |
2 | 2 | import { Routes, RouterModule } from '@angular/router'; |
3 | +import { ComprobantesComponent } from './comprobantes/comprobantes.component'; | |
4 | +import { AppBotonera } from './botonera/botonera.component'; | |
3 | 5 | |
4 | -const routes: Routes = []; | |
6 | +const routes: Routes = [ | |
7 | + { path: 'comprobantes', component: ComprobantesComponent, pathMatch: 'full' }, | |
8 | + { path: '', redirectTo: 'home', pathMatch: 'full' }, | |
9 | + { path: 'home', component: AppBotonera } | |
10 | +]; | |
5 | 11 | |
6 | 12 | @NgModule({ |
7 | 13 | imports: [RouterModule.forRoot(routes)], |
src/app/app.component.html
1 | 1 | <!--The content below is only a placeholder and can be replaced.--> |
2 | -<div style="text-align:center"> | |
3 | - <h1> | |
4 | - Welcome to {{ title }}! | |
5 | - </h1> | |
6 | - <img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="> | |
2 | +<div style="text-align:center" class="body-background container"> | |
3 | + <app-nombre-empresa></app-nombre-empresa> | |
4 | + <router-outlet></router-outlet> | |
7 | 5 | </div> |
8 | -<h2>Here are some links to help you start: </h2> | |
9 | -<ul> | |
10 | - <li> | |
11 | - <h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2> | |
12 | - </li> | |
13 | - <li> | |
14 | - <h2><a target="_blank" rel="noopener" href="https://angular.io/cli">CLI Documentation</a></h2> | |
15 | - </li> | |
16 | - <li> | |
17 | - <h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2> | |
18 | - </li> | |
19 | -</ul> | |
20 | - | |
21 | -<router-outlet></router-outlet> |
src/app/app.component.ts
src/app/app.module.ts
1 | 1 | import { BrowserModule } from '@angular/platform-browser'; |
2 | 2 | import { NgModule } from '@angular/core'; |
3 | +import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; | |
4 | +import { HttpClientModule } from '@angular/common/http'; | |
5 | +import { FormsModule } from '@angular/forms'; | |
6 | +import { LaddaModule } from 'angular2-ladda'; | |
3 | 7 | |
4 | 8 | import { AppRoutingModule } from './app-routing.module'; |
5 | 9 | import { AppComponent } from './app.component'; |
10 | +import { AppBotonera } from './botonera/botonera.component'; | |
11 | +import { ComprobantesComponent } from './comprobantes/comprobantes.component'; | |
12 | +import { NombreEmpresaComponent } from './nombre-empresa/nombre-empresa.component'; | |
13 | +import { AccionesComponent } from './acciones/acciones.component'; | |
6 | 14 | |
7 | 15 | @NgModule({ |
8 | 16 | declarations: [ |
9 | - AppComponent | |
17 | + AppComponent, | |
18 | + AppBotonera, | |
19 | + ComprobantesComponent, | |
20 | + NombreEmpresaComponent, | |
21 | + AccionesComponent | |
10 | 22 | ], |
11 | 23 | imports: [ |
12 | 24 | BrowserModule, |
13 | - AppRoutingModule | |
25 | + AppRoutingModule, | |
26 | + NgbModule, | |
27 | + HttpClientModule, | |
28 | + FormsModule, | |
29 | + LaddaModule | |
14 | 30 | ], |
15 | 31 | providers: [], |
16 | 32 | bootstrap: [AppComponent] |
src/app/boton-service.service.ts
... | ... | @@ -0,0 +1,15 @@ |
1 | +import { Injectable } from '@angular/core'; | |
2 | +import { HttpClient } from '@angular/common/http'; | |
3 | + | |
4 | +@Injectable({ | |
5 | + providedIn: 'root' | |
6 | +}) | |
7 | +export class BotonServiceService { | |
8 | + | |
9 | + constructor(private http: String) { } | |
10 | + | |
11 | + getBotones() { | |
12 | + // return this.http.get('http://localhost:5555/comprobantes'); | |
13 | + return [1]; | |
14 | + } | |
15 | +} |
src/app/botonera/botonera.component.css
... | ... | @@ -0,0 +1,54 @@ |
1 | +.botonera-principal-comprobante { | |
2 | + background-image: url('/assets/img/comprobante.png'); | |
3 | + background-size: 90px 90px; | |
4 | + display: inline-block; | |
5 | + text-align: center; | |
6 | + border-radius: 12px; | |
7 | + border-width: 0; | |
8 | + height: 90px; | |
9 | + position: relative; | |
10 | + width: 90px; | |
11 | + outline: 0; | |
12 | +} | |
13 | +.botonera-principal-comprobante:hover { | |
14 | + background-color:rgb(250,250,250); | |
15 | + filter:drop-shadow(4px 4px 4px gray); | |
16 | +} | |
17 | +.botonera-principal-comprobante:active { | |
18 | + background-color: rgb(230, 230, 230); | |
19 | + filter:drop-shadow(4px 4px 4px gray); | |
20 | +} | |
21 | +@media (min-width: 992px) and (max-width: 1200px) { | |
22 | + .botonera-principal-comprobante { | |
23 | + width: 150px; | |
24 | + } | |
25 | +} | |
26 | +.botonera-principal-comprobante > span { | |
27 | + left: 0; | |
28 | + position: absolute; | |
29 | + text-align: center; | |
30 | + top: 90px; | |
31 | + width: 100%; | |
32 | + font-size: 12px; | |
33 | + color: #777777 | |
34 | +} | |
35 | +.botonera-principal-logo { | |
36 | + width: 50%; | |
37 | + margin-left: 75%; | |
38 | + opacity: .8; | |
39 | +} | |
40 | +@media (max-width: 576px) { | |
41 | + .botonera-principal-logo { | |
42 | + width: 180%; | |
43 | + margin-left: 20%; | |
44 | + opacity: .8; | |
45 | + } | |
46 | +} | |
47 | +.acciones-mobile { | |
48 | + line-height: 2.5em; | |
49 | + color: orange; | |
50 | + font-size: 1.25em | |
51 | +} | |
52 | +.swiper { | |
53 | + height: 300px; | |
54 | +} |
src/app/botonera/botonera.component.html
... | ... | @@ -0,0 +1,42 @@ |
1 | +<div class="col-6"> | |
2 | + <img src="assets/img/logo.png" class="botonera-principal-logo"> | |
3 | +</div> | |
4 | +<div class="pt-5 row"> | |
5 | + <div class="swiper col-12"> | |
6 | + <a class="botonera-principal-comprobante" routerLink="/comprobantes"> | |
7 | + <span>Lista comprobantes</span> | |
8 | + </a> | |
9 | + </div> | |
10 | + <div class="d-none d-sm-block"> | |
11 | + <a | |
12 | + class="btn btn-outline-dark mt-5 btn-lg" | |
13 | + href="javascript:void()" | |
14 | + ng-click="showTerminal()" | |
15 | + > | |
16 | + <i class="fa fa-info-circle" aria-hidden="true"></i> | |
17 | + </a> | |
18 | + <a class="btn btn-outline-dark mt-5 btn-lg" | |
19 | + href="javascript:void()" | |
20 | + ng-click="logout()" | |
21 | + > | |
22 | + <i class="fa fa-power-off" aria-hidden="true"></i> | |
23 | + </a> | |
24 | + </div> | |
25 | + <div class="row d-md-none fixed-bottom"> | |
26 | + <div class="w-100 d-flex px-3 acciones-mobile"> | |
27 | + <a | |
28 | + class="btn btn-outline-dark btn-lg mr-2" | |
29 | + href="javascript:void()" | |
30 | + ng-click="showTerminal()" | |
31 | + > | |
32 | + <i class="fa fa-info-circle" aria-hidden="true"></i> | |
33 | + </a> | |
34 | + <a class="btn btn-outline-dark btn-lg" | |
35 | + href="javascript:void()" | |
36 | + ng-click="logout()" | |
37 | + > | |
38 | + <i class="fa fa-power-off" aria-hidden="true"></i> | |
39 | + </a> | |
40 | + </div> | |
41 | + </div> | |
42 | +</div> |
src/app/botonera/botonera.component.ts
... | ... | @@ -0,0 +1,13 @@ |
1 | +import { Component } from '@angular/core'; | |
2 | +import { BotonServiceService } from 'src/app/boton-service.service'; | |
3 | + | |
4 | +@Component({ | |
5 | + selector: 'app-botonera', | |
6 | + templateUrl: './botonera.component.html', | |
7 | + styleUrls: ['./botonera.component.css'] | |
8 | +}) | |
9 | + | |
10 | +export class AppBotonera { | |
11 | + botones = new BotonServiceService('').getBotones(); | |
12 | + paginas = [1]; | |
13 | +} |
src/app/comprobantes/comprobantes.component.html
... | ... | @@ -0,0 +1,167 @@ |
1 | +<div class="row panel-informativo"> | |
2 | + <div class="col-12"> | |
3 | + <div class="row titulares"> | |
4 | + <div class="col-12 col-sm numero-pedido text-center text-md-left border border-white align-middle ng-binding ng-scope"> | |
5 | + Recepción | |
6 | + <button | |
7 | + class="btn btn-xs btn-outline-light float-right" | |
8 | + type="button" | |
9 | + ng-click="$ctrl.busqueda()" | |
10 | + ng-if="$ctrl.busqueda" | |
11 | + title="Buscar" | |
12 | + > | |
13 | + <i class="fa fa-search"></i> | |
14 | + </button> | |
15 | + </div> | |
16 | + <div class="col-7 col-sm border border-white align-middle"> | |
17 | + Fecha: | |
18 | + <span | |
19 | + ng-click="datepickerAbierto = true" | |
20 | + > {{ fecha | date: 'dd/MM/yyyy' }}</span> | |
21 | + </div> | |
22 | + <div class="col-5 col-sm border border-white border-right-0 align-middle"> | |
23 | + Hora: | |
24 | + <span | |
25 | + ng-click="datepickerAbierto = true" | |
26 | + > {{ fecha | date: 'shortTime'}}</span> | |
27 | + </div> | |
28 | + </div> | |
29 | + </div> | |
30 | +</div> | |
31 | +<div class="row"> | |
32 | + <form class="col-12 col-sm-10"> | |
33 | + <div class="row border"> | |
34 | + <div class="col-6 col-sm-3 d-flex"> | |
35 | + <strong>Letra Factura: </strong> | |
36 | + <label>{{cabecera.TIP}}</label> | |
37 | + </div> | |
38 | + <div class="col-6 col-sm-3 d-flex"> | |
39 | + <strong>Tipo Factura: </strong> | |
40 | + <label>{{cabecera.TCO}}</label> | |
41 | + </div> | |
42 | + <div class="col-6 col-sm-3 d-flex"> | |
43 | + <strong>Sucursal: </strong> | |
44 | + <label>{{cabecera.SUC}}</label> | |
45 | + </div> | |
46 | + <div class="col-6 col-sm-3 d-flex"> | |
47 | + <strong>Número: </strong> | |
48 | + <label>{{cabecera.NCO}}</label> | |
49 | + </div> | |
50 | + <div class="col-6 col-sm-3 d-flex"> | |
51 | + <strong>Cuit: </strong> | |
52 | + <label>{{cabecera.CUI}}</label> | |
53 | + </div> | |
54 | + <div class="col-12 col-sm-3 d-flex"> | |
55 | + <strong>Nombre: </strong> | |
56 | + <label>{{cabecera.NOM}}</label> | |
57 | + </div> | |
58 | + </div> | |
59 | + <div class="row border"> | |
60 | + <div class="col-4"> | |
61 | + <button | |
62 | + type="button" | |
63 | + class="btn btn-outline-secondary btn-sm" | |
64 | + [ngClass]="{'active': estadoArticulos == 'pendiente'}" | |
65 | + (click)="estadoArticulos = 'pendiente'; paginaActiva = 1; filter = '';"> | |
66 | + Pendientes ({{getCantidadArticulosByEstado('pendiente')}}) | |
67 | + </button> | |
68 | + </div> | |
69 | + <div class="col-4"> | |
70 | + <button | |
71 | + type="button" | |
72 | + class="btn btn-outline-success btn-sm" | |
73 | + [ngClass]="{'active': estadoArticulos == 'aprobado'}" | |
74 | + (click)="estadoArticulos = 'aprobado'; paginaActiva = 1; filter = '';"> | |
75 | + Aprobados ({{getCantidadArticulosByEstado('aprobado')}}) | |
76 | + </button> | |
77 | + </div> | |
78 | + <div class="col-4"> | |
79 | + <button | |
80 | + type="button" | |
81 | + class="btn btn-outline-danger btn-sm" | |
82 | + [ngClass]="{'active': estadoArticulos == 'rechazado'}" | |
83 | + (click)="estadoArticulos = 'rechazado'; paginaActiva = 1; filter = '';"> | |
84 | + Rechazados ({{getCantidadArticulosByEstado('rechazado')}}) | |
85 | + </button> | |
86 | + </div> | |
87 | +</div> | |
88 | +<div class="row"> | |
89 | + <input | |
90 | + type="text" | |
91 | + class="form-control-sm col-12" | |
92 | + placeholder="Busque producto por nombre, codigo" | |
93 | + [(ngModel)]="filter" | |
94 | + [ngModelOptions]="{standalone: true}"/> | |
95 | + </div> | |
96 | + <div class="row"> | |
97 | + <table class="table table-dark"> | |
98 | + <thead> | |
99 | + <tr> | |
100 | + <th *ngIf="estadoArticulos != 'rechazado'">Rechazar</th> | |
101 | + <th>Producto</th> | |
102 | + <th>Cantidad</th> | |
103 | + <th *ngIf="estadoArticulos != 'aprobado'">Aceptar</th> | |
104 | + </tr> | |
105 | + </thead> | |
106 | + <tbody> | |
107 | + <tr *ngFor="let articulo of getPaginaFiltro()" [ngClass]="{'bg-success': articulo.estado == 'aprobado'}"> | |
108 | + <th *ngIf="estadoArticulos != 'rechazado'"><button type="button" class="" (click)="articulo.estado = 'rechazado'"> | |
109 | + <i class="fa fa-window-close"></i> | |
110 | + </button></th> | |
111 | + <th>{{articulo.LI0}}</th> | |
112 | + <th *ngIf="!articulo.input" (click)="articulo.input = true"> | |
113 | + {{articulo.recibido ? articulo.recibido + '/' : ''}}{{articulo.CAN}}</th> | |
114 | + <th *ngIf="articulo.input"> | |
115 | + <input | |
116 | + class="form-control-sm col-12" | |
117 | + type="number" | |
118 | + (keyup.enter)="articulo.input = false" | |
119 | + [(ngModel)]="articulo.recibido" | |
120 | + [ngModelOptions]="{standalone: true}" | |
121 | + autofocus/> | |
122 | + /{{articulo.CAN}} | |
123 | + </th> | |
124 | + <th *ngIf="estadoArticulos != 'aprobado'"> | |
125 | + <button type="button" class="" (click)="articulo.estado = 'aprobado'"> | |
126 | + <i class="fa fa-check"></i> | |
127 | + </button> | |
128 | + </th> | |
129 | + </tr> | |
130 | + <tr> | |
131 | + <th colspan="3" *ngIf="articulosFiltro.length == 0">Por el momento no hay elementos aquí</th> | |
132 | + </tr> | |
133 | + </tbody> | |
134 | + <tfoot> | |
135 | + <nav *ngIf="articulosFiltro.length > 0" class="mr-auto position-absolute mb-5"> | |
136 | + <ul class="pagination pagination-sm justify-content mb-0"> | |
137 | + <li class="page-item" [ngClass]="{'disabled': paginaActiva == 1}"> | |
138 | + <a class="page-link" href="javascript:void();" (click)="paginaActiva = paginaActiva - 1"> | |
139 | + <span aria-hidden="true">«</span> | |
140 | + <span class="sr-only">Anterior</span> | |
141 | + </a> | |
142 | + </li> | |
143 | + <li | |
144 | + class="page-item" | |
145 | + *ngFor="let pagina of paginas; index as i" | |
146 | + [ngClass]="{'active': pagina == paginaActiva}" | |
147 | + > | |
148 | + <a | |
149 | + class="page-link" | |
150 | + href="javascript:void();" | |
151 | + (click)="paginaActiva = pagina" | |
152 | + >{{pagina}}</a> | |
153 | + </li> | |
154 | + <li class="page-item" [ngClass]="{'disabled': paginaActiva == paginas.length}"> | |
155 | + <a class="page-link" href="javascript:void();" (click)="paginaActiva = paginaActiva + 1"> | |
156 | + <span aria-hidden="true">»</span> | |
157 | + <span class="sr-only">Siguiente</span> | |
158 | + </a> | |
159 | + </li> | |
160 | + </ul> | |
161 | + </nav> | |
162 | + </tfoot> | |
163 | + </table> | |
164 | + </div> | |
165 | + </form> | |
166 | + <app-acciones (guardar)="guardarComprobante()"></app-acciones> | |
167 | +</div> |
src/app/comprobantes/comprobantes.component.scss
... | ... | @@ -0,0 +1,56 @@ |
1 | +.panel-informativo { | |
2 | + background: #67615e; | |
3 | + color: #FFF; | |
4 | + min-height: 32px; | |
5 | + .form-group { | |
6 | + margin-bottom: 5px; | |
7 | + } | |
8 | + .form-control-xs { | |
9 | + height: calc(1.6rem); | |
10 | + padding: .25rem .5rem; | |
11 | + font-size: .8rem; | |
12 | + line-height: 1.3; | |
13 | + border-radius: .2rem; | |
14 | + } | |
15 | + .label { | |
16 | + font-size: .8em; | |
17 | + } | |
18 | + .valor { | |
19 | + font-size: .8em; | |
20 | + } | |
21 | + | |
22 | + .border{ | |
23 | + border-width: 4px 2px !important; | |
24 | + } | |
25 | + | |
26 | + .nota-pedido { | |
27 | + @media (max-width: 576px) { | |
28 | + text-align: center; | |
29 | + } | |
30 | + } | |
31 | + | |
32 | +} | |
33 | +.titulares>div{ | |
34 | + display: flex; | |
35 | + line-height: 30px; | |
36 | + h5{ | |
37 | + line-height: 30px; | |
38 | + } | |
39 | + button{ | |
40 | + margin: auto; | |
41 | + margin-right: 0; | |
42 | + } | |
43 | + | |
44 | + @media(max-width: 992px){ | |
45 | + border-top: none !important; | |
46 | + border-right: none !important; | |
47 | + border-left: none !important; | |
48 | + border-bottom: 2px solid #FFF !important; | |
49 | + &:last-child{ | |
50 | + border-left: 2px solid #FFF !important; | |
51 | + } | |
52 | + &:first-child{ | |
53 | + border-top: 2px solid #FFF !important; | |
54 | + } | |
55 | + } | |
56 | +} | |
0 | 57 | \ No newline at end of file |
src/app/comprobantes/comprobantes.component.ts
... | ... | @@ -0,0 +1,123 @@ |
1 | +import { Component, OnInit} from '@angular/core'; | |
2 | + | |
3 | +@Component({ | |
4 | + templateUrl: './comprobantes.component.html', | |
5 | + styleUrls: ['./comprobantes.component.scss'] | |
6 | +}) | |
7 | +export class ComprobantesComponent implements OnInit { | |
8 | + | |
9 | + constructor() { } | |
10 | + | |
11 | + ngOnInit() { | |
12 | + | |
13 | + this.obtenerConsulta(); | |
14 | + } | |
15 | + | |
16 | + filter = ''; | |
17 | + estadoArticulos = 'pendiente'; | |
18 | + comprobantes = [1, 2, 3]; | |
19 | + cabecera = {}; | |
20 | + cuerpo = []; | |
21 | + articulosFiltro = []; | |
22 | + paginaActiva = 1; | |
23 | + paginas = []; | |
24 | + | |
25 | + fecha = new Date(); | |
26 | + | |
27 | + paginar() { | |
28 | + | |
29 | + var cantPaginas = Math.ceil(this.articulosFiltro.length / 5); | |
30 | + this.paginas = []; | |
31 | + for (let i = 0; i < cantPaginas; i++) { | |
32 | + this.paginas.push(i + 1); | |
33 | + } | |
34 | + } | |
35 | + | |
36 | + getPaginaFiltro() { | |
37 | + | |
38 | + this.articulosFiltro = this.cuerpo.filter((articulo) => { | |
39 | + return articulo.estado == this.estadoArticulos && | |
40 | + (articulo.LI0.toLocaleUpperCase().includes(this.filter.toLocaleUpperCase()) || | |
41 | + articulo.codigoBarras == this.filter); | |
42 | + }); | |
43 | + | |
44 | + this.paginar(); | |
45 | + | |
46 | + return this.articulosFiltro.slice((this.paginaActiva - 1) * 5 , this.paginaActiva * 5); | |
47 | + } | |
48 | + | |
49 | + getCantidadArticulosByEstado(estado: String) { | |
50 | + return this.cuerpo.filter((articulo) => { | |
51 | + return articulo.estado == estado; | |
52 | + }).length; | |
53 | + } | |
54 | + | |
55 | + guardarComprobante(event: any) { | |
56 | + alert('Guardando'); | |
57 | + } | |
58 | + | |
59 | + obtenerConsulta() { | |
60 | + | |
61 | + setTimeout(() => { | |
62 | + this.cabecera = { | |
63 | + TIP: 'A', | |
64 | + TCO: 'FT', | |
65 | + SUC: 623, | |
66 | + NCO: 53979, | |
67 | + COD: 1, | |
68 | + FEC: new Date(), | |
69 | + NOM: 'POTIGIAN GOLOCINAS', | |
70 | + CUI: '30-54775125-2' | |
71 | + }; | |
72 | + | |
73 | + this.cuerpo = [ | |
74 | + { | |
75 | + LI0: 'Mantel Combo Bolso CocaCola', | |
76 | + CAN: 5, | |
77 | + estado: 'pendiente', | |
78 | + codigoBarras: '7790667006462' | |
79 | + }, | |
80 | + { | |
81 | + LI0: 'Papas', | |
82 | + CAN: 5, | |
83 | + estado: 'pendiente', | |
84 | + }, | |
85 | + { | |
86 | + LI0: 'Peras', | |
87 | + CAN: 5, | |
88 | + estado: 'pendiente', | |
89 | + }, | |
90 | + { | |
91 | + LI0: 'Cafe', | |
92 | + CAN: 5, | |
93 | + estado: 'pendiente', | |
94 | + }, | |
95 | + { | |
96 | + LI0: 'Cafe capuchino', | |
97 | + CAN: 5, | |
98 | + estado: 'pendiente', | |
99 | + }, | |
100 | + { | |
101 | + LI0: 'Menta', | |
102 | + CAN: 5, | |
103 | + estado: 'pendiente', | |
104 | + }, | |
105 | + { | |
106 | + LI0: 'Fernet', | |
107 | + CAN: 5, | |
108 | + estado: 'pendiente', | |
109 | + }, | |
110 | + { | |
111 | + LI0: 'Andes', | |
112 | + CAN: 5, | |
113 | + estado: 'pendiente', | |
114 | + } | |
115 | + ]; | |
116 | + | |
117 | + this.articulosFiltro = this.cuerpo; | |
118 | + | |
119 | + this.paginar(); | |
120 | + }, 500); | |
121 | + } | |
122 | + | |
123 | +} |
src/app/nombre-empresa/nombre-empresa.component.css
src/app/nombre-empresa/nombre-empresa.component.html
... | ... | @@ -0,0 +1,10 @@ |
1 | +<div class="container"> | |
2 | + <div class="row align-items-end"> | |
3 | + <div class="col-md-6"> | |
4 | + <h5 class="text-left"><strong>Demo distribuidor</strong></h5> | |
5 | + </div> | |
6 | + <div class="col-md-6"> | |
7 | + <h5 class="text-right align-bottom"><small>Paso de los andes 1874</small></h5> | |
8 | + </div> | |
9 | + </div> | |
10 | +</div> |
src/app/nombre-empresa/nombre-empresa.component.ts
... | ... | @@ -0,0 +1,15 @@ |
1 | +import { Component, OnInit } from '@angular/core'; | |
2 | + | |
3 | +@Component({ | |
4 | + selector: 'app-nombre-empresa', | |
5 | + templateUrl: './nombre-empresa.component.html', | |
6 | + styleUrls: ['./nombre-empresa.component.css'] | |
7 | +}) | |
8 | +export class NombreEmpresaComponent implements OnInit { | |
9 | + | |
10 | + constructor() { } | |
11 | + | |
12 | + ngOnInit() { | |
13 | + } | |
14 | + | |
15 | +} |
src/assets/img/comprobante.png
3.89 KB
src/assets/img/logo.png
143 KB
src/index.html
... | ... | @@ -6,10 +6,14 @@ |
6 | 6 | <base href="./"> |
7 | 7 | |
8 | 8 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
9 | - <link rel="icon" type="image/x-icon" href="favicon.ico"> | |
9 | + <link rel="icon" type="image/x-icon" href="assets/img/logo.png"> | |
10 | + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
11 | + | |
12 | + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> | |
13 | + | |
10 | 14 | <script type="text/javascript" src="cordova.js"></script> |
11 | 15 | </head> |
12 | 16 | <body> |
13 | - <app-root></app-root> | |
17 | + <app></app> | |
14 | 18 | </body> |
15 | 19 | </html> |
src/styles.css