From 3c606dad17aa9dbcfc73d65f02532ac033193a9e Mon Sep 17 00:00:00 2001 From: Eric Fernandez Date: Fri, 31 May 2019 17:44:56 -0300 Subject: [PATCH] avances --- config.xml | 2 +- package.json | 2 +- src/app/app.component.html | 1 + src/app/app.module.ts | 10 +- src/app/botonera/botonera.component.html | 30 ++--- src/app/botonera/botonera.component.spec.ts | 25 ---- src/app/comprobantes/comprobantes.component.css | 0 src/app/comprobantes/comprobantes.component.html | 127 ++++++++++++++++++++- .../comprobantes/comprobantes.component.spec.ts | 25 ---- src/app/comprobantes/comprobantes.component.ts | 78 ++++++++++++- src/index.html | 2 +- 11 files changed, 225 insertions(+), 77 deletions(-) delete mode 100644 src/app/botonera/botonera.component.spec.ts delete mode 100644 src/app/comprobantes/comprobantes.component.css delete mode 100644 src/app/comprobantes/comprobantes.component.spec.ts diff --git a/config.xml b/config.xml index 95c66c8..ee97df1 100644 --- a/config.xml +++ b/config.xml @@ -7,7 +7,7 @@ Apache Cordova Team - + diff --git a/package.json b/package.json index 49683b0..c600223 100644 --- a/package.json +++ b/package.json @@ -55,4 +55,4 @@ "android" ] } -} +} \ No newline at end of file diff --git a/src/app/app.component.html b/src/app/app.component.html index 8758897..5cae8b5 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,4 +1,5 @@
+
diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 21f4e1e..bd1f704 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -2,25 +2,29 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { HttpClientModule } from '@angular/common/http'; +import { FormsModule } from '@angular/forms'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { AppBotonera } from './botonera/botonera.component'; import { ComprobantesComponent } from './comprobantes/comprobantes.component'; +import { NombreEmpresaComponent } from './nombre-empresa/nombre-empresa.component'; @NgModule({ declarations: [ AppComponent, AppBotonera, - ComprobantesComponent + ComprobantesComponent, + NombreEmpresaComponent ], imports: [ BrowserModule, AppRoutingModule, NgbModule, - HttpClientModule + HttpClientModule, + FormsModule ], providers: [], - bootstrap: [AppComponent, AppBotonera] + bootstrap: [AppComponent] }) export class AppModule { } diff --git a/src/app/botonera/botonera.component.html b/src/app/botonera/botonera.component.html index e4e1371..2cbb8db 100644 --- a/src/app/botonera/botonera.component.html +++ b/src/app/botonera/botonera.component.html @@ -23,20 +23,20 @@ diff --git a/src/app/botonera/botonera.component.spec.ts b/src/app/botonera/botonera.component.spec.ts deleted file mode 100644 index bea50d2..0000000 --- a/src/app/botonera/botonera.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { BotoneraComponent } from './botonera.component'; - -describe('BotoneraComponent', () => { - let component: BotoneraComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ BotoneraComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(BotoneraComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/comprobantes/comprobantes.component.css b/src/app/comprobantes/comprobantes.component.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/comprobantes/comprobantes.component.html b/src/app/comprobantes/comprobantes.component.html index ba2b83c..9dc487f 100644 --- a/src/app/comprobantes/comprobantes.component.html +++ b/src/app/comprobantes/comprobantes.component.html @@ -1,5 +1,122 @@ -
    -
  • - {{comprobante}} -
  • -
+
+
+
+
+ Recepción + +
+
+ Fecha: +  {{ fecha | date: 'dd/MM/yyyy' }} +
+
+ Hora: +  {{ fecha | date: 'shortTime'}} +
+
+
+
+ +
+
+
+ Letra Factura:  + +
+
+ Tipo Factura:  + +
+
+ Sucursal:  + +
+
+ Número:  + +
+
+ Cuit:  + +
+
+ Nombre:  + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
RechazarProductoCantidadAceptar
{{articulo.LI0}}{{articulo.CAN}} + +
+
+
diff --git a/src/app/comprobantes/comprobantes.component.spec.ts b/src/app/comprobantes/comprobantes.component.spec.ts deleted file mode 100644 index a6db286..0000000 --- a/src/app/comprobantes/comprobantes.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ComprobantesComponent } from './comprobantes.component'; - -describe('ComprobantesComponent', () => { - let component: ComprobantesComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ComprobantesComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ComprobantesComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/comprobantes/comprobantes.component.ts b/src/app/comprobantes/comprobantes.component.ts index e8f05f2..3a45493 100644 --- a/src/app/comprobantes/comprobantes.component.ts +++ b/src/app/comprobantes/comprobantes.component.ts @@ -3,14 +3,90 @@ import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-comprobantes', templateUrl: './comprobantes.component.html', - styleUrls: ['./comprobantes.component.css'] + styleUrls: ['./comprobantes.component.scss'] }) export class ComprobantesComponent implements OnInit { constructor() { } ngOnInit() { + + this.obtenerConsulta() } + filter = ''; comprobantes = [1, 2, 3]; + cabecera = {}; + cuerpo = []; + articulosFiltro = []; + pagina = 1; + paginas = []; + + fecha = new Date(); + + filtrar(event: any) { + var filtro = this.cuerpo.filter((param)=> { + return (param.LI0).toLocaleUpperCase().includes((event.target.value).toLocaleUpperCase()); + }); + + this.paginar(filtro, this.pagina); + this.paginas.length = Math.round(filtro.length / 5); + } + + paginar(filtro: any, pagina: any) { + this.articulosFiltro = filtro.slice( + filtro.length - 1 * pagina, filtro.length * this.pagina + 4); + } + + obtenerConsulta() { + + setTimeout(() => { + this.cabecera = { + TIP: 'A', + TCO: 'FT', + SUC: 623, + NCO: 53979, + COD: 1, + FEC: new Date(), + NOM: 'POTIGIAN GOLOCINAS', + CUI: '30-54775125-2' + }; + + this.cuerpo = [ + { + LI0: 'Mantel Combo Bolso CocaCola', + CAN: 5 + }, + { + LI0: 'Papas', + CAN: 5 + }, + { + LI0: 'Peras', + CAN: 5 + }, + { + LI0: 'Cafe', + CAN: 5 + }, + { + LI0: 'Menta', + CAN: 5 + }, + { + LI0: 'Fernet', + CAN: 5 + }, + { + LI0: 'Birra', + CAN: 5 + } + ]; + + this.articulosFiltro = this.cuerpo; + + this.paginar(this.articulosFiltro); + }, 500); + } + } diff --git a/src/index.html b/src/index.html index db422d4..fbd6bdd 100644 --- a/src/index.html +++ b/src/index.html @@ -6,7 +6,7 @@ - + -- 1.9.1