visorus-erp-core 12.0.0 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/acreedor/select/select-acreedor.component.mjs +205 -0
- package/esm2020/lib/components/caja/session-create/session-create.component.mjs +177 -0
- package/esm2020/lib/components/cliente/select/select-cliente.component.mjs +215 -0
- package/esm2020/lib/components/error404/error404.component.mjs +21 -0
- package/esm2020/lib/components/loading/loading.component.mjs +48 -0
- package/{esm2015/lib/components/loading-screen/loading-screen.component.js → esm2020/lib/components/loading-screen/loading-screen.component.mjs} +5 -19
- package/esm2020/lib/components/login-modal/login-modal.component.mjs +152 -0
- package/{esm2015/lib/components/pdfModal/pdf-modal.component.js → esm2020/lib/components/pdfModal/pdf-modal.component.mjs} +2 -6
- package/esm2020/lib/components/proveedor/select/select-proveedor.component.mjs +138 -0
- package/esm2020/lib/components/seleccion-articulo-informacion/seleccion-articulo-informacion.component.mjs +143 -0
- package/esm2020/lib/components/selecciona-articulo/selecciona-articulo.component.mjs +493 -0
- package/esm2020/lib/contabilidad/componentes/cclista/cclista.component.mjs +262 -0
- package/{esm2015/lib/contabilidad/componentes/ccseleccion-dialog/ccseleccion-dialog.component.js → esm2020/lib/contabilidad/componentes/ccseleccion-dialog/ccseleccion-dialog.component.mjs} +4 -11
- package/fesm2015/visorus-erp-core.mjs +4066 -0
- package/fesm2015/visorus-erp-core.mjs.map +1 -0
- package/{fesm2015/visorus-erp-core.js → fesm2020/visorus-erp-core.mjs} +115 -303
- package/fesm2020/visorus-erp-core.mjs.map +1 -0
- package/package.json +25 -12
- package/bundles/visorus-erp-core.umd.js +0 -5077
- package/bundles/visorus-erp-core.umd.js.map +0 -1
- package/esm2015/lib/components/acreedor/select/select-acreedor.component.js +0 -217
- package/esm2015/lib/components/caja/session-create/session-create.component.js +0 -194
- package/esm2015/lib/components/cliente/select/select-cliente.component.js +0 -227
- package/esm2015/lib/components/error404/error404.component.js +0 -35
- package/esm2015/lib/components/loading/loading.component.js +0 -66
- package/esm2015/lib/components/login-modal/login-modal.component.js +0 -180
- package/esm2015/lib/components/proveedor/select/select-proveedor.component.js +0 -148
- package/esm2015/lib/components/seleccion-articulo-informacion/seleccion-articulo-informacion.component.js +0 -154
- package/esm2015/lib/components/selecciona-articulo/selecciona-articulo.component.js +0 -522
- package/esm2015/lib/contabilidad/componentes/cclista/cclista.component.js +0 -274
- package/fesm2015/visorus-erp-core.js.map +0 -1
- /package/{esm2015/lib/app.module.js → esm2020/lib/app.module.mjs} +0 -0
- /package/{esm2015/lib/components/acreedor/services/acreedor.service.js → esm2020/lib/components/acreedor/services/acreedor.service.mjs} +0 -0
- /package/{esm2015/lib/components/acreedor/services/acreedorCuentaContable.js → esm2020/lib/components/acreedor/services/acreedorCuentaContable.mjs} +0 -0
- /package/{esm2015/lib/components/agente/models/Agente.js → esm2020/lib/components/agente/models/Agente.mjs} +0 -0
- /package/{esm2015/lib/components/agente/services/agente.service.js → esm2020/lib/components/agente/services/agente.service.mjs} +0 -0
- /package/{esm2015/lib/components/almacen/models/Almacen.js → esm2020/lib/components/almacen/models/Almacen.mjs} +0 -0
- /package/{esm2015/lib/components/almacen/services/almacen.service.js → esm2020/lib/components/almacen/services/almacen.service.mjs} +0 -0
- /package/{esm2015/lib/components/banco/models/Banco.js → esm2020/lib/components/banco/models/Banco.mjs} +0 -0
- /package/{esm2015/lib/components/banco/services/banco.service.js → esm2020/lib/components/banco/services/banco.service.mjs} +0 -0
- /package/{esm2015/lib/components/caja/sessionCaja.service.js → esm2020/lib/components/caja/sessionCaja.service.mjs} +0 -0
- /package/{esm2015/lib/components/catalogoTipo/models/CatalogoTipo.js → esm2020/lib/components/catalogoTipo/models/CatalogoTipo.mjs} +0 -0
- /package/{esm2015/lib/components/catalogoTipo/services/catalogoTipo.service.js → esm2020/lib/components/catalogoTipo/services/catalogoTipo.service.mjs} +0 -0
- /package/{esm2015/lib/components/clasificadorTipo/models/ClasificadorTipo.js → esm2020/lib/components/clasificadorTipo/models/ClasificadorTipo.mjs} +0 -0
- /package/{esm2015/lib/components/clasificadorTipo/services/clasificadorTipo.service.js → esm2020/lib/components/clasificadorTipo/services/clasificadorTipo.service.mjs} +0 -0
- /package/{esm2015/lib/components/claveAumentoDisminucion/services/clave-aumento-disminucion.service.js → esm2020/lib/components/claveAumentoDisminucion/services/clave-aumento-disminucion.service.mjs} +0 -0
- /package/{esm2015/lib/components/claveMovimiento/models/ClaveMovimiento.js → esm2020/lib/components/claveMovimiento/models/ClaveMovimiento.mjs} +0 -0
- /package/{esm2015/lib/components/claveMovimiento/services/claveMovimiento.service.js → esm2020/lib/components/claveMovimiento/services/claveMovimiento.service.mjs} +0 -0
- /package/{esm2015/lib/components/cliente/models/Cliente.js → esm2020/lib/components/cliente/models/Cliente.mjs} +0 -0
- /package/{esm2015/lib/components/cliente/models/ClienteCuentaBanco.js → esm2020/lib/components/cliente/models/ClienteCuentaBanco.mjs} +0 -0
- /package/{esm2015/lib/components/cliente/models/ClienteFlete.js → esm2020/lib/components/cliente/models/ClienteFlete.mjs} +0 -0
- /package/{esm2015/lib/components/cliente/services/cliente.service.js → esm2020/lib/components/cliente/services/cliente.service.mjs} +0 -0
- /package/{esm2015/lib/components/cliente/services/clienteCuentaBanco.service.js → esm2020/lib/components/cliente/services/clienteCuentaBanco.service.mjs} +0 -0
- /package/{esm2015/lib/components/cliente/services/clienteFlete.service.js → esm2020/lib/components/cliente/services/clienteFlete.service.mjs} +0 -0
- /package/{esm2015/lib/components/contacto/models/DatoContacto.js → esm2020/lib/components/contacto/models/DatoContacto.mjs} +0 -0
- /package/{esm2015/lib/components/contacto/services/datoContacto.service.js → esm2020/lib/components/contacto/services/datoContacto.service.mjs} +0 -0
- /package/{esm2015/lib/components/dato-direccion/models/DatoDireccion.js → esm2020/lib/components/dato-direccion/models/DatoDireccion.mjs} +0 -0
- /package/{esm2015/lib/components/dato-direccion/services/datoDireccion.service.js → esm2020/lib/components/dato-direccion/services/datoDireccion.service.mjs} +0 -0
- /package/{esm2015/lib/components/departamento/models/Departamento.js → esm2020/lib/components/departamento/models/Departamento.mjs} +0 -0
- /package/{esm2015/lib/components/departamento/services/departamento.service.js → esm2020/lib/components/departamento/services/departamento.service.mjs} +0 -0
- /package/{esm2015/lib/components/empresa/models/ConfiguracionEmpresaAdministrativa.js → esm2020/lib/components/empresa/models/ConfiguracionEmpresaAdministrativa.mjs} +0 -0
- /package/{esm2015/lib/components/empresa/models/Empresa.js → esm2020/lib/components/empresa/models/Empresa.mjs} +0 -0
- /package/{esm2015/lib/components/empresa/services/empresa.service.js → esm2020/lib/components/empresa/services/empresa.service.mjs} +0 -0
- /package/{esm2015/lib/components/flete/models/Flete.js → esm2020/lib/components/flete/models/Flete.mjs} +0 -0
- /package/{esm2015/lib/components/flete/services/flete.service.js → esm2020/lib/components/flete/services/flete.service.mjs} +0 -0
- /package/{esm2015/lib/components/formaPago/models/FormaPago.js → esm2020/lib/components/formaPago/models/FormaPago.mjs} +0 -0
- /package/{esm2015/lib/components/formaPago/services/FormaPago.service.js → esm2020/lib/components/formaPago/services/FormaPago.service.mjs} +0 -0
- /package/{esm2015/lib/components/loading/loading.service.js → esm2020/lib/components/loading/loading.service.mjs} +0 -0
- /package/{esm2015/lib/components/loading-screen/loading-screen.service.js → esm2020/lib/components/loading-screen/loading-screen.service.mjs} +0 -0
- /package/{esm2015/lib/components/login-modal/login-modal.service.js → esm2020/lib/components/login-modal/login-modal.service.mjs} +0 -0
- /package/{esm2015/lib/components/moneda/models/Moneda.js → esm2020/lib/components/moneda/models/Moneda.mjs} +0 -0
- /package/{esm2015/lib/components/moneda/services/moneda.service.js → esm2020/lib/components/moneda/services/moneda.service.mjs} +0 -0
- /package/{esm2015/lib/components/pdfModal/pdf-modal.service.js → esm2020/lib/components/pdfModal/pdf-modal.service.mjs} +0 -0
- /package/{esm2015/lib/components/persona-fisica/models/EstadoCivil.js → esm2020/lib/components/persona-fisica/models/EstadoCivil.mjs} +0 -0
- /package/{esm2015/lib/components/persona-fisica/models/Genero.js → esm2020/lib/components/persona-fisica/models/Genero.mjs} +0 -0
- /package/{esm2015/lib/components/persona-fisica/models/Persona.js → esm2020/lib/components/persona-fisica/models/Persona.mjs} +0 -0
- /package/{esm2015/lib/components/persona-fisica/models/PersonaFisica.js → esm2020/lib/components/persona-fisica/models/PersonaFisica.mjs} +0 -0
- /package/{esm2015/lib/components/persona-fisica/services/personaFisica.service.js → esm2020/lib/components/persona-fisica/services/personaFisica.service.mjs} +0 -0
- /package/{esm2015/lib/components/proveedor/models/Proveedor.js → esm2020/lib/components/proveedor/models/Proveedor.mjs} +0 -0
- /package/{esm2015/lib/components/proveedor/models/ProveedorCuentaBanco.js → esm2020/lib/components/proveedor/models/ProveedorCuentaBanco.mjs} +0 -0
- /package/{esm2015/lib/components/proveedor/models/ProveedorFlete.js → esm2020/lib/components/proveedor/models/ProveedorFlete.mjs} +0 -0
- /package/{esm2015/lib/components/proveedor/services/proveedor.service.js → esm2020/lib/components/proveedor/services/proveedor.service.mjs} +0 -0
- /package/{esm2015/lib/components/proveedor/services/proveedorCuentaBanco.service.js → esm2020/lib/components/proveedor/services/proveedorCuentaBanco.service.mjs} +0 -0
- /package/{esm2015/lib/components/proveedor/services/proveedorFlete.service.js → esm2020/lib/components/proveedor/services/proveedorFlete.service.mjs} +0 -0
- /package/{esm2015/lib/components/seleccion-articulo-informacion/services/articulo-informacion.service.js → esm2020/lib/components/seleccion-articulo-informacion/services/articulo-informacion.service.mjs} +0 -0
- /package/{esm2015/lib/components/selecciona-articulo/stock.service.js → esm2020/lib/components/selecciona-articulo/stock.service.mjs} +0 -0
- /package/{esm2015/lib/components/serieDocumento/models/SerieDocumento.js → esm2020/lib/components/serieDocumento/models/SerieDocumento.mjs} +0 -0
- /package/{esm2015/lib/components/serieDocumento/services/serieDocumento.service.js → esm2020/lib/components/serieDocumento/services/serieDocumento.service.mjs} +0 -0
- /package/{esm2015/lib/components/tipo-contacto/models/TipoContacto.js → esm2020/lib/components/tipo-contacto/models/TipoContacto.mjs} +0 -0
- /package/{esm2015/lib/components/tipo-contacto/services/tipoContacto.service.js → esm2020/lib/components/tipo-contacto/services/tipoContacto.service.mjs} +0 -0
- /package/{esm2015/lib/components/ubicacion/models/Ubicacion.js → esm2020/lib/components/ubicacion/models/Ubicacion.mjs} +0 -0
- /package/{esm2015/lib/components/ubicacion/services/ubicacion.service.js → esm2020/lib/components/ubicacion/services/ubicacion.service.mjs} +0 -0
- /package/{esm2015/lib/contabilidad/modelos/cuentaContable.model.js → esm2020/lib/contabilidad/modelos/cuentaContable.model.mjs} +0 -0
- /package/{esm2015/lib/contabilidad/modelos/normaInfoFinanciera.model.js → esm2020/lib/contabilidad/modelos/normaInfoFinanciera.model.mjs} +0 -0
- /package/{esm2015/lib/contabilidad/servicios/cuentacontable.service.js → esm2020/lib/contabilidad/servicios/cuentacontable.service.mjs} +0 -0
- /package/{esm2015/lib/globalPrimeNg.js → esm2020/lib/globalPrimeNg.mjs} +0 -0
- /package/{esm2015/lib/httpInterceptor/httpInterceptor.js → esm2020/lib/httpInterceptor/httpInterceptor.mjs} +0 -0
- /package/{esm2015/lib/importComponents.js → esm2020/lib/importComponents.mjs} +0 -0
- /package/{esm2015/lib/importComponetsConta.js → esm2020/lib/importComponetsConta.mjs} +0 -0
- /package/{esm2015/lib/models/PersonaMoral.js → esm2020/lib/models/PersonaMoral.mjs} +0 -0
- /package/{esm2015/lib/models/Usuario.js → esm2020/lib/models/Usuario.mjs} +0 -0
- /package/{esm2015/lib/models/auth.js → esm2020/lib/models/auth.mjs} +0 -0
- /package/{esm2015/lib/services/auth.service.js → esm2020/lib/services/auth.service.mjs} +0 -0
- /package/{esm2015/lib/services/authenticated.service.js → esm2020/lib/services/authenticated.service.mjs} +0 -0
- /package/{esm2015/lib/services/canActivateGuard.service.ts.js → esm2020/lib/services/canActivateGuard.service.ts.mjs} +0 -0
- /package/{esm2015/lib/services/catalogo-adicional.service.js → esm2020/lib/services/catalogo-adicional.service.mjs} +0 -0
- /package/{esm2015/lib/services/controlAcceso.service.js → esm2020/lib/services/controlAcceso.service.mjs} +0 -0
- /package/{esm2015/lib/services/crud.service.js → esm2020/lib/services/crud.service.mjs} +0 -0
- /package/{esm2015/lib/services/file.service.js → esm2020/lib/services/file.service.mjs} +0 -0
- /package/{esm2015/lib/services/global.service.js → esm2020/lib/services/global.service.mjs} +0 -0
- /package/{esm2015/lib/services/init.service.js → esm2020/lib/services/init.service.mjs} +0 -0
- /package/{esm2015/lib/services/message.service.js → esm2020/lib/services/message.service.mjs} +0 -0
- /package/{esm2015/lib/services/paginate.service.js → esm2020/lib/services/paginate.service.mjs} +0 -0
- /package/{esm2015/lib/services/personaMoral.service.js → esm2020/lib/services/personaMoral.service.mjs} +0 -0
- /package/{esm2015/lib/services/versionCheck.service.js → esm2020/lib/services/versionCheck.service.mjs} +0 -0
- /package/{esm2015/lib/utils/tipo_catalogo.ts.js → esm2020/lib/utils/tipo_catalogo.ts.mjs} +0 -0
- /package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- /package/{esm2015/visorus-erp-core.js → esm2020/visorus-erp-core.mjs} +0 -0
|
@@ -0,0 +1,4066 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, EventEmitter, Component, Input, Output, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common/http';
|
|
4
|
+
import { HttpHeaders, HTTP_INTERCEPTORS, HttpClient } from '@angular/common/http';
|
|
5
|
+
import * as i5 from '@angular/forms';
|
|
6
|
+
import { FormsModule } from '@angular/forms';
|
|
7
|
+
import * as i6 from 'primeng/inputtext';
|
|
8
|
+
import { InputTextModule } from 'primeng/inputtext';
|
|
9
|
+
import * as i4 from 'primeng/treetable';
|
|
10
|
+
import { TreeTableModule } from 'primeng/treetable';
|
|
11
|
+
import * as i4$1 from 'primeng/api';
|
|
12
|
+
import { ConfirmationService } from 'primeng/api';
|
|
13
|
+
import * as i8 from '@angular/common';
|
|
14
|
+
import { CommonModule } from '@angular/common';
|
|
15
|
+
import * as i7 from 'primeng/button';
|
|
16
|
+
import { ButtonModule } from 'primeng/button';
|
|
17
|
+
import * as i4$2 from 'primeng/dialog';
|
|
18
|
+
import { DialogModule } from 'primeng/dialog';
|
|
19
|
+
import { Subject, throwError, of } from 'rxjs';
|
|
20
|
+
import { catchError, tap } from 'rxjs/internal/operators';
|
|
21
|
+
import * as i1$1 from 'ngx-toastr';
|
|
22
|
+
import { ToastrModule } from 'ngx-toastr';
|
|
23
|
+
import * as i3 from '@ngx-translate/core';
|
|
24
|
+
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
25
|
+
import { debounceTime } from 'rxjs/operators';
|
|
26
|
+
import * as i3$1 from '@angular/platform-browser';
|
|
27
|
+
import { __awaiter } from 'tslib';
|
|
28
|
+
import * as i8$1 from 'primeng/table';
|
|
29
|
+
import { TableModule } from 'primeng/table';
|
|
30
|
+
import * as i10 from 'primeng/paginator';
|
|
31
|
+
import { PaginatorModule } from 'primeng/paginator';
|
|
32
|
+
import * as i23 from 'primeng/dropdown';
|
|
33
|
+
import { DropdownModule } from 'primeng/dropdown';
|
|
34
|
+
import * as i24 from 'primeng/inputmask';
|
|
35
|
+
import { InputMaskModule } from 'primeng/inputmask';
|
|
36
|
+
import * as i25 from 'primeng/messages';
|
|
37
|
+
import { MessagesModule } from 'primeng/messages';
|
|
38
|
+
import * as i26 from 'primeng/message';
|
|
39
|
+
import { MessageModule } from 'primeng/message';
|
|
40
|
+
import * as i28 from 'primeng/confirmdialog';
|
|
41
|
+
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
42
|
+
import * as i29 from 'primeng/progressbar';
|
|
43
|
+
import { ProgressBarModule } from 'primeng/progressbar';
|
|
44
|
+
import * as i30 from 'primeng/tristatecheckbox';
|
|
45
|
+
import { TriStateCheckboxModule } from 'primeng/tristatecheckbox';
|
|
46
|
+
import * as i31 from 'primeng/keyfilter';
|
|
47
|
+
import { KeyFilterModule } from 'primeng/keyfilter';
|
|
48
|
+
import * as i32 from 'primeng/inputswitch';
|
|
49
|
+
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
50
|
+
import * as i34 from 'primeng/tabview';
|
|
51
|
+
import { TabViewModule } from 'primeng/tabview';
|
|
52
|
+
import * as i20 from 'primeng/calendar';
|
|
53
|
+
import { CalendarModule } from 'primeng/calendar';
|
|
54
|
+
import * as i35 from 'primeng/panel';
|
|
55
|
+
import { PanelModule } from 'primeng/panel';
|
|
56
|
+
import * as i17 from 'primeng/autocomplete';
|
|
57
|
+
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
58
|
+
import * as i38 from 'primeng/fieldset';
|
|
59
|
+
import { FieldsetModule } from 'primeng/fieldset';
|
|
60
|
+
import * as i16 from 'primeng/checkbox';
|
|
61
|
+
import { CheckboxModule } from 'primeng/checkbox';
|
|
62
|
+
import * as i39 from 'primeng/tree';
|
|
63
|
+
import { TreeModule } from 'primeng/tree';
|
|
64
|
+
import * as i15 from 'primeng/radiobutton';
|
|
65
|
+
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
66
|
+
import * as i40 from 'primeng/tabmenu';
|
|
67
|
+
import { TabMenuModule } from 'primeng/tabmenu';
|
|
68
|
+
import * as i14 from 'primeng/overlaypanel';
|
|
69
|
+
import { OverlayPanelModule } from 'primeng/overlaypanel';
|
|
70
|
+
import * as i13 from 'primeng/tooltip';
|
|
71
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
72
|
+
import * as i12 from 'primeng/card';
|
|
73
|
+
import { CardModule } from 'primeng/card';
|
|
74
|
+
import * as i41 from 'primeng/menubar';
|
|
75
|
+
import { MenubarModule } from 'primeng/menubar';
|
|
76
|
+
import * as i37 from 'primeng/splitbutton';
|
|
77
|
+
import { SplitButtonModule } from 'primeng/splitbutton';
|
|
78
|
+
import * as i36 from 'primeng/toolbar';
|
|
79
|
+
import { ToolbarModule } from 'primeng/toolbar';
|
|
80
|
+
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
81
|
+
import * as i3$2 from '@angular/router';
|
|
82
|
+
|
|
83
|
+
class GlobalService {
|
|
84
|
+
constructor(http) {
|
|
85
|
+
this.http = http;
|
|
86
|
+
}
|
|
87
|
+
setConfiguracion() {
|
|
88
|
+
this.http.get('assets/config.json').subscribe((data) => {
|
|
89
|
+
localStorage.setItem('config', JSON.stringify(data));
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
obtieneConfiguracion() {
|
|
93
|
+
return JSON.parse(localStorage.getItem('config'));
|
|
94
|
+
}
|
|
95
|
+
getUrl(urlComponente) {
|
|
96
|
+
return this.obtieneConfiguracion().url + (urlComponente ? '/' + urlComponente : '');
|
|
97
|
+
}
|
|
98
|
+
auth(params) {
|
|
99
|
+
return this.http.post(this.getUrl() + '/login', params);
|
|
100
|
+
}
|
|
101
|
+
getUsuarioActual() {
|
|
102
|
+
return this.http.get(this.getUrl() + '/usuario/obtieneUsuarioActual', this.buildAuth());
|
|
103
|
+
}
|
|
104
|
+
buildAuth() {
|
|
105
|
+
const data = this.getUsuario();
|
|
106
|
+
return {
|
|
107
|
+
headers: new HttpHeaders({
|
|
108
|
+
'Authorization': data.token_type + ' ' + data.access_token,
|
|
109
|
+
'Content-Type': 'application/json',
|
|
110
|
+
'Accept': 'application/json'
|
|
111
|
+
})
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
validateEndPoint() {
|
|
115
|
+
return this.http.get(this.getUrl() + '/validate', this.buildAuth());
|
|
116
|
+
}
|
|
117
|
+
closeEndPoint() {
|
|
118
|
+
localStorage.removeItem('usuario');
|
|
119
|
+
this.setUsuarioInstance(null);
|
|
120
|
+
}
|
|
121
|
+
getUsuario() {
|
|
122
|
+
return JSON.parse(localStorage.getItem('usuario'));
|
|
123
|
+
}
|
|
124
|
+
setUsuarioInstance(usuarioInstance) {
|
|
125
|
+
this.usuarioInstance = usuarioInstance;
|
|
126
|
+
}
|
|
127
|
+
getLang() {
|
|
128
|
+
let lang = localStorage.getItem('lang');
|
|
129
|
+
return lang ? lang : 'es';
|
|
130
|
+
}
|
|
131
|
+
setModulo(modulo) {
|
|
132
|
+
return this.http.post(this.getUrl() + '/usuario/setModulo', modulo, this.buildAuth());
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
class CrudService extends GlobalService {
|
|
137
|
+
constructor(httpCliente, url) {
|
|
138
|
+
super(httpCliente);
|
|
139
|
+
this.httpCliente = httpCliente;
|
|
140
|
+
this.url = url;
|
|
141
|
+
this.urlComponente = this.url;
|
|
142
|
+
}
|
|
143
|
+
//Functions for ResourcesCrud [{ param: "max", value: 10}]
|
|
144
|
+
serializeParams(params) {
|
|
145
|
+
let serializeString = '';
|
|
146
|
+
params.map((e, index) => {
|
|
147
|
+
if (e.value !== undefined)
|
|
148
|
+
serializeString += ((index == 0) ? '?' : '&') + e.param + '=' + e.value;
|
|
149
|
+
});
|
|
150
|
+
return serializeString;
|
|
151
|
+
}
|
|
152
|
+
getHttp() {
|
|
153
|
+
return this.httpCliente;
|
|
154
|
+
}
|
|
155
|
+
geturl() {
|
|
156
|
+
return this.getUrl(this.urlComponente);
|
|
157
|
+
}
|
|
158
|
+
getBaseUrl() {
|
|
159
|
+
return this.getUrl('');
|
|
160
|
+
}
|
|
161
|
+
getByUrl(url, params) {
|
|
162
|
+
return this.httpCliente.get(this.getUrl(url) + this.serializeParams(params), this.buildAuth());
|
|
163
|
+
}
|
|
164
|
+
getAll(params) {
|
|
165
|
+
return this.httpCliente.get(this.getUrl(this.urlComponente) + (params ? (this.serializeParams(params)) : ('')), this.buildAuth());
|
|
166
|
+
}
|
|
167
|
+
get(id) {
|
|
168
|
+
return this.httpCliente.get(this.getUrl(this.urlComponente) + '/' + id, this.buildAuth());
|
|
169
|
+
}
|
|
170
|
+
save(obj) {
|
|
171
|
+
return this.httpCliente.post(this.getUrl(this.urlComponente), obj, this.buildAuth());
|
|
172
|
+
}
|
|
173
|
+
update(obj) {
|
|
174
|
+
return this.httpCliente.put(this.getUrl(this.urlComponente) + '/' + obj.id, obj, this.buildAuth());
|
|
175
|
+
}
|
|
176
|
+
delete(id) {
|
|
177
|
+
return this.httpCliente.delete(this.getUrl(this.urlComponente) + '/' + id, this.buildAuth());
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
class CuentaContableService extends CrudService {
|
|
182
|
+
constructor(httpClient) {
|
|
183
|
+
super(httpClient, 'cuentaContable');
|
|
184
|
+
this.httpClient = httpClient;
|
|
185
|
+
}
|
|
186
|
+
obtieneCuentasContablesRecursivo() {
|
|
187
|
+
return this.httpClient.get(this.getUrl('cuentaContable') + '/obtieneCuentasContablesRecursivo', this.buildAuth());
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/** @nocollapse */ CuentaContableService.ɵfac = function CuentaContableService_Factory(t) { return new (t || CuentaContableService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
191
|
+
/** @nocollapse */ CuentaContableService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: CuentaContableService, factory: CuentaContableService.ɵfac, providedIn: 'root' });
|
|
192
|
+
(function () {
|
|
193
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CuentaContableService, [{
|
|
194
|
+
type: Injectable,
|
|
195
|
+
args: [{
|
|
196
|
+
providedIn: 'root'
|
|
197
|
+
}]
|
|
198
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
199
|
+
})();
|
|
200
|
+
|
|
201
|
+
function CclistaComponent_ng_template_3_Template(rf, ctx) {
|
|
202
|
+
if (rf & 1) {
|
|
203
|
+
i0.ɵɵelementStart(0, "tr")(1, "th", 5);
|
|
204
|
+
i0.ɵɵtext(2, "Cuenta contable");
|
|
205
|
+
i0.ɵɵelementEnd();
|
|
206
|
+
i0.ɵɵelementStart(3, "th", 5);
|
|
207
|
+
i0.ɵɵtext(4, "Descripci\u00F3n");
|
|
208
|
+
i0.ɵɵelementEnd();
|
|
209
|
+
i0.ɵɵelementStart(5, "th", 6);
|
|
210
|
+
i0.ɵɵtext(6, "Naturaleza");
|
|
211
|
+
i0.ɵɵelementEnd();
|
|
212
|
+
i0.ɵɵelementStart(7, "th", 7);
|
|
213
|
+
i0.ɵɵtext(8, "Tipo");
|
|
214
|
+
i0.ɵɵelementEnd();
|
|
215
|
+
i0.ɵɵelementStart(9, "th", 8);
|
|
216
|
+
i0.ɵɵtext(10, "Acciones");
|
|
217
|
+
i0.ɵɵelementEnd()();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function CclistaComponent_ng_template_4_button_12_Template(rf, ctx) {
|
|
221
|
+
if (rf & 1) {
|
|
222
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
223
|
+
i0.ɵɵelementStart(0, "button", 16);
|
|
224
|
+
i0.ɵɵlistener("click", function CclistaComponent_ng_template_4_button_12_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const rowData_r3 = i0.ɵɵnextContext().rowData; const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.selectCuentaContable(rowData_r3); });
|
|
225
|
+
i0.ɵɵelementEnd();
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
function CclistaComponent_ng_template_4_button_13_Template(rf, ctx) {
|
|
229
|
+
if (rf & 1) {
|
|
230
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
231
|
+
i0.ɵɵelementStart(0, "button", 16);
|
|
232
|
+
i0.ɵɵlistener("click", function CclistaComponent_ng_template_4_button_13_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r11); const rowData_r3 = i0.ɵɵnextContext().rowData; const ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.selectCuentaContable(rowData_r3); });
|
|
233
|
+
i0.ɵɵelementEnd();
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
function CclistaComponent_ng_template_4_Template(rf, ctx) {
|
|
237
|
+
if (rf & 1) {
|
|
238
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 9);
|
|
239
|
+
i0.ɵɵelement(2, "p-treeTableToggler", 10);
|
|
240
|
+
i0.ɵɵtext(3);
|
|
241
|
+
i0.ɵɵelementEnd();
|
|
242
|
+
i0.ɵɵelementStart(4, "td", 9);
|
|
243
|
+
i0.ɵɵtext(5);
|
|
244
|
+
i0.ɵɵelementEnd();
|
|
245
|
+
i0.ɵɵelementStart(6, "td", 11);
|
|
246
|
+
i0.ɵɵtext(7);
|
|
247
|
+
i0.ɵɵelementEnd();
|
|
248
|
+
i0.ɵɵelementStart(8, "td", 12);
|
|
249
|
+
i0.ɵɵtext(9);
|
|
250
|
+
i0.ɵɵelementEnd();
|
|
251
|
+
i0.ɵɵelementStart(10, "td", 13)(11, "div", 14);
|
|
252
|
+
i0.ɵɵtemplate(12, CclistaComponent_ng_template_4_button_12_Template, 1, 0, "button", 15);
|
|
253
|
+
i0.ɵɵtemplate(13, CclistaComponent_ng_template_4_button_13_Template, 1, 0, "button", 15);
|
|
254
|
+
i0.ɵɵelementEnd()()();
|
|
255
|
+
}
|
|
256
|
+
if (rf & 2) {
|
|
257
|
+
const rowNode_r2 = ctx.$implicit;
|
|
258
|
+
const rowData_r3 = ctx.rowData;
|
|
259
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
260
|
+
i0.ɵɵadvance(2);
|
|
261
|
+
i0.ɵɵproperty("rowNode", rowNode_r2);
|
|
262
|
+
i0.ɵɵadvance(1);
|
|
263
|
+
i0.ɵɵtextInterpolate1(" ", rowData_r3.cuentaContable, " ");
|
|
264
|
+
i0.ɵɵadvance(2);
|
|
265
|
+
i0.ɵɵtextInterpolate1(" ", rowData_r3.descripcion, " ");
|
|
266
|
+
i0.ɵɵadvance(2);
|
|
267
|
+
i0.ɵɵtextInterpolate1(" ", rowData_r3.naturaleza, " ");
|
|
268
|
+
i0.ɵɵadvance(2);
|
|
269
|
+
i0.ɵɵtextInterpolate1(" ", rowData_r3.tipo, " ");
|
|
270
|
+
i0.ɵɵadvance(3);
|
|
271
|
+
i0.ɵɵproperty("ngIf", ctx_r1.typeAccount == 1 && rowData_r3.cuentaRegistro);
|
|
272
|
+
i0.ɵɵadvance(1);
|
|
273
|
+
i0.ɵɵproperty("ngIf", ctx_r1.typeAccount == 2 && !rowData_r3.cuentaRegistro);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
const _c0$7 = function () { return { width: "100%" }; };
|
|
277
|
+
class CclistaComponent {
|
|
278
|
+
constructor(_cuentaContableService) {
|
|
279
|
+
this._cuentaContableService = _cuentaContableService;
|
|
280
|
+
this.cuentasContables = [];
|
|
281
|
+
this.maxH = 720;
|
|
282
|
+
this.query = "";
|
|
283
|
+
this.tempAccounts = [];
|
|
284
|
+
this.evSelectedAccount = new EventEmitter();
|
|
285
|
+
}
|
|
286
|
+
ngOnInit() {
|
|
287
|
+
this.maxH = window.innerHeight - 320;
|
|
288
|
+
this.obtenerCuentasContablesRecursivo();
|
|
289
|
+
}
|
|
290
|
+
obtenerCuentasContablesRecursivo() {
|
|
291
|
+
this._cuentaContableService.obtieneCuentasContablesRecursivo().subscribe((result) => {
|
|
292
|
+
if (result) {
|
|
293
|
+
this.cuentasContables = result;
|
|
294
|
+
this.sortAccounts();
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
sortAccounts() {
|
|
299
|
+
this.cuentasContables.sort(function (a, b) {
|
|
300
|
+
// get symbol for string
|
|
301
|
+
let characterBreak = '.';
|
|
302
|
+
const listA = a.data.cuentaContable.split(characterBreak);
|
|
303
|
+
const listB = b.data.cuentaContable.split(characterBreak);
|
|
304
|
+
if (listA.length > 0 && listB.length > 0) {
|
|
305
|
+
if (listA.length === listB.length) {
|
|
306
|
+
for (let i = 0; i < listA.length; i++) {
|
|
307
|
+
if (parseInt(listA[i]) > parseInt(listB[i])) {
|
|
308
|
+
return 1;
|
|
309
|
+
}
|
|
310
|
+
if (parseInt(listA[i]) < parseInt(listB[i])) {
|
|
311
|
+
return -1;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return 0;
|
|
315
|
+
}
|
|
316
|
+
if (listA.length < listB.length) {
|
|
317
|
+
for (let i = 0; i < listA.length; i++) {
|
|
318
|
+
if (parseInt(listA[i]) > parseInt(listB[i])) {
|
|
319
|
+
return 1;
|
|
320
|
+
}
|
|
321
|
+
if (parseInt(listA[i]) < parseInt(listB[i])) {
|
|
322
|
+
return -1;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return -1;
|
|
326
|
+
}
|
|
327
|
+
if (listB.length < listA.length) {
|
|
328
|
+
for (let i = 0; i < listB.length; i++) {
|
|
329
|
+
if (parseInt(listA[i]) > parseInt(listB[i])) {
|
|
330
|
+
return 1;
|
|
331
|
+
}
|
|
332
|
+
if (parseInt(listA[i]) < parseInt(listB[i])) {
|
|
333
|
+
return -1;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
return 1;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
return 0;
|
|
340
|
+
});
|
|
341
|
+
for (let item of this.cuentasContables) {
|
|
342
|
+
if (item.children) {
|
|
343
|
+
this.sortItem(item);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
this.tempAccounts = this.cuentasContables;
|
|
347
|
+
}
|
|
348
|
+
sortItem(account) {
|
|
349
|
+
account.children.sort(function (a, b) {
|
|
350
|
+
// get symbol for string
|
|
351
|
+
let characterBreak = '.';
|
|
352
|
+
const listA = a.data.cuentaContable.split(characterBreak);
|
|
353
|
+
const listB = b.data.cuentaContable.split(characterBreak);
|
|
354
|
+
if (listA.length > 0 && listB.length > 0) {
|
|
355
|
+
if (listA.length === listB.length) {
|
|
356
|
+
for (let i = 0; i < listA.length; i++) {
|
|
357
|
+
if (parseInt(listA[i]) > parseInt(listB[i])) {
|
|
358
|
+
return 1;
|
|
359
|
+
}
|
|
360
|
+
if (parseInt(listA[i]) < parseInt(listB[i])) {
|
|
361
|
+
return -1;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
return 0;
|
|
365
|
+
}
|
|
366
|
+
if (listA.length < listB.length) {
|
|
367
|
+
for (let i = 0; i < listA.length; i++) {
|
|
368
|
+
if (parseInt(listA[i]) > parseInt(listB[i])) {
|
|
369
|
+
return 1;
|
|
370
|
+
}
|
|
371
|
+
if (parseInt(listA[i]) < parseInt(listB[i])) {
|
|
372
|
+
return -1;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
return -1;
|
|
376
|
+
}
|
|
377
|
+
if (listB.length < listA.length) {
|
|
378
|
+
for (let i = 0; i < listB.length; i++) {
|
|
379
|
+
if (parseInt(listA[i]) > parseInt(listB[i])) {
|
|
380
|
+
return 1;
|
|
381
|
+
}
|
|
382
|
+
if (parseInt(listA[i]) < parseInt(listB[i])) {
|
|
383
|
+
return -1;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
return 1;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
return 0;
|
|
390
|
+
});
|
|
391
|
+
for (let item of account.children) {
|
|
392
|
+
this.sortItem(item);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
selectCuentaContable(account) {
|
|
396
|
+
this.evSelectedAccount.emit(account);
|
|
397
|
+
}
|
|
398
|
+
filterAccounts(evt) {
|
|
399
|
+
if (!evt) {
|
|
400
|
+
const temp = this.resetAccount();
|
|
401
|
+
this.cuentasContables = temp;
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
this.cuentasContables = this.browseAccount(this.tempAccounts);
|
|
405
|
+
}
|
|
406
|
+
resetAccount() {
|
|
407
|
+
this.query = '';
|
|
408
|
+
let accounts = [];
|
|
409
|
+
for (let cc of this.tempAccounts) {
|
|
410
|
+
accounts.push(cc);
|
|
411
|
+
}
|
|
412
|
+
return accounts;
|
|
413
|
+
}
|
|
414
|
+
browseAccount(accounts) {
|
|
415
|
+
let listAccounts = [];
|
|
416
|
+
if (this.query === '') {
|
|
417
|
+
const temp = this.resetAccount();
|
|
418
|
+
this.cuentasContables = temp;
|
|
419
|
+
}
|
|
420
|
+
else {
|
|
421
|
+
for (let account of accounts) {
|
|
422
|
+
if (account.data.cuentaContable.toString().toLowerCase().includes(this.query.toLowerCase()) || account.data.descripcion.toString().toLowerCase().includes(this.query.toLowerCase())) {
|
|
423
|
+
listAccounts = listAccounts.concat({
|
|
424
|
+
data: account.data,
|
|
425
|
+
children: this.browseAccount(account.children)
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
else {
|
|
429
|
+
listAccounts = listAccounts.concat(this.browseAccount(account.children));
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
return listAccounts;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
/** @nocollapse */ CclistaComponent.ɵfac = function CclistaComponent_Factory(t) { return new (t || CclistaComponent)(i0.ɵɵdirectiveInject(CuentaContableService)); };
|
|
437
|
+
/** @nocollapse */ CclistaComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: CclistaComponent, selectors: [["lib-cclista"]], inputs: { isShared: "isShared", typeAccount: "typeAccount" }, outputs: { evSelectedAccount: "evSelectedAccount" }, decls: 5, vars: 8, consts: [["type", "text", "pInputText", "", "placeholder", "Cuenta o descripci\u00F3n", 2, "width", "100%", 3, "ngModel", "ngModelChange", "keyup"], [2, "padding", "10px"], [3, "value", "scrollable", "scrollHeight", "resizableColumns"], ["pTemplate", "header"], ["pTemplate", "body", "style", "width: 100%;"], [2, "width", "150px"], [2, "width", "90px"], [2, "width", "60px"], [2, "width", "200px"], [1, "ui-resizable-column", 2, "width", "150px"], [3, "rowNode"], [1, "ui-resizable-column", 2, "width", "90px"], [1, "ui-resizable-column", 2, "width", "60px"], [1, "ui-resizable-column", 2, "width", "200px"], [1, "button-row"], ["pButton", "", "type", "button", "icon", "pi pi-check", "class", "ui-button-raised ui-button-success", 3, "click", 4, "ngIf"], ["pButton", "", "type", "button", "icon", "pi pi-check", 1, "ui-button-raised", "ui-button-success", 3, "click"]], template: function CclistaComponent_Template(rf, ctx) {
|
|
438
|
+
if (rf & 1) {
|
|
439
|
+
i0.ɵɵelementStart(0, "input", 0);
|
|
440
|
+
i0.ɵɵlistener("ngModelChange", function CclistaComponent_Template_input_ngModelChange_0_listener($event) { return ctx.query = $event; })("keyup", function CclistaComponent_Template_input_keyup_0_listener($event) { return ctx.filterAccounts($event); });
|
|
441
|
+
i0.ɵɵelementEnd();
|
|
442
|
+
i0.ɵɵelementStart(1, "div", 1)(2, "p-treeTable", 2);
|
|
443
|
+
i0.ɵɵtemplate(3, CclistaComponent_ng_template_3_Template, 11, 0, "ng-template", 3);
|
|
444
|
+
i0.ɵɵtemplate(4, CclistaComponent_ng_template_4_Template, 14, 7, "ng-template", 4);
|
|
445
|
+
i0.ɵɵelementEnd()();
|
|
446
|
+
}
|
|
447
|
+
if (rf & 2) {
|
|
448
|
+
i0.ɵɵproperty("ngModel", ctx.query);
|
|
449
|
+
i0.ɵɵadvance(2);
|
|
450
|
+
i0.ɵɵstyleMap(i0.ɵɵpureFunction0(7, _c0$7));
|
|
451
|
+
i0.ɵɵproperty("value", ctx.cuentasContables ? ctx.cuentasContables : ctx.tempAccounts)("scrollable", true)("scrollHeight", ctx.maxH + "px")("resizableColumns", true);
|
|
452
|
+
}
|
|
453
|
+
}, directives: [i5.DefaultValueAccessor, i6.InputText, i5.NgControlStatus, i5.NgModel, i4.TreeTable, i4$1.PrimeTemplate, i4.TreeTableToggler, i8.NgIf, i7.ButtonDirective], styles: [""] });
|
|
454
|
+
(function () {
|
|
455
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CclistaComponent, [{
|
|
456
|
+
type: Component,
|
|
457
|
+
args: [{ selector: 'lib-cclista', template: "<input type=\"text\" style=\"width: 100%;\" pInputText placeholder=\"Cuenta o descripci\u00F3n\" [(ngModel)]=\"query\" (keyup)=\"filterAccounts($event)\">\n\n<div style=\"padding: 10px;\">\n <p-treeTable [value]=\"cuentasContables?cuentasContables:tempAccounts\" [scrollable]=\"true\" [style]=\"{width: '100%'} \" [scrollHeight]=\"maxH + 'px'\" [resizableColumns]=\"true\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th style=\"width: 150px;\">Cuenta contable</th>\n <th style=\"width: 150px;\">Descripci\u00F3n</th>\n <th style=\"width: 90px;\">Naturaleza</th>\n <th style=\"width: 60px;\">Tipo</th>\n <th style=\"width: 200px;\">Acciones</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowNode let-rowData=\"rowData\" style=\"width: 100%;\">\n <tr>\n <td class=\"ui-resizable-column\" style=\"width: 150px;\">\n <p-treeTableToggler [rowNode]=\"rowNode\"></p-treeTableToggler>\n {{rowData.cuentaContable}}\n </td>\n <td class=\"ui-resizable-column\" style=\"width: 150px;\">\n {{rowData.descripcion}}\n </td>\n <td class=\"ui-resizable-column\" style=\"width: 90px;\">\n {{rowData.naturaleza}}\n </td>\n <td class=\"ui-resizable-column\" style=\"width: 60px;\">\n {{rowData.tipo}}\n </td>\n <td class=\"ui-resizable-column\" style=\"width: 200px;\">\n <div class=\"button-row\">\n <button pButton type=\"button\" icon=\"pi pi-check\" class=\"ui-button-raised ui-button-success\" (click)=\"selectCuentaContable(rowData)\" *ngIf=\"typeAccount==1 && rowData.cuentaRegistro\"></button>\n <button pButton type=\"button\" icon=\"pi pi-check\" class=\"ui-button-raised ui-button-success\" (click)=\"selectCuentaContable(rowData)\" *ngIf=\"typeAccount==2 && !rowData.cuentaRegistro\"></button>\n </div>\n </td>\n </tr>\n </ng-template>\n </p-treeTable>\n</div>", styles: [""] }]
|
|
458
|
+
}], function () { return [{ type: CuentaContableService }]; }, { isShared: [{
|
|
459
|
+
type: Input
|
|
460
|
+
}], typeAccount: [{
|
|
461
|
+
type: Input
|
|
462
|
+
}], evSelectedAccount: [{
|
|
463
|
+
type: Output
|
|
464
|
+
}] });
|
|
465
|
+
})();
|
|
466
|
+
|
|
467
|
+
const _c0$6 = ["dialog"];
|
|
468
|
+
const _c1$3 = function (a0) { return { "width": a0, "min-width": "200px" }; };
|
|
469
|
+
const _c2 = function (a0) { return { "height": a0 }; };
|
|
470
|
+
class CcseleccionDialogComponent {
|
|
471
|
+
constructor() {
|
|
472
|
+
this.cuentasContables = [];
|
|
473
|
+
this.maxH = 720;
|
|
474
|
+
this.maxW = 0;
|
|
475
|
+
this.flagModal = true;
|
|
476
|
+
this.size = 350;
|
|
477
|
+
this.maxH = window.innerHeight - 370;
|
|
478
|
+
this.maxW = window.innerWidth;
|
|
479
|
+
this.size = this.maxW - 50;
|
|
480
|
+
this.evSelectedAccount = new EventEmitter();
|
|
481
|
+
}
|
|
482
|
+
ngOnInit() {
|
|
483
|
+
}
|
|
484
|
+
getAccount(account) {
|
|
485
|
+
this.evSelectedAccount.emit(account);
|
|
486
|
+
}
|
|
487
|
+
hiddenDialog(evt) {
|
|
488
|
+
this.evSelectedAccount.emit(null);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
/** @nocollapse */ CcseleccionDialogComponent.ɵfac = function CcseleccionDialogComponent_Factory(t) { return new (t || CcseleccionDialogComponent)(); };
|
|
492
|
+
/** @nocollapse */ CcseleccionDialogComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: CcseleccionDialogComponent, selectors: [["lib-ccseleccion-dialog"]], viewQuery: function CcseleccionDialogComponent_Query(rf, ctx) {
|
|
493
|
+
if (rf & 1) {
|
|
494
|
+
i0.ɵɵviewQuery(_c0$6, 7);
|
|
495
|
+
}
|
|
496
|
+
if (rf & 2) {
|
|
497
|
+
let _t;
|
|
498
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dialog = _t.first);
|
|
499
|
+
}
|
|
500
|
+
}, inputs: { tipoCuenta: "tipoCuenta", displayShowCuentas: "displayShowCuentas" }, outputs: { evSelectedAccount: "evSelectedAccount" }, decls: 3, vars: 17, consts: [["header", "Selecciona cuenta contable", 3, "visible", "modal", "minY", "baseZIndex", "blockScroll", "draggable", "maximizable", "visibleChange", "onHide"], [1, "padding10", 3, "ngStyle"], [3, "isShared", "typeAccount", "evSelectedAccount"]], template: function CcseleccionDialogComponent_Template(rf, ctx) {
|
|
501
|
+
if (rf & 1) {
|
|
502
|
+
i0.ɵɵelementStart(0, "p-dialog", 0);
|
|
503
|
+
i0.ɵɵlistener("visibleChange", function CcseleccionDialogComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.displayShowCuentas = $event; })("onHide", function CcseleccionDialogComponent_Template_p_dialog_onHide_0_listener($event) { return ctx.hiddenDialog($event); });
|
|
504
|
+
i0.ɵɵelementStart(1, "div", 1)(2, "lib-cclista", 2);
|
|
505
|
+
i0.ɵɵlistener("evSelectedAccount", function CcseleccionDialogComponent_Template_lib_cclista_evSelectedAccount_2_listener($event) { return ctx.getAccount($event); });
|
|
506
|
+
i0.ɵɵelementEnd()()();
|
|
507
|
+
}
|
|
508
|
+
if (rf & 2) {
|
|
509
|
+
i0.ɵɵstyleMap(i0.ɵɵpureFunction1(13, _c1$3, ctx.size + "px"));
|
|
510
|
+
i0.ɵɵproperty("visible", ctx.displayShowCuentas)("modal", true)("minY", 70)("baseZIndex", 10000)("blockScroll", true)("draggable", false)("blockScroll", true)("maximizable", true);
|
|
511
|
+
i0.ɵɵadvance(1);
|
|
512
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(15, _c2, ctx.maxH + 200 + "px"));
|
|
513
|
+
i0.ɵɵadvance(1);
|
|
514
|
+
i0.ɵɵproperty("isShared", true)("typeAccount", ctx.tipoCuenta);
|
|
515
|
+
}
|
|
516
|
+
}, directives: [i4$2.Dialog, i8.NgStyle, CclistaComponent], styles: [""] });
|
|
517
|
+
(function () {
|
|
518
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CcseleccionDialogComponent, [{
|
|
519
|
+
type: Component,
|
|
520
|
+
args: [{ selector: 'lib-ccseleccion-dialog', template: "<p-dialog header=\"Selecciona cuenta contable\" [(visible)]=\"displayShowCuentas\" [modal]=\"true\" [style]=\"{'width': size+'px', 'min-width': '200px'}\" [minY]=\"70\" [baseZIndex]=\"10000\" (onHide)=\"hiddenDialog($event)\" [blockScroll]=\"true\" [draggable]=\"false\" [blockScroll]=\"true\"\n [maximizable]=\"true\">\n <div class=\"padding10\" [ngStyle]=\"{'height': maxH+200+'px'}\">\n <lib-cclista [isShared]=\"true\" [typeAccount]=\"tipoCuenta\" (evSelectedAccount)=\"getAccount($event)\"></lib-cclista>\n </div>\n</p-dialog>", styles: [""] }]
|
|
521
|
+
}], function () { return []; }, { dialog: [{
|
|
522
|
+
type: ViewChild,
|
|
523
|
+
args: ["dialog", { static: true }]
|
|
524
|
+
}], tipoCuenta: [{
|
|
525
|
+
type: Input
|
|
526
|
+
}], displayShowCuentas: [{
|
|
527
|
+
type: Input
|
|
528
|
+
}], evSelectedAccount: [{
|
|
529
|
+
type: Output
|
|
530
|
+
}] });
|
|
531
|
+
})();
|
|
532
|
+
|
|
533
|
+
const contaComponents = [
|
|
534
|
+
CclistaComponent,
|
|
535
|
+
CcseleccionDialogComponent
|
|
536
|
+
];
|
|
537
|
+
|
|
538
|
+
class LoginModalService {
|
|
539
|
+
constructor() {
|
|
540
|
+
this.modal = new EventEmitter();
|
|
541
|
+
}
|
|
542
|
+
showModal() {
|
|
543
|
+
this.modal.emit(true);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
/** @nocollapse */ LoginModalService.ɵfac = function LoginModalService_Factory(t) { return new (t || LoginModalService)(); };
|
|
547
|
+
/** @nocollapse */ LoginModalService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: LoginModalService, factory: LoginModalService.ɵfac, providedIn: 'root' });
|
|
548
|
+
(function () {
|
|
549
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoginModalService, [{
|
|
550
|
+
type: Injectable,
|
|
551
|
+
args: [{
|
|
552
|
+
providedIn: 'root'
|
|
553
|
+
}]
|
|
554
|
+
}], null, { modal: [{
|
|
555
|
+
type: Output
|
|
556
|
+
}] });
|
|
557
|
+
})();
|
|
558
|
+
|
|
559
|
+
class LoadingScreenService {
|
|
560
|
+
constructor() {
|
|
561
|
+
this._loading = false;
|
|
562
|
+
this.loadingStatus = new Subject();
|
|
563
|
+
}
|
|
564
|
+
get loading() {
|
|
565
|
+
return this._loading;
|
|
566
|
+
}
|
|
567
|
+
set loading(value) {
|
|
568
|
+
this._loading = value;
|
|
569
|
+
this.loadingStatus.next(value);
|
|
570
|
+
}
|
|
571
|
+
startLoading() {
|
|
572
|
+
this.loading = true;
|
|
573
|
+
}
|
|
574
|
+
stopLoading() {
|
|
575
|
+
this.loading = false;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
/** @nocollapse */ LoadingScreenService.ɵfac = function LoadingScreenService_Factory(t) { return new (t || LoadingScreenService)(); };
|
|
579
|
+
/** @nocollapse */ LoadingScreenService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: LoadingScreenService, factory: LoadingScreenService.ɵfac, providedIn: 'root' });
|
|
580
|
+
(function () {
|
|
581
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingScreenService, [{
|
|
582
|
+
type: Injectable,
|
|
583
|
+
args: [{
|
|
584
|
+
providedIn: 'root'
|
|
585
|
+
}]
|
|
586
|
+
}], null, null);
|
|
587
|
+
})();
|
|
588
|
+
|
|
589
|
+
class httpInterceptor {
|
|
590
|
+
constructor(loginModalService, toastrService, loadingScreenService) {
|
|
591
|
+
this.loginModalService = loginModalService;
|
|
592
|
+
this.toastrService = toastrService;
|
|
593
|
+
this.loadingScreenService = loadingScreenService;
|
|
594
|
+
}
|
|
595
|
+
intercept(request, next) {
|
|
596
|
+
this.loadingScreenService.startLoading(); // this.loadingService.start();
|
|
597
|
+
return next.handle(request).pipe(catchError((error, caught) => {
|
|
598
|
+
this.loadingScreenService.stopLoading();
|
|
599
|
+
this.handleError(error);
|
|
600
|
+
return throwError(error);
|
|
601
|
+
}), tap((res) => {
|
|
602
|
+
// @ts-ignore
|
|
603
|
+
const body = (res.body) ? res.body : null;
|
|
604
|
+
if (res.type !== 0 && res.type === 4) {
|
|
605
|
+
this.loadingScreenService.stopLoading();
|
|
606
|
+
}
|
|
607
|
+
if (body) {
|
|
608
|
+
let message = (body.success) ? body.success : null;
|
|
609
|
+
if (message) {
|
|
610
|
+
this.toastrService.success(message, 'Exito', {
|
|
611
|
+
timeOut: 3000, closeButton: true
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}));
|
|
616
|
+
}
|
|
617
|
+
handleError(err) {
|
|
618
|
+
if (err.status === 401 || err.status === 403) {
|
|
619
|
+
if (err.status === 401) {
|
|
620
|
+
//this.router.navigateByUrl('/login');
|
|
621
|
+
// this.router.navigateByUrl('/sing_out');
|
|
622
|
+
this.loginModalService.showModal();
|
|
623
|
+
}
|
|
624
|
+
if (err.status === 403)
|
|
625
|
+
this.toastrService.error('No tiene permiso sobre esta accion', 'Error', {
|
|
626
|
+
timeOut: 5000
|
|
627
|
+
});
|
|
628
|
+
return of(err.message);
|
|
629
|
+
}
|
|
630
|
+
if (err.status !== 401 && err.status !== 403 && err.status !== 409) {
|
|
631
|
+
this.toastrService.error('Ocurrio un error al procesar su solicitud', 'Error', {
|
|
632
|
+
timeOut: 5000
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
this.readError(err);
|
|
636
|
+
return of(err);
|
|
637
|
+
}
|
|
638
|
+
readError(respuesta) {
|
|
639
|
+
if (respuesta.error) {
|
|
640
|
+
if (respuesta.error.error)
|
|
641
|
+
if (respuesta.error.error.message) {
|
|
642
|
+
this.toastrService.error(respuesta.error.error.message, 'Error', {
|
|
643
|
+
timeOut: 3000
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
if (respuesta.error.message) {
|
|
647
|
+
this.toastrService.error(respuesta.error.message, 'Error', {
|
|
648
|
+
timeOut: 3000
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
if (respuesta.error._errors) {
|
|
652
|
+
if (Array.isArray(respuesta.error._errors))
|
|
653
|
+
for (let indexError = 0; indexError < respuesta.error._errors.length; indexError++) {
|
|
654
|
+
this.toastrService.error(respuesta.error._errors[indexError].message, 'Error', {
|
|
655
|
+
timeOut: 3000,
|
|
656
|
+
closeButton: true
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
/** @nocollapse */ httpInterceptor.ɵfac = function httpInterceptor_Factory(t) { return new (t || httpInterceptor)(i0.ɵɵinject(LoginModalService), i0.ɵɵinject(i1$1.ToastrService), i0.ɵɵinject(LoadingScreenService)); };
|
|
664
|
+
/** @nocollapse */ httpInterceptor.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: httpInterceptor, factory: httpInterceptor.ɵfac });
|
|
665
|
+
(function () {
|
|
666
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(httpInterceptor, [{
|
|
667
|
+
type: Injectable
|
|
668
|
+
}], function () { return [{ type: LoginModalService }, { type: i1$1.ToastrService }, { type: LoadingScreenService }]; }, null);
|
|
669
|
+
})();
|
|
670
|
+
|
|
671
|
+
class Error404Component {
|
|
672
|
+
constructor() { }
|
|
673
|
+
ngOnInit() {
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
/** @nocollapse */ Error404Component.ɵfac = function Error404Component_Factory(t) { return new (t || Error404Component)(); };
|
|
677
|
+
/** @nocollapse */ Error404Component.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: Error404Component, selectors: [["app-error404"]], decls: 9, vars: 0, consts: [[1, "col-md-12", "sec_sof"], [1, "row"], [1, "col", "col-center"], [1, "center"], [1, "error"], [1, "col-12"]], template: function Error404Component_Template(rf, ctx) {
|
|
678
|
+
if (rf & 1) {
|
|
679
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3)(4, "div", 4);
|
|
680
|
+
i0.ɵɵtext(5, " Error 404 ");
|
|
681
|
+
i0.ɵɵelementEnd();
|
|
682
|
+
i0.ɵɵelementStart(6, "div", 5)(7, "p");
|
|
683
|
+
i0.ɵɵtext(8, "La pagina solicitada no fue encontrada");
|
|
684
|
+
i0.ɵɵelementEnd()()()()()();
|
|
685
|
+
}
|
|
686
|
+
}, styles: [".error[_ngcontent-%COMP%]{font-size:70px}"] });
|
|
687
|
+
(function () {
|
|
688
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Error404Component, [{
|
|
689
|
+
type: Component,
|
|
690
|
+
args: [{ selector: 'app-error404', template: "<div class=\"col-md-12 sec_sof\">\n <div class=\"row\">\n <div class=\"col col-center\">\n <div class=\"center\">\n <div class=\"error\">\n Error 404\n </div>\n <div class=\"col-12\">\n <p>La pagina solicitada no fue encontrada</p>\n </div>\n </div> \n </div>\n \n </div>\n</div>\n", styles: [".error{font-size:70px}\n"] }]
|
|
691
|
+
}], function () { return []; }, null);
|
|
692
|
+
})();
|
|
693
|
+
|
|
694
|
+
class LoadingService {
|
|
695
|
+
constructor() {
|
|
696
|
+
this.loading = new EventEmitter();
|
|
697
|
+
}
|
|
698
|
+
setLoading(visible) {
|
|
699
|
+
if (visible)
|
|
700
|
+
this.start();
|
|
701
|
+
else
|
|
702
|
+
this.stop();
|
|
703
|
+
}
|
|
704
|
+
start() {
|
|
705
|
+
this.loading.emit(true);
|
|
706
|
+
}
|
|
707
|
+
stop() {
|
|
708
|
+
this.loading.emit(false);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
/** @nocollapse */ LoadingService.ɵfac = function LoadingService_Factory(t) { return new (t || LoadingService)(); };
|
|
712
|
+
/** @nocollapse */ LoadingService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: LoadingService, factory: LoadingService.ɵfac, providedIn: 'root' });
|
|
713
|
+
(function () {
|
|
714
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingService, [{
|
|
715
|
+
type: Injectable,
|
|
716
|
+
args: [{
|
|
717
|
+
providedIn: 'root'
|
|
718
|
+
}]
|
|
719
|
+
}], null, { loading: [{
|
|
720
|
+
type: Output
|
|
721
|
+
}] });
|
|
722
|
+
})();
|
|
723
|
+
|
|
724
|
+
class LoadingComponent {
|
|
725
|
+
constructor(loadingService) {
|
|
726
|
+
this.loadingService = loadingService;
|
|
727
|
+
this.visible = false;
|
|
728
|
+
this.logo_loading = 'assets/img/logo_visorus_loading.png';
|
|
729
|
+
this.loadingService.loading.subscribe((_visible) => {
|
|
730
|
+
if (_visible && !this.visible) {
|
|
731
|
+
$('#modal_loading').modal('show');
|
|
732
|
+
this.visible = true;
|
|
733
|
+
}
|
|
734
|
+
else {
|
|
735
|
+
setTimeout(() => {
|
|
736
|
+
$('#modal_loading').modal('hide');
|
|
737
|
+
}, 650);
|
|
738
|
+
this.visible = false;
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
/** @nocollapse */ LoadingComponent.ɵfac = function LoadingComponent_Factory(t) { return new (t || LoadingComponent)(i0.ɵɵdirectiveInject(LoadingService)); };
|
|
744
|
+
/** @nocollapse */ LoadingComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: LoadingComponent, selectors: [["loading"]], inputs: { logo_loading: "logo_loading" }, decls: 14, vars: 4, consts: [["id", "modal_loading", "tabindex", "-1", "role", "dialog", "aria-labelledby", "exampleModalScrollableTitle", "data-backdrop", "static", "data-keyboard", "false", "aria-hidden", "true", 1, "modal", "fade"], ["role", "document", 1, "modal-dialog", "modal-dialog-scrollable"], [1, "modal-content"], [1, "modal-body"], [1, "row", "justify-content-center"], [1, "col-lg-4", "col-md-4", "col-sm-10"], [1, "loader"], [1, "box"], [1, "code"], ["width", "200px", 3, "src"], [1, "txt"]], template: function LoadingComponent_Template(rf, ctx) {
|
|
745
|
+
if (rf & 1) {
|
|
746
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3)(4, "div", 4)(5, "div", 5)(6, "div", 6);
|
|
747
|
+
i0.ɵɵelement(7, "span", 7)(8, "span", 7);
|
|
748
|
+
i0.ɵɵelementStart(9, "div", 8);
|
|
749
|
+
i0.ɵɵelement(10, "img", 9);
|
|
750
|
+
i0.ɵɵelementEnd();
|
|
751
|
+
i0.ɵɵelementStart(11, "span", 10);
|
|
752
|
+
i0.ɵɵtext(12);
|
|
753
|
+
i0.ɵɵpipe(13, "translate");
|
|
754
|
+
i0.ɵɵelementEnd()()()()()()()();
|
|
755
|
+
}
|
|
756
|
+
if (rf & 2) {
|
|
757
|
+
i0.ɵɵadvance(10);
|
|
758
|
+
i0.ɵɵpropertyInterpolate("src", ctx.logo_loading, i0.ɵɵsanitizeUrl);
|
|
759
|
+
i0.ɵɵadvance(2);
|
|
760
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(13, 2, "cargando"), "...");
|
|
761
|
+
}
|
|
762
|
+
}, pipes: [i3.TranslatePipe], styles: [".loader[_ngcontent-%COMP%]{width:130px;height:170px;position:relative}.loader[_ngcontent-%COMP%]:before, .loader[_ngcontent-%COMP%]:after{content:\"\";width:0;height:0;position:absolute;bottom:30px;left:15px;z-index:1;transform:scale(0);transition:all .2s ease}.loader[_ngcontent-%COMP%] .txt[_ngcontent-%COMP%]{width:120%;text-align:center;position:absolute;bottom:-30px;left:-7%;font-family:Abel,sans-serif;font-size:12px;letter-spacing:2px;color:#fff}.loader[_ngcontent-%COMP%] .code[_ngcontent-%COMP%]{position:absolute;z-index:99;bottom:-3px;-webkit-animation-name:spaceboots;-webkit-animation-duration:.8s;-webkit-transform-origin:50% 50%;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]{width:100%;height:140px;display:block;color:#fff;position:absolute;left:28px;z-index:2;overflow:hidden}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:before, .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:after{display:inline-block;font: 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;top:0;left:0;opacity:0}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(1):before{font-size:20px;content:\"\\f13b\";animation:a 1.1s linear infinite}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(1):after{content:\"\\f13c\";animation:b 1.3s linear infinite}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(2):before{content:\"\\f121\";font-size:25px;animation:c .9s linear infinite}.loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:nth-child(2):after{content:\"\\f19a\";animation:d .7s linear infinite}.loader.amit[_ngcontent-%COMP%]:before, .loader.amit[_ngcontent-%COMP%]:after{transform:scale(1)}@keyframes a{0%{transform:translate(30px) rotate(30deg);opacity:0}to{transform:translate(30px,150px) rotate(-50deg);opacity:1}}@keyframes b{0%{transform:translate(50px) rotate(-40deg);opacity:0}to{transform:translate(40px,150px) rotate(80deg);opacity:1}}@keyframes c{0%{transform:translate(70px) rotate(10deg);opacity:0}to{transform:translate(60px,150px) rotate(70deg);opacity:1}}@keyframes d{0%{transform:translate(30px) rotate(-50deg);opacity:0}to{transform:translate(45px,150px) rotate(30deg);opacity:1}}.modal[_ngcontent-%COMP%]{z-index:2050!important}.modal-content[_ngcontent-%COMP%]{border:0px!important;background-color:#fff0!important;height:350px!important}.modal-body[_ngcontent-%COMP%]{margin-left:-7%!important}"] });
|
|
763
|
+
(function () {
|
|
764
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingComponent, [{
|
|
765
|
+
type: Component,
|
|
766
|
+
args: [{ selector: 'loading', template: "<!-- Modal -->\n<div class=\"modal fade\" id=\"modal_loading\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalScrollableTitle\"\n data-backdrop=\"static\" data-keyboard=\"false\" aria-hidden=\"true\">\n <div class=\"modal-dialog modal-dialog-scrollable\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-body\">\n <div class=\"row justify-content-center\">\n <div class=\"col-lg-4 col-md-4 col-sm-10\">\n <div class=\"loader\">\n <span class=\"box\"></span>\n <span class=\"box\"></span>\n <div class=\"code\">\n <img src=\"{{logo_loading}}\" width=\"200px\">\n </div>\n <span class=\"txt\">{{'cargando' | translate}}...</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: [".loader{width:130px;height:170px;position:relative}.loader:before,.loader:after{content:\"\";width:0;height:0;position:absolute;bottom:30px;left:15px;z-index:1;transform:scale(0);transition:all .2s ease}.loader .txt{width:120%;text-align:center;position:absolute;bottom:-30px;left:-7%;font-family:Abel,sans-serif;font-size:12px;letter-spacing:2px;color:#fff}.loader .code{position:absolute;z-index:99;bottom:-3px;-webkit-animation-name:spaceboots;-webkit-animation-duration:.8s;-webkit-transform-origin:50% 50%;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear}.loader .box{width:100%;height:140px;display:block;color:#fff;position:absolute;left:28px;z-index:2;overflow:hidden}.loader .box:before,.loader .box:after{display:inline-block;font: 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;top:0;left:0;opacity:0}.loader .box:nth-child(1):before{font-size:20px;content:\"\\f13b\";animation:a 1.1s linear infinite}.loader .box:nth-child(1):after{content:\"\\f13c\";animation:b 1.3s linear infinite}.loader .box:nth-child(2):before{content:\"\\f121\";font-size:25px;animation:c .9s linear infinite}.loader .box:nth-child(2):after{content:\"\\f19a\";animation:d .7s linear infinite}.loader.amit:before,.loader.amit:after{transform:scale(1)}@keyframes a{0%{transform:translate(30px) rotate(30deg);opacity:0}to{transform:translate(30px,150px) rotate(-50deg);opacity:1}}@keyframes b{0%{transform:translate(50px) rotate(-40deg);opacity:0}to{transform:translate(40px,150px) rotate(80deg);opacity:1}}@keyframes c{0%{transform:translate(70px) rotate(10deg);opacity:0}to{transform:translate(60px,150px) rotate(70deg);opacity:1}}@keyframes d{0%{transform:translate(30px) rotate(-50deg);opacity:0}to{transform:translate(45px,150px) rotate(30deg);opacity:1}}.modal{z-index:2050!important}.modal-content{border:0px!important;background-color:#fff0!important;height:350px!important}.modal-body{margin-left:-7%!important}\n"] }]
|
|
767
|
+
}], function () { return [{ type: LoadingService }]; }, { logo_loading: [{
|
|
768
|
+
type: Input
|
|
769
|
+
}] });
|
|
770
|
+
})();
|
|
771
|
+
|
|
772
|
+
class LoadingScreenComponent {
|
|
773
|
+
constructor(loadingScreenService, _elmRef, _changeDetectorRef, loadingService) {
|
|
774
|
+
this.loadingScreenService = loadingScreenService;
|
|
775
|
+
this._elmRef = _elmRef;
|
|
776
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
777
|
+
this.loadingService = loadingService;
|
|
778
|
+
this.debounceTime = 250;
|
|
779
|
+
this.loading = false;
|
|
780
|
+
this.logo_loading = 'assets/img/logo_visorus_loading.png';
|
|
781
|
+
this.loadingService.loading.subscribe((_visible) => {
|
|
782
|
+
this._elmRef.nativeElement.style.display = _visible ? 'block' : 'none';
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
ngAfterViewInit() {
|
|
786
|
+
this._elmRef.nativeElement.style.display = 'none';
|
|
787
|
+
this.loadingSubscription = this.loadingScreenService.loadingStatus.pipe(debounceTime(this.debounceTime)).subscribe((status) => {
|
|
788
|
+
this._elmRef.nativeElement.style.display = status ? 'block' : 'none';
|
|
789
|
+
this._changeDetectorRef.detectChanges();
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
ngOnDestroy() {
|
|
793
|
+
this.loadingSubscription.unsubscribe();
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
/** @nocollapse */ LoadingScreenComponent.ɵfac = function LoadingScreenComponent_Factory(t) { return new (t || LoadingScreenComponent)(i0.ɵɵdirectiveInject(LoadingScreenService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(LoadingService)); };
|
|
797
|
+
/** @nocollapse */ LoadingScreenComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: LoadingScreenComponent, selectors: [["app-loading-screen"]], inputs: { logo_loading: "logo_loading" }, decls: 10, vars: 0, consts: [[1, "loading-screen-wrapper"], [1, "loading-screen-icon"], [1, "blobs"], [1, "blob-center"], [1, "blob"]], template: function LoadingScreenComponent_Template(rf, ctx) {
|
|
798
|
+
if (rf & 1) {
|
|
799
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2);
|
|
800
|
+
i0.ɵɵelement(3, "div", 3)(4, "div", 4)(5, "div", 4)(6, "div", 4)(7, "div", 4)(8, "div", 4)(9, "div", 4);
|
|
801
|
+
i0.ɵɵelementEnd()()();
|
|
802
|
+
}
|
|
803
|
+
}, styles: [".loading-screen-wrapper[_ngcontent-%COMP%]{z-index:100000;position:fixed;background-color:#00000062;width:100%;height:100%;display:block}.loading-screen-icon[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}svg[_ngcontent-%COMP%]{display:none}.blobs[_ngcontent-%COMP%]{filter:url(#goo);width:300px;height:300px;position:relative;overflow:hidden;border-radius:70px;transform-style:preserve-3d}.blobs[_ngcontent-%COMP%] .blob-center[_ngcontent-%COMP%]{transform-style:preserve-3d;position:absolute;background:#475158;top:50%;left:50%;width:30px;height:30px;transform-origin:left top;transform:scale(.9) translate(-50%,-50%);animation:blob-grow linear 3.4s infinite;border-radius:50%;box-shadow:0 -10px 40px -5px #475158}.blob[_ngcontent-%COMP%]{position:absolute;background:#475158;top:50%;left:50%;width:30px;height:30px;border-radius:50%;animation:blobs ease-out 3.4s infinite;transform:scale(.9) translate(-50%,-50%);transform-origin:center top;opacity:0}.blob[_ngcontent-%COMP%]:nth-child(1){animation-delay:.2s}.blob[_ngcontent-%COMP%]:nth-child(2){animation-delay:.4s}.blob[_ngcontent-%COMP%]:nth-child(3){animation-delay:.6s}.blob[_ngcontent-%COMP%]:nth-child(4){animation-delay:.8s}.blob[_ngcontent-%COMP%]:nth-child(5){animation-delay:1s}@keyframes blobs{0%{opacity:0;transform:scale(0) translate(calc(-330px - 50%),-50%)}1%{opacity:1}35%,65%{opacity:1;transform:scale(.9) translate(-50%,-50%)}99%{opacity:1}to{opacity:0;transform:scale(0) translate(calc(330px - 50%),-50%)}}@keyframes blob-grow{0%,39%{transform:scale(0) translate(-50%,-50%)}40%,42%{transform:scaleY(.9) translate(-50%,-50%)}43%,44%{transform:scale(1.2,1.1) translate(-50%,-50%)}45%,46%{transform:scale(1.3,1.2) translate(-50%,-50%)}47%,48%{transform:scale(1.4,1.3) translate(-50%,-50%)}52%{transform:scale(1.5,1.4) translate(-50%,-50%)}54%{transform:scale(1.7,1.6) translate(-50%,-50%)}58%{transform:scale(1.8,1.7) translate(-50%,-50%)}68%,70%{transform:scale(1.7,1.5) translate(-50%,-50%)}78%{transform:scale(1.6,1.4) translate(-50%,-50%)}80%,81%{transform:scale(1.5,1.4) translate(-50%,-50%)}82%,83%{transform:scale(1.4,1.3) translate(-50%,-50%)}84%,85%{transform:scale(1.3,1.2) translate(-50%,-50%)}86%,87%{transform:scale(1.2,1.1) translate(-50%,-50%)}90%,91%{transform:scaleY(.9) translate(-50%,-50%)}92%,to{transform:scale(0) translate(-50%,-50%)}}"] });
|
|
804
|
+
(function () {
|
|
805
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingScreenComponent, [{
|
|
806
|
+
type: Component,
|
|
807
|
+
args: [{ selector: 'app-loading-screen', template: "<div class=\"loading-screen-wrapper\">\n <div class=\"loading-screen-icon\">\n <div class=\"blobs\">\n <div class=\"blob-center\"></div>\n <div class=\"blob\"></div>\n <div class=\"blob\"></div>\n <div class=\"blob\"></div>\n <div class=\"blob\"></div>\n <div class=\"blob\"></div>\n <div class=\"blob\"></div>\n </div> \n </div>\n</div>\n", styles: [".loading-screen-wrapper{z-index:100000;position:fixed;background-color:#00000062;width:100%;height:100%;display:block}.loading-screen-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}svg{display:none}.blobs{filter:url(#goo);width:300px;height:300px;position:relative;overflow:hidden;border-radius:70px;transform-style:preserve-3d}.blobs .blob-center{transform-style:preserve-3d;position:absolute;background:#475158;top:50%;left:50%;width:30px;height:30px;transform-origin:left top;transform:scale(.9) translate(-50%,-50%);animation:blob-grow linear 3.4s infinite;border-radius:50%;box-shadow:0 -10px 40px -5px #475158}.blob{position:absolute;background:#475158;top:50%;left:50%;width:30px;height:30px;border-radius:50%;animation:blobs ease-out 3.4s infinite;transform:scale(.9) translate(-50%,-50%);transform-origin:center top;opacity:0}.blob:nth-child(1){animation-delay:.2s}.blob:nth-child(2){animation-delay:.4s}.blob:nth-child(3){animation-delay:.6s}.blob:nth-child(4){animation-delay:.8s}.blob:nth-child(5){animation-delay:1s}@keyframes blobs{0%{opacity:0;transform:scale(0) translate(calc(-330px - 50%),-50%)}1%{opacity:1}35%,65%{opacity:1;transform:scale(.9) translate(-50%,-50%)}99%{opacity:1}to{opacity:0;transform:scale(0) translate(calc(330px - 50%),-50%)}}@keyframes blob-grow{0%,39%{transform:scale(0) translate(-50%,-50%)}40%,42%{transform:scaleY(.9) translate(-50%,-50%)}43%,44%{transform:scale(1.2,1.1) translate(-50%,-50%)}45%,46%{transform:scale(1.3,1.2) translate(-50%,-50%)}47%,48%{transform:scale(1.4,1.3) translate(-50%,-50%)}52%{transform:scale(1.5,1.4) translate(-50%,-50%)}54%{transform:scale(1.7,1.6) translate(-50%,-50%)}58%{transform:scale(1.8,1.7) translate(-50%,-50%)}68%,70%{transform:scale(1.7,1.5) translate(-50%,-50%)}78%{transform:scale(1.6,1.4) translate(-50%,-50%)}80%,81%{transform:scale(1.5,1.4) translate(-50%,-50%)}82%,83%{transform:scale(1.4,1.3) translate(-50%,-50%)}84%,85%{transform:scale(1.3,1.2) translate(-50%,-50%)}86%,87%{transform:scale(1.2,1.1) translate(-50%,-50%)}90%,91%{transform:scaleY(.9) translate(-50%,-50%)}92%,to{transform:scale(0) translate(-50%,-50%)}}\n"] }]
|
|
808
|
+
}], function () { return [{ type: LoadingScreenService }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: LoadingService }]; }, { logo_loading: [{
|
|
809
|
+
type: Input
|
|
810
|
+
}] });
|
|
811
|
+
})();
|
|
812
|
+
|
|
813
|
+
class PdfModalService {
|
|
814
|
+
constructor() {
|
|
815
|
+
this.visible = new EventEmitter();
|
|
816
|
+
this.print = new EventEmitter();
|
|
817
|
+
}
|
|
818
|
+
pdf_generate(base_64) {
|
|
819
|
+
this.base_64 = base_64;
|
|
820
|
+
this.visible.emit(true);
|
|
821
|
+
}
|
|
822
|
+
generate_print(html) {
|
|
823
|
+
this.html = html;
|
|
824
|
+
this.print.emit(true);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
/** @nocollapse */ PdfModalService.ɵfac = function PdfModalService_Factory(t) { return new (t || PdfModalService)(); };
|
|
828
|
+
/** @nocollapse */ PdfModalService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: PdfModalService, factory: PdfModalService.ɵfac, providedIn: 'root' });
|
|
829
|
+
(function () {
|
|
830
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PdfModalService, [{
|
|
831
|
+
type: Injectable,
|
|
832
|
+
args: [{
|
|
833
|
+
providedIn: 'root'
|
|
834
|
+
}]
|
|
835
|
+
}], null, { visible: [{
|
|
836
|
+
type: Output
|
|
837
|
+
}], print: [{
|
|
838
|
+
type: Output
|
|
839
|
+
}] });
|
|
840
|
+
})();
|
|
841
|
+
|
|
842
|
+
class FileService {
|
|
843
|
+
constructor(_toastrService, translate) {
|
|
844
|
+
this._toastrService = _toastrService;
|
|
845
|
+
this.translate = translate;
|
|
846
|
+
}
|
|
847
|
+
addFile(evt, toastr = true) {
|
|
848
|
+
const file = evt.target.files[0];
|
|
849
|
+
let imgObj = {
|
|
850
|
+
id: null,
|
|
851
|
+
nombre: '',
|
|
852
|
+
contentType: '',
|
|
853
|
+
orden: 0,
|
|
854
|
+
archivo: ''
|
|
855
|
+
};
|
|
856
|
+
imgObj.nombre = file.name;
|
|
857
|
+
imgObj.tipo = file.type;
|
|
858
|
+
const reader = new FileReader();
|
|
859
|
+
reader.readAsDataURL(file);
|
|
860
|
+
reader.onload = () => {
|
|
861
|
+
imgObj.archivo = reader.result;
|
|
862
|
+
this.translate.get(['msgSuccess', 'titleFile']).subscribe((data) => {
|
|
863
|
+
if (toastr)
|
|
864
|
+
this._toastrService.success(data.msgSuccess, data.titleFile);
|
|
865
|
+
});
|
|
866
|
+
};
|
|
867
|
+
reader.onerror = (error) => {
|
|
868
|
+
this.translate.get(['msgError', 'titleFile']).subscribe((data) => {
|
|
869
|
+
if (toastr)
|
|
870
|
+
this._toastrService.error(data['msgError'], data['titleFile']);
|
|
871
|
+
});
|
|
872
|
+
};
|
|
873
|
+
return imgObj;
|
|
874
|
+
}
|
|
875
|
+
base64ToBlob(base64, type) {
|
|
876
|
+
let byteCharacters = atob(base64);
|
|
877
|
+
const byteNumbers = new Array(byteCharacters.length);
|
|
878
|
+
for (let i = 0; i < byteCharacters.length; i++) {
|
|
879
|
+
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
|
880
|
+
}
|
|
881
|
+
let byteArray = new Uint8Array(byteNumbers);
|
|
882
|
+
return new Blob([byteArray], { type: type });
|
|
883
|
+
}
|
|
884
|
+
blobToDowload(blob, type, name) {
|
|
885
|
+
let anchor = document.createElement('a');
|
|
886
|
+
anchor.download = name;
|
|
887
|
+
anchor.href = window.URL.createObjectURL(blob);
|
|
888
|
+
anchor.dataset.downloadurl = [type, anchor.download, anchor.href].join(':');
|
|
889
|
+
anchor.click();
|
|
890
|
+
}
|
|
891
|
+
base64ToFileDowload(base64, type, name) {
|
|
892
|
+
this.blobToDowload(this.base64ToBlob(base64, type), type, name);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
/** @nocollapse */ FileService.ɵfac = function FileService_Factory(t) { return new (t || FileService)(i0.ɵɵinject(i1$1.ToastrService), i0.ɵɵinject(i3.TranslateService)); };
|
|
896
|
+
/** @nocollapse */ FileService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: FileService, factory: FileService.ɵfac, providedIn: 'root' });
|
|
897
|
+
(function () {
|
|
898
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileService, [{
|
|
899
|
+
type: Injectable,
|
|
900
|
+
args: [{
|
|
901
|
+
providedIn: 'root'
|
|
902
|
+
}]
|
|
903
|
+
}], function () { return [{ type: i1$1.ToastrService }, { type: i3.TranslateService }]; }, null);
|
|
904
|
+
})();
|
|
905
|
+
|
|
906
|
+
function PdfModalComponent_div_1_Template(rf, ctx) {
|
|
907
|
+
if (rf & 1) {
|
|
908
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
909
|
+
i0.ɵɵelement(1, "iframe", 3);
|
|
910
|
+
i0.ɵɵelementEnd();
|
|
911
|
+
}
|
|
912
|
+
if (rf & 2) {
|
|
913
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
914
|
+
i0.ɵɵadvance(1);
|
|
915
|
+
i0.ɵɵproperty("src", ctx_r0.domSanitizer.bypassSecurityTrustResourceUrl("data:application/pdf;base64," + ctx_r0.pdfBase64), i0.ɵɵsanitizeResourceUrl);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
const _c0$5 = function (a0) { return { "width": a0, "min-width": "200px" }; };
|
|
919
|
+
const _c1$2 = function () { return { "overflow": "visible" }; };
|
|
920
|
+
class PdfModalComponent {
|
|
921
|
+
constructor(_pdfModalService, fileService, domSanitizer) {
|
|
922
|
+
this._pdfModalService = _pdfModalService;
|
|
923
|
+
this.fileService = fileService;
|
|
924
|
+
this.domSanitizer = domSanitizer;
|
|
925
|
+
this.display = false;
|
|
926
|
+
this.pdfBase64 = null;
|
|
927
|
+
this.size = 840;
|
|
928
|
+
_pdfModalService.visible.subscribe(resp => {
|
|
929
|
+
if (_pdfModalService.base_64) {
|
|
930
|
+
this.display = resp;
|
|
931
|
+
this.pdfBase64 = _pdfModalService.base_64;
|
|
932
|
+
/*
|
|
933
|
+
let blob = fileService.base64ToBlob(_pdfModalService.base_64, "application/pdf");
|
|
934
|
+
let blobUrl = URL.createObjectURL(blob);
|
|
935
|
+
setTimeout(() => {
|
|
936
|
+
let iframe = "<iframe width='100%' height='100%' src='" + blobUrl + "'></iframe>";
|
|
937
|
+
document.getElementById('_modal_pdf').innerHTML = iframe;
|
|
938
|
+
},20); */
|
|
939
|
+
}
|
|
940
|
+
});
|
|
941
|
+
_pdfModalService.print.subscribe((resp) => {
|
|
942
|
+
this.display = resp;
|
|
943
|
+
setTimeout(() => {
|
|
944
|
+
let iframe = "<iframe id='printf' width='100%' height='100%' ></iframe>";
|
|
945
|
+
document.getElementById('_modal_pdf').innerHTML = iframe;
|
|
946
|
+
}, 20);
|
|
947
|
+
setTimeout(() => {
|
|
948
|
+
this.imprimir();
|
|
949
|
+
}, 40);
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
imprimir() {
|
|
953
|
+
var iframe = window.frames['printf'];
|
|
954
|
+
iframe.contentWindow.head.innerHTML = ` <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
|
955
|
+
<style>
|
|
956
|
+
.table-hover tbody tr:hover {
|
|
957
|
+
color: #ffffff;
|
|
958
|
+
background-color: rgb(92, 180, 234);
|
|
959
|
+
}
|
|
960
|
+
.tr-select{
|
|
961
|
+
color: #ffffff;
|
|
962
|
+
background-color: rgb(92, 180, 234);
|
|
963
|
+
}
|
|
964
|
+
.td-header{
|
|
965
|
+
background: #f3f3f3;
|
|
966
|
+
color: #0d385d;
|
|
967
|
+
border-color: 1px solid #0b4b87;
|
|
968
|
+
}
|
|
969
|
+
.td-yellow{
|
|
970
|
+
background: #fff6d3;
|
|
971
|
+
}
|
|
972
|
+
.td-blue{
|
|
973
|
+
background: #88d1ea;
|
|
974
|
+
}
|
|
975
|
+
.td-green{
|
|
976
|
+
background: #b9d2a0;
|
|
977
|
+
}
|
|
978
|
+
</style>`;
|
|
979
|
+
iframe.contentWindow.body.innerHTML = this._pdfModalService.html;
|
|
980
|
+
//iframe.focus();
|
|
981
|
+
// iframe.contentWindow.print();
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
/** @nocollapse */ PdfModalComponent.ɵfac = function PdfModalComponent_Factory(t) { return new (t || PdfModalComponent)(i0.ɵɵdirectiveInject(PdfModalService), i0.ɵɵdirectiveInject(FileService), i0.ɵɵdirectiveInject(i3$1.DomSanitizer)); };
|
|
985
|
+
/** @nocollapse */ PdfModalComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: PdfModalComponent, selectors: [["pdf-modal"]], decls: 2, vars: 15, consts: [[3, "visible", "modal", "minY", "baseZIndex", "blockScroll", "maximizable", "breakpoint", "contentStyle", "visibleChange"], ["style", "min-height: 90vh;", 4, "ngIf"], [2, "min-height", "90vh"], [2, "width", "100%", "height", "90vh", 3, "src"]], template: function PdfModalComponent_Template(rf, ctx) {
|
|
986
|
+
if (rf & 1) {
|
|
987
|
+
i0.ɵɵelementStart(0, "p-dialog", 0);
|
|
988
|
+
i0.ɵɵlistener("visibleChange", function PdfModalComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.display = $event; });
|
|
989
|
+
i0.ɵɵtemplate(1, PdfModalComponent_div_1_Template, 2, 1, "div", 1);
|
|
990
|
+
i0.ɵɵelementEnd();
|
|
991
|
+
}
|
|
992
|
+
if (rf & 2) {
|
|
993
|
+
i0.ɵɵstyleMap(i0.ɵɵpureFunction1(12, _c0$5, ctx.size + "px"));
|
|
994
|
+
i0.ɵɵproperty("visible", ctx.display)("modal", true)("minY", 70)("baseZIndex", 10000)("blockScroll", true)("blockScroll", true)("maximizable", true)("breakpoint", 840)("contentStyle", i0.ɵɵpureFunction0(14, _c1$2));
|
|
995
|
+
i0.ɵɵadvance(1);
|
|
996
|
+
i0.ɵɵproperty("ngIf", ctx.pdfBase64);
|
|
997
|
+
}
|
|
998
|
+
}, directives: [i4$2.Dialog, i8.NgIf], styles: [".down[_ngcontent-%COMP%]{display:block}"] });
|
|
999
|
+
(function () {
|
|
1000
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PdfModalComponent, [{
|
|
1001
|
+
type: Component,
|
|
1002
|
+
args: [{ selector: 'pdf-modal', template: "<p-dialog [(visible)]=\"display\" [modal]=\"true\" [style]=\"{'width': size+'px', 'min-width': '200px'}\" [minY]=\"70\" [baseZIndex]=\"10000\" [blockScroll]=\"true\" \n [blockScroll]=\"true\" [maximizable]=\"true\"\n [breakpoint]=\"840\" [contentStyle]=\"{'overflow':'visible'}\">\n <div *ngIf=\"pdfBase64\" style=\"min-height: 90vh;\">\n <iframe style=\"width: 100%; height: 90vh;\" [src]=\"domSanitizer.bypassSecurityTrustResourceUrl('data:application/pdf;base64,'+pdfBase64)\"></iframe>\n </div>\n</p-dialog>\n\n", styles: [".down{display:block}\n"] }]
|
|
1003
|
+
}], function () { return [{ type: PdfModalService }, { type: FileService }, { type: i3$1.DomSanitizer }]; }, null);
|
|
1004
|
+
})();
|
|
1005
|
+
|
|
1006
|
+
class Usuario {
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
class Auth {
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
class AuthService {
|
|
1013
|
+
constructor(httpClient) {
|
|
1014
|
+
this.httpClient = httpClient;
|
|
1015
|
+
this.url_host = '';
|
|
1016
|
+
this.login = new EventEmitter();
|
|
1017
|
+
this.seleccionEmpresa = new EventEmitter();
|
|
1018
|
+
this.auth = new Auth();
|
|
1019
|
+
}
|
|
1020
|
+
setlogin(user, key) {
|
|
1021
|
+
localStorage.setItem('lang', 'es');
|
|
1022
|
+
let config = JSON.parse(localStorage.getItem("config"));
|
|
1023
|
+
if (config)
|
|
1024
|
+
if (config.url)
|
|
1025
|
+
this.url_host = config.url;
|
|
1026
|
+
return this.httpClient.post(this.url_host + '/login' + (key ? '/' + key : ''), user);
|
|
1027
|
+
}
|
|
1028
|
+
startAuth(user) {
|
|
1029
|
+
this.auth = user;
|
|
1030
|
+
this.login.emit(this.auth);
|
|
1031
|
+
}
|
|
1032
|
+
isLogin() {
|
|
1033
|
+
return localStorage.getItem('usuario') !== null;
|
|
1034
|
+
}
|
|
1035
|
+
quitarUsuario() {
|
|
1036
|
+
localStorage.removeItem('usuario');
|
|
1037
|
+
this.auth.login = false;
|
|
1038
|
+
this.login.emit(this.auth);
|
|
1039
|
+
}
|
|
1040
|
+
verificaLogin() {
|
|
1041
|
+
this.usuario = this.getUser();
|
|
1042
|
+
if (this.usuario.access_token) {
|
|
1043
|
+
this.getDetalsUser().subscribe((resp) => {
|
|
1044
|
+
this.auth.usuarioDetalles = resp;
|
|
1045
|
+
this.auth.login = true;
|
|
1046
|
+
this.login.emit(this.auth);
|
|
1047
|
+
}, (error) => {
|
|
1048
|
+
this.quitarUsuario();
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
else {
|
|
1052
|
+
this.auth.usuarioDetalles = null;
|
|
1053
|
+
this.auth.login = false;
|
|
1054
|
+
this.login.emit(this.auth);
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
loginOut() {
|
|
1058
|
+
this.quitarEmpresaAdministrativa().subscribe((data) => {
|
|
1059
|
+
localStorage.removeItem('usuario');
|
|
1060
|
+
}, error => {
|
|
1061
|
+
localStorage.removeItem('usuario');
|
|
1062
|
+
});
|
|
1063
|
+
localStorage.setItem('lang', 'es');
|
|
1064
|
+
this.auth.login = false;
|
|
1065
|
+
this.login.emit(this.auth);
|
|
1066
|
+
}
|
|
1067
|
+
getUser() {
|
|
1068
|
+
this.usuario = new Usuario();
|
|
1069
|
+
if (this.isLogin()) {
|
|
1070
|
+
let us = localStorage.getItem('usuario');
|
|
1071
|
+
if (us) {
|
|
1072
|
+
this.usuario = JSON.parse(us);
|
|
1073
|
+
}
|
|
1074
|
+
return this.usuario;
|
|
1075
|
+
}
|
|
1076
|
+
else {
|
|
1077
|
+
return this.usuario;
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
getLang() {
|
|
1081
|
+
let lang = localStorage.getItem('lang');
|
|
1082
|
+
return lang ? lang : 'es';
|
|
1083
|
+
}
|
|
1084
|
+
selectEmpresa(e) {
|
|
1085
|
+
this.seleccionEmpresa.emit(e);
|
|
1086
|
+
}
|
|
1087
|
+
quitarEmpresaAdministrativa() {
|
|
1088
|
+
let usuario;
|
|
1089
|
+
let token_type = '';
|
|
1090
|
+
let access_token = '';
|
|
1091
|
+
usuario = JSON.parse(localStorage.getItem("usuario"));
|
|
1092
|
+
if (usuario) {
|
|
1093
|
+
token_type = usuario.token_type,
|
|
1094
|
+
access_token = usuario.access_token;
|
|
1095
|
+
}
|
|
1096
|
+
let httpOptions = {
|
|
1097
|
+
headers: new HttpHeaders({
|
|
1098
|
+
'Accept-type': 'application/json',
|
|
1099
|
+
'Authorization': token_type + ' ' + access_token
|
|
1100
|
+
})
|
|
1101
|
+
};
|
|
1102
|
+
let config = JSON.parse(localStorage.getItem("config"));
|
|
1103
|
+
if (config)
|
|
1104
|
+
if (config.url)
|
|
1105
|
+
this.url_host = config.url;
|
|
1106
|
+
return this.httpClient.post(this.url_host + '/usuario/setEmpresa', { id: 0 }, httpOptions);
|
|
1107
|
+
}
|
|
1108
|
+
setEmpresa(empresa) {
|
|
1109
|
+
// setEmpresaAdministrativa
|
|
1110
|
+
let usuario;
|
|
1111
|
+
let token_type = '';
|
|
1112
|
+
let access_token = '';
|
|
1113
|
+
usuario = JSON.parse(localStorage.getItem("usuario"));
|
|
1114
|
+
if (usuario) {
|
|
1115
|
+
token_type = usuario.token_type,
|
|
1116
|
+
access_token = usuario.access_token;
|
|
1117
|
+
}
|
|
1118
|
+
let httpOptions = {
|
|
1119
|
+
headers: new HttpHeaders({
|
|
1120
|
+
'Accept-type': 'application/json',
|
|
1121
|
+
'Authorization': token_type + ' ' + access_token
|
|
1122
|
+
})
|
|
1123
|
+
};
|
|
1124
|
+
let config = JSON.parse(localStorage.getItem("config"));
|
|
1125
|
+
if (config)
|
|
1126
|
+
if (config.url)
|
|
1127
|
+
this.url_host = config.url;
|
|
1128
|
+
return this.httpClient.post(this.url_host + '/usuario/setEmpresa', empresa, httpOptions);
|
|
1129
|
+
}
|
|
1130
|
+
setModulo(modulo) {
|
|
1131
|
+
// setEmpresaAdministrativa
|
|
1132
|
+
let usuario;
|
|
1133
|
+
let token_type = '';
|
|
1134
|
+
let access_token = '';
|
|
1135
|
+
usuario = JSON.parse(localStorage.getItem("usuario"));
|
|
1136
|
+
if (usuario) {
|
|
1137
|
+
token_type = usuario.token_type,
|
|
1138
|
+
access_token = usuario.access_token;
|
|
1139
|
+
}
|
|
1140
|
+
let httpOptions = {
|
|
1141
|
+
headers: new HttpHeaders({
|
|
1142
|
+
'Accept-type': 'application/json',
|
|
1143
|
+
'Authorization': token_type + ' ' + access_token
|
|
1144
|
+
})
|
|
1145
|
+
};
|
|
1146
|
+
let config = JSON.parse(localStorage.getItem("config"));
|
|
1147
|
+
if (config)
|
|
1148
|
+
if (config.url)
|
|
1149
|
+
this.url_host = config.url;
|
|
1150
|
+
return this.httpClient.post(this.url_host + '/usuario/setModulo', modulo, httpOptions);
|
|
1151
|
+
}
|
|
1152
|
+
quitarModulo() {
|
|
1153
|
+
// setEmpresaAdministrativa
|
|
1154
|
+
let usuario;
|
|
1155
|
+
let token_type = '';
|
|
1156
|
+
let access_token = '';
|
|
1157
|
+
usuario = JSON.parse(localStorage.getItem("usuario"));
|
|
1158
|
+
if (usuario) {
|
|
1159
|
+
token_type = usuario.token_type,
|
|
1160
|
+
access_token = usuario.access_token;
|
|
1161
|
+
}
|
|
1162
|
+
let httpOptions = {
|
|
1163
|
+
headers: new HttpHeaders({
|
|
1164
|
+
'Accept-type': 'application/json',
|
|
1165
|
+
'Authorization': token_type + ' ' + access_token
|
|
1166
|
+
})
|
|
1167
|
+
};
|
|
1168
|
+
let config = JSON.parse(localStorage.getItem("config"));
|
|
1169
|
+
if (config)
|
|
1170
|
+
if (config.url)
|
|
1171
|
+
this.url_host = config.url;
|
|
1172
|
+
return this.httpClient.post(this.url_host + '/usuario/setModulo', { id: 0 }, httpOptions);
|
|
1173
|
+
}
|
|
1174
|
+
getDetalsUser() {
|
|
1175
|
+
let usuario;
|
|
1176
|
+
let token_type = '';
|
|
1177
|
+
let access_token = '';
|
|
1178
|
+
usuario = JSON.parse(localStorage.getItem("usuario"));
|
|
1179
|
+
if (usuario) {
|
|
1180
|
+
token_type = usuario.token_type,
|
|
1181
|
+
access_token = usuario.access_token;
|
|
1182
|
+
}
|
|
1183
|
+
let httpOptions = {
|
|
1184
|
+
headers: new HttpHeaders({
|
|
1185
|
+
'Accept-type': 'application/json',
|
|
1186
|
+
'Authorization': token_type + ' ' + access_token
|
|
1187
|
+
})
|
|
1188
|
+
};
|
|
1189
|
+
let config = JSON.parse(localStorage.getItem("config"));
|
|
1190
|
+
if (config)
|
|
1191
|
+
if (config.url)
|
|
1192
|
+
this.url_host = config.url;
|
|
1193
|
+
return this.httpClient.get(this.url_host + '/usuario/obtieneUsuarioActual', httpOptions);
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
/** @nocollapse */ AuthService.ɵfac = function AuthService_Factory(t) { return new (t || AuthService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
1197
|
+
/** @nocollapse */ AuthService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: AuthService, factory: AuthService.ɵfac, providedIn: 'root' });
|
|
1198
|
+
(function () {
|
|
1199
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthService, [{
|
|
1200
|
+
type: Injectable,
|
|
1201
|
+
args: [{
|
|
1202
|
+
providedIn: 'root'
|
|
1203
|
+
}]
|
|
1204
|
+
}], function () { return [{ type: i1.HttpClient }]; }, { login: [{
|
|
1205
|
+
type: Output
|
|
1206
|
+
}], seleccionEmpresa: [{
|
|
1207
|
+
type: Output
|
|
1208
|
+
}] });
|
|
1209
|
+
})();
|
|
1210
|
+
|
|
1211
|
+
function LoginModalComponent_div_6_label_4_Template(rf, ctx) {
|
|
1212
|
+
if (rf & 1) {
|
|
1213
|
+
i0.ɵɵelementStart(0, "label", 19);
|
|
1214
|
+
i0.ɵɵtext(1);
|
|
1215
|
+
i0.ɵɵpipe(2, "translate");
|
|
1216
|
+
i0.ɵɵelementEnd();
|
|
1217
|
+
}
|
|
1218
|
+
if (rf & 2) {
|
|
1219
|
+
i0.ɵɵadvance(1);
|
|
1220
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Usuario.errorLogin"));
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
function LoginModalComponent_div_6_Template(rf, ctx) {
|
|
1224
|
+
if (rf & 1) {
|
|
1225
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
1226
|
+
i0.ɵɵelementStart(0, "div", 7)(1, "div", 8)(2, "form", 9, 10);
|
|
1227
|
+
i0.ɵɵlistener("ngSubmit", function LoginModalComponent_div_6_Template_form_ngSubmit_2_listener() { i0.ɵɵrestoreView(_r6); const _r2 = i0.ɵɵreference(3); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.entrar(_r2); });
|
|
1228
|
+
i0.ɵɵtemplate(4, LoginModalComponent_div_6_label_4_Template, 3, 3, "label", 11);
|
|
1229
|
+
i0.ɵɵelementStart(5, "div", 12)(6, "label", 13);
|
|
1230
|
+
i0.ɵɵtext(7);
|
|
1231
|
+
i0.ɵɵpipe(8, "translate");
|
|
1232
|
+
i0.ɵɵelementEnd();
|
|
1233
|
+
i0.ɵɵelementStart(9, "input", 14, 15);
|
|
1234
|
+
i0.ɵɵlistener("ngModelChange", function LoginModalComponent_div_6_Template_input_ngModelChange_9_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.user.username = $event; });
|
|
1235
|
+
i0.ɵɵpipe(11, "translate");
|
|
1236
|
+
i0.ɵɵelementEnd()();
|
|
1237
|
+
i0.ɵɵelementStart(12, "div", 12)(13, "label", 16);
|
|
1238
|
+
i0.ɵɵtext(14);
|
|
1239
|
+
i0.ɵɵpipe(15, "translate");
|
|
1240
|
+
i0.ɵɵelementEnd();
|
|
1241
|
+
i0.ɵɵelementStart(16, "input", 17);
|
|
1242
|
+
i0.ɵɵlistener("ngModelChange", function LoginModalComponent_div_6_Template_input_ngModelChange_16_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.user.password = $event; });
|
|
1243
|
+
i0.ɵɵpipe(17, "translate");
|
|
1244
|
+
i0.ɵɵelementEnd()();
|
|
1245
|
+
i0.ɵɵelementStart(18, "button", 18);
|
|
1246
|
+
i0.ɵɵtext(19, "entrar");
|
|
1247
|
+
i0.ɵɵelementEnd()()()();
|
|
1248
|
+
}
|
|
1249
|
+
if (rf & 2) {
|
|
1250
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
1251
|
+
i0.ɵɵadvance(4);
|
|
1252
|
+
i0.ɵɵproperty("ngIf", ctx_r0.error);
|
|
1253
|
+
i0.ɵɵadvance(3);
|
|
1254
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(8, 7, "Usuario.username"));
|
|
1255
|
+
i0.ɵɵadvance(2);
|
|
1256
|
+
i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(11, 9, "Usuario.username"));
|
|
1257
|
+
i0.ɵɵproperty("ngModel", ctx_r0.user.username);
|
|
1258
|
+
i0.ɵɵadvance(5);
|
|
1259
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 11, "Usuario.password"));
|
|
1260
|
+
i0.ɵɵadvance(2);
|
|
1261
|
+
i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(17, 13, "Usuario.password"));
|
|
1262
|
+
i0.ɵɵproperty("ngModel", ctx_r0.user.password);
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
function LoginModalComponent_div_7_div_5_Template(rf, ctx) {
|
|
1266
|
+
if (rf & 1) {
|
|
1267
|
+
i0.ɵɵelementStart(0, "div", 22)(1, "div", 23)(2, "div", 24)(3, "h5");
|
|
1268
|
+
i0.ɵɵtext(4);
|
|
1269
|
+
i0.ɵɵelementEnd()()()();
|
|
1270
|
+
}
|
|
1271
|
+
if (rf & 2) {
|
|
1272
|
+
const empresa_r10 = ctx.$implicit;
|
|
1273
|
+
i0.ɵɵadvance(4);
|
|
1274
|
+
i0.ɵɵtextInterpolate1(" ", empresa_r10.nombre, " ");
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
function LoginModalComponent_div_7_Template(rf, ctx) {
|
|
1278
|
+
if (rf & 1) {
|
|
1279
|
+
i0.ɵɵelementStart(0, "div", 7)(1, "div", 20)(2, "h4");
|
|
1280
|
+
i0.ɵɵtext(3, "Selecciona la empresa");
|
|
1281
|
+
i0.ɵɵelementEnd();
|
|
1282
|
+
i0.ɵɵelement(4, "hr");
|
|
1283
|
+
i0.ɵɵelementEnd();
|
|
1284
|
+
i0.ɵɵtemplate(5, LoginModalComponent_div_7_div_5_Template, 5, 1, "div", 21);
|
|
1285
|
+
i0.ɵɵelementEnd();
|
|
1286
|
+
}
|
|
1287
|
+
if (rf & 2) {
|
|
1288
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
1289
|
+
i0.ɵɵadvance(5);
|
|
1290
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.empresas);
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
class LoginModalComponent {
|
|
1294
|
+
constructor(loginModalService, authService) {
|
|
1295
|
+
this.loginModalService = loginModalService;
|
|
1296
|
+
this.authService = authService;
|
|
1297
|
+
this.modal = false;
|
|
1298
|
+
this.user = { username: undefined, password: undefined };
|
|
1299
|
+
this.error = false;
|
|
1300
|
+
this.empresas = [];
|
|
1301
|
+
this.loginModalService.modal.subscribe(resp => {
|
|
1302
|
+
$('#modalLogin').modal('show');
|
|
1303
|
+
this.user = { username: undefined, password: undefined };
|
|
1304
|
+
this.empresas = [];
|
|
1305
|
+
});
|
|
1306
|
+
}
|
|
1307
|
+
entrar(form) {
|
|
1308
|
+
if (form.valid) {
|
|
1309
|
+
this.user.key = "";
|
|
1310
|
+
let password = this.user.password.split('_');
|
|
1311
|
+
if (password.length > 1) {
|
|
1312
|
+
this.user.key = password[0];
|
|
1313
|
+
this.user.password = '';
|
|
1314
|
+
for (let index = 1; index < password.length; index++) {
|
|
1315
|
+
this.user.password += password[index];
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
this.authService.setlogin(this.user, this.user.key).subscribe((resp) => {
|
|
1319
|
+
localStorage.setItem('usuario', JSON.stringify(resp));
|
|
1320
|
+
let usuario = resp;
|
|
1321
|
+
this.authService.getDetalsUser().subscribe((resp) => {
|
|
1322
|
+
if (!resp.empresa) {
|
|
1323
|
+
this.empresas = resp.empresas;
|
|
1324
|
+
if (this.empresas.length == 1) {
|
|
1325
|
+
this.entrarEmpresa(this.empresas[0]);
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
let auth = {};
|
|
1329
|
+
auth.login = true;
|
|
1330
|
+
auth.usuario = usuario;
|
|
1331
|
+
auth.usuarioDetalles = resp;
|
|
1332
|
+
this.authService.startAuth(auth);
|
|
1333
|
+
this.error = false;
|
|
1334
|
+
$('#modalLogin').modal('hide');
|
|
1335
|
+
});
|
|
1336
|
+
}, (_error) => {
|
|
1337
|
+
this.error = true;
|
|
1338
|
+
});
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
entrarEmpresa(_empresa) {
|
|
1342
|
+
this.authService.setEmpresa(_empresa).subscribe((resp) => {
|
|
1343
|
+
$('#modalLogin').modal('hide');
|
|
1344
|
+
});
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
/** @nocollapse */ LoginModalComponent.ɵfac = function LoginModalComponent_Factory(t) { return new (t || LoginModalComponent)(i0.ɵɵdirectiveInject(LoginModalService), i0.ɵɵdirectiveInject(AuthService)); };
|
|
1348
|
+
/** @nocollapse */ LoginModalComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: LoginModalComponent, selectors: [["app-login-modal"]], decls: 8, vars: 2, consts: [["id", "modalLogin", "tabindex", "-1", "role", "dialog", "aria-labelledby", "exampleModalCenterTitle", "aria-hidden", "true", 1, "modal", "fade"], ["role", "document", 1, "modal-dialog", "modal-dialog-centered"], [1, "modal-content"], [1, "modal-body"], [1, "row", "justify-content-center"], ["src", "assets/img/logo_visorus_loading.png", "alt", ""], ["class", "row", 4, "ngIf"], [1, "row"], [1, "col-lg-12", "col-md-12", "col-sm-12"], [3, "ngSubmit"], ["datoForm", "ngForm"], ["class", "error", 4, "ngIf"], [1, "form-group", "mb-3"], ["for", "exampleInputEmail1"], ["type", "text", "id", "exampleInputEmail1", "aria-describedby", "emailHelp", "name", "username", "required", "", 1, "form-control", 3, "placeholder", "ngModel", "ngModelChange"], ["username", "ngModel"], ["for", "exampleInputPassword1"], ["type", "password", "id", "exampleInputPassword1", "name", "password", "required", "", 1, "form-control", 3, "placeholder", "ngModel", "ngModelChange"], ["type", "submit", "translate", "", 1, "btn", "btn-primary_low", "btn-lg", "btn-block", "my-5", "text-light"], [1, "error"], [1, "col-xl-12", "col-lg-12", "col-sm-12"], ["class", "col-xl-6 col-lg-6 col-sm-12 mb-2", "style", "cursor: pointer", 4, "ngFor", "ngForOf"], [1, "col-xl-6", "col-lg-6", "col-sm-12", "mb-2", 2, "cursor", "pointer"], [1, "card"], [1, "card-body"]], template: function LoginModalComponent_Template(rf, ctx) {
|
|
1349
|
+
if (rf & 1) {
|
|
1350
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3)(4, "div", 4);
|
|
1351
|
+
i0.ɵɵelement(5, "img", 5);
|
|
1352
|
+
i0.ɵɵelementEnd();
|
|
1353
|
+
i0.ɵɵtemplate(6, LoginModalComponent_div_6_Template, 20, 15, "div", 6);
|
|
1354
|
+
i0.ɵɵtemplate(7, LoginModalComponent_div_7_Template, 6, 1, "div", 6);
|
|
1355
|
+
i0.ɵɵelementEnd()()()();
|
|
1356
|
+
}
|
|
1357
|
+
if (rf & 2) {
|
|
1358
|
+
i0.ɵɵadvance(6);
|
|
1359
|
+
i0.ɵɵproperty("ngIf", ctx.empresas.length == 0);
|
|
1360
|
+
i0.ɵɵadvance(1);
|
|
1361
|
+
i0.ɵɵproperty("ngIf", ctx.empresas.length);
|
|
1362
|
+
}
|
|
1363
|
+
}, directives: [i8.NgIf, i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i5.DefaultValueAccessor, i5.RequiredValidator, i5.NgControlStatus, i5.NgModel, i3.TranslateDirective, i8.NgForOf], pipes: [i3.TranslatePipe], styles: [".modal[_ngcontent-%COMP%]{z-index:2050!important}.btn-primary_low[_ngcontent-%COMP%]{background:#133659!important}.ng-valid[_ngcontent-%COMP%]:not(form){border-left:1px solid #ced4da!important}.ng-invalid[_ngcontent-%COMP%]:not(form){border-left:1px solid #ced4da!important}.card[_ngcontent-%COMP%]{background:#26baed;color:#fff}.card-body[_ngcontent-%COMP%]{padding:10px}"] });
|
|
1364
|
+
(function () {
|
|
1365
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoginModalComponent, [{
|
|
1366
|
+
type: Component,
|
|
1367
|
+
args: [{ selector: 'app-login-modal', template: "<div class=\"modal fade\" id=\"modalLogin\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalCenterTitle\" aria-hidden=\"true\">\n <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-body\">\n <div class=\"row justify-content-center\">\n <img src=\"assets/img/logo_visorus_loading.png\" alt=\"\">\n </div>\n <div class=\"row\" *ngIf=\"empresas.length == 0\">\n <div class=\"col-lg-12 col-md-12 col-sm-12\" >\n <form #datoForm=\"ngForm\" (ngSubmit)=\"entrar(datoForm)\" > \n <label class=\"error\" *ngIf=\"error\">{{'Usuario.errorLogin' | translate}}</label>\n <div class=\"form-group mb-3\">\n <label for=\"exampleInputEmail1\" >{{ 'Usuario.username' | translate }}</label>\n <input type=\"text\" class=\"form-control\" id=\"exampleInputEmail1\" aria-describedby=\"emailHelp\" #username=\"ngModel\"\n placeholder=\"{{ 'Usuario.username' | translate }}\" name=\"username\" [(ngModel)]=\"user.username\" required>\n </div>\n <div class=\"form-group mb-3\">\n <label for=\"exampleInputPassword1\">{{ 'Usuario.password' | translate }}</label>\n <input type=\"password\" class=\"form-control\" id=\"exampleInputPassword1\" placeholder=\"{{ 'Usuario.password' | translate }}\"\n name=\"password\" [(ngModel)]=\"user.password\" required>\n </div>\n \n <button type=\"submit\" class=\"btn btn-primary_low btn-lg btn-block my-5 text-light\" translate>entrar</button>\n </form>\n </div>\n </div> \n <div class=\"row\" *ngIf=\"empresas.length\">\n <div class=\"col-xl-12 col-lg-12 col-sm-12\">\n <h4>Selecciona la empresa</h4>\n <hr>\n </div>\n <div class=\"col-xl-6 col-lg-6 col-sm-12 mb-2\" *ngFor=\"let empresa of empresas\" style=\"cursor: pointer\">\n <div class=\"card\">\n <div class=\"card-body\">\n <h5>\n {{empresa.nombre}}\n </h5>\n </div>\n </div>\n </div>\n </div> \n \n </div>\n </div>\n </div>\n</div>", styles: [".modal{z-index:2050!important}.btn-primary_low{background:#133659!important}.ng-valid:not(form){border-left:1px solid #ced4da!important}.ng-invalid:not(form){border-left:1px solid #ced4da!important}.card{background:#26baed;color:#fff}.card-body{padding:10px}\n"] }]
|
|
1368
|
+
}], function () { return [{ type: LoginModalService }, { type: AuthService }]; }, null);
|
|
1369
|
+
})();
|
|
1370
|
+
|
|
1371
|
+
class SessionCajaService extends CrudService {
|
|
1372
|
+
constructor(httpClient) {
|
|
1373
|
+
super(httpClient, 'sessionCaja');
|
|
1374
|
+
this.httpClient = httpClient;
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
/** @nocollapse */ SessionCajaService.ɵfac = function SessionCajaService_Factory(t) { return new (t || SessionCajaService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
1378
|
+
/** @nocollapse */ SessionCajaService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: SessionCajaService, factory: SessionCajaService.ɵfac, providedIn: 'root' });
|
|
1379
|
+
(function () {
|
|
1380
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SessionCajaService, [{
|
|
1381
|
+
type: Injectable,
|
|
1382
|
+
args: [{
|
|
1383
|
+
providedIn: 'root'
|
|
1384
|
+
}]
|
|
1385
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
1386
|
+
})();
|
|
1387
|
+
|
|
1388
|
+
function SessionCreateComponent_ng_template_1_Template(rf, ctx) {
|
|
1389
|
+
if (rf & 1) {
|
|
1390
|
+
i0.ɵɵelementStart(0, "a", 4);
|
|
1391
|
+
i0.ɵɵtext(1);
|
|
1392
|
+
i0.ɵɵelementEnd();
|
|
1393
|
+
}
|
|
1394
|
+
if (rf & 2) {
|
|
1395
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
1396
|
+
i0.ɵɵadvance(1);
|
|
1397
|
+
i0.ɵɵtextInterpolate1("", ctx_r0.labels.title, ": ");
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
function SessionCreateComponent_div_2_Template(rf, ctx) {
|
|
1401
|
+
if (rf & 1) {
|
|
1402
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
1403
|
+
i0.ɵɵelementStart(0, "div", 5)(1, "div", 6)(2, "label", 7);
|
|
1404
|
+
i0.ɵɵtext(3, "Nombre de caja: ");
|
|
1405
|
+
i0.ɵɵelementEnd();
|
|
1406
|
+
i0.ɵɵelementStart(4, "input", 8);
|
|
1407
|
+
i0.ɵɵlistener("ngModelChange", function SessionCreateComponent_div_2_Template_input_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return ctx_r3.caja.nombre = $event; });
|
|
1408
|
+
i0.ɵɵelementEnd()();
|
|
1409
|
+
i0.ɵɵelementStart(5, "div", 9)(6, "label", 10);
|
|
1410
|
+
i0.ɵɵtext(7, "Saldo: ");
|
|
1411
|
+
i0.ɵɵelementEnd();
|
|
1412
|
+
i0.ɵɵelementStart(8, "input", 11);
|
|
1413
|
+
i0.ɵɵlistener("ngModelChange", function SessionCreateComponent_div_2_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.session.monto = $event; });
|
|
1414
|
+
i0.ɵɵelementEnd()();
|
|
1415
|
+
i0.ɵɵelementStart(9, "div", 9)(10, "label", 12);
|
|
1416
|
+
i0.ɵɵtext(11, "Numero Z:");
|
|
1417
|
+
i0.ɵɵelementEnd();
|
|
1418
|
+
i0.ɵɵelementStart(12, "input", 13);
|
|
1419
|
+
i0.ɵɵlistener("ngModelChange", function SessionCreateComponent_div_2_Template_input_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.session.z = $event; });
|
|
1420
|
+
i0.ɵɵelementEnd()()();
|
|
1421
|
+
}
|
|
1422
|
+
if (rf & 2) {
|
|
1423
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
1424
|
+
i0.ɵɵadvance(4);
|
|
1425
|
+
i0.ɵɵproperty("ngModel", ctx_r1.caja.nombre)("disabled", true);
|
|
1426
|
+
i0.ɵɵadvance(4);
|
|
1427
|
+
i0.ɵɵproperty("ngModel", ctx_r1.session.monto)("disabled", ctx_r1.editMode);
|
|
1428
|
+
i0.ɵɵadvance(4);
|
|
1429
|
+
i0.ɵɵproperty("ngModel", ctx_r1.session.z)("disabled", true);
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
function SessionCreateComponent_ng_template_5_button_0_Template(rf, ctx) {
|
|
1433
|
+
if (rf & 1) {
|
|
1434
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
1435
|
+
i0.ɵɵelementStart(0, "button", 17);
|
|
1436
|
+
i0.ɵɵlistener("click", function SessionCreateComponent_ng_template_5_button_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(2); return ctx_r9.save(); });
|
|
1437
|
+
i0.ɵɵelementEnd();
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
function SessionCreateComponent_ng_template_5_button_1_Template(rf, ctx) {
|
|
1441
|
+
if (rf & 1) {
|
|
1442
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
1443
|
+
i0.ɵɵelementStart(0, "button", 18);
|
|
1444
|
+
i0.ɵɵlistener("click", function SessionCreateComponent_ng_template_5_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(2); return ctx_r11.edit(); });
|
|
1445
|
+
i0.ɵɵelementEnd();
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
function SessionCreateComponent_ng_template_5_Template(rf, ctx) {
|
|
1449
|
+
if (rf & 1) {
|
|
1450
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
1451
|
+
i0.ɵɵtemplate(0, SessionCreateComponent_ng_template_5_button_0_Template, 1, 0, "button", 14);
|
|
1452
|
+
i0.ɵɵtemplate(1, SessionCreateComponent_ng_template_5_button_1_Template, 1, 0, "button", 15);
|
|
1453
|
+
i0.ɵɵelementStart(2, "button", 16);
|
|
1454
|
+
i0.ɵɵlistener("click", function SessionCreateComponent_ng_template_5_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.closeModal(); });
|
|
1455
|
+
i0.ɵɵelementEnd();
|
|
1456
|
+
}
|
|
1457
|
+
if (rf & 2) {
|
|
1458
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
1459
|
+
i0.ɵɵproperty("ngIf", !ctx_r2.editMode && ctx_r2.caja);
|
|
1460
|
+
i0.ɵɵadvance(1);
|
|
1461
|
+
i0.ɵɵproperty("ngIf", ctx_r2.editMode && ctx_r2.caja);
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
const _c0$4 = function () { return { width: "750px" }; };
|
|
1465
|
+
class SessionCreateComponent {
|
|
1466
|
+
constructor(sessionCajaService) {
|
|
1467
|
+
this.sessionCajaService = sessionCajaService;
|
|
1468
|
+
this.showCreateSession = false;
|
|
1469
|
+
this.caja = {};
|
|
1470
|
+
this.sessionEdit = null;
|
|
1471
|
+
// @Input() closeSession?: boolean
|
|
1472
|
+
this.status = new EventEmitter();
|
|
1473
|
+
this.success = new EventEmitter();
|
|
1474
|
+
this.session = {
|
|
1475
|
+
inicio: new Date().getTime(),
|
|
1476
|
+
termino: null,
|
|
1477
|
+
monedaDenominacionList: []
|
|
1478
|
+
};
|
|
1479
|
+
this.flagModal = true;
|
|
1480
|
+
this.labels = {
|
|
1481
|
+
title: "Crear nueva session de caja"
|
|
1482
|
+
};
|
|
1483
|
+
this.resp = {};
|
|
1484
|
+
this.editMode = false;
|
|
1485
|
+
}
|
|
1486
|
+
ngOnInit() {
|
|
1487
|
+
console.log("denominacionList", this.monedaDenominacionList);
|
|
1488
|
+
}
|
|
1489
|
+
setSession() {
|
|
1490
|
+
if (this.sessionEdit) {
|
|
1491
|
+
this.session = this.sessionEdit;
|
|
1492
|
+
this.session.monedaDenominacionList = this.monedaDenominacionList;
|
|
1493
|
+
if (this.session.movimientosCaja) {
|
|
1494
|
+
this.session.monto = this.session.movimientosCaja[0].monto;
|
|
1495
|
+
}
|
|
1496
|
+
this.labels = {
|
|
1497
|
+
title: "Cerrar session"
|
|
1498
|
+
};
|
|
1499
|
+
this.editMode = true;
|
|
1500
|
+
}
|
|
1501
|
+
else if (this.caja) {
|
|
1502
|
+
this.labels.title = "Crear nueva session de caja";
|
|
1503
|
+
this.session.caja = this.caja;
|
|
1504
|
+
this.session.z = this.caja.z;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
closeModal() {
|
|
1508
|
+
this.session = {};
|
|
1509
|
+
this.editMode = false;
|
|
1510
|
+
this.status.emit({ status: false });
|
|
1511
|
+
}
|
|
1512
|
+
save() {
|
|
1513
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1514
|
+
this.resp = (yield this.sessionCajaService.save(this.session).toPromise()) || null;
|
|
1515
|
+
if (this.resp) {
|
|
1516
|
+
this.session = {};
|
|
1517
|
+
this.editMode = false;
|
|
1518
|
+
this.status.emit({ status: false, save: this.resp.data });
|
|
1519
|
+
this.success.emit(true);
|
|
1520
|
+
}
|
|
1521
|
+
else {
|
|
1522
|
+
this.success.emit(false);
|
|
1523
|
+
}
|
|
1524
|
+
});
|
|
1525
|
+
}
|
|
1526
|
+
edit() {
|
|
1527
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1528
|
+
console.log("EDIT", this.session);
|
|
1529
|
+
this.resp = (yield this.sessionCajaService.update(this.session).toPromise()) || null;
|
|
1530
|
+
if (this.resp) {
|
|
1531
|
+
this.session = {};
|
|
1532
|
+
this.editMode = false;
|
|
1533
|
+
this.status.emit({ status: false, update: this.resp.data });
|
|
1534
|
+
}
|
|
1535
|
+
});
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
/** @nocollapse */ SessionCreateComponent.ɵfac = function SessionCreateComponent_Factory(t) { return new (t || SessionCreateComponent)(i0.ɵɵdirectiveInject(SessionCajaService)); };
|
|
1539
|
+
/** @nocollapse */ SessionCreateComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: SessionCreateComponent, selectors: [["session-create"]], inputs: { showCreateSession: "showCreateSession", caja: "caja", monedaDenominacionList: "monedaDenominacionList", sessionEdit: "sessionEdit" }, outputs: { status: "status", success: "success" }, decls: 6, vars: 9, consts: [[3, "visible", "modal", "closeOnEscape", "closable", "blockScroll", "visibleChange", "onHide", "onShow"], ["pTemplate", "header"], ["class", "grid grid-fluid", 4, "ngIf"], ["pTemplate", "footer"], [1, "text-primary"], [1, "grid", "grid-fluid"], [1, "p-field", "col-12"], ["for", "nombreCaja"], ["pInputText", "", "type", "text", "id", "nombreCaja", 3, "ngModel", "disabled", "ngModelChange"], [1, "p-field", "col-12", "md:col-6"], ["for", "saldoCaja"], ["pInputText", "", "type", "number", "id", "saldoCaja", 3, "ngModel", "disabled", "ngModelChange"], ["for", "numeroZ"], ["pInputText", "", "type", "number", "id", "numeroZ", 3, "ngModel", "disabled", "ngModelChange"], ["pButton", "", "type", "button", "label", "Guardar", "class", "p-button-sm", 3, "click", 4, "ngIf"], ["pButton", "", "type", "button", "label", "Cerrar session", "class", "p-button-sm p-button-success", 3, "click", 4, "ngIf"], ["pButton", "", "type", "button", "label", "Cancelar", 1, "p-button-sm", "p-button-danger", 3, "click"], ["pButton", "", "type", "button", "label", "Guardar", 1, "p-button-sm", 3, "click"], ["pButton", "", "type", "button", "label", "Cerrar session", 1, "p-button-sm", "p-button-success", 3, "click"]], template: function SessionCreateComponent_Template(rf, ctx) {
|
|
1540
|
+
if (rf & 1) {
|
|
1541
|
+
i0.ɵɵelementStart(0, "p-dialog", 0);
|
|
1542
|
+
i0.ɵɵlistener("visibleChange", function SessionCreateComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.showCreateSession = $event; })("onHide", function SessionCreateComponent_Template_p_dialog_onHide_0_listener() { return ctx.closeModal(); })("onShow", function SessionCreateComponent_Template_p_dialog_onShow_0_listener() { return ctx.setSession(); });
|
|
1543
|
+
i0.ɵɵtemplate(1, SessionCreateComponent_ng_template_1_Template, 2, 1, "ng-template", 1);
|
|
1544
|
+
i0.ɵɵtemplate(2, SessionCreateComponent_div_2_Template, 13, 6, "div", 2);
|
|
1545
|
+
i0.ɵɵelementStart(3, "div");
|
|
1546
|
+
i0.ɵɵtext(4, " Este agente no esta asignado a una caja ");
|
|
1547
|
+
i0.ɵɵelementEnd();
|
|
1548
|
+
i0.ɵɵtemplate(5, SessionCreateComponent_ng_template_5_Template, 3, 2, "ng-template", 3);
|
|
1549
|
+
i0.ɵɵelementEnd();
|
|
1550
|
+
}
|
|
1551
|
+
if (rf & 2) {
|
|
1552
|
+
i0.ɵɵstyleMap(i0.ɵɵpureFunction0(8, _c0$4));
|
|
1553
|
+
i0.ɵɵproperty("visible", ctx.showCreateSession)("modal", ctx.flagModal)("closeOnEscape", ctx.flagModal)("closable", ctx.flagModal)("blockScroll", true);
|
|
1554
|
+
i0.ɵɵadvance(2);
|
|
1555
|
+
i0.ɵɵproperty("ngIf", ctx.caja);
|
|
1556
|
+
}
|
|
1557
|
+
}, directives: [i4$2.Dialog, i4$1.PrimeTemplate, i8.NgIf, i5.DefaultValueAccessor, i6.InputText, i5.NgControlStatus, i5.NgModel, i5.NumberValueAccessor, i7.ButtonDirective], styles: [""] });
|
|
1558
|
+
(function () {
|
|
1559
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SessionCreateComponent, [{
|
|
1560
|
+
type: Component,
|
|
1561
|
+
args: [{ selector: 'session-create', template: "<p-dialog [(visible)]=\"showCreateSession\" [modal]=\"flagModal\" (onHide)=\"closeModal()\" (onShow)=\"setSession()\"\n [closeOnEscape]=\"flagModal\" [closable]=\"flagModal\" [blockScroll]=\"true\" [style]=\"{width: '750px'}\">\n\n <ng-template pTemplate=\"header\">\n <a class=\"text-primary\">{{labels.title}}: </a>\n </ng-template>\n\n <div class=\"grid grid-fluid\" *ngIf=\"caja\">\n <div class=\"p-field col-12\">\n <label for=\"nombreCaja\">Nombre de caja: </label>\n <input pInputText type=\"text\" id=\"nombreCaja\" [(ngModel)]=\"caja.nombre\" [disabled]=\"true\">\n </div>\n\n <div class=\"p-field col-12 md:col-6\">\n <label for=\"saldoCaja\">Saldo: </label>\n <input pInputText type=\"number\" id=\"saldoCaja\" [(ngModel)]=\"session.monto\" [disabled]=\"editMode\">\n </div>\n\n <div class=\"p-field col-12 md:col-6\">\n <label for=\"numeroZ\">Numero Z:</label>\n <input pInputText type=\"number\" id=\"numeroZ\" [(ngModel)]=\"session.z\" [disabled]=\"true\">\n </div>\n </div>\n\n <div>\n Este agente no esta asignado a una caja\n </div>\n\n <ng-template pTemplate=\"footer\">\n <button pButton type=\"button\" label=\"Guardar\" (click)=\"save()\" *ngIf=\"!editMode && caja\" class=\"p-button-sm\"></button>\n <button pButton type=\"button\" label=\"Cerrar session\" (click)=\"edit()\" *ngIf=\"editMode && caja\" class=\"p-button-sm p-button-success\"></button>\n <button pButton type=\"button\" label=\"Cancelar\" (click)=\"closeModal()\" class=\"p-button-sm p-button-danger\"></button>\n </ng-template>\n\n</p-dialog>", styles: [""] }]
|
|
1562
|
+
}], function () { return [{ type: SessionCajaService }]; }, { showCreateSession: [{
|
|
1563
|
+
type: Input
|
|
1564
|
+
}], caja: [{
|
|
1565
|
+
type: Input
|
|
1566
|
+
}], monedaDenominacionList: [{
|
|
1567
|
+
type: Input
|
|
1568
|
+
}], sessionEdit: [{
|
|
1569
|
+
type: Input
|
|
1570
|
+
}], status: [{
|
|
1571
|
+
type: Output
|
|
1572
|
+
}], success: [{
|
|
1573
|
+
type: Output
|
|
1574
|
+
}] });
|
|
1575
|
+
})();
|
|
1576
|
+
|
|
1577
|
+
class ClienteService extends CrudService {
|
|
1578
|
+
constructor(httpCliente) {
|
|
1579
|
+
super(httpCliente, '/cliente');
|
|
1580
|
+
}
|
|
1581
|
+
validar_archivos_bss(id) {
|
|
1582
|
+
return this.getHttp().get(this.getUrl('/cliente/validarClienteBss/') + id, this.buildAuth());
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
/** @nocollapse */ ClienteService.ɵfac = function ClienteService_Factory(t) { return new (t || ClienteService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
1586
|
+
/** @nocollapse */ ClienteService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: ClienteService, factory: ClienteService.ɵfac, providedIn: 'root' });
|
|
1587
|
+
(function () {
|
|
1588
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ClienteService, [{
|
|
1589
|
+
type: Injectable,
|
|
1590
|
+
args: [{
|
|
1591
|
+
providedIn: 'root'
|
|
1592
|
+
}]
|
|
1593
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
1594
|
+
})();
|
|
1595
|
+
|
|
1596
|
+
class PaginateService {
|
|
1597
|
+
constructor(translate) {
|
|
1598
|
+
this.translate = translate;
|
|
1599
|
+
}
|
|
1600
|
+
getPage() {
|
|
1601
|
+
return {
|
|
1602
|
+
rows: 25,
|
|
1603
|
+
total: undefined,
|
|
1604
|
+
offset: 0,
|
|
1605
|
+
filtro: undefined,
|
|
1606
|
+
sort: undefined,
|
|
1607
|
+
};
|
|
1608
|
+
}
|
|
1609
|
+
getParams(page) {
|
|
1610
|
+
return [
|
|
1611
|
+
{ param: 'offset', value: page.offset },
|
|
1612
|
+
{ param: 'max', value: page.rows },
|
|
1613
|
+
{ param: 'filter', value: page.filtro },
|
|
1614
|
+
{ param: 'sort', value: page.sort }
|
|
1615
|
+
];
|
|
1616
|
+
}
|
|
1617
|
+
getOrden(arg, lang) {
|
|
1618
|
+
if (lang)
|
|
1619
|
+
this.translate.setDefaultLang(lang);
|
|
1620
|
+
let ordenar = [];
|
|
1621
|
+
let tra = [];
|
|
1622
|
+
for (let index = 0; index < arg.length; index++) {
|
|
1623
|
+
ordenar.push({ label: "...", value: arg[index].label });
|
|
1624
|
+
tra.push(arg[index].param);
|
|
1625
|
+
}
|
|
1626
|
+
let dat;
|
|
1627
|
+
let a = true;
|
|
1628
|
+
if (tra.length > 0)
|
|
1629
|
+
this.translate.get(tra).subscribe(data => {
|
|
1630
|
+
dat = data;
|
|
1631
|
+
let values = Object.values(dat);
|
|
1632
|
+
let i = 0;
|
|
1633
|
+
ordenar.forEach(elem => {
|
|
1634
|
+
elem.label = '' + values[i];
|
|
1635
|
+
i++;
|
|
1636
|
+
});
|
|
1637
|
+
}, erro => { });
|
|
1638
|
+
return ordenar;
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
/** @nocollapse */ PaginateService.ɵfac = function PaginateService_Factory(t) { return new (t || PaginateService)(i0.ɵɵinject(i3.TranslateService)); };
|
|
1642
|
+
/** @nocollapse */ PaginateService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: PaginateService, factory: PaginateService.ɵfac, providedIn: "root" });
|
|
1643
|
+
(function () {
|
|
1644
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginateService, [{
|
|
1645
|
+
type: Injectable,
|
|
1646
|
+
args: [{
|
|
1647
|
+
providedIn: "root"
|
|
1648
|
+
}]
|
|
1649
|
+
}], function () { return [{ type: i3.TranslateService }]; }, null);
|
|
1650
|
+
})();
|
|
1651
|
+
|
|
1652
|
+
function SelectClienteComponent_ng_template_7_Template(rf, ctx) {
|
|
1653
|
+
if (rf & 1) {
|
|
1654
|
+
i0.ɵɵelementStart(0, "tr")(1, "th");
|
|
1655
|
+
i0.ɵɵtext(2);
|
|
1656
|
+
i0.ɵɵpipe(3, "translate");
|
|
1657
|
+
i0.ɵɵelementEnd();
|
|
1658
|
+
i0.ɵɵelementStart(4, "th");
|
|
1659
|
+
i0.ɵɵtext(5);
|
|
1660
|
+
i0.ɵɵpipe(6, "translate");
|
|
1661
|
+
i0.ɵɵelementEnd();
|
|
1662
|
+
i0.ɵɵelementStart(7, "th");
|
|
1663
|
+
i0.ɵɵtext(8);
|
|
1664
|
+
i0.ɵɵpipe(9, "translate");
|
|
1665
|
+
i0.ɵɵelementEnd();
|
|
1666
|
+
i0.ɵɵelementStart(10, "th");
|
|
1667
|
+
i0.ɵɵtext(11);
|
|
1668
|
+
i0.ɵɵpipe(12, "translate");
|
|
1669
|
+
i0.ɵɵelementEnd();
|
|
1670
|
+
i0.ɵɵelementStart(13, "th");
|
|
1671
|
+
i0.ɵɵtext(14);
|
|
1672
|
+
i0.ɵɵpipe(15, "translate");
|
|
1673
|
+
i0.ɵɵelementEnd();
|
|
1674
|
+
i0.ɵɵelementStart(16, "th");
|
|
1675
|
+
i0.ɵɵtext(17);
|
|
1676
|
+
i0.ɵɵpipe(18, "translate");
|
|
1677
|
+
i0.ɵɵelementEnd()();
|
|
1678
|
+
}
|
|
1679
|
+
if (rf & 2) {
|
|
1680
|
+
i0.ɵɵadvance(2);
|
|
1681
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 6, "clave"));
|
|
1682
|
+
i0.ɵɵadvance(3);
|
|
1683
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 8, "razonSocial"));
|
|
1684
|
+
i0.ɵɵadvance(3);
|
|
1685
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 10, "tipo"));
|
|
1686
|
+
i0.ɵɵadvance(3);
|
|
1687
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(12, 12, "Cliente.limiteCredito"));
|
|
1688
|
+
i0.ɵɵadvance(3);
|
|
1689
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 14, "Cliente.plazoCredito"));
|
|
1690
|
+
i0.ɵɵadvance(3);
|
|
1691
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(18, 16, "Cliente.diasPago"));
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
function SelectClienteComponent_ng_template_8_span_6_Template(rf, ctx) {
|
|
1695
|
+
if (rf & 1) {
|
|
1696
|
+
i0.ɵɵelementStart(0, "span");
|
|
1697
|
+
i0.ɵɵtext(1);
|
|
1698
|
+
i0.ɵɵpipe(2, "translate");
|
|
1699
|
+
i0.ɵɵelementEnd();
|
|
1700
|
+
}
|
|
1701
|
+
if (rf & 2) {
|
|
1702
|
+
i0.ɵɵadvance(1);
|
|
1703
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "fisico"));
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
function SelectClienteComponent_ng_template_8_span_7_Template(rf, ctx) {
|
|
1707
|
+
if (rf & 1) {
|
|
1708
|
+
i0.ɵɵelementStart(0, "span");
|
|
1709
|
+
i0.ɵɵtext(1);
|
|
1710
|
+
i0.ɵɵpipe(2, "translate");
|
|
1711
|
+
i0.ɵɵelementEnd();
|
|
1712
|
+
}
|
|
1713
|
+
if (rf & 2) {
|
|
1714
|
+
i0.ɵɵadvance(1);
|
|
1715
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "moral"));
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
function SelectClienteComponent_ng_template_8_Template(rf, ctx) {
|
|
1719
|
+
if (rf & 1) {
|
|
1720
|
+
i0.ɵɵelementStart(0, "tr", 8)(1, "td");
|
|
1721
|
+
i0.ɵɵtext(2);
|
|
1722
|
+
i0.ɵɵelementEnd();
|
|
1723
|
+
i0.ɵɵelementStart(3, "td");
|
|
1724
|
+
i0.ɵɵtext(4);
|
|
1725
|
+
i0.ɵɵelementEnd();
|
|
1726
|
+
i0.ɵɵelementStart(5, "td");
|
|
1727
|
+
i0.ɵɵtemplate(6, SelectClienteComponent_ng_template_8_span_6_Template, 3, 3, "span", 9);
|
|
1728
|
+
i0.ɵɵtemplate(7, SelectClienteComponent_ng_template_8_span_7_Template, 3, 3, "span", 9);
|
|
1729
|
+
i0.ɵɵelementEnd();
|
|
1730
|
+
i0.ɵɵelementStart(8, "td");
|
|
1731
|
+
i0.ɵɵtext(9);
|
|
1732
|
+
i0.ɵɵelementEnd();
|
|
1733
|
+
i0.ɵɵelementStart(10, "td");
|
|
1734
|
+
i0.ɵɵtext(11);
|
|
1735
|
+
i0.ɵɵelementEnd();
|
|
1736
|
+
i0.ɵɵelementStart(12, "td");
|
|
1737
|
+
i0.ɵɵtext(13);
|
|
1738
|
+
i0.ɵɵelementEnd()();
|
|
1739
|
+
}
|
|
1740
|
+
if (rf & 2) {
|
|
1741
|
+
const cliente_r3 = ctx.$implicit;
|
|
1742
|
+
i0.ɵɵproperty("pSelectableRow", cliente_r3);
|
|
1743
|
+
i0.ɵɵadvance(2);
|
|
1744
|
+
i0.ɵɵtextInterpolate(cliente_r3.codigo);
|
|
1745
|
+
i0.ɵɵadvance(2);
|
|
1746
|
+
i0.ɵɵtextInterpolate(cliente_r3.descripcionRazonSocial);
|
|
1747
|
+
i0.ɵɵadvance(2);
|
|
1748
|
+
i0.ɵɵproperty("ngIf", cliente_r3.personaFisica);
|
|
1749
|
+
i0.ɵɵadvance(1);
|
|
1750
|
+
i0.ɵɵproperty("ngIf", cliente_r3.personaMoral);
|
|
1751
|
+
i0.ɵɵadvance(2);
|
|
1752
|
+
i0.ɵɵtextInterpolate(cliente_r3.limiteCredito);
|
|
1753
|
+
i0.ɵɵadvance(2);
|
|
1754
|
+
i0.ɵɵtextInterpolate(cliente_r3.plazoCredito);
|
|
1755
|
+
i0.ɵɵadvance(2);
|
|
1756
|
+
i0.ɵɵtextInterpolate(cliente_r3.diasPago);
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
function SelectClienteComponent_ng_template_9_Template(rf, ctx) {
|
|
1760
|
+
if (rf & 1) {
|
|
1761
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 10);
|
|
1762
|
+
i0.ɵɵtext(2);
|
|
1763
|
+
i0.ɵɵpipe(3, "translate");
|
|
1764
|
+
i0.ɵɵelementEnd()();
|
|
1765
|
+
}
|
|
1766
|
+
if (rf & 2) {
|
|
1767
|
+
i0.ɵɵadvance(2);
|
|
1768
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "general.noRegistros"));
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
class SelectClienteComponent {
|
|
1772
|
+
constructor(clienteService, paginate) {
|
|
1773
|
+
this.clienteService = clienteService;
|
|
1774
|
+
this.paginate = paginate;
|
|
1775
|
+
this.selectMode = 'single';
|
|
1776
|
+
this.select = new EventEmitter();
|
|
1777
|
+
this.ordenar = [];
|
|
1778
|
+
this.loading = true;
|
|
1779
|
+
}
|
|
1780
|
+
ngOnInit() {
|
|
1781
|
+
this.page = this.paginate.getPage();
|
|
1782
|
+
this.page.rows = 20;
|
|
1783
|
+
this.clientes = [];
|
|
1784
|
+
this.ordenar = this.paginate.getOrden([
|
|
1785
|
+
{ param: 'razonZocial', label: 'razonZocial' }
|
|
1786
|
+
], 'es');
|
|
1787
|
+
}
|
|
1788
|
+
cargarDatosClientes(event = null) {
|
|
1789
|
+
this.loading = true;
|
|
1790
|
+
if (event) {
|
|
1791
|
+
this.page.rows = event.rows;
|
|
1792
|
+
this.page.offset = event.first;
|
|
1793
|
+
}
|
|
1794
|
+
this.clientes = [];
|
|
1795
|
+
this.params = this.paginate.getParams(this.page);
|
|
1796
|
+
this.params.push({ param: 'estatus', value: true });
|
|
1797
|
+
if (this.page.filtro && this.page.filtro.trim() !== '') {
|
|
1798
|
+
this.params.push({ param: 'filtroGeneral', value: this.page.filtro.trim() });
|
|
1799
|
+
}
|
|
1800
|
+
this.clienteService.getAll(this.params).subscribe((data) => {
|
|
1801
|
+
this.page.total = data.total;
|
|
1802
|
+
this.clientes = data.data;
|
|
1803
|
+
this.loading = false;
|
|
1804
|
+
}, error => {
|
|
1805
|
+
console.error("Error al cargar clientes:", error);
|
|
1806
|
+
this.loading = false;
|
|
1807
|
+
});
|
|
1808
|
+
}
|
|
1809
|
+
aplicarFiltro() {
|
|
1810
|
+
this.page.offset = 0;
|
|
1811
|
+
this.cargarDatosClientes();
|
|
1812
|
+
}
|
|
1813
|
+
seleccionaCliente(e) {
|
|
1814
|
+
console.log('Fila seleccionada (evento):', e);
|
|
1815
|
+
console.log('Datos de la fila (e.data):', e.data);
|
|
1816
|
+
console.log('Cliente seleccionado ANTES de emitir:', this.clienteSeleccionado); // Verifica si [(selection)] ya lo actualizó
|
|
1817
|
+
this.select.emit(e.data);
|
|
1818
|
+
this.visible = false;
|
|
1819
|
+
console.log('Cliente seleccionado DESPUÉS de emitir (y si se actualizó por [(selection)]):', this.clienteSeleccionado);
|
|
1820
|
+
}
|
|
1821
|
+
cerrar() {
|
|
1822
|
+
this.select.emit(null);
|
|
1823
|
+
this.visible = false;
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
/** @nocollapse */ SelectClienteComponent.ɵfac = function SelectClienteComponent_Factory(t) { return new (t || SelectClienteComponent)(i0.ɵɵdirectiveInject(ClienteService), i0.ɵɵdirectiveInject(PaginateService)); };
|
|
1827
|
+
/** @nocollapse */ SelectClienteComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: SelectClienteComponent, selectors: [["select-cliente"]], inputs: { clienteSeleccionado: "clienteSeleccionado", selectMode: "selectMode", visible: "visible" }, outputs: { select: "select" }, decls: 10, vars: 17, consts: [[3, "header", "visible", "visibleChange", "onHide", "onShow"], [1, "p-inputgroup", "mt-2"], ["type", "text", "pInputText", "", "name", "filtro", 3, "placeholder", "ngModel", "ngModelChange", "keyup"], ["pButton", "", "type", "button", "icon", "pi pi-search", "styleClass", "p-button-secondary", 3, "click"], ["dataKey", "id", "scrollHeight", "350px", 3, "value", "lazy", "paginator", "rows", "totalRecords", "selection", "selectionMode", "scrollable", "loading", "onLazyLoad", "selectionChange", "onRowSelect"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], [3, "pSelectableRow"], [4, "ngIf"], ["colspan", "6"]], template: function SelectClienteComponent_Template(rf, ctx) {
|
|
1828
|
+
if (rf & 1) {
|
|
1829
|
+
i0.ɵɵelementStart(0, "p-dialog", 0);
|
|
1830
|
+
i0.ɵɵlistener("visibleChange", function SelectClienteComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.visible = $event; })("onHide", function SelectClienteComponent_Template_p_dialog_onHide_0_listener() { return ctx.cerrar(); })("onShow", function SelectClienteComponent_Template_p_dialog_onShow_0_listener() { return ctx.cargarDatosClientes(); });
|
|
1831
|
+
i0.ɵɵpipe(1, "translate");
|
|
1832
|
+
i0.ɵɵelementStart(2, "div", 1)(3, "input", 2);
|
|
1833
|
+
i0.ɵɵlistener("ngModelChange", function SelectClienteComponent_Template_input_ngModelChange_3_listener($event) { return ctx.page.filtro = $event; })("keyup", function SelectClienteComponent_Template_input_keyup_3_listener() { return ctx.aplicarFiltro(); });
|
|
1834
|
+
i0.ɵɵpipe(4, "translate");
|
|
1835
|
+
i0.ɵɵelementEnd();
|
|
1836
|
+
i0.ɵɵelementStart(5, "button", 3);
|
|
1837
|
+
i0.ɵɵlistener("click", function SelectClienteComponent_Template_button_click_5_listener() { return ctx.aplicarFiltro(); });
|
|
1838
|
+
i0.ɵɵelementEnd()();
|
|
1839
|
+
i0.ɵɵelementStart(6, "p-table", 4);
|
|
1840
|
+
i0.ɵɵlistener("onLazyLoad", function SelectClienteComponent_Template_p_table_onLazyLoad_6_listener($event) { return ctx.cargarDatosClientes($event); })("selectionChange", function SelectClienteComponent_Template_p_table_selectionChange_6_listener($event) { return ctx.clienteSeleccionado = $event; })("onRowSelect", function SelectClienteComponent_Template_p_table_onRowSelect_6_listener($event) { return ctx.seleccionaCliente($event); });
|
|
1841
|
+
i0.ɵɵtemplate(7, SelectClienteComponent_ng_template_7_Template, 19, 18, "ng-template", 5);
|
|
1842
|
+
i0.ɵɵtemplate(8, SelectClienteComponent_ng_template_8_Template, 14, 8, "ng-template", 6);
|
|
1843
|
+
i0.ɵɵtemplate(9, SelectClienteComponent_ng_template_9_Template, 4, 3, "ng-template", 7);
|
|
1844
|
+
i0.ɵɵelementEnd()();
|
|
1845
|
+
}
|
|
1846
|
+
if (rf & 2) {
|
|
1847
|
+
i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(1, 13, "Seleccionar cliente "));
|
|
1848
|
+
i0.ɵɵproperty("visible", ctx.visible);
|
|
1849
|
+
i0.ɵɵadvance(3);
|
|
1850
|
+
i0.ɵɵpropertyInterpolate1("placeholder", "", i0.ɵɵpipeBind1(4, 15, "buscar"), "...");
|
|
1851
|
+
i0.ɵɵproperty("ngModel", ctx.page.filtro);
|
|
1852
|
+
i0.ɵɵadvance(3);
|
|
1853
|
+
i0.ɵɵpropertyInterpolate("selectionMode", ctx.selectMode);
|
|
1854
|
+
i0.ɵɵproperty("value", ctx.clientes)("lazy", true)("paginator", true)("rows", ctx.page.rows)("totalRecords", ctx.page.total)("selection", ctx.clienteSeleccionado)("scrollable", true)("loading", ctx.loading);
|
|
1855
|
+
}
|
|
1856
|
+
}, directives: [i4$2.Dialog, i5.DefaultValueAccessor, i6.InputText, i5.NgControlStatus, i5.NgModel, i7.ButtonDirective, i8$1.Table, i4$1.PrimeTemplate, i8$1.SelectableRow, i8.NgIf], pipes: [i3.TranslatePipe], encapsulation: 2 });
|
|
1857
|
+
(function () {
|
|
1858
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SelectClienteComponent, [{
|
|
1859
|
+
type: Component,
|
|
1860
|
+
args: [{ selector: 'select-cliente', template: "<p-dialog header=\"{{ 'Seleccionar cliente ' | translate }}\" [(visible)]=\"visible\" (onHide)=\"cerrar()\"\n (onShow)=\"cargarDatosClientes()\">\n\n <div class=\"p-inputgroup mt-2\">\n <input type=\"text\" pInputText placeholder=\"{{'buscar'| translate}}...\"\n [(ngModel)]=\"page.filtro\" name=\"filtro\" (keyup)=\"aplicarFiltro()\">\n <button pButton type=\"button\" icon=\"pi pi-search\" styleClass=\"p-button-secondary\" (click)=\"aplicarFiltro()\"></button>\n </div>\n\n <p-table\n [value]=\"clientes\"\n dataKey=\"id\" [lazy]=\"true\"\n (onLazyLoad)=\"cargarDatosClientes($event)\"\n [paginator]=\"true\"\n [rows]=\"page.rows\"\n [totalRecords]=\"page.total\"\n [(selection)]=\"clienteSeleccionado\"\n selectionMode=\"{{selectMode}}\"\n (onRowSelect)=\"seleccionaCliente($event)\"\n [scrollable]=\"true\" scrollHeight=\"350px\"\n [loading]=\"loading\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th>{{'clave' | translate}}</th>\n <th>{{'razonSocial' | translate}}</th>\n <th>{{'tipo' | translate}}</th>\n <th>{{'Cliente.limiteCredito' | translate}}</th>\n <th>{{'Cliente.plazoCredito' | translate}}</th>\n <th>{{'Cliente.diasPago' | translate}}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-cliente>\n <tr [pSelectableRow]=\"cliente\"> \n <td>{{cliente.codigo}}</td>\n <td>{{cliente.descripcionRazonSocial}}</td>\n <td>\n <span *ngIf=\"cliente.personaFisica\">{{'fisico'| translate}}</span>\n <span *ngIf=\"cliente.personaMoral\">{{'moral'| translate}}</span>\n </td>\n <td>{{cliente.limiteCredito}}</td>\n <td>{{cliente.plazoCredito}}</td>\n <td>{{cliente.diasPago}}</td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td colspan=\"6\">{{'general.noRegistros' | translate}}</td>\n </tr>\n </ng-template>\n</p-table>\n \n</p-dialog>" }]
|
|
1861
|
+
}], function () { return [{ type: ClienteService }, { type: PaginateService }]; }, { clienteSeleccionado: [{
|
|
1862
|
+
type: Input
|
|
1863
|
+
}], selectMode: [{
|
|
1864
|
+
type: Input
|
|
1865
|
+
}], visible: [{
|
|
1866
|
+
type: Input
|
|
1867
|
+
}], select: [{
|
|
1868
|
+
type: Output
|
|
1869
|
+
}] });
|
|
1870
|
+
})();
|
|
1871
|
+
|
|
1872
|
+
class Persona {
|
|
1873
|
+
constructor() {
|
|
1874
|
+
//this.estadoCivil= new EstadoCivil();
|
|
1875
|
+
//this.genero = new Genero();
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
class PersonaFisica {
|
|
1880
|
+
constructor() {
|
|
1881
|
+
this.datoPersona = new Persona();
|
|
1882
|
+
this.contactos = [];
|
|
1883
|
+
this.datoDirecciones = [];
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
class PersonaMoral {
|
|
1888
|
+
constructor() {
|
|
1889
|
+
this.representanteLegal = new PersonaFisica();
|
|
1890
|
+
this.contactos = [];
|
|
1891
|
+
this.datoDirecciones = [];
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
class ClasificadorTipo {
|
|
1896
|
+
constructor() { }
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
class Proveedor {
|
|
1900
|
+
constructor() {
|
|
1901
|
+
this.personaMoral = new PersonaMoral();
|
|
1902
|
+
this.catalogoTipo = new ClasificadorTipo();
|
|
1903
|
+
this.clasificadorTipo = new ClasificadorTipo();
|
|
1904
|
+
this.personaFisica = new PersonaFisica();
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
class ProveedorService extends CrudService {
|
|
1909
|
+
constructor(httpClient) {
|
|
1910
|
+
super(httpClient, '/proveedor');
|
|
1911
|
+
this.httpClient = httpClient;
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
/** @nocollapse */ ProveedorService.ɵfac = function ProveedorService_Factory(t) { return new (t || ProveedorService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
1915
|
+
/** @nocollapse */ ProveedorService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: ProveedorService, factory: ProveedorService.ɵfac, providedIn: 'root' });
|
|
1916
|
+
(function () {
|
|
1917
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProveedorService, [{
|
|
1918
|
+
type: Injectable,
|
|
1919
|
+
args: [{
|
|
1920
|
+
providedIn: 'root'
|
|
1921
|
+
}]
|
|
1922
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
1923
|
+
})();
|
|
1924
|
+
|
|
1925
|
+
function SelectProveedorComponent_ng_template_7_Template(rf, ctx) {
|
|
1926
|
+
if (rf & 1) {
|
|
1927
|
+
i0.ɵɵelementStart(0, "tr")(1, "th");
|
|
1928
|
+
i0.ɵɵtext(2);
|
|
1929
|
+
i0.ɵɵpipe(3, "translate");
|
|
1930
|
+
i0.ɵɵelementEnd();
|
|
1931
|
+
i0.ɵɵelementStart(4, "th");
|
|
1932
|
+
i0.ɵɵtext(5);
|
|
1933
|
+
i0.ɵɵpipe(6, "translate");
|
|
1934
|
+
i0.ɵɵelementEnd();
|
|
1935
|
+
i0.ɵɵelementStart(7, "th");
|
|
1936
|
+
i0.ɵɵtext(8);
|
|
1937
|
+
i0.ɵɵpipe(9, "translate");
|
|
1938
|
+
i0.ɵɵelementEnd()();
|
|
1939
|
+
}
|
|
1940
|
+
if (rf & 2) {
|
|
1941
|
+
i0.ɵɵadvance(2);
|
|
1942
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 3, "clave"));
|
|
1943
|
+
i0.ɵɵadvance(3);
|
|
1944
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 5, "razonSocial"));
|
|
1945
|
+
i0.ɵɵadvance(3);
|
|
1946
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 7, "rfc"));
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
function SelectProveedorComponent_ng_template_8_Template(rf, ctx) {
|
|
1950
|
+
if (rf & 1) {
|
|
1951
|
+
i0.ɵɵelementStart(0, "tr")(1, "td");
|
|
1952
|
+
i0.ɵɵtext(2);
|
|
1953
|
+
i0.ɵɵelementEnd();
|
|
1954
|
+
i0.ɵɵelementStart(3, "td");
|
|
1955
|
+
i0.ɵɵtext(4);
|
|
1956
|
+
i0.ɵɵelementEnd();
|
|
1957
|
+
i0.ɵɵelementStart(5, "td");
|
|
1958
|
+
i0.ɵɵtext(6);
|
|
1959
|
+
i0.ɵɵelementEnd()();
|
|
1960
|
+
}
|
|
1961
|
+
if (rf & 2) {
|
|
1962
|
+
const proveedor_r2 = ctx.rowData;
|
|
1963
|
+
i0.ɵɵadvance(2);
|
|
1964
|
+
i0.ɵɵtextInterpolate(proveedor_r2.codigo);
|
|
1965
|
+
i0.ɵɵadvance(2);
|
|
1966
|
+
i0.ɵɵtextInterpolate(proveedor_r2.descripcionRazonSocial);
|
|
1967
|
+
i0.ɵɵadvance(2);
|
|
1968
|
+
i0.ɵɵtextInterpolate(proveedor_r2.descripcionRfc);
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
const _c0$3 = function () { return [10, 25, 50, 100, 500]; };
|
|
1972
|
+
class SelectProveedorComponent {
|
|
1973
|
+
constructor(proveedorService, paginanateService, translate) {
|
|
1974
|
+
this.proveedorService = proveedorService;
|
|
1975
|
+
this.paginanateService = paginanateService;
|
|
1976
|
+
this.translate = translate;
|
|
1977
|
+
this.params = [];
|
|
1978
|
+
this.ordenar = [];
|
|
1979
|
+
this.visible = false;
|
|
1980
|
+
this.proveedorSeleccionado = new Proveedor();
|
|
1981
|
+
this.select = new EventEmitter();
|
|
1982
|
+
this.translate.get('es');
|
|
1983
|
+
}
|
|
1984
|
+
ngOnInit() {
|
|
1985
|
+
this.page = this.paginanateService.getPage();
|
|
1986
|
+
let arg = [];
|
|
1987
|
+
this.ordenar = this.paginanateService.getOrden(arg, 'es');
|
|
1988
|
+
this.proveedores = [];
|
|
1989
|
+
}
|
|
1990
|
+
cargarDatosProveedores() {
|
|
1991
|
+
this.params = this.paginanateService.getParams(this.page);
|
|
1992
|
+
this.params.push({ param: 'estatus', value: true });
|
|
1993
|
+
this.proveedorService.getAll(this.params).subscribe((data) => {
|
|
1994
|
+
this.proveedores = data.data;
|
|
1995
|
+
});
|
|
1996
|
+
}
|
|
1997
|
+
pagina(e) {
|
|
1998
|
+
this.page.rows = e.rows;
|
|
1999
|
+
this.page.offset = e.first;
|
|
2000
|
+
this.cargarDatosProveedores();
|
|
2001
|
+
}
|
|
2002
|
+
cerrarModal() {
|
|
2003
|
+
this.select.emit(null);
|
|
2004
|
+
this.visible = false;
|
|
2005
|
+
}
|
|
2006
|
+
seleccionarProveedor(e) {
|
|
2007
|
+
this.select.emit(e.data);
|
|
2008
|
+
this.visible = false;
|
|
2009
|
+
}
|
|
2010
|
+
}
|
|
2011
|
+
/** @nocollapse */ SelectProveedorComponent.ɵfac = function SelectProveedorComponent_Factory(t) { return new (t || SelectProveedorComponent)(i0.ɵɵdirectiveInject(ProveedorService), i0.ɵɵdirectiveInject(PaginateService), i0.ɵɵdirectiveInject(i3.TranslateService)); };
|
|
2012
|
+
/** @nocollapse */ SelectProveedorComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: SelectProveedorComponent, selectors: [["select-proveedor"]], inputs: { visible: "visible", proveedorSeleccionado: "proveedorSeleccionado" }, outputs: { select: "select" }, decls: 10, vars: 16, consts: [[3, "header", "visible", "visibleChange", "onHide", "onShow"], [1, "p-inputgroup", "mt-2"], ["type", "text", "pInputText", "", "name", "filtro", 3, "placeholder", "ngModel", "ngModelChange", "change"], ["pButton", "", "type", "button", "icon", "pi pi-search", "styleClass", "p-button-secondary", 3, "click"], ["selectionMode", "single", "scrollHeight", "350px", 3, "value", "selection", "scrollable", "valueChange", "selectionChange", "onRowSelect"], ["pTemplate", "header"], ["pTemplate", "body"], [3, "rows", "totalRecords", "pageLinkSize", "rowsPerPageOptions", "onPageChange"]], template: function SelectProveedorComponent_Template(rf, ctx) {
|
|
2013
|
+
if (rf & 1) {
|
|
2014
|
+
i0.ɵɵelementStart(0, "p-dialog", 0);
|
|
2015
|
+
i0.ɵɵlistener("visibleChange", function SelectProveedorComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.visible = $event; })("onHide", function SelectProveedorComponent_Template_p_dialog_onHide_0_listener() { return ctx.cerrarModal(); })("onShow", function SelectProveedorComponent_Template_p_dialog_onShow_0_listener() { return ctx.cargarDatosProveedores(); });
|
|
2016
|
+
i0.ɵɵpipe(1, "translate");
|
|
2017
|
+
i0.ɵɵelementStart(2, "div", 1)(3, "input", 2);
|
|
2018
|
+
i0.ɵɵlistener("ngModelChange", function SelectProveedorComponent_Template_input_ngModelChange_3_listener($event) { return ctx.page.filtro = $event; })("change", function SelectProveedorComponent_Template_input_change_3_listener() { return ctx.cargarDatosProveedores(); });
|
|
2019
|
+
i0.ɵɵpipe(4, "translate");
|
|
2020
|
+
i0.ɵɵelementEnd();
|
|
2021
|
+
i0.ɵɵelementStart(5, "button", 3);
|
|
2022
|
+
i0.ɵɵlistener("click", function SelectProveedorComponent_Template_button_click_5_listener() { return ctx.cargarDatosProveedores(); });
|
|
2023
|
+
i0.ɵɵelementEnd()();
|
|
2024
|
+
i0.ɵɵelementStart(6, "p-table", 4);
|
|
2025
|
+
i0.ɵɵlistener("valueChange", function SelectProveedorComponent_Template_p_table_valueChange_6_listener($event) { return ctx.proveedores = $event; })("selectionChange", function SelectProveedorComponent_Template_p_table_selectionChange_6_listener($event) { return ctx.proveedorSeleccionado = $event; })("onRowSelect", function SelectProveedorComponent_Template_p_table_onRowSelect_6_listener($event) { return ctx.seleccionarProveedor($event); });
|
|
2026
|
+
i0.ɵɵtemplate(7, SelectProveedorComponent_ng_template_7_Template, 10, 9, "ng-template", 5);
|
|
2027
|
+
i0.ɵɵtemplate(8, SelectProveedorComponent_ng_template_8_Template, 7, 3, "ng-template", 6);
|
|
2028
|
+
i0.ɵɵelementEnd();
|
|
2029
|
+
i0.ɵɵelementStart(9, "p-paginator", 7);
|
|
2030
|
+
i0.ɵɵlistener("onPageChange", function SelectProveedorComponent_Template_p_paginator_onPageChange_9_listener($event) { return ctx.pagina($event); });
|
|
2031
|
+
i0.ɵɵelementEnd()();
|
|
2032
|
+
}
|
|
2033
|
+
if (rf & 2) {
|
|
2034
|
+
i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(1, 11, "ArticuloProveedor.proveedores"));
|
|
2035
|
+
i0.ɵɵproperty("visible", ctx.visible);
|
|
2036
|
+
i0.ɵɵadvance(3);
|
|
2037
|
+
i0.ɵɵpropertyInterpolate1("placeholder", "", i0.ɵɵpipeBind1(4, 13, "buscar"), "...");
|
|
2038
|
+
i0.ɵɵproperty("ngModel", ctx.page.filtro);
|
|
2039
|
+
i0.ɵɵadvance(3);
|
|
2040
|
+
i0.ɵɵproperty("value", ctx.proveedores)("selection", ctx.proveedorSeleccionado)("scrollable", true);
|
|
2041
|
+
i0.ɵɵadvance(3);
|
|
2042
|
+
i0.ɵɵproperty("rows", ctx.page.rows)("totalRecords", ctx.page.total)("pageLinkSize", 5)("rowsPerPageOptions", i0.ɵɵpureFunction0(15, _c0$3));
|
|
2043
|
+
}
|
|
2044
|
+
}, directives: [i4$2.Dialog, i5.DefaultValueAccessor, i6.InputText, i5.NgControlStatus, i5.NgModel, i7.ButtonDirective, i8$1.Table, i4$1.PrimeTemplate, i10.Paginator], pipes: [i3.TranslatePipe], encapsulation: 2 });
|
|
2045
|
+
(function () {
|
|
2046
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SelectProveedorComponent, [{
|
|
2047
|
+
type: Component,
|
|
2048
|
+
args: [{ selector: 'select-proveedor', template: "<p-dialog header=\"{{'ArticuloProveedor.proveedores' | translate}}\" [(visible)]=\"visible\" (onHide)=\"cerrarModal()\"\n (onShow)=\"cargarDatosProveedores()\">\n\n <div class=\"p-inputgroup mt-2\">\n <input type=\"text\" pInputText placeholder=\"{{'buscar'| translate}}...\"\n [(ngModel)]=\"page.filtro\" name=\"filtro\" (change)=\"cargarDatosProveedores()\">\n <button pButton type=\"button\" icon=\"pi pi-search\" styleClass=\"p-button-secondary\" (click)=\"cargarDatosProveedores()\"></button>\n </div>\n\n <p-table [(value)]=\"proveedores\" selectionMode=\"single\" [(selection)]=\"proveedorSeleccionado\"\n [scrollable]=\"true\" scrollHeight=\"350px\" (onRowSelect)=\"seleccionarProveedor($event)\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th>{{'clave' | translate}}</th>\n <th>{{'razonSocial' | translate}}</th>\n <th>{{'rfc' | translate}}</th>\n </tr>\n </ng-template> \n <ng-template pTemplate=\"body\" let-proveedor=\"rowData\">\n <tr>\n <td>{{proveedor.codigo}}</td>\n <td>{{proveedor.descripcionRazonSocial}}</td>\n <td>{{proveedor.descripcionRfc}}</td>\n </tr>\n </ng-template>\n </p-table>\n\n <p-paginator [rows]=\"page.rows\" [totalRecords]=\"page.total\" [pageLinkSize]=\"5\"\n (onPageChange)=\"pagina($event)\" [rowsPerPageOptions]=\"[10,25,50,100,500]\"></p-paginator>\n\n</p-dialog>" }]
|
|
2049
|
+
}], function () { return [{ type: ProveedorService }, { type: PaginateService }, { type: i3.TranslateService }]; }, { visible: [{
|
|
2050
|
+
type: Input
|
|
2051
|
+
}], proveedorSeleccionado: [{
|
|
2052
|
+
type: Input
|
|
2053
|
+
}], select: [{
|
|
2054
|
+
type: Output
|
|
2055
|
+
}] });
|
|
2056
|
+
})();
|
|
2057
|
+
|
|
2058
|
+
class StockService extends CrudService {
|
|
2059
|
+
constructor(httpClient) {
|
|
2060
|
+
super(httpClient, 'stock');
|
|
2061
|
+
this.httpClient = httpClient;
|
|
2062
|
+
}
|
|
2063
|
+
obtenerExistenciasArticulosDescripcion(parametros, params) {
|
|
2064
|
+
const url = this.getBaseUrl() + '/stock/obtenerExistenciasArticulos';
|
|
2065
|
+
let promesa = new Promise((resolve, reject) => {
|
|
2066
|
+
this.httpClient.post(url + this.serializeParams(params), parametros, this.buildAuth()).subscribe((data) => {
|
|
2067
|
+
resolve(data);
|
|
2068
|
+
}, (err) => {
|
|
2069
|
+
reject(err);
|
|
2070
|
+
});
|
|
2071
|
+
});
|
|
2072
|
+
return promesa;
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
/** @nocollapse */ StockService.ɵfac = function StockService_Factory(t) { return new (t || StockService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
2076
|
+
/** @nocollapse */ StockService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: StockService, factory: StockService.ɵfac, providedIn: 'root' });
|
|
2077
|
+
(function () {
|
|
2078
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(StockService, [{
|
|
2079
|
+
type: Injectable,
|
|
2080
|
+
args: [{
|
|
2081
|
+
providedIn: 'root'
|
|
2082
|
+
}]
|
|
2083
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
2084
|
+
})();
|
|
2085
|
+
|
|
2086
|
+
class AlmacenService extends CrudService {
|
|
2087
|
+
constructor(httpClient) {
|
|
2088
|
+
super(httpClient, '/almacen');
|
|
2089
|
+
this.httpClient = httpClient;
|
|
2090
|
+
}
|
|
2091
|
+
obtenerAlmacenEmpresa() {
|
|
2092
|
+
let url = this.geturl() + '/obtenerAlmacenEmpresa';
|
|
2093
|
+
return this.getHttp().get(url, this.buildAuth());
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
/** @nocollapse */ AlmacenService.ɵfac = function AlmacenService_Factory(t) { return new (t || AlmacenService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
2097
|
+
/** @nocollapse */ AlmacenService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: AlmacenService, factory: AlmacenService.ɵfac, providedIn: 'root' });
|
|
2098
|
+
(function () {
|
|
2099
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AlmacenService, [{
|
|
2100
|
+
type: Injectable,
|
|
2101
|
+
args: [{
|
|
2102
|
+
providedIn: 'root'
|
|
2103
|
+
}]
|
|
2104
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
2105
|
+
})();
|
|
2106
|
+
|
|
2107
|
+
class ArticuloInformacionService extends CrudService {
|
|
2108
|
+
constructor(httpClient) {
|
|
2109
|
+
super(httpClient, 'articulo');
|
|
2110
|
+
this.httpClient = httpClient;
|
|
2111
|
+
}
|
|
2112
|
+
obtenerExistencias(articulo) {
|
|
2113
|
+
let uRL = "/existenciasArticulo/" + articulo;
|
|
2114
|
+
return this.httpClient.get(this.geturl() + uRL, this.buildAuth());
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
/** @nocollapse */ ArticuloInformacionService.ɵfac = function ArticuloInformacionService_Factory(t) { return new (t || ArticuloInformacionService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
2118
|
+
/** @nocollapse */ ArticuloInformacionService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: ArticuloInformacionService, factory: ArticuloInformacionService.ɵfac, providedIn: 'root' });
|
|
2119
|
+
(function () {
|
|
2120
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArticuloInformacionService, [{
|
|
2121
|
+
type: Injectable,
|
|
2122
|
+
args: [{
|
|
2123
|
+
providedIn: 'root'
|
|
2124
|
+
}]
|
|
2125
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
2126
|
+
})();
|
|
2127
|
+
|
|
2128
|
+
function SeleccionArticuloInformacionComponent_ng_template_2_col_1_Template(rf, ctx) {
|
|
2129
|
+
if (rf & 1) {
|
|
2130
|
+
i0.ɵɵelement(0, "col");
|
|
2131
|
+
}
|
|
2132
|
+
if (rf & 2) {
|
|
2133
|
+
const col_r5 = ctx.$implicit;
|
|
2134
|
+
i0.ɵɵstyleProp("width", col_r5.width);
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
function SeleccionArticuloInformacionComponent_ng_template_2_Template(rf, ctx) {
|
|
2138
|
+
if (rf & 1) {
|
|
2139
|
+
i0.ɵɵelementStart(0, "colgroup");
|
|
2140
|
+
i0.ɵɵtemplate(1, SeleccionArticuloInformacionComponent_ng_template_2_col_1_Template, 1, 2, "col", 7);
|
|
2141
|
+
i0.ɵɵelementEnd();
|
|
2142
|
+
}
|
|
2143
|
+
if (rf & 2) {
|
|
2144
|
+
const columns_r3 = ctx.$implicit;
|
|
2145
|
+
i0.ɵɵadvance(1);
|
|
2146
|
+
i0.ɵɵproperty("ngForOf", columns_r3);
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
function SeleccionArticuloInformacionComponent_ng_template_3_th_1_Template(rf, ctx) {
|
|
2150
|
+
if (rf & 1) {
|
|
2151
|
+
i0.ɵɵelementStart(0, "th", 9);
|
|
2152
|
+
i0.ɵɵtext(1);
|
|
2153
|
+
i0.ɵɵelementEnd();
|
|
2154
|
+
}
|
|
2155
|
+
if (rf & 2) {
|
|
2156
|
+
const col_r8 = ctx.$implicit;
|
|
2157
|
+
i0.ɵɵadvance(1);
|
|
2158
|
+
i0.ɵɵtextInterpolate1(" ", col_r8.header, " ");
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
function SeleccionArticuloInformacionComponent_ng_template_3_Template(rf, ctx) {
|
|
2162
|
+
if (rf & 1) {
|
|
2163
|
+
i0.ɵɵelementStart(0, "tr");
|
|
2164
|
+
i0.ɵɵtemplate(1, SeleccionArticuloInformacionComponent_ng_template_3_th_1_Template, 2, 1, "th", 8);
|
|
2165
|
+
i0.ɵɵelementEnd();
|
|
2166
|
+
}
|
|
2167
|
+
if (rf & 2) {
|
|
2168
|
+
const columns_r6 = ctx.$implicit;
|
|
2169
|
+
i0.ɵɵadvance(1);
|
|
2170
|
+
i0.ɵɵproperty("ngForOf", columns_r6);
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
function SeleccionArticuloInformacionComponent_ng_template_4_Template(rf, ctx) {
|
|
2174
|
+
if (rf & 1) {
|
|
2175
|
+
i0.ɵɵelementStart(0, "tr")(1, "td");
|
|
2176
|
+
i0.ɵɵtext(2);
|
|
2177
|
+
i0.ɵɵelementEnd();
|
|
2178
|
+
i0.ɵɵelementStart(3, "td");
|
|
2179
|
+
i0.ɵɵtext(4);
|
|
2180
|
+
i0.ɵɵelementEnd();
|
|
2181
|
+
i0.ɵɵelementStart(5, "td");
|
|
2182
|
+
i0.ɵɵtext(6);
|
|
2183
|
+
i0.ɵɵelementEnd();
|
|
2184
|
+
i0.ɵɵelementStart(7, "td");
|
|
2185
|
+
i0.ɵɵtext(8);
|
|
2186
|
+
i0.ɵɵelementEnd();
|
|
2187
|
+
i0.ɵɵelementStart(9, "td");
|
|
2188
|
+
i0.ɵɵtext(10);
|
|
2189
|
+
i0.ɵɵelementEnd()();
|
|
2190
|
+
}
|
|
2191
|
+
if (rf & 2) {
|
|
2192
|
+
const rowData_r9 = ctx.$implicit;
|
|
2193
|
+
i0.ɵɵadvance(2);
|
|
2194
|
+
i0.ɵɵtextInterpolate(rowData_r9.almacenCodigo);
|
|
2195
|
+
i0.ɵɵadvance(2);
|
|
2196
|
+
i0.ɵɵtextInterpolate(rowData_r9.almacenDescripcion);
|
|
2197
|
+
i0.ɵɵadvance(2);
|
|
2198
|
+
i0.ɵɵtextInterpolate(rowData_r9.ubicacionCodigo);
|
|
2199
|
+
i0.ɵɵadvance(2);
|
|
2200
|
+
i0.ɵɵtextInterpolate(rowData_r9.ubicacionDescripcion);
|
|
2201
|
+
i0.ɵɵadvance(2);
|
|
2202
|
+
i0.ɵɵtextInterpolate(rowData_r9.existencia);
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
const _c0$2 = function (a0) { return { "width": a0, "min-width": "200px" }; };
|
|
2206
|
+
const _c1$1 = function () { return { width: "600px" }; };
|
|
2207
|
+
class SeleccionArticuloInformacionComponent {
|
|
2208
|
+
constructor(articuloInformacionService) {
|
|
2209
|
+
this.articuloInformacionService = articuloInformacionService;
|
|
2210
|
+
this.eventSelection = new EventEmitter();
|
|
2211
|
+
this.flagModal = true;
|
|
2212
|
+
this.size = 640;
|
|
2213
|
+
this.params = [
|
|
2214
|
+
{ param: 'offset', value: 0 },
|
|
2215
|
+
{ param: 'max', value: -1 },
|
|
2216
|
+
{ param: 'order', value: 'asc' }
|
|
2217
|
+
];
|
|
2218
|
+
this.columnsData = [
|
|
2219
|
+
{ field: 'codigo', header: 'Código Almacén', width: '90px' },
|
|
2220
|
+
{ field: 'descripcion', header: 'Descripción Almacen', width: '140px' },
|
|
2221
|
+
{ field: 'codigo', header: 'Código Ubicación', width: '90px' },
|
|
2222
|
+
{ field: 'descripcion', header: 'Descripción Ubicación', width: '140px' },
|
|
2223
|
+
{ field: 'opciones', header: 'Existencia', width: '80px' },
|
|
2224
|
+
];
|
|
2225
|
+
}
|
|
2226
|
+
ngOnInit() {
|
|
2227
|
+
this.OnLoad();
|
|
2228
|
+
}
|
|
2229
|
+
hiddenDialog() {
|
|
2230
|
+
this.eventSelection.emit({ status: false });
|
|
2231
|
+
}
|
|
2232
|
+
OnResize(event) {
|
|
2233
|
+
this.isMovil = event.target.innerWidth <= 640;
|
|
2234
|
+
}
|
|
2235
|
+
OnLoad() {
|
|
2236
|
+
this.articuloInformacionService.obtenerExistencias(this.articulo.articulo.id).subscribe((data) => {
|
|
2237
|
+
this.existenciasList = data.data;
|
|
2238
|
+
});
|
|
2239
|
+
}
|
|
2240
|
+
OnShow() {
|
|
2241
|
+
this.titulo = 'Existencias en Almacenes';
|
|
2242
|
+
}
|
|
2243
|
+
onSelectedUbicacion(ubicacionRow) {
|
|
2244
|
+
this.eventSelection.emit({ status: false, ubicacion: ubicacionRow });
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
/** @nocollapse */ SeleccionArticuloInformacionComponent.ɵfac = function SeleccionArticuloInformacionComponent_Factory(t) { return new (t || SeleccionArticuloInformacionComponent)(i0.ɵɵdirectiveInject(ArticuloInformacionService)); };
|
|
2248
|
+
/** @nocollapse */ SeleccionArticuloInformacionComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: SeleccionArticuloInformacionComponent, selectors: [["lib-seleccion-articulo-informacion"]], inputs: { showModal: "showModal", articulo: "articulo" }, outputs: { eventSelection: "eventSelection" }, decls: 8, vars: 20, consts: [[3, "header", "visible", "modal", "minY", "baseZIndex", "draggable", "blockScroll", "maximizable", "breakpoint", "onShow", "visibleChange", "onHide", "resize"], ["scrollHeight", "350px", 3, "columns", "value", "scrollable", "responsive"], ["pTemplate", "colgroup"], ["pTemplate", "header"], ["pTemplate", "body"], [1, "container-end"], ["pButton", "", "type", "button", "icon", "pi pi-replay", "label", "Cerrar", 1, "ui-button-raised", "ui-button-secondary", 3, "click"], [3, "width", 4, "ngFor", "ngForOf"], ["pResizableColumn", "", 4, "ngFor", "ngForOf"], ["pResizableColumn", ""]], template: function SeleccionArticuloInformacionComponent_Template(rf, ctx) {
|
|
2249
|
+
if (rf & 1) {
|
|
2250
|
+
i0.ɵɵelementStart(0, "p-dialog", 0);
|
|
2251
|
+
i0.ɵɵlistener("onShow", function SeleccionArticuloInformacionComponent_Template_p_dialog_onShow_0_listener() { return ctx.OnShow(); })("visibleChange", function SeleccionArticuloInformacionComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.showModal = $event; })("onHide", function SeleccionArticuloInformacionComponent_Template_p_dialog_onHide_0_listener() { return ctx.hiddenDialog(); })("resize", function SeleccionArticuloInformacionComponent_Template_p_dialog_resize_0_listener($event) { return ctx.OnResize($event); }, false, i0.ɵɵresolveWindow);
|
|
2252
|
+
i0.ɵɵelementStart(1, "p-table", 1);
|
|
2253
|
+
i0.ɵɵtemplate(2, SeleccionArticuloInformacionComponent_ng_template_2_Template, 2, 1, "ng-template", 2);
|
|
2254
|
+
i0.ɵɵtemplate(3, SeleccionArticuloInformacionComponent_ng_template_3_Template, 2, 1, "ng-template", 3);
|
|
2255
|
+
i0.ɵɵtemplate(4, SeleccionArticuloInformacionComponent_ng_template_4_Template, 11, 5, "ng-template", 4);
|
|
2256
|
+
i0.ɵɵelementEnd();
|
|
2257
|
+
i0.ɵɵelementStart(5, "p-footer")(6, "div", 5)(7, "button", 6);
|
|
2258
|
+
i0.ɵɵlistener("click", function SeleccionArticuloInformacionComponent_Template_button_click_7_listener() { return ctx.hiddenDialog(); });
|
|
2259
|
+
i0.ɵɵelementEnd()()()();
|
|
2260
|
+
}
|
|
2261
|
+
if (rf & 2) {
|
|
2262
|
+
i0.ɵɵstyleMap(i0.ɵɵpureFunction1(17, _c0$2, ctx.size + "px"));
|
|
2263
|
+
i0.ɵɵproperty("header", ctx.titulo)("visible", ctx.showModal)("modal", ctx.flagModal)("minY", 70)("baseZIndex", 10000)("draggable", false)("blockScroll", true)("maximizable", true)("breakpoint", 640);
|
|
2264
|
+
i0.ɵɵadvance(1);
|
|
2265
|
+
i0.ɵɵstyleMap(i0.ɵɵpureFunction0(19, _c1$1));
|
|
2266
|
+
i0.ɵɵproperty("columns", ctx.columnsData)("value", ctx.existenciasList)("scrollable", true)("responsive", true);
|
|
2267
|
+
}
|
|
2268
|
+
}, directives: [i4$2.Dialog, i8$1.Table, i4$1.PrimeTemplate, i8.NgForOf, i8$1.ResizableColumn, i4$1.Footer, i7.ButtonDirective], styles: [""] });
|
|
2269
|
+
(function () {
|
|
2270
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SeleccionArticuloInformacionComponent, [{
|
|
2271
|
+
type: Component,
|
|
2272
|
+
args: [{ selector: 'lib-seleccion-articulo-informacion', template: "<p-dialog (onShow)=\"OnShow()\" [header]=\"titulo\" [(visible)]=\"showModal\" [modal]=\"flagModal\" \n [style]=\"{'width': size+'px', 'min-width': '200px'}\" [minY]=\"70\"\n [baseZIndex]=\"10000\" (onHide)=\"hiddenDialog()\" [draggable]=\"false\" \n [blockScroll]=\"true\"\n\t\t (window:resize)=\"OnResize($event)\" [maximizable]=\"true\" [breakpoint]=\"640\">\n <p-table [columns]=\"columnsData\" [value]=\"existenciasList\" [scrollable]=\"true\" [style]=\"{width: '600px'}\" \n [responsive]=\"true\" \n scrollHeight=\"350px\"\n > \n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\">\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\" pResizableColumn>\n {{col.header}}\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowIndex=\"rowIndex\">\n <tr>\n <td>{{rowData.almacenCodigo}}</td>\n <td>{{rowData.almacenDescripcion}}</td> \n <td>{{rowData.ubicacionCodigo}}</td>\n <td>{{rowData.ubicacionDescripcion}}</td> \n <td>{{rowData.existencia}}</td> \n </tr>\n </ng-template>\n </p-table>\n\t \n <p-footer>\n <div class=\"container-end\">\n <button pButton type=\"button\" icon=\"pi pi-replay\" label=\"Cerrar\" class=\"ui-button-raised ui-button-secondary\" (click)=\"hiddenDialog()\"></button>\n </div>\n </p-footer>\n</p-dialog>", styles: [""] }]
|
|
2273
|
+
}], function () { return [{ type: ArticuloInformacionService }]; }, { showModal: [{
|
|
2274
|
+
type: Input
|
|
2275
|
+
}], articulo: [{
|
|
2276
|
+
type: Input
|
|
2277
|
+
}], eventSelection: [{
|
|
2278
|
+
type: Output
|
|
2279
|
+
}] });
|
|
2280
|
+
})();
|
|
2281
|
+
|
|
2282
|
+
function SeleccionaArticuloComponent_option_23_Template(rf, ctx) {
|
|
2283
|
+
if (rf & 1) {
|
|
2284
|
+
i0.ɵɵelementStart(0, "option", 22);
|
|
2285
|
+
i0.ɵɵtext(1);
|
|
2286
|
+
i0.ɵɵelementEnd();
|
|
2287
|
+
}
|
|
2288
|
+
if (rf & 2) {
|
|
2289
|
+
const almacen_r5 = ctx.$implicit;
|
|
2290
|
+
i0.ɵɵpropertyInterpolate("value", almacen_r5.id);
|
|
2291
|
+
i0.ɵɵadvance(1);
|
|
2292
|
+
i0.ɵɵtextInterpolate(almacen_r5.descripcion);
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
function SeleccionaArticuloComponent_ng_template_26_th_7_Template(rf, ctx) {
|
|
2296
|
+
if (rf & 1) {
|
|
2297
|
+
i0.ɵɵelementStart(0, "th", 31);
|
|
2298
|
+
i0.ɵɵtext(1, "existenciaSecundaria");
|
|
2299
|
+
i0.ɵɵelementEnd();
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
function SeleccionaArticuloComponent_ng_template_26_th_8_Template(rf, ctx) {
|
|
2303
|
+
if (rf & 1) {
|
|
2304
|
+
i0.ɵɵelementStart(0, "th", 25);
|
|
2305
|
+
i0.ɵɵtext(1, "Unidad");
|
|
2306
|
+
i0.ɵɵelementEnd();
|
|
2307
|
+
}
|
|
2308
|
+
}
|
|
2309
|
+
function SeleccionaArticuloComponent_ng_template_26_th_14_Template(rf, ctx) {
|
|
2310
|
+
if (rf & 1) {
|
|
2311
|
+
i0.ɵɵelementStart(0, "th", 23);
|
|
2312
|
+
i0.ɵɵtext(1, "Precio");
|
|
2313
|
+
i0.ɵɵelementEnd();
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
function SeleccionaArticuloComponent_ng_template_26_th_15_Template(rf, ctx) {
|
|
2317
|
+
if (rf & 1) {
|
|
2318
|
+
i0.ɵɵelementStart(0, "th", 23);
|
|
2319
|
+
i0.ɵɵtext(1, "Precio 2");
|
|
2320
|
+
i0.ɵɵelementEnd();
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
function SeleccionaArticuloComponent_ng_template_26_th_16_Template(rf, ctx) {
|
|
2324
|
+
if (rf & 1) {
|
|
2325
|
+
i0.ɵɵelementStart(0, "th", 23);
|
|
2326
|
+
i0.ɵɵtext(1, "Precio 3");
|
|
2327
|
+
i0.ɵɵelementEnd();
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
function SeleccionaArticuloComponent_ng_template_26_th_17_Template(rf, ctx) {
|
|
2331
|
+
if (rf & 1) {
|
|
2332
|
+
i0.ɵɵelementStart(0, "th", 23);
|
|
2333
|
+
i0.ɵɵtext(1, "Precio 4");
|
|
2334
|
+
i0.ɵɵelementEnd();
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
function SeleccionaArticuloComponent_ng_template_26_th_18_Template(rf, ctx) {
|
|
2338
|
+
if (rf & 1) {
|
|
2339
|
+
i0.ɵɵelementStart(0, "th", 23);
|
|
2340
|
+
i0.ɵɵtext(1, "Precio 5");
|
|
2341
|
+
i0.ɵɵelementEnd();
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
function SeleccionaArticuloComponent_ng_template_26_th_19_Template(rf, ctx) {
|
|
2345
|
+
if (rf & 1) {
|
|
2346
|
+
i0.ɵɵelementStart(0, "th", 25);
|
|
2347
|
+
i0.ɵɵtext(1, "Movimiento.costo");
|
|
2348
|
+
i0.ɵɵelementEnd();
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
function SeleccionaArticuloComponent_ng_template_26_th_22_Template(rf, ctx) {
|
|
2352
|
+
if (rf & 1) {
|
|
2353
|
+
i0.ɵɵelementStart(0, "th", 23);
|
|
2354
|
+
i0.ɵɵtext(1);
|
|
2355
|
+
i0.ɵɵelementEnd();
|
|
2356
|
+
}
|
|
2357
|
+
if (rf & 2) {
|
|
2358
|
+
const item_r15 = ctx.$implicit;
|
|
2359
|
+
i0.ɵɵadvance(1);
|
|
2360
|
+
i0.ɵɵtextInterpolate(item_r15.descripcion);
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
function SeleccionaArticuloComponent_ng_template_26_Template(rf, ctx) {
|
|
2364
|
+
if (rf & 1) {
|
|
2365
|
+
i0.ɵɵelementStart(0, "tr")(1, "th", 23);
|
|
2366
|
+
i0.ɵɵtext(2, "C\u00F3digo Ubicacion");
|
|
2367
|
+
i0.ɵɵelementEnd();
|
|
2368
|
+
i0.ɵɵelementStart(3, "th", 24);
|
|
2369
|
+
i0.ɵɵtext(4, "Existencia");
|
|
2370
|
+
i0.ɵɵelementEnd();
|
|
2371
|
+
i0.ɵɵelementStart(5, "th", 25);
|
|
2372
|
+
i0.ɵɵtext(6, "Unidad");
|
|
2373
|
+
i0.ɵɵelementEnd();
|
|
2374
|
+
i0.ɵɵtemplate(7, SeleccionaArticuloComponent_ng_template_26_th_7_Template, 2, 0, "th", 26);
|
|
2375
|
+
i0.ɵɵtemplate(8, SeleccionaArticuloComponent_ng_template_26_th_8_Template, 2, 0, "th", 27);
|
|
2376
|
+
i0.ɵɵelementStart(9, "th", 23);
|
|
2377
|
+
i0.ɵɵtext(10, "C\u00F3digo");
|
|
2378
|
+
i0.ɵɵelementEnd();
|
|
2379
|
+
i0.ɵɵelementStart(11, "th", 28);
|
|
2380
|
+
i0.ɵɵtext(12, "Descripcion");
|
|
2381
|
+
i0.ɵɵelementEnd();
|
|
2382
|
+
i0.ɵɵelement(13, "th", 25);
|
|
2383
|
+
i0.ɵɵtemplate(14, SeleccionaArticuloComponent_ng_template_26_th_14_Template, 2, 0, "th", 29);
|
|
2384
|
+
i0.ɵɵtemplate(15, SeleccionaArticuloComponent_ng_template_26_th_15_Template, 2, 0, "th", 29);
|
|
2385
|
+
i0.ɵɵtemplate(16, SeleccionaArticuloComponent_ng_template_26_th_16_Template, 2, 0, "th", 29);
|
|
2386
|
+
i0.ɵɵtemplate(17, SeleccionaArticuloComponent_ng_template_26_th_17_Template, 2, 0, "th", 29);
|
|
2387
|
+
i0.ɵɵtemplate(18, SeleccionaArticuloComponent_ng_template_26_th_18_Template, 2, 0, "th", 29);
|
|
2388
|
+
i0.ɵɵtemplate(19, SeleccionaArticuloComponent_ng_template_26_th_19_Template, 2, 0, "th", 27);
|
|
2389
|
+
i0.ɵɵelementStart(20, "th", 25);
|
|
2390
|
+
i0.ɵɵtext(21, "Existencia por Unidad");
|
|
2391
|
+
i0.ɵɵelementEnd();
|
|
2392
|
+
i0.ɵɵtemplate(22, SeleccionaArticuloComponent_ng_template_26_th_22_Template, 2, 1, "th", 30);
|
|
2393
|
+
i0.ɵɵelementEnd();
|
|
2394
|
+
}
|
|
2395
|
+
if (rf & 2) {
|
|
2396
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
2397
|
+
i0.ɵɵadvance(7);
|
|
2398
|
+
i0.ɵɵproperty("ngIf", ctx_r2.manejaUnidadSecundaria);
|
|
2399
|
+
i0.ɵɵadvance(1);
|
|
2400
|
+
i0.ɵɵproperty("ngIf", ctx_r2.manejaUnidadSecundaria);
|
|
2401
|
+
i0.ɵɵadvance(6);
|
|
2402
|
+
i0.ɵɵproperty("ngIf", ctx_r2.configuracion.tipoPrecio !== "costo");
|
|
2403
|
+
i0.ɵɵadvance(1);
|
|
2404
|
+
i0.ɵɵproperty("ngIf", ctx_r2.configuracion.tipoPrecio !== "costo");
|
|
2405
|
+
i0.ɵɵadvance(1);
|
|
2406
|
+
i0.ɵɵproperty("ngIf", ctx_r2.configuracion.tipoPrecio !== "costo");
|
|
2407
|
+
i0.ɵɵadvance(1);
|
|
2408
|
+
i0.ɵɵproperty("ngIf", ctx_r2.configuracion.tipoPrecio !== "costo");
|
|
2409
|
+
i0.ɵɵadvance(1);
|
|
2410
|
+
i0.ɵɵproperty("ngIf", ctx_r2.configuracion.tipoPrecio !== "costo");
|
|
2411
|
+
i0.ɵɵadvance(1);
|
|
2412
|
+
i0.ɵɵproperty("ngIf", ctx_r2.configuracion.tipoPrecio === "costo");
|
|
2413
|
+
i0.ɵɵadvance(3);
|
|
2414
|
+
i0.ɵɵproperty("ngForOf", ctx_r2.clasificadorList);
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
function SeleccionaArticuloComponent_ng_template_27_td_1_Template(rf, ctx) {
|
|
2418
|
+
if (rf & 1) {
|
|
2419
|
+
i0.ɵɵelementStart(0, "td", 23);
|
|
2420
|
+
i0.ɵɵtext(1, "Movimiento.NoAsignado");
|
|
2421
|
+
i0.ɵɵelementEnd();
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
function SeleccionaArticuloComponent_ng_template_27_td_2_Template(rf, ctx) {
|
|
2425
|
+
if (rf & 1) {
|
|
2426
|
+
i0.ɵɵelementStart(0, "td", 39);
|
|
2427
|
+
i0.ɵɵtext(1);
|
|
2428
|
+
i0.ɵɵelementEnd();
|
|
2429
|
+
}
|
|
2430
|
+
if (rf & 2) {
|
|
2431
|
+
const rowData_r16 = i0.ɵɵnextContext().$implicit;
|
|
2432
|
+
i0.ɵɵadvance(1);
|
|
2433
|
+
i0.ɵɵtextInterpolate(rowData_r16.ubicacionCodigo);
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
function SeleccionaArticuloComponent_ng_template_27_td_7_Template(rf, ctx) {
|
|
2437
|
+
if (rf & 1) {
|
|
2438
|
+
i0.ɵɵelementStart(0, "td", 44);
|
|
2439
|
+
i0.ɵɵtext(1);
|
|
2440
|
+
i0.ɵɵelementEnd();
|
|
2441
|
+
}
|
|
2442
|
+
if (rf & 2) {
|
|
2443
|
+
const rowData_r16 = i0.ɵɵnextContext().$implicit;
|
|
2444
|
+
i0.ɵɵadvance(1);
|
|
2445
|
+
i0.ɵɵtextInterpolate(rowData_r16.existenciaSecundaria);
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
function SeleccionaArticuloComponent_ng_template_27_td_8_Template(rf, ctx) {
|
|
2449
|
+
if (rf & 1) {
|
|
2450
|
+
i0.ɵɵelementStart(0, "td", 36);
|
|
2451
|
+
i0.ɵɵtext(1);
|
|
2452
|
+
i0.ɵɵelementEnd();
|
|
2453
|
+
}
|
|
2454
|
+
if (rf & 2) {
|
|
2455
|
+
const rowData_r16 = i0.ɵɵnextContext().$implicit;
|
|
2456
|
+
i0.ɵɵadvance(1);
|
|
2457
|
+
i0.ɵɵtextInterpolate(rowData_r16.unidadSecundariaCodigo);
|
|
2458
|
+
}
|
|
2459
|
+
}
|
|
2460
|
+
function SeleccionaArticuloComponent_ng_template_27_td_15_Template(rf, ctx) {
|
|
2461
|
+
if (rf & 1) {
|
|
2462
|
+
i0.ɵɵelementStart(0, "td", 39);
|
|
2463
|
+
i0.ɵɵtext(1);
|
|
2464
|
+
i0.ɵɵpipe(2, "currency");
|
|
2465
|
+
i0.ɵɵelementEnd();
|
|
2466
|
+
}
|
|
2467
|
+
if (rf & 2) {
|
|
2468
|
+
const rowData_r16 = i0.ɵɵnextContext().$implicit;
|
|
2469
|
+
i0.ɵɵadvance(1);
|
|
2470
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(2, 1, rowData_r16.precioConImpuestos), " ");
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
function SeleccionaArticuloComponent_ng_template_27_td_16_Template(rf, ctx) {
|
|
2474
|
+
if (rf & 1) {
|
|
2475
|
+
i0.ɵɵelementStart(0, "td", 39);
|
|
2476
|
+
i0.ɵɵtext(1);
|
|
2477
|
+
i0.ɵɵpipe(2, "currency");
|
|
2478
|
+
i0.ɵɵelementEnd();
|
|
2479
|
+
}
|
|
2480
|
+
if (rf & 2) {
|
|
2481
|
+
const rowData_r16 = i0.ɵɵnextContext().$implicit;
|
|
2482
|
+
i0.ɵɵadvance(1);
|
|
2483
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, rowData_r16.precio2ConImpuestos));
|
|
2484
|
+
}
|
|
2485
|
+
}
|
|
2486
|
+
function SeleccionaArticuloComponent_ng_template_27_td_17_Template(rf, ctx) {
|
|
2487
|
+
if (rf & 1) {
|
|
2488
|
+
i0.ɵɵelementStart(0, "td", 39);
|
|
2489
|
+
i0.ɵɵtext(1);
|
|
2490
|
+
i0.ɵɵpipe(2, "currency");
|
|
2491
|
+
i0.ɵɵelementEnd();
|
|
2492
|
+
}
|
|
2493
|
+
if (rf & 2) {
|
|
2494
|
+
const rowData_r16 = i0.ɵɵnextContext().$implicit;
|
|
2495
|
+
i0.ɵɵadvance(1);
|
|
2496
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, rowData_r16.precio3ConImpuestos));
|
|
2497
|
+
}
|
|
2498
|
+
}
|
|
2499
|
+
function SeleccionaArticuloComponent_ng_template_27_td_18_Template(rf, ctx) {
|
|
2500
|
+
if (rf & 1) {
|
|
2501
|
+
i0.ɵɵelementStart(0, "td", 39);
|
|
2502
|
+
i0.ɵɵtext(1);
|
|
2503
|
+
i0.ɵɵpipe(2, "currency");
|
|
2504
|
+
i0.ɵɵelementEnd();
|
|
2505
|
+
}
|
|
2506
|
+
if (rf & 2) {
|
|
2507
|
+
const rowData_r16 = i0.ɵɵnextContext().$implicit;
|
|
2508
|
+
i0.ɵɵadvance(1);
|
|
2509
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, rowData_r16.precio4ConImpuestos));
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
function SeleccionaArticuloComponent_ng_template_27_td_19_Template(rf, ctx) {
|
|
2513
|
+
if (rf & 1) {
|
|
2514
|
+
i0.ɵɵelementStart(0, "td", 39);
|
|
2515
|
+
i0.ɵɵtext(1);
|
|
2516
|
+
i0.ɵɵpipe(2, "currency");
|
|
2517
|
+
i0.ɵɵelementEnd();
|
|
2518
|
+
}
|
|
2519
|
+
if (rf & 2) {
|
|
2520
|
+
const rowData_r16 = i0.ɵɵnextContext().$implicit;
|
|
2521
|
+
i0.ɵɵadvance(1);
|
|
2522
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, rowData_r16.precio5ConImpuestos));
|
|
2523
|
+
}
|
|
2524
|
+
}
|
|
2525
|
+
function SeleccionaArticuloComponent_ng_template_27_td_20_Template(rf, ctx) {
|
|
2526
|
+
if (rf & 1) {
|
|
2527
|
+
i0.ɵɵelementStart(0, "td", 36);
|
|
2528
|
+
i0.ɵɵtext(1);
|
|
2529
|
+
i0.ɵɵpipe(2, "currency");
|
|
2530
|
+
i0.ɵɵelementEnd();
|
|
2531
|
+
}
|
|
2532
|
+
if (rf & 2) {
|
|
2533
|
+
const rowData_r16 = i0.ɵɵnextContext().$implicit;
|
|
2534
|
+
i0.ɵɵadvance(1);
|
|
2535
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, rowData_r16.precio));
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
function SeleccionaArticuloComponent_ng_template_27_div_22_Template(rf, ctx) {
|
|
2539
|
+
if (rf & 1) {
|
|
2540
|
+
i0.ɵɵelementStart(0, "div", 45)(1, "div", 46)(2, "label", 47);
|
|
2541
|
+
i0.ɵɵtext(3);
|
|
2542
|
+
i0.ɵɵelementEnd()();
|
|
2543
|
+
i0.ɵɵelementStart(4, "div", 46)(5, "label", 47);
|
|
2544
|
+
i0.ɵɵtext(6);
|
|
2545
|
+
i0.ɵɵpipe(7, "number");
|
|
2546
|
+
i0.ɵɵelementEnd()()();
|
|
2547
|
+
}
|
|
2548
|
+
if (rf & 2) {
|
|
2549
|
+
const item_r39 = ctx.$implicit;
|
|
2550
|
+
i0.ɵɵadvance(3);
|
|
2551
|
+
i0.ɵɵtextInterpolate(item_r39.unidad_codigo);
|
|
2552
|
+
i0.ɵɵadvance(3);
|
|
2553
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(7, 2, item_r39.unidad_existencia, "1.2-2"));
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
function SeleccionaArticuloComponent_ng_template_27_td_23_Template(rf, ctx) {
|
|
2557
|
+
if (rf & 1) {
|
|
2558
|
+
i0.ɵɵelementStart(0, "td", 39);
|
|
2559
|
+
i0.ɵɵtext(1);
|
|
2560
|
+
i0.ɵɵelementEnd();
|
|
2561
|
+
}
|
|
2562
|
+
if (rf & 2) {
|
|
2563
|
+
const itemData_r40 = ctx.$implicit;
|
|
2564
|
+
i0.ɵɵadvance(1);
|
|
2565
|
+
i0.ɵɵtextInterpolate(itemData_r40.valor);
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
function SeleccionaArticuloComponent_ng_template_27_Template(rf, ctx) {
|
|
2569
|
+
if (rf & 1) {
|
|
2570
|
+
const _r42 = i0.ɵɵgetCurrentView();
|
|
2571
|
+
i0.ɵɵelementStart(0, "tr", 32);
|
|
2572
|
+
i0.ɵɵtemplate(1, SeleccionaArticuloComponent_ng_template_27_td_1_Template, 2, 0, "td", 33);
|
|
2573
|
+
i0.ɵɵtemplate(2, SeleccionaArticuloComponent_ng_template_27_td_2_Template, 2, 1, "td", 34);
|
|
2574
|
+
i0.ɵɵelementStart(3, "td", 35);
|
|
2575
|
+
i0.ɵɵtext(4);
|
|
2576
|
+
i0.ɵɵelementEnd();
|
|
2577
|
+
i0.ɵɵelementStart(5, "td", 36);
|
|
2578
|
+
i0.ɵɵtext(6);
|
|
2579
|
+
i0.ɵɵelementEnd();
|
|
2580
|
+
i0.ɵɵtemplate(7, SeleccionaArticuloComponent_ng_template_27_td_7_Template, 2, 1, "td", 37);
|
|
2581
|
+
i0.ɵɵtemplate(8, SeleccionaArticuloComponent_ng_template_27_td_8_Template, 2, 1, "td", 38);
|
|
2582
|
+
i0.ɵɵelementStart(9, "td", 39);
|
|
2583
|
+
i0.ɵɵtext(10);
|
|
2584
|
+
i0.ɵɵelementEnd();
|
|
2585
|
+
i0.ɵɵelementStart(11, "td", 40);
|
|
2586
|
+
i0.ɵɵtext(12);
|
|
2587
|
+
i0.ɵɵelementEnd();
|
|
2588
|
+
i0.ɵɵelementStart(13, "td", 36)(14, "button", 41);
|
|
2589
|
+
i0.ɵɵlistener("click", function SeleccionaArticuloComponent_ng_template_27_Template_button_click_14_listener() { const restoredCtx = i0.ɵɵrestoreView(_r42); const rowData_r16 = restoredCtx.$implicit; const ctx_r41 = i0.ɵɵnextContext(); return ctx_r41.onShowInformacion(rowData_r16); });
|
|
2590
|
+
i0.ɵɵelementEnd()();
|
|
2591
|
+
i0.ɵɵtemplate(15, SeleccionaArticuloComponent_ng_template_27_td_15_Template, 3, 3, "td", 34);
|
|
2592
|
+
i0.ɵɵtemplate(16, SeleccionaArticuloComponent_ng_template_27_td_16_Template, 3, 3, "td", 34);
|
|
2593
|
+
i0.ɵɵtemplate(17, SeleccionaArticuloComponent_ng_template_27_td_17_Template, 3, 3, "td", 34);
|
|
2594
|
+
i0.ɵɵtemplate(18, SeleccionaArticuloComponent_ng_template_27_td_18_Template, 3, 3, "td", 34);
|
|
2595
|
+
i0.ɵɵtemplate(19, SeleccionaArticuloComponent_ng_template_27_td_19_Template, 3, 3, "td", 34);
|
|
2596
|
+
i0.ɵɵtemplate(20, SeleccionaArticuloComponent_ng_template_27_td_20_Template, 3, 3, "td", 38);
|
|
2597
|
+
i0.ɵɵelementStart(21, "td", 36);
|
|
2598
|
+
i0.ɵɵtemplate(22, SeleccionaArticuloComponent_ng_template_27_div_22_Template, 8, 5, "div", 42);
|
|
2599
|
+
i0.ɵɵelementEnd();
|
|
2600
|
+
i0.ɵɵtemplate(23, SeleccionaArticuloComponent_ng_template_27_td_23_Template, 2, 1, "td", 43);
|
|
2601
|
+
i0.ɵɵelementEnd();
|
|
2602
|
+
}
|
|
2603
|
+
if (rf & 2) {
|
|
2604
|
+
const rowData_r16 = ctx.$implicit;
|
|
2605
|
+
const ctx_r3 = i0.ɵɵnextContext();
|
|
2606
|
+
i0.ɵɵproperty("pSelectableRow", rowData_r16);
|
|
2607
|
+
i0.ɵɵadvance(1);
|
|
2608
|
+
i0.ɵɵproperty("ngIf", !rowData_r16.ubicacionCodigo);
|
|
2609
|
+
i0.ɵɵadvance(1);
|
|
2610
|
+
i0.ɵɵproperty("ngIf", rowData_r16.ubicacionCodigo);
|
|
2611
|
+
i0.ɵɵadvance(2);
|
|
2612
|
+
i0.ɵɵtextInterpolate(rowData_r16.existencia);
|
|
2613
|
+
i0.ɵɵadvance(2);
|
|
2614
|
+
i0.ɵɵtextInterpolate(rowData_r16.unidadCodigo);
|
|
2615
|
+
i0.ɵɵadvance(1);
|
|
2616
|
+
i0.ɵɵproperty("ngIf", ctx_r3.manejaUnidadSecundaria);
|
|
2617
|
+
i0.ɵɵadvance(1);
|
|
2618
|
+
i0.ɵɵproperty("ngIf", ctx_r3.manejaUnidadSecundaria);
|
|
2619
|
+
i0.ɵɵadvance(2);
|
|
2620
|
+
i0.ɵɵtextInterpolate(rowData_r16.articulo.codigo);
|
|
2621
|
+
i0.ɵɵadvance(2);
|
|
2622
|
+
i0.ɵɵtextInterpolate(rowData_r16.articulo.descripcion);
|
|
2623
|
+
i0.ɵɵadvance(3);
|
|
2624
|
+
i0.ɵɵproperty("ngIf", ctx_r3.configuracion.tipoPrecio !== "costo");
|
|
2625
|
+
i0.ɵɵadvance(1);
|
|
2626
|
+
i0.ɵɵproperty("ngIf", ctx_r3.configuracion.tipoPrecio !== "costo");
|
|
2627
|
+
i0.ɵɵadvance(1);
|
|
2628
|
+
i0.ɵɵproperty("ngIf", ctx_r3.configuracion.tipoPrecio !== "costo");
|
|
2629
|
+
i0.ɵɵadvance(1);
|
|
2630
|
+
i0.ɵɵproperty("ngIf", ctx_r3.configuracion.tipoPrecio !== "costo");
|
|
2631
|
+
i0.ɵɵadvance(1);
|
|
2632
|
+
i0.ɵɵproperty("ngIf", ctx_r3.configuracion.tipoPrecio !== "costo");
|
|
2633
|
+
i0.ɵɵadvance(1);
|
|
2634
|
+
i0.ɵɵproperty("ngIf", ctx_r3.configuracion.tipoPrecio === "costo");
|
|
2635
|
+
i0.ɵɵadvance(2);
|
|
2636
|
+
i0.ɵɵproperty("ngForOf", rowData_r16.existenciaUnidades);
|
|
2637
|
+
i0.ɵɵadvance(1);
|
|
2638
|
+
i0.ɵɵproperty("ngForOf", rowData_r16.articuloClasificadorList);
|
|
2639
|
+
}
|
|
2640
|
+
}
|
|
2641
|
+
function SeleccionaArticuloComponent_lib_seleccion_articulo_informacion_29_Template(rf, ctx) {
|
|
2642
|
+
if (rf & 1) {
|
|
2643
|
+
const _r44 = i0.ɵɵgetCurrentView();
|
|
2644
|
+
i0.ɵɵelementStart(0, "lib-seleccion-articulo-informacion", 48);
|
|
2645
|
+
i0.ɵɵlistener("eventSelection", function SeleccionaArticuloComponent_lib_seleccion_articulo_informacion_29_Template_lib_seleccion_articulo_informacion_eventSelection_0_listener($event) { i0.ɵɵrestoreView(_r44); const ctx_r43 = i0.ɵɵnextContext(); return ctx_r43.onEventInformacion($event); });
|
|
2646
|
+
i0.ɵɵelementEnd();
|
|
2647
|
+
}
|
|
2648
|
+
if (rf & 2) {
|
|
2649
|
+
const ctx_r4 = i0.ɵɵnextContext();
|
|
2650
|
+
i0.ɵɵproperty("showModal", ctx_r4.showModalInformacion)("articulo", ctx_r4.articuloSelected);
|
|
2651
|
+
}
|
|
2652
|
+
}
|
|
2653
|
+
const _c0$1 = function (a0) { return { "width": a0, "min-width": "200px" }; };
|
|
2654
|
+
const _c1 = function () { return [10, 25, 50, 100, 500]; };
|
|
2655
|
+
class SeleccionaArticuloComponent {
|
|
2656
|
+
constructor(_stockService, _paginateService, _almacenService) {
|
|
2657
|
+
this._stockService = _stockService;
|
|
2658
|
+
this._paginateService = _paginateService;
|
|
2659
|
+
this._almacenService = _almacenService;
|
|
2660
|
+
this.manejaUnidadSecundaria = false;
|
|
2661
|
+
this.emitFilaSeleccionada = new EventEmitter();
|
|
2662
|
+
this.emitShowArticulos = new EventEmitter();
|
|
2663
|
+
this.articulosList = [];
|
|
2664
|
+
this.ordenar = [];
|
|
2665
|
+
this.busquedaArticulos = {
|
|
2666
|
+
tipoBusqueda: ''
|
|
2667
|
+
};
|
|
2668
|
+
this.showModal = false;
|
|
2669
|
+
this.showModalInformacion = false;
|
|
2670
|
+
this.showFirstTime = true;
|
|
2671
|
+
this.clasificadorList = [];
|
|
2672
|
+
this.size = 640;
|
|
2673
|
+
}
|
|
2674
|
+
ngOnInit() {
|
|
2675
|
+
this.page = this._paginateService.getPage();
|
|
2676
|
+
this.ordenar = this._paginateService.getOrden([
|
|
2677
|
+
{ param: 'nombre', label: 'estatus' }
|
|
2678
|
+
], 'es');
|
|
2679
|
+
this.showFirstTime = true;
|
|
2680
|
+
this._almacenService.getAll(this.configuracion.params).subscribe((data) => {
|
|
2681
|
+
this.almacenList = data.data;
|
|
2682
|
+
});
|
|
2683
|
+
this.busquedaArticulos.tipoBusqueda = 'CD';
|
|
2684
|
+
//tempthis.obtenerExistenciaArticulosShow();
|
|
2685
|
+
}
|
|
2686
|
+
pagina(e) {
|
|
2687
|
+
this.page.rows = e.rows;
|
|
2688
|
+
this.page.offset = e.first;
|
|
2689
|
+
this.obtenerExistenciaArticulos();
|
|
2690
|
+
}
|
|
2691
|
+
obtenerExistenciaArticulosShow() {
|
|
2692
|
+
this.busquedaArticulos.tipoBusqueda = 'CD';
|
|
2693
|
+
if (this.showFirstTime) {
|
|
2694
|
+
this.obtenerExistenciaArticulos();
|
|
2695
|
+
this.showFirstTime = false;
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
obtenerExistenciaArticulos() {
|
|
2699
|
+
this.busquedaArticulos.params = this._paginateService.getParams(this.page);
|
|
2700
|
+
const parametros = {
|
|
2701
|
+
almacen: (this.configuracion.noOcupaAlamacen ? null : this.movimiento.almacen),
|
|
2702
|
+
tipoPrecio: this.configuracion.tipoPrecio,
|
|
2703
|
+
busquedaArticulos: this.busquedaArticulos,
|
|
2704
|
+
tipoArticulo: this.configuracion.tipoArticulo ? this.configuracion.tipoArticulo : null,
|
|
2705
|
+
numeroPrecioDefault: this.configuracion.numeroPrecioDefault
|
|
2706
|
+
};
|
|
2707
|
+
this._stockService.obtenerExistenciasArticulosDescripcion(parametros, this.busquedaArticulos.params).then((data) => {
|
|
2708
|
+
this.articulosList = data.articulosDescripcion;
|
|
2709
|
+
this.page.total = data.total;
|
|
2710
|
+
if (data.clasificadores) {
|
|
2711
|
+
this.clasificadorList = data.clasificadores;
|
|
2712
|
+
}
|
|
2713
|
+
if (!this.showModal) {
|
|
2714
|
+
this.showModal = true;
|
|
2715
|
+
}
|
|
2716
|
+
}).catch(e => {
|
|
2717
|
+
this.articulosList = [];
|
|
2718
|
+
});
|
|
2719
|
+
}
|
|
2720
|
+
obtenerExistenciaArticulosVal() {
|
|
2721
|
+
if (this.busquedaArticulos.tipoBusqueda != '' && !this.busquedaArticulos.key)
|
|
2722
|
+
return false;
|
|
2723
|
+
this.obtenerExistenciaArticulos();
|
|
2724
|
+
}
|
|
2725
|
+
obtenerExistenciaArticulosKey($event) {
|
|
2726
|
+
if ($event.key === 'Enter')
|
|
2727
|
+
this.obtenerExistenciaArticulos();
|
|
2728
|
+
}
|
|
2729
|
+
filaSeleccionada($event) {
|
|
2730
|
+
this.emitFilaSeleccionada.emit($event);
|
|
2731
|
+
}
|
|
2732
|
+
emitirShowArticulos() {
|
|
2733
|
+
this.emitShowArticulos.emit(0);
|
|
2734
|
+
}
|
|
2735
|
+
seriesArticulo(series) {
|
|
2736
|
+
console.log(series);
|
|
2737
|
+
}
|
|
2738
|
+
onShowInformacion(eventArticulo) {
|
|
2739
|
+
this.articuloSelected = eventArticulo;
|
|
2740
|
+
this.showModalInformacion = true;
|
|
2741
|
+
}
|
|
2742
|
+
onEventInformacion(event) {
|
|
2743
|
+
this.showModalInformacion = event.status;
|
|
2744
|
+
}
|
|
2745
|
+
}
|
|
2746
|
+
/** @nocollapse */ SeleccionaArticuloComponent.ɵfac = function SeleccionaArticuloComponent_Factory(t) { return new (t || SeleccionaArticuloComponent)(i0.ɵɵdirectiveInject(StockService), i0.ɵɵdirectiveInject(PaginateService), i0.ɵɵdirectiveInject(AlmacenService)); };
|
|
2747
|
+
/** @nocollapse */ SeleccionaArticuloComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: SeleccionaArticuloComponent, selectors: [["app-selecciona-articulo"]], inputs: { configuracion: "configuracion", showArticulos: "showArticulos", movimiento: "movimiento", manejaUnidadSecundaria: "manejaUnidadSecundaria" }, outputs: { emitFilaSeleccionada: "emitFilaSeleccionada", emitShowArticulos: "emitShowArticulos" }, decls: 30, vars: 25, consts: [[3, "header", "visible", "maximizable", "baseZIndex", "blockScroll", "minY", "visibleChange", "onShow", "onHide"], [1, "grid", "grid-fluid"], [1, "col-12", "md:col-6", "lg:col-6"], [2, "display", "flex"], [2, "width", "115px"], ["pInputText", "", 3, "ngModel", "ngModelChange", "change"], ["value", "C"], ["value", "D"], ["value", "CD"], ["value", "CI"], ["type", "text", "pInputText", "", "id", "key", 2, "width", "200px", 3, "ngModel", "ngModelChange", "keypress"], ["pButton", "", "type", "button", "icon", "pi pi-search", "styleClass", "p-button-secondary", 3, "click"], [2, "width", "100px"], ["for", "almacen"], ["pInputText", "", "disabled", "", "id", "almacen", 2, "width", "200px", 3, "ngModel", "ngModelChange", "change"], [3, "value", 4, "ngFor", "ngForOf"], ["scrollHeight", "400px", "selectionMode", "single", 3, "value", "scrollable", "responsive", "onRowSelect"], ["dt", ""], ["pTemplate", "header"], ["pTemplate", "body"], [3, "rows", "totalRecords", "pageLinkSize", "rowsPerPageOptions", "onPageChange"], [3, "showModal", "articulo", "eventSelection", 4, "ngIf"], [3, "value"], ["translate", "", 2, "width", "80px"], ["translate", "", 2, "width", "70px"], ["translate", "", 2, "width", "40px"], ["style", "width: 50px", "translate", "", 4, "ngIf"], ["style", "width: 40px", "translate", "", 4, "ngIf"], ["translate", "", 2, "width", "120px"], ["style", "width: 80px", "translate", "", 4, "ngIf"], ["style", "width: 80px", "translate", "", 4, "ngFor", "ngForOf"], ["translate", "", 2, "width", "50px"], [3, "pSelectableRow"], ["style", "width: 80px;", "translate", "", 4, "ngIf"], ["style", "width: 80px;", 4, "ngIf"], [2, "width", "70px"], [2, "width", "40px"], ["style", "width: 50px;", 4, "ngIf"], ["style", "width: 40px;", 4, "ngIf"], [2, "width", "80px"], [2, "width", "120px"], ["pButton", "", "type", "button", "icon", "pi pi-eye", 1, "ui-button-raised", "ui-button-primary", 3, "click"], ["class", "row justify-content-between", 4, "ngFor", "ngForOf"], ["style", "width: 80px;", 4, "ngFor", "ngForOf"], [2, "width", "50px"], [1, "row", "justify-content-between"], [1, "col-lg-4"], ["for", ""], [3, "showModal", "articulo", "eventSelection"]], template: function SeleccionaArticuloComponent_Template(rf, ctx) {
|
|
2748
|
+
if (rf & 1) {
|
|
2749
|
+
i0.ɵɵelementStart(0, "p-dialog", 0);
|
|
2750
|
+
i0.ɵɵlistener("visibleChange", function SeleccionaArticuloComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.showArticulos = $event; })("onShow", function SeleccionaArticuloComponent_Template_p_dialog_onShow_0_listener() { return ctx.obtenerExistenciaArticulosShow(); })("onHide", function SeleccionaArticuloComponent_Template_p_dialog_onHide_0_listener() { ctx.busquedaArticulos = { tipoBusqueda: "" }; return ctx.emitirShowArticulos(); });
|
|
2751
|
+
i0.ɵɵpipe(1, "translate");
|
|
2752
|
+
i0.ɵɵelementStart(2, "div", 1)(3, "div", 2)(4, "div", 3)(5, "div", 4)(6, "select", 5);
|
|
2753
|
+
i0.ɵɵlistener("ngModelChange", function SeleccionaArticuloComponent_Template_select_ngModelChange_6_listener($event) { return ctx.busquedaArticulos.tipoBusqueda = $event; })("change", function SeleccionaArticuloComponent_Template_select_change_6_listener() { return ctx.obtenerExistenciaArticulosVal(); });
|
|
2754
|
+
i0.ɵɵelementStart(7, "option", 6);
|
|
2755
|
+
i0.ɵɵtext(8, "Codigo");
|
|
2756
|
+
i0.ɵɵelementEnd();
|
|
2757
|
+
i0.ɵɵelementStart(9, "option", 7);
|
|
2758
|
+
i0.ɵɵtext(10, "Descripcion");
|
|
2759
|
+
i0.ɵɵelementEnd();
|
|
2760
|
+
i0.ɵɵelementStart(11, "option", 8);
|
|
2761
|
+
i0.ɵɵtext(12, "Coincidencia");
|
|
2762
|
+
i0.ɵɵelementEnd();
|
|
2763
|
+
i0.ɵɵelementStart(13, "option", 9);
|
|
2764
|
+
i0.ɵɵtext(14, "Igual a");
|
|
2765
|
+
i0.ɵɵelementEnd()()();
|
|
2766
|
+
i0.ɵɵelementStart(15, "input", 10);
|
|
2767
|
+
i0.ɵɵlistener("ngModelChange", function SeleccionaArticuloComponent_Template_input_ngModelChange_15_listener($event) { return ctx.busquedaArticulos.key = $event; })("keypress", function SeleccionaArticuloComponent_Template_input_keypress_15_listener($event) { return ctx.obtenerExistenciaArticulosKey($event); });
|
|
2768
|
+
i0.ɵɵelementEnd();
|
|
2769
|
+
i0.ɵɵelementStart(16, "button", 11);
|
|
2770
|
+
i0.ɵɵlistener("click", function SeleccionaArticuloComponent_Template_button_click_16_listener() { return ctx.obtenerExistenciaArticulos(); });
|
|
2771
|
+
i0.ɵɵelementEnd()()();
|
|
2772
|
+
i0.ɵɵelementStart(17, "div", 2)(18, "div", 3)(19, "div", 12)(20, "label", 13);
|
|
2773
|
+
i0.ɵɵtext(21, "Almacen:");
|
|
2774
|
+
i0.ɵɵelementEnd()();
|
|
2775
|
+
i0.ɵɵelementStart(22, "select", 14);
|
|
2776
|
+
i0.ɵɵlistener("ngModelChange", function SeleccionaArticuloComponent_Template_select_ngModelChange_22_listener($event) { return ctx.movimiento.almacen = $event; })("change", function SeleccionaArticuloComponent_Template_select_change_22_listener() { return ctx.obtenerExistenciaArticulosVal(); });
|
|
2777
|
+
i0.ɵɵtemplate(23, SeleccionaArticuloComponent_option_23_Template, 2, 2, "option", 15);
|
|
2778
|
+
i0.ɵɵelementEnd()()()();
|
|
2779
|
+
i0.ɵɵelementStart(24, "p-table", 16, 17);
|
|
2780
|
+
i0.ɵɵlistener("onRowSelect", function SeleccionaArticuloComponent_Template_p_table_onRowSelect_24_listener($event) { return ctx.filaSeleccionada($event); });
|
|
2781
|
+
i0.ɵɵtemplate(26, SeleccionaArticuloComponent_ng_template_26_Template, 23, 9, "ng-template", 18);
|
|
2782
|
+
i0.ɵɵtemplate(27, SeleccionaArticuloComponent_ng_template_27_Template, 24, 17, "ng-template", 19);
|
|
2783
|
+
i0.ɵɵelementEnd();
|
|
2784
|
+
i0.ɵɵelementStart(28, "p-paginator", 20);
|
|
2785
|
+
i0.ɵɵlistener("onPageChange", function SeleccionaArticuloComponent_Template_p_paginator_onPageChange_28_listener($event) { return ctx.pagina($event); });
|
|
2786
|
+
i0.ɵɵelementEnd()();
|
|
2787
|
+
i0.ɵɵtemplate(29, SeleccionaArticuloComponent_lib_seleccion_articulo_informacion_29_Template, 1, 2, "lib-seleccion-articulo-informacion", 21);
|
|
2788
|
+
}
|
|
2789
|
+
if (rf & 2) {
|
|
2790
|
+
i0.ɵɵstyleMap(i0.ɵɵpureFunction1(22, _c0$1, ctx.size + "px"));
|
|
2791
|
+
i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(1, 20, "Articulos"));
|
|
2792
|
+
i0.ɵɵproperty("visible", ctx.showArticulos)("maximizable", true)("baseZIndex", 10000)("blockScroll", true)("minY", 70);
|
|
2793
|
+
i0.ɵɵadvance(6);
|
|
2794
|
+
i0.ɵɵproperty("ngModel", ctx.busquedaArticulos.tipoBusqueda);
|
|
2795
|
+
i0.ɵɵadvance(9);
|
|
2796
|
+
i0.ɵɵproperty("ngModel", ctx.busquedaArticulos.key);
|
|
2797
|
+
i0.ɵɵadvance(7);
|
|
2798
|
+
i0.ɵɵproperty("ngModel", ctx.movimiento.almacen);
|
|
2799
|
+
i0.ɵɵadvance(1);
|
|
2800
|
+
i0.ɵɵproperty("ngForOf", ctx.almacenList);
|
|
2801
|
+
i0.ɵɵadvance(1);
|
|
2802
|
+
i0.ɵɵproperty("value", ctx.articulosList)("scrollable", true)("responsive", true);
|
|
2803
|
+
i0.ɵɵadvance(4);
|
|
2804
|
+
i0.ɵɵproperty("rows", ctx.page.rows)("totalRecords", ctx.page.total)("pageLinkSize", 5)("rowsPerPageOptions", i0.ɵɵpureFunction0(24, _c1));
|
|
2805
|
+
i0.ɵɵadvance(1);
|
|
2806
|
+
i0.ɵɵproperty("ngIf", ctx.showModalInformacion);
|
|
2807
|
+
}
|
|
2808
|
+
}, directives: [i4$2.Dialog, i5.SelectControlValueAccessor, i6.InputText, i5.NgControlStatus, i5.NgModel, i5.NgSelectOption, i5.ɵNgSelectMultipleOption, i5.DefaultValueAccessor, i7.ButtonDirective, i8.NgForOf, i8$1.Table, i4$1.PrimeTemplate, i3.TranslateDirective, i8.NgIf, i8$1.SelectableRow, i10.Paginator, SeleccionArticuloInformacionComponent], pipes: [i3.TranslatePipe, i8.CurrencyPipe, i8.DecimalPipe], styles: ["tr[_ngcontent-%COMP%]:hover{background-color:#34a835!important;color:#fff!important}table[_ngcontent-%COMP%]{position:absolute}"] });
|
|
2809
|
+
(function () {
|
|
2810
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SeleccionaArticuloComponent, [{
|
|
2811
|
+
type: Component,
|
|
2812
|
+
args: [{ selector: 'app-selecciona-articulo', template: "<!--inicia seleccion de articulos-->\n<!-- (onShow)=\"obtenerExistenciaArticulosShow()\" -->\n<!--\n <div class=\"col-12 col-center\" >-->\n<p-dialog header=\"{{ 'Articulos' | translate }}\" [(visible)]=\"showArticulos\" [maximizable]=\"true\"\n (onShow)=\"obtenerExistenciaArticulosShow()\" (onHide)=\"busquedaArticulos = { tipoBusqueda : ''}; emitirShowArticulos()\"\n [baseZIndex]=\"10000\" [blockScroll]=\"true\" [style]=\"{'width': size+'px', 'min-width': '200px'}\" [minY]=\"70\">\n <div class=\"grid grid-fluid\">\n <div class=\"col-12 md:col-6 lg:col-6\">\n <div style=\"display: flex;\">\n <div style=\"width: 115px;\">\n <select pInputText [(ngModel)]=\"busquedaArticulos.tipoBusqueda\" (change)=\"obtenerExistenciaArticulosVal()\">\n <option value=\"C\">Codigo</option>\n <option value=\"D\">Descripcion</option>\n <option value=\"CD\">Coincidencia</option>\n <option value=\"CI\">Igual a</option>\n </select>\n </div>\n <input type=\"text\" style=\"width: 200px;\" pInputText [(ngModel)]=\"busquedaArticulos.key\"\n (keypress)=\"obtenerExistenciaArticulosKey( $event )\" id=\"key\">\n <button pButton type=\"button\" icon=\"pi pi-search\" styleClass=\"p-button-secondary\"\n (click)=\"obtenerExistenciaArticulos( )\"></button>\n </div>\n </div>\n <div class=\"col-12 md:col-6 lg:col-6\">\n <div style=\"display: flex;\">\n <div style=\"width: 100px;\">\n <label for=\"almacen\">Almacen:</label>\n </div>\n <select pInputText style=\"width: 200px;\" [(ngModel)]=\"movimiento.almacen\" disabled id=\"almacen\"\n (change)=\"obtenerExistenciaArticulosVal()\">\n <option *ngFor=\"let almacen of almacenList\" value=\"{{ almacen.id }}\">{{almacen.descripcion}}</option>\n </select>\n </div>\n\n </div>\n </div>\n\n <!--\n <div id=\"table-wrapper\">\n <div id=\"table-scroll\">-->\n <!-- new table\n <p-table #dt [columns]=\"colsDD\" [value]=\"listDD\" [scrollable]=\"true\" \n [style]=\"{width: '100%'} \" [scrollHeight]=\"maxH + 'px'\" \n [resizableColumns]=\"true\" [(selection)]=\"selectedXML\" (onRowSelect)=\"onRowSelect($event)\" dataKey=\"uuid\">\n\n \n -->\n\n <p-table [value]=\"articulosList\" [scrollable]=\"true\" #dt scrollHeight=\"400px\" [responsive]=\"true\"\n selectionMode=\"single\" (onRowSelect)=\"filaSeleccionada($event)\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th style=\"width: 80px\" translate>C\u00F3digo Ubicacion</th>\n <th style=\"width: 70px\" translate>Existencia</th>\n <th style=\"width: 40px\" translate>Unidad</th>\n <th style=\"width: 50px\" *ngIf=\"manejaUnidadSecundaria\" translate>existenciaSecundaria</th>\n <th style=\"width: 40px\" *ngIf=\"manejaUnidadSecundaria\" translate>Unidad</th>\n <th style=\"width: 80px\" translate>C\u00F3digo</th>\n <th style=\"width: 120px\" translate>Descripcion</th>\n <th style=\"width: 40px\" translate></th>\n <th style=\"width: 80px\" *ngIf=\"configuracion.tipoPrecio !== 'costo' \" translate>Precio</th>\n <th style=\"width: 80px\" *ngIf=\"configuracion.tipoPrecio !== 'costo' \" translate>Precio 2</th>\n <th style=\"width: 80px\" *ngIf=\"configuracion.tipoPrecio !== 'costo' \" translate>Precio 3</th>\n <th style=\"width: 80px\" *ngIf=\"configuracion.tipoPrecio !== 'costo' \" translate>Precio 4</th>\n <th style=\"width: 80px\" *ngIf=\"configuracion.tipoPrecio !== 'costo' \" translate>Precio 5</th>\n <th style=\"width: 40px\" *ngIf=\"configuracion.tipoPrecio === 'costo' \" translate>Movimiento.costo</th>\n <th style=\"width: 40px\" translate>Existencia por Unidad</th>\n <th *ngFor=\"let item of clasificadorList\" style=\"width: 80px\" translate>{{item.descripcion}}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\n <tr [pSelectableRow]=\"rowData\">\n <td style=\"width: 80px;\" *ngIf=\"!rowData.ubicacionCodigo\" translate>Movimiento.NoAsignado</td>\n <td style=\"width: 80px;\" *ngIf=\"rowData.ubicacionCodigo\">{{rowData.ubicacionCodigo}}</td>\n <td style=\"width: 70px;\">{{rowData.existencia}}</td>\n <td style=\"width: 40px;\">{{rowData.unidadCodigo}}</td>\n\n <td style=\"width: 50px;\" *ngIf=\"manejaUnidadSecundaria\">{{rowData.existenciaSecundaria}}</td>\n <td style=\"width: 40px;\" *ngIf=\"manejaUnidadSecundaria\">{{rowData.unidadSecundariaCodigo}}</td>\n\n <td style=\"width: 80px;\">{{rowData.articulo.codigo}}</td>\n <td style=\"width: 120px;\">{{rowData.articulo.descripcion}}</td>\n <td style=\"width: 40px;\">\n <button pButton type=\"button\" icon=\"pi pi-eye\" class=\"ui-button-raised ui-button-primary\"\n (click)=\"onShowInformacion(rowData)\">\n </button>\n </td>\n <td style=\"width: 80px;\" *ngIf=\"configuracion.tipoPrecio !== 'costo'\">{{rowData.precioConImpuestos | currency }}\n </td>\n <td style=\"width: 80px;\" *ngIf=\"configuracion.tipoPrecio !== 'costo'\">{{rowData.precio2ConImpuestos | currency\n }}</td>\n <td style=\"width: 80px;\" *ngIf=\"configuracion.tipoPrecio !== 'costo'\">{{rowData.precio3ConImpuestos | currency\n }}</td>\n <td style=\"width: 80px;\" *ngIf=\"configuracion.tipoPrecio !== 'costo'\">{{rowData.precio4ConImpuestos | currency\n }}</td>\n <td style=\"width: 80px;\" *ngIf=\"configuracion.tipoPrecio !== 'costo'\">{{rowData.precio5ConImpuestos | currency\n }}</td>\n <td style=\"width: 40px;\" *ngIf=\"configuracion.tipoPrecio === 'costo' \">{{rowData.precio | currency }}</td>\n <td style=\"width: 40px;\">\n <div class=\"row justify-content-between\" *ngFor=\"let item of rowData.existenciaUnidades\">\n <div class=\"col-lg-4\"><label for=\"\">{{item.unidad_codigo}}</label></div>\n <div class=\"col-lg-4\"><label for=\"\">{{item.unidad_existencia | number : '1.2-2'}}</label>\n </div>\n </div>\n </td>\n <!-- <td style=\"width: 40px;\"></td> -->\n <td *ngFor=\"let itemData of rowData.articuloClasificadorList\" style=\"width: 80px;\">{{itemData.valor}}</td>\n </tr>\n </ng-template>\n </p-table>\n\n <!-- /new table-->\n <!-- \n <p-table [(value)]=\"articulosList\" responsive=\"true\" \n selectionMode=\"multiple\" (onRowSelect)=\"filaSeleccionada($event)\" [scrollable]=\"true\" scrollHeight=\"350px\" >\n\n <p-column header=\"{{ 'Codigo ubicacion'.toString() | translate}}\">\n <ng-template let-dato=\"rowData\" pTemplate=\"body\">\n <label for=\"\" *ngIf=\"!dato.ubicacionCodigo\" translate> Movimiento.NoAsignado </label>\n <label for=\"\" *ngIf=\"dato.ubicacionCodigo\" > {{ dato.ubicacionCodigo }}</label>\n </ng-template>\n </p-column>\n <p-column field=\"ubicacionCodigo\" header=\"{{ 'Descripcion ubicacion'.toString() | translate}}\">\n <ng-template let-dato=\"rowData\" pTemplate=\"body\">\n <label for=\"\" *ngIf=\"!dato.ubicacionCodigo\" translate> Movimiento.NoAsignado </label>\n <label for=\"\" *ngIf=\"dato.ubicacionCodigo\" > {{ dato.ubicacionCodigo }}</label>\n </ng-template>\n </p-column>\n\n <p-column field=\"existencia\" header=\"{{'Existencia' | translate}}\"></p-column>\n <p-column field=\"unidadCodigo\" header=\"{{'Unidad' | translate}}\"></p-column>\n <p-column field=\"unidadDescripcion\" header=\"{{'Descripcion unidad' | translate}}\"></p-column>\n\n <p-column field=\"existenciaSecundaria\" header=\"{{'existenciaSecundaria' | translate}}\" *ngIf=\"manejaUnidadSecundaria\"></p-column>\n <p-column field=\"unidadSecundariaCodigo\" header=\"{{'Unidad' | translate}}\" *ngIf=\"manejaUnidadSecundaria\"></p-column>\n \n\n <p-column *ngIf=\"configuracion.tipoPrecio !== 'costo' \" header=\"{{'Movimiento.movimientoDetalle.precio' | translate}}\">\n <ng-template let-dato=\"rowData\" pTemplate=\"body\">\n <label for=\"\">{{ dato.precioConImpuestos | currency }}</label>\n </ng-template>\n </p-column>\n <p-column *ngIf=\"configuracion.tipoPrecio === 'costo' \" header=\"{{'Movimiento.costo' | translate }}\">\n <ng-template let-dato=\"rowData\" pTemplate=\"body\">\n <label for=\"\">{{ dato.precio | currency }}</label>\n </ng-template>\n </p-column>\n\n\n <p-column field=\"articulo.codigo\" header=\"{{'Codigo articulo' | translate}}\"></p-column>\n <p-column field=\"articulo.descripcion\" header=\"{{'Descripcion' | translate}}\"></p-column>\n\n\n\n <p-column header=\"{{'ExistenciaPorUnidad' | translate }}\">\n <ng-template let-dato=\"rowData\" pTemplate=\"body\">\n <div class=\"row justify-content-between\" *ngFor=\"let item of dato.existenciaUnidades\" >\n <div class=\"col-lg-4\"><label for=\"\">{{item.unidad_codigo}}</label></div>\n <div class=\"col-lg-4\"><label for=\"\">{{item.unidad_existencia | number : '1.2-2'}}</label>\n </div> \n </div> \n </ng-template>\n </p-column>\n \n </p-table>\n -->\n <p-paginator [rows]=\"page.rows\" [totalRecords]=\"page.total\" [pageLinkSize]=\"5\" (onPageChange)=\"pagina($event)\"\n [rowsPerPageOptions]=\"[10,25,50,100,500]\"></p-paginator>\n <!-- \n </div>\n </div>\n -->\n</p-dialog>\n<!--\n </div> \n -->\n<!--termina seleccion de articulos-->\n<!--selecciona ubicacion -->\n<lib-seleccion-articulo-informacion [showModal]=\"showModalInformacion\" [articulo]=\"articuloSelected\"\n (eventSelection)=\"onEventInformacion($event)\" *ngIf=\"showModalInformacion\">\n</lib-seleccion-articulo-informacion>", styles: ["tr:hover{background-color:#34a835!important;color:#fff!important}table{position:absolute}\n"] }]
|
|
2813
|
+
}], function () { return [{ type: StockService }, { type: PaginateService }, { type: AlmacenService }]; }, { configuracion: [{
|
|
2814
|
+
type: Input
|
|
2815
|
+
}], showArticulos: [{
|
|
2816
|
+
type: Input
|
|
2817
|
+
}], movimiento: [{
|
|
2818
|
+
type: Input
|
|
2819
|
+
}], manejaUnidadSecundaria: [{
|
|
2820
|
+
type: Input
|
|
2821
|
+
}], emitFilaSeleccionada: [{
|
|
2822
|
+
type: Output
|
|
2823
|
+
}], emitShowArticulos: [{
|
|
2824
|
+
type: Output
|
|
2825
|
+
}] });
|
|
2826
|
+
})();
|
|
2827
|
+
|
|
2828
|
+
class AcreedorService extends CrudService {
|
|
2829
|
+
constructor(httpClient) {
|
|
2830
|
+
super(httpClient, 'acreedor');
|
|
2831
|
+
this.httpClient = httpClient;
|
|
2832
|
+
}
|
|
2833
|
+
}
|
|
2834
|
+
/** @nocollapse */ AcreedorService.ɵfac = function AcreedorService_Factory(t) { return new (t || AcreedorService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
2835
|
+
/** @nocollapse */ AcreedorService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: AcreedorService, factory: AcreedorService.ɵfac, providedIn: 'root' });
|
|
2836
|
+
(function () {
|
|
2837
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AcreedorService, [{
|
|
2838
|
+
type: Injectable,
|
|
2839
|
+
args: [{
|
|
2840
|
+
providedIn: 'root'
|
|
2841
|
+
}]
|
|
2842
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
2843
|
+
})();
|
|
2844
|
+
|
|
2845
|
+
function SelectAcreedorComponent_ng_template_6_Template(rf, ctx) {
|
|
2846
|
+
if (rf & 1) {
|
|
2847
|
+
i0.ɵɵelementStart(0, "tr")(1, "th");
|
|
2848
|
+
i0.ɵɵtext(2);
|
|
2849
|
+
i0.ɵɵpipe(3, "translate");
|
|
2850
|
+
i0.ɵɵelementEnd();
|
|
2851
|
+
i0.ɵɵelementStart(4, "th");
|
|
2852
|
+
i0.ɵɵtext(5);
|
|
2853
|
+
i0.ɵɵpipe(6, "translate");
|
|
2854
|
+
i0.ɵɵelementEnd();
|
|
2855
|
+
i0.ɵɵelementStart(7, "th");
|
|
2856
|
+
i0.ɵɵtext(8);
|
|
2857
|
+
i0.ɵɵpipe(9, "translate");
|
|
2858
|
+
i0.ɵɵelementEnd();
|
|
2859
|
+
i0.ɵɵelementStart(10, "th");
|
|
2860
|
+
i0.ɵɵtext(11);
|
|
2861
|
+
i0.ɵɵpipe(12, "translate");
|
|
2862
|
+
i0.ɵɵelementEnd();
|
|
2863
|
+
i0.ɵɵelementStart(13, "th");
|
|
2864
|
+
i0.ɵɵtext(14);
|
|
2865
|
+
i0.ɵɵpipe(15, "translate");
|
|
2866
|
+
i0.ɵɵelementEnd();
|
|
2867
|
+
i0.ɵɵelementStart(16, "th");
|
|
2868
|
+
i0.ɵɵtext(17);
|
|
2869
|
+
i0.ɵɵpipe(18, "translate");
|
|
2870
|
+
i0.ɵɵelementEnd()();
|
|
2871
|
+
}
|
|
2872
|
+
if (rf & 2) {
|
|
2873
|
+
i0.ɵɵadvance(2);
|
|
2874
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 6, "razonSocial"));
|
|
2875
|
+
i0.ɵɵadvance(3);
|
|
2876
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 8, "rfc"));
|
|
2877
|
+
i0.ɵɵadvance(3);
|
|
2878
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 10, "tipo"));
|
|
2879
|
+
i0.ɵɵadvance(3);
|
|
2880
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(12, 12, "atrasoDiasEntrega"));
|
|
2881
|
+
i0.ɵɵadvance(3);
|
|
2882
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 14, "limiteCredito"));
|
|
2883
|
+
i0.ɵɵadvance(3);
|
|
2884
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(18, 16, "fechaUltimaCompra"));
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
2887
|
+
function SelectAcreedorComponent_ng_template_7_span_6_Template(rf, ctx) {
|
|
2888
|
+
if (rf & 1) {
|
|
2889
|
+
i0.ɵɵelementStart(0, "span");
|
|
2890
|
+
i0.ɵɵtext(1);
|
|
2891
|
+
i0.ɵɵpipe(2, "translate");
|
|
2892
|
+
i0.ɵɵelementEnd();
|
|
2893
|
+
}
|
|
2894
|
+
if (rf & 2) {
|
|
2895
|
+
i0.ɵɵadvance(1);
|
|
2896
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "moral"));
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
function SelectAcreedorComponent_ng_template_7_span_7_Template(rf, ctx) {
|
|
2900
|
+
if (rf & 1) {
|
|
2901
|
+
i0.ɵɵelementStart(0, "span");
|
|
2902
|
+
i0.ɵɵtext(1);
|
|
2903
|
+
i0.ɵɵpipe(2, "translate");
|
|
2904
|
+
i0.ɵɵelementEnd();
|
|
2905
|
+
}
|
|
2906
|
+
if (rf & 2) {
|
|
2907
|
+
i0.ɵɵadvance(1);
|
|
2908
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "fisico"));
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
function SelectAcreedorComponent_ng_template_7_Template(rf, ctx) {
|
|
2912
|
+
if (rf & 1) {
|
|
2913
|
+
i0.ɵɵelementStart(0, "tr", 9)(1, "td");
|
|
2914
|
+
i0.ɵɵtext(2);
|
|
2915
|
+
i0.ɵɵelementEnd();
|
|
2916
|
+
i0.ɵɵelementStart(3, "td");
|
|
2917
|
+
i0.ɵɵtext(4);
|
|
2918
|
+
i0.ɵɵelementEnd();
|
|
2919
|
+
i0.ɵɵelementStart(5, "td");
|
|
2920
|
+
i0.ɵɵtemplate(6, SelectAcreedorComponent_ng_template_7_span_6_Template, 3, 3, "span", 10);
|
|
2921
|
+
i0.ɵɵtemplate(7, SelectAcreedorComponent_ng_template_7_span_7_Template, 3, 3, "span", 10);
|
|
2922
|
+
i0.ɵɵelementEnd();
|
|
2923
|
+
i0.ɵɵelementStart(8, "td");
|
|
2924
|
+
i0.ɵɵtext(9);
|
|
2925
|
+
i0.ɵɵelementEnd();
|
|
2926
|
+
i0.ɵɵelementStart(10, "td");
|
|
2927
|
+
i0.ɵɵtext(11);
|
|
2928
|
+
i0.ɵɵelementEnd();
|
|
2929
|
+
i0.ɵɵelementStart(12, "td");
|
|
2930
|
+
i0.ɵɵtext(13);
|
|
2931
|
+
i0.ɵɵpipe(14, "date");
|
|
2932
|
+
i0.ɵɵelementEnd()();
|
|
2933
|
+
}
|
|
2934
|
+
if (rf & 2) {
|
|
2935
|
+
const acreedor_r3 = ctx.$implicit;
|
|
2936
|
+
i0.ɵɵproperty("pSelectableRow", acreedor_r3);
|
|
2937
|
+
i0.ɵɵadvance(2);
|
|
2938
|
+
i0.ɵɵtextInterpolate(acreedor_r3.descripcionRazonSocial);
|
|
2939
|
+
i0.ɵɵadvance(2);
|
|
2940
|
+
i0.ɵɵtextInterpolate(acreedor_r3.descripcionRfc);
|
|
2941
|
+
i0.ɵɵadvance(2);
|
|
2942
|
+
i0.ɵɵproperty("ngIf", acreedor_r3.personaMoral);
|
|
2943
|
+
i0.ɵɵadvance(1);
|
|
2944
|
+
i0.ɵɵproperty("ngIf", acreedor_r3.personaFisica);
|
|
2945
|
+
i0.ɵɵadvance(2);
|
|
2946
|
+
i0.ɵɵtextInterpolate(acreedor_r3.atrasoDiasEntrega);
|
|
2947
|
+
i0.ɵɵadvance(2);
|
|
2948
|
+
i0.ɵɵtextInterpolate(acreedor_r3.limiteCredito);
|
|
2949
|
+
i0.ɵɵadvance(2);
|
|
2950
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(14, 8, acreedor_r3.fechaUltimaCompra, "dd/MM/yyyy"));
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2953
|
+
function SelectAcreedorComponent_ng_template_8_Template(rf, ctx) {
|
|
2954
|
+
if (rf & 1) {
|
|
2955
|
+
i0.ɵɵelementStart(0, "tr")(1, "td");
|
|
2956
|
+
i0.ɵɵtext(2);
|
|
2957
|
+
i0.ɵɵpipe(3, "translate");
|
|
2958
|
+
i0.ɵɵelementEnd()();
|
|
2959
|
+
}
|
|
2960
|
+
if (rf & 2) {
|
|
2961
|
+
i0.ɵɵadvance(1);
|
|
2962
|
+
i0.ɵɵattribute("colspan", 6);
|
|
2963
|
+
i0.ɵɵadvance(1);
|
|
2964
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "general.noRegistros"));
|
|
2965
|
+
}
|
|
2966
|
+
}
|
|
2967
|
+
const _c0 = function () { return [10, 25, 50, 100, 500]; };
|
|
2968
|
+
class SelectAcreedorComponent {
|
|
2969
|
+
constructor(acreedorService, paginanateService, translate) {
|
|
2970
|
+
this.acreedorService = acreedorService;
|
|
2971
|
+
this.paginanateService = paginanateService;
|
|
2972
|
+
this.translate = translate;
|
|
2973
|
+
this.params = [];
|
|
2974
|
+
this.ordenar = [];
|
|
2975
|
+
this.visible = false;
|
|
2976
|
+
this.acreedorSeleccionado = new Proveedor();
|
|
2977
|
+
this.select = new EventEmitter();
|
|
2978
|
+
this.translate.get('es');
|
|
2979
|
+
}
|
|
2980
|
+
ngOnInit() {
|
|
2981
|
+
this.page = this.paginanateService.getPage();
|
|
2982
|
+
let arg = [];
|
|
2983
|
+
this.ordenar = this.paginanateService.getOrden(arg, 'es');
|
|
2984
|
+
this.acreedores = [];
|
|
2985
|
+
}
|
|
2986
|
+
cargarDatosAcreedores() {
|
|
2987
|
+
this.params = this.paginanateService.getParams(this.page);
|
|
2988
|
+
this.params.push({ param: 'estatus', value: true });
|
|
2989
|
+
this.acreedorService.getAll(this.params).subscribe((data) => {
|
|
2990
|
+
this.acreedores = data.data;
|
|
2991
|
+
});
|
|
2992
|
+
}
|
|
2993
|
+
pagina(e) {
|
|
2994
|
+
this.page.rows = e.rows;
|
|
2995
|
+
this.page.offset = e.first;
|
|
2996
|
+
this.cargarDatosAcreedores;
|
|
2997
|
+
}
|
|
2998
|
+
cerrarModal() {
|
|
2999
|
+
this.select.emit(null);
|
|
3000
|
+
this.visible = false;
|
|
3001
|
+
}
|
|
3002
|
+
seleccionarAcreedor(e) {
|
|
3003
|
+
this.select.emit(e.data);
|
|
3004
|
+
this.visible = false;
|
|
3005
|
+
}
|
|
3006
|
+
}
|
|
3007
|
+
/** @nocollapse */ SelectAcreedorComponent.ɵfac = function SelectAcreedorComponent_Factory(t) { return new (t || SelectAcreedorComponent)(i0.ɵɵdirectiveInject(AcreedorService), i0.ɵɵdirectiveInject(PaginateService), i0.ɵɵdirectiveInject(i3.TranslateService)); };
|
|
3008
|
+
/** @nocollapse */ SelectAcreedorComponent.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: SelectAcreedorComponent, selectors: [["select-acreedor"]], inputs: { visible: "visible", acreedorSeleccionado: "acreedorSeleccionado" }, outputs: { select: "select" }, decls: 10, vars: 14, consts: [["header", "Selecciona el acreedor", 3, "visible", "visibleChange", "onHide", "onShow"], [1, "p-inputgroup", "mt-2"], ["type", "text", "pInputText", "", "name", "filtro", 3, "placeholder", "ngModel", "ngModelChange", "keyup"], ["pButton", "", "type", "button", "icon", "pi pi-search", "styleClass", "p-button-secondary", 3, "click"], ["dataKey", "id", "selectionMode", "single", "scrollHeight", "350px", 3, "value", "selection", "scrollable", "responsive", "selectionChange", "onRowSelect"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], [3, "rows", "totalRecords", "pageLinkSize", "rowsPerPageOptions", "onPageChange"], [3, "pSelectableRow"], [4, "ngIf"]], template: function SelectAcreedorComponent_Template(rf, ctx) {
|
|
3009
|
+
if (rf & 1) {
|
|
3010
|
+
i0.ɵɵelementStart(0, "p-dialog", 0);
|
|
3011
|
+
i0.ɵɵlistener("visibleChange", function SelectAcreedorComponent_Template_p_dialog_visibleChange_0_listener($event) { return ctx.visible = $event; })("onHide", function SelectAcreedorComponent_Template_p_dialog_onHide_0_listener() { return ctx.cerrarModal(); })("onShow", function SelectAcreedorComponent_Template_p_dialog_onShow_0_listener() { return ctx.cargarDatosAcreedores(); });
|
|
3012
|
+
i0.ɵɵelementStart(1, "div", 1)(2, "input", 2);
|
|
3013
|
+
i0.ɵɵlistener("ngModelChange", function SelectAcreedorComponent_Template_input_ngModelChange_2_listener($event) { return ctx.page.filtro = $event; })("keyup", function SelectAcreedorComponent_Template_input_keyup_2_listener() { return ctx.cargarDatosAcreedores(); });
|
|
3014
|
+
i0.ɵɵpipe(3, "translate");
|
|
3015
|
+
i0.ɵɵelementEnd();
|
|
3016
|
+
i0.ɵɵelementStart(4, "button", 3);
|
|
3017
|
+
i0.ɵɵlistener("click", function SelectAcreedorComponent_Template_button_click_4_listener() { return ctx.cargarDatosAcreedores(); });
|
|
3018
|
+
i0.ɵɵelementEnd()();
|
|
3019
|
+
i0.ɵɵelementStart(5, "p-table", 4);
|
|
3020
|
+
i0.ɵɵlistener("selectionChange", function SelectAcreedorComponent_Template_p_table_selectionChange_5_listener($event) { return ctx.acreedorSeleccionado = $event; })("onRowSelect", function SelectAcreedorComponent_Template_p_table_onRowSelect_5_listener($event) { return ctx.seleccionarAcreedor($event); });
|
|
3021
|
+
i0.ɵɵtemplate(6, SelectAcreedorComponent_ng_template_6_Template, 19, 18, "ng-template", 5);
|
|
3022
|
+
i0.ɵɵtemplate(7, SelectAcreedorComponent_ng_template_7_Template, 15, 11, "ng-template", 6);
|
|
3023
|
+
i0.ɵɵtemplate(8, SelectAcreedorComponent_ng_template_8_Template, 4, 4, "ng-template", 7);
|
|
3024
|
+
i0.ɵɵelementEnd();
|
|
3025
|
+
i0.ɵɵelementStart(9, "p-paginator", 8);
|
|
3026
|
+
i0.ɵɵlistener("onPageChange", function SelectAcreedorComponent_Template_p_paginator_onPageChange_9_listener($event) { return ctx.pagina($event); });
|
|
3027
|
+
i0.ɵɵelementEnd()();
|
|
3028
|
+
}
|
|
3029
|
+
if (rf & 2) {
|
|
3030
|
+
i0.ɵɵproperty("visible", ctx.visible);
|
|
3031
|
+
i0.ɵɵadvance(2);
|
|
3032
|
+
i0.ɵɵpropertyInterpolate1("placeholder", "", i0.ɵɵpipeBind1(3, 11, "buscar"), "...");
|
|
3033
|
+
i0.ɵɵproperty("ngModel", ctx.page.filtro);
|
|
3034
|
+
i0.ɵɵadvance(3);
|
|
3035
|
+
i0.ɵɵproperty("value", ctx.acreedores)("selection", ctx.acreedorSeleccionado)("scrollable", true)("responsive", true);
|
|
3036
|
+
i0.ɵɵadvance(4);
|
|
3037
|
+
i0.ɵɵproperty("rows", ctx.page.rows)("totalRecords", ctx.page.total)("pageLinkSize", 5)("rowsPerPageOptions", i0.ɵɵpureFunction0(13, _c0));
|
|
3038
|
+
}
|
|
3039
|
+
}, directives: [i4$2.Dialog, i5.DefaultValueAccessor, i6.InputText, i5.NgControlStatus, i5.NgModel, i7.ButtonDirective, i8$1.Table, i4$1.PrimeTemplate, i8$1.SelectableRow, i8.NgIf, i10.Paginator], pipes: [i3.TranslatePipe, i8.DatePipe], encapsulation: 2 });
|
|
3040
|
+
(function () {
|
|
3041
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SelectAcreedorComponent, [{
|
|
3042
|
+
type: Component,
|
|
3043
|
+
args: [{ selector: 'select-acreedor', template: "<p-dialog header=\"Selecciona el acreedor\" [(visible)]=\"visible\" (onHide)=\"cerrarModal()\"\n (onShow)=\"cargarDatosAcreedores()\">\n\n <div class=\"p-inputgroup mt-2\">\n <input type=\"text\" pInputText placeholder=\"{{'buscar'| translate}}...\"\n [(ngModel)]=\"page.filtro\" name=\"filtro\" (keyup)=\"cargarDatosAcreedores()\">\n <button pButton type=\"button\" icon=\"pi pi-search\" styleClass=\"p-button-secondary\" (click)=\"cargarDatosAcreedores()\"></button>\n </div>\n <p-table\n [value]=\"acreedores\"\n dataKey=\"id\" selectionMode=\"single\"\n [(selection)]=\"acreedorSeleccionado\"\n (onRowSelect)=\"seleccionarAcreedor($event)\"\n [scrollable]=\"true\"\n scrollHeight=\"350px\"\n [responsive]=\"true\">\n\n <ng-template pTemplate=\"header\">\n <tr>\n <th>{{'razonSocial' | translate}}</th>\n <th>{{'rfc' | translate}}</th>\n <th>{{'tipo' | translate}}</th>\n <th>{{'atrasoDiasEntrega' | translate}}</th>\n <th>{{'limiteCredito' | translate}}</th>\n <th>{{'fechaUltimaCompra' | translate}}</th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-acreedor>\n <tr [pSelectableRow]=\"acreedor\">\n <td>{{acreedor.descripcionRazonSocial}}</td>\n <td>{{acreedor.descripcionRfc}}</td>\n <td>\n <span *ngIf=\"acreedor.personaMoral\">{{'moral' | translate}}</span>\n <span *ngIf=\"acreedor.personaFisica\">{{'fisico' | translate}}</span>\n </td>\n <td>{{acreedor.atrasoDiasEntrega}}</td>\n <td>{{acreedor.limiteCredito}}</td>\n <td>{{acreedor.fechaUltimaCompra | date:'dd/MM/yyyy'}}</td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td [attr.colspan]=\"6\">{{'general.noRegistros' | translate}}</td>\n </tr>\n </ng-template>\n </p-table>\n\n <p-paginator [rows]=\"page.rows\" [totalRecords]=\"page.total\" [pageLinkSize]=\"5\"\n (onPageChange)=\"pagina($event)\" [rowsPerPageOptions]=\"[10,25,50,100,500]\"></p-paginator>\n\n</p-dialog>" }]
|
|
3044
|
+
}], function () { return [{ type: AcreedorService }, { type: PaginateService }, { type: i3.TranslateService }]; }, { visible: [{
|
|
3045
|
+
type: Input
|
|
3046
|
+
}], acreedorSeleccionado: [{
|
|
3047
|
+
type: Input
|
|
3048
|
+
}], select: [{
|
|
3049
|
+
type: Output
|
|
3050
|
+
}] });
|
|
3051
|
+
})();
|
|
3052
|
+
|
|
3053
|
+
const components = [
|
|
3054
|
+
LoadingComponent,
|
|
3055
|
+
LoadingScreenComponent,
|
|
3056
|
+
LoginModalComponent,
|
|
3057
|
+
PdfModalComponent,
|
|
3058
|
+
SessionCreateComponent,
|
|
3059
|
+
SelectClienteComponent,
|
|
3060
|
+
SelectProveedorComponent,
|
|
3061
|
+
SeleccionaArticuloComponent,
|
|
3062
|
+
SelectAcreedorComponent
|
|
3063
|
+
];
|
|
3064
|
+
const exportComponents = components;
|
|
3065
|
+
const exportServices = [];
|
|
3066
|
+
const exportModels = [];
|
|
3067
|
+
|
|
3068
|
+
const primeNg = [
|
|
3069
|
+
CardModule,
|
|
3070
|
+
TooltipModule,
|
|
3071
|
+
OverlayPanelModule,
|
|
3072
|
+
RadioButtonModule,
|
|
3073
|
+
CheckboxModule,
|
|
3074
|
+
AutoCompleteModule,
|
|
3075
|
+
TableModule,
|
|
3076
|
+
TreeTableModule,
|
|
3077
|
+
CalendarModule,
|
|
3078
|
+
TableModule,
|
|
3079
|
+
ButtonModule,
|
|
3080
|
+
InputTextModule,
|
|
3081
|
+
DropdownModule,
|
|
3082
|
+
InputMaskModule,
|
|
3083
|
+
MessagesModule,
|
|
3084
|
+
MessageModule,
|
|
3085
|
+
PaginatorModule,
|
|
3086
|
+
ConfirmDialogModule,
|
|
3087
|
+
ProgressBarModule,
|
|
3088
|
+
TriStateCheckboxModule,
|
|
3089
|
+
KeyFilterModule,
|
|
3090
|
+
InputSwitchModule,
|
|
3091
|
+
DialogModule,
|
|
3092
|
+
TabViewModule,
|
|
3093
|
+
PanelModule,
|
|
3094
|
+
ToolbarModule,
|
|
3095
|
+
SplitButtonModule,
|
|
3096
|
+
FieldsetModule,
|
|
3097
|
+
TreeModule,
|
|
3098
|
+
TabMenuModule,
|
|
3099
|
+
MenubarModule,
|
|
3100
|
+
];
|
|
3101
|
+
const primeNgServices = [ConfirmationService];
|
|
3102
|
+
|
|
3103
|
+
function HttpLoaderFactory(http) {
|
|
3104
|
+
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
|
|
3105
|
+
}
|
|
3106
|
+
class CoreLibModule {
|
|
3107
|
+
}
|
|
3108
|
+
/** @nocollapse */ CoreLibModule.ɵfac = function CoreLibModule_Factory(t) { return new (t || CoreLibModule)(); };
|
|
3109
|
+
/** @nocollapse */ CoreLibModule.ɵmod = /** @pureOrBreakMyCode */ i0.ɵɵdefineNgModule({ type: CoreLibModule });
|
|
3110
|
+
/** @nocollapse */ CoreLibModule.ɵinj = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjector({ providers: [
|
|
3111
|
+
primeNgServices,
|
|
3112
|
+
{ provide: HTTP_INTERCEPTORS, useClass: httpInterceptor, multi: true }
|
|
3113
|
+
], imports: [[
|
|
3114
|
+
CommonModule,
|
|
3115
|
+
primeNg,
|
|
3116
|
+
FormsModule,
|
|
3117
|
+
ToastrModule.forRoot(),
|
|
3118
|
+
TranslateModule.forRoot({
|
|
3119
|
+
loader: {
|
|
3120
|
+
provide: TranslateLoader,
|
|
3121
|
+
useFactory: HttpLoaderFactory,
|
|
3122
|
+
deps: [HttpClient]
|
|
3123
|
+
}
|
|
3124
|
+
})
|
|
3125
|
+
]] });
|
|
3126
|
+
(function () {
|
|
3127
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CoreLibModule, [{
|
|
3128
|
+
type: NgModule,
|
|
3129
|
+
args: [{
|
|
3130
|
+
declarations: [
|
|
3131
|
+
Error404Component,
|
|
3132
|
+
components,
|
|
3133
|
+
contaComponents,
|
|
3134
|
+
SeleccionArticuloInformacionComponent
|
|
3135
|
+
],
|
|
3136
|
+
imports: [
|
|
3137
|
+
CommonModule,
|
|
3138
|
+
primeNg,
|
|
3139
|
+
FormsModule,
|
|
3140
|
+
ToastrModule.forRoot(),
|
|
3141
|
+
TranslateModule.forRoot({
|
|
3142
|
+
loader: {
|
|
3143
|
+
provide: TranslateLoader,
|
|
3144
|
+
useFactory: HttpLoaderFactory,
|
|
3145
|
+
deps: [HttpClient]
|
|
3146
|
+
}
|
|
3147
|
+
})
|
|
3148
|
+
],
|
|
3149
|
+
providers: [
|
|
3150
|
+
primeNgServices,
|
|
3151
|
+
{ provide: HTTP_INTERCEPTORS, useClass: httpInterceptor, multi: true }
|
|
3152
|
+
],
|
|
3153
|
+
exports: [components, contaComponents]
|
|
3154
|
+
}]
|
|
3155
|
+
}], null, null);
|
|
3156
|
+
})();
|
|
3157
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CoreLibModule, { declarations: [Error404Component, LoadingComponent, LoadingScreenComponent, LoginModalComponent, PdfModalComponent, SessionCreateComponent, SelectClienteComponent, SelectProveedorComponent, SeleccionaArticuloComponent, SelectAcreedorComponent, CclistaComponent, CcseleccionDialogComponent, SeleccionArticuloInformacionComponent], imports: [CommonModule, i12.CardModule, i13.TooltipModule, i14.OverlayPanelModule, i15.RadioButtonModule, i16.CheckboxModule, i17.AutoCompleteModule, i8$1.TableModule, i4.TreeTableModule, i20.CalendarModule, i8$1.TableModule, i7.ButtonModule, i6.InputTextModule, i23.DropdownModule, i24.InputMaskModule, i25.MessagesModule, i26.MessageModule, i10.PaginatorModule, i28.ConfirmDialogModule, i29.ProgressBarModule, i30.TriStateCheckboxModule, i31.KeyFilterModule, i32.InputSwitchModule, i4$2.DialogModule, i34.TabViewModule, i35.PanelModule, i36.ToolbarModule, i37.SplitButtonModule, i38.FieldsetModule, i39.TreeModule, i40.TabMenuModule, i41.MenubarModule, FormsModule, i1$1.ToastrModule, i3.TranslateModule], exports: [LoadingComponent, LoadingScreenComponent, LoginModalComponent, PdfModalComponent, SessionCreateComponent, SelectClienteComponent, SelectProveedorComponent, SeleccionaArticuloComponent, SelectAcreedorComponent, CclistaComponent, CcseleccionDialogComponent] }); })();
|
|
3158
|
+
|
|
3159
|
+
class ControlAccesoService {
|
|
3160
|
+
constructor(authService) {
|
|
3161
|
+
this.authService = authService;
|
|
3162
|
+
this.cambioAcciones = new EventEmitter();
|
|
3163
|
+
this.changeDetalleUsuario = new EventEmitter();
|
|
3164
|
+
}
|
|
3165
|
+
set(detallesUsuarios) {
|
|
3166
|
+
this.detallesUsuarios = detallesUsuarios;
|
|
3167
|
+
this.changeDetalleUsuario.emit(this.detallesUsuarios);
|
|
3168
|
+
}
|
|
3169
|
+
canActivete(rols) {
|
|
3170
|
+
let permiso = false;
|
|
3171
|
+
let user = this.authService.getUser();
|
|
3172
|
+
if (!user)
|
|
3173
|
+
false;
|
|
3174
|
+
for (let index = 0; index < rols.length; index++) {
|
|
3175
|
+
if (permiso)
|
|
3176
|
+
return permiso;
|
|
3177
|
+
let grupoPermisos = user.roles.filter((permiso) => {
|
|
3178
|
+
return permiso === rols[index];
|
|
3179
|
+
});
|
|
3180
|
+
permiso = grupoPermisos.length > 0;
|
|
3181
|
+
}
|
|
3182
|
+
return permiso;
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
/** @nocollapse */ ControlAccesoService.ɵfac = function ControlAccesoService_Factory(t) { return new (t || ControlAccesoService)(i0.ɵɵinject(AuthService)); };
|
|
3186
|
+
/** @nocollapse */ ControlAccesoService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: ControlAccesoService, factory: ControlAccesoService.ɵfac, providedIn: 'root' });
|
|
3187
|
+
(function () {
|
|
3188
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ControlAccesoService, [{
|
|
3189
|
+
type: Injectable,
|
|
3190
|
+
args: [{
|
|
3191
|
+
providedIn: 'root'
|
|
3192
|
+
}]
|
|
3193
|
+
}], function () { return [{ type: AuthService }]; }, { cambioAcciones: [{
|
|
3194
|
+
type: Output
|
|
3195
|
+
}], changeDetalleUsuario: [{
|
|
3196
|
+
type: Output
|
|
3197
|
+
}] });
|
|
3198
|
+
})();
|
|
3199
|
+
|
|
3200
|
+
class InitService {
|
|
3201
|
+
constructor(http, authService) {
|
|
3202
|
+
this.http = http;
|
|
3203
|
+
this.authService = authService;
|
|
3204
|
+
}
|
|
3205
|
+
initConfig() {
|
|
3206
|
+
this.http.get('assets/config.json').subscribe((data) => {
|
|
3207
|
+
localStorage.setItem("config", JSON.stringify(data));
|
|
3208
|
+
});
|
|
3209
|
+
this.http.get('assets/version.json')
|
|
3210
|
+
//.first()
|
|
3211
|
+
.subscribe((response) => {
|
|
3212
|
+
localStorage.removeItem('version');
|
|
3213
|
+
localStorage.setItem('version', response.hash);
|
|
3214
|
+
});
|
|
3215
|
+
}
|
|
3216
|
+
cargaConfig() {
|
|
3217
|
+
this.http.get('assets/config.json').subscribe((data) => {
|
|
3218
|
+
localStorage.setItem("config", JSON.stringify(data));
|
|
3219
|
+
let url = data.url;
|
|
3220
|
+
this.http.post(url + '/login', { username: 'admin', password: 'admin' }).subscribe((data) => {
|
|
3221
|
+
localStorage.setItem('usuario', JSON.stringify(data));
|
|
3222
|
+
let httpOptions = {
|
|
3223
|
+
headers: new HttpHeaders({
|
|
3224
|
+
'Accept-type': 'application/json',
|
|
3225
|
+
'Authorization': data.token_type + ' ' + data.access_token
|
|
3226
|
+
})
|
|
3227
|
+
};
|
|
3228
|
+
this.http.get(url + '/usuario/obtieneUsuarioActual', httpOptions).subscribe((dat) => {
|
|
3229
|
+
let empresaAdmin = dat.empresas[0];
|
|
3230
|
+
this.authService.setEmpresa(empresaAdmin).subscribe();
|
|
3231
|
+
});
|
|
3232
|
+
});
|
|
3233
|
+
});
|
|
3234
|
+
}
|
|
3235
|
+
}
|
|
3236
|
+
/** @nocollapse */ InitService.ɵfac = function InitService_Factory(t) { return new (t || InitService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(AuthService)); };
|
|
3237
|
+
/** @nocollapse */ InitService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: InitService, factory: InitService.ɵfac, providedIn: 'root' });
|
|
3238
|
+
(function () {
|
|
3239
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(InitService, [{
|
|
3240
|
+
type: Injectable,
|
|
3241
|
+
args: [{
|
|
3242
|
+
providedIn: 'root'
|
|
3243
|
+
}]
|
|
3244
|
+
}], function () { return [{ type: i1.HttpClient }, { type: AuthService }]; }, null);
|
|
3245
|
+
})();
|
|
3246
|
+
|
|
3247
|
+
class MessageService {
|
|
3248
|
+
constructor(toastr) {
|
|
3249
|
+
this.toastr = toastr;
|
|
3250
|
+
}
|
|
3251
|
+
deployMessage(tipo = null, titulo, msg) {
|
|
3252
|
+
switch (tipo) {
|
|
3253
|
+
case "success":
|
|
3254
|
+
{
|
|
3255
|
+
this.toastr.success(msg, titulo, {
|
|
3256
|
+
timeOut: 3000
|
|
3257
|
+
});
|
|
3258
|
+
}
|
|
3259
|
+
break;
|
|
3260
|
+
case "info":
|
|
3261
|
+
{
|
|
3262
|
+
this.toastr.info(msg, titulo, {
|
|
3263
|
+
timeOut: 3000,
|
|
3264
|
+
});
|
|
3265
|
+
}
|
|
3266
|
+
break;
|
|
3267
|
+
case "warning":
|
|
3268
|
+
{
|
|
3269
|
+
this.toastr.warning(msg, titulo, {
|
|
3270
|
+
timeOut: 3000
|
|
3271
|
+
});
|
|
3272
|
+
}
|
|
3273
|
+
break;
|
|
3274
|
+
case "error":
|
|
3275
|
+
{
|
|
3276
|
+
this.toastr.error(msg, titulo, {
|
|
3277
|
+
timeOut: 3000
|
|
3278
|
+
});
|
|
3279
|
+
}
|
|
3280
|
+
break;
|
|
3281
|
+
case null:
|
|
3282
|
+
{
|
|
3283
|
+
this.toastr.success(msg, titulo, {
|
|
3284
|
+
timeOut: 3000
|
|
3285
|
+
});
|
|
3286
|
+
}
|
|
3287
|
+
break;
|
|
3288
|
+
}
|
|
3289
|
+
}
|
|
3290
|
+
success(msg) {
|
|
3291
|
+
let msgs = [];
|
|
3292
|
+
msgs.push({ severity: 'success', summary: 'Exito', detail: '' + msg });
|
|
3293
|
+
return msgs;
|
|
3294
|
+
}
|
|
3295
|
+
error(error) {
|
|
3296
|
+
let msgs = [];
|
|
3297
|
+
if (error) {
|
|
3298
|
+
if (error.error) {
|
|
3299
|
+
error = error.error;
|
|
3300
|
+
if (error.error)
|
|
3301
|
+
for (let i = 0; i < (error.error).length; i++) {
|
|
3302
|
+
msgs.push({ severity: 'error', summary: 'Error', detail: '' + error.error[i].message });
|
|
3303
|
+
}
|
|
3304
|
+
}
|
|
3305
|
+
}
|
|
3306
|
+
else {
|
|
3307
|
+
if (error.mensaje)
|
|
3308
|
+
msgs.push({ severity: 'error', summary: 'Error', detail: '' + error.mensaje });
|
|
3309
|
+
}
|
|
3310
|
+
return msgs;
|
|
3311
|
+
}
|
|
3312
|
+
}
|
|
3313
|
+
/** @nocollapse */ MessageService.ɵfac = function MessageService_Factory(t) { return new (t || MessageService)(i0.ɵɵinject(i1$1.ToastrService)); };
|
|
3314
|
+
/** @nocollapse */ MessageService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: MessageService, factory: MessageService.ɵfac, providedIn: 'root' });
|
|
3315
|
+
(function () {
|
|
3316
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MessageService, [{
|
|
3317
|
+
type: Injectable,
|
|
3318
|
+
args: [{
|
|
3319
|
+
providedIn: 'root'
|
|
3320
|
+
}]
|
|
3321
|
+
}], function () { return [{ type: i1$1.ToastrService }]; }, null);
|
|
3322
|
+
})();
|
|
3323
|
+
|
|
3324
|
+
class PersonaMoralService extends CrudService {
|
|
3325
|
+
constructor(http) {
|
|
3326
|
+
super(http, '/personaMoral');
|
|
3327
|
+
}
|
|
3328
|
+
}
|
|
3329
|
+
/** @nocollapse */ PersonaMoralService.ɵfac = function PersonaMoralService_Factory(t) { return new (t || PersonaMoralService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3330
|
+
/** @nocollapse */ PersonaMoralService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: PersonaMoralService, factory: PersonaMoralService.ɵfac, providedIn: 'root' });
|
|
3331
|
+
(function () {
|
|
3332
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PersonaMoralService, [{
|
|
3333
|
+
type: Injectable,
|
|
3334
|
+
args: [{
|
|
3335
|
+
providedIn: 'root'
|
|
3336
|
+
}]
|
|
3337
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3338
|
+
})();
|
|
3339
|
+
|
|
3340
|
+
class CanActivateGuard {
|
|
3341
|
+
constructor(controlAccesoService) {
|
|
3342
|
+
this.controlAccesoService = controlAccesoService;
|
|
3343
|
+
this.rol = '';
|
|
3344
|
+
this.method = '';
|
|
3345
|
+
}
|
|
3346
|
+
canActivate() {
|
|
3347
|
+
return this.controlAccesoService.canActivete([this.rol]);
|
|
3348
|
+
}
|
|
3349
|
+
permisos(rol) {
|
|
3350
|
+
this.rol = rol;
|
|
3351
|
+
}
|
|
3352
|
+
}
|
|
3353
|
+
/** @nocollapse */ CanActivateGuard.ɵfac = function CanActivateGuard_Factory(t) { return new (t || CanActivateGuard)(i0.ɵɵinject(ControlAccesoService)); };
|
|
3354
|
+
/** @nocollapse */ CanActivateGuard.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: CanActivateGuard, factory: CanActivateGuard.ɵfac, providedIn: 'root' });
|
|
3355
|
+
(function () {
|
|
3356
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CanActivateGuard, [{
|
|
3357
|
+
type: Injectable,
|
|
3358
|
+
args: [{
|
|
3359
|
+
providedIn: 'root'
|
|
3360
|
+
}]
|
|
3361
|
+
}], function () { return [{ type: ControlAccesoService }]; }, null);
|
|
3362
|
+
})();
|
|
3363
|
+
|
|
3364
|
+
class CatalogoAdicionalService extends CrudService {
|
|
3365
|
+
constructor(httpClient) {
|
|
3366
|
+
super(httpClient, 'catalogoAdicional');
|
|
3367
|
+
this.httpClient = httpClient;
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
/** @nocollapse */ CatalogoAdicionalService.ɵfac = function CatalogoAdicionalService_Factory(t) { return new (t || CatalogoAdicionalService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3371
|
+
/** @nocollapse */ CatalogoAdicionalService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: CatalogoAdicionalService, factory: CatalogoAdicionalService.ɵfac, providedIn: 'root' });
|
|
3372
|
+
(function () {
|
|
3373
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CatalogoAdicionalService, [{
|
|
3374
|
+
type: Injectable,
|
|
3375
|
+
args: [{
|
|
3376
|
+
providedIn: 'root'
|
|
3377
|
+
}]
|
|
3378
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3379
|
+
})();
|
|
3380
|
+
|
|
3381
|
+
class Authenticated {
|
|
3382
|
+
constructor(authService, controlAccesoService, router) {
|
|
3383
|
+
this.authService = authService;
|
|
3384
|
+
this.controlAccesoService = controlAccesoService;
|
|
3385
|
+
this.router = router;
|
|
3386
|
+
}
|
|
3387
|
+
load(modulo) {
|
|
3388
|
+
let usuario = this.authService.getUser();
|
|
3389
|
+
if (usuario) {
|
|
3390
|
+
this.authService.getDetalsUser().subscribe((resp) => {
|
|
3391
|
+
let roles = resp.roles;
|
|
3392
|
+
for (let index = 0; index < roles.length; index++) {
|
|
3393
|
+
if (roles[index].authority === "ROLE_CLIENTE") {
|
|
3394
|
+
//this.regresaAlprincipal('/administrativo/movimientos/ventaRapida/create')
|
|
3395
|
+
this.router.navigate(['movimientos/ventaRapida/create']);
|
|
3396
|
+
}
|
|
3397
|
+
}
|
|
3398
|
+
if (!resp.empresa) {
|
|
3399
|
+
this.regresaAlprincipal(undefined);
|
|
3400
|
+
}
|
|
3401
|
+
this.controlAccesoService.detallesUsuarios = resp;
|
|
3402
|
+
this.controlAccesoService.cambioAcciones.emit(true);
|
|
3403
|
+
return true;
|
|
3404
|
+
/*
|
|
3405
|
+
if (resp.moduloAccesoActual) {
|
|
3406
|
+
if (resp.moduloAccesoActual.descripcion === modulo) {
|
|
3407
|
+
this.controlAccesoService.detallesUsuarios = resp;
|
|
3408
|
+
this.controlAccesoService.cambioAcciones.emit(true);
|
|
3409
|
+
return true;
|
|
3410
|
+
} else {
|
|
3411
|
+
this.regresaAlprincipal(resp.moduloAccesoActual.urlInicial);
|
|
3412
|
+
}
|
|
3413
|
+
} else {
|
|
3414
|
+
this.regresaAlprincipal(undefined);
|
|
3415
|
+
}
|
|
3416
|
+
|
|
3417
|
+
*/
|
|
3418
|
+
}, (error) => {
|
|
3419
|
+
this.regresaAlprincipal(undefined);
|
|
3420
|
+
});
|
|
3421
|
+
}
|
|
3422
|
+
else {
|
|
3423
|
+
this.regresaAlprincipal(undefined);
|
|
3424
|
+
}
|
|
3425
|
+
return false;
|
|
3426
|
+
}
|
|
3427
|
+
regresaAlprincipal(url) {
|
|
3428
|
+
let config = JSON.parse(localStorage.getItem("config"));
|
|
3429
|
+
let host = "";
|
|
3430
|
+
if (config) {
|
|
3431
|
+
if (config.host) {
|
|
3432
|
+
host = config.host;
|
|
3433
|
+
}
|
|
3434
|
+
}
|
|
3435
|
+
if (url) {
|
|
3436
|
+
host = host + url;
|
|
3437
|
+
}
|
|
3438
|
+
window.location.href = host;
|
|
3439
|
+
}
|
|
3440
|
+
}
|
|
3441
|
+
/** @nocollapse */ Authenticated.ɵfac = function Authenticated_Factory(t) { return new (t || Authenticated)(i0.ɵɵinject(AuthService), i0.ɵɵinject(ControlAccesoService), i0.ɵɵinject(i3$2.Router)); };
|
|
3442
|
+
/** @nocollapse */ Authenticated.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: Authenticated, factory: Authenticated.ɵfac, providedIn: 'root' });
|
|
3443
|
+
(function () {
|
|
3444
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Authenticated, [{
|
|
3445
|
+
type: Injectable,
|
|
3446
|
+
args: [{
|
|
3447
|
+
providedIn: 'root'
|
|
3448
|
+
}]
|
|
3449
|
+
}], function () { return [{ type: AuthService }, { type: ControlAccesoService }, { type: i3$2.Router }]; }, null);
|
|
3450
|
+
})();
|
|
3451
|
+
|
|
3452
|
+
class VersionCheckService {
|
|
3453
|
+
constructor(http) {
|
|
3454
|
+
this.http = http;
|
|
3455
|
+
this.currentHash = '{{POST_BUILD_ENTERS_HASH_HERE}}';
|
|
3456
|
+
this.versionado = false;
|
|
3457
|
+
this.frequency = 1000 * 60 * 180;
|
|
3458
|
+
}
|
|
3459
|
+
initVersionCheck() {
|
|
3460
|
+
setInterval(() => {
|
|
3461
|
+
this.checkVersion();
|
|
3462
|
+
}, this.frequency);
|
|
3463
|
+
}
|
|
3464
|
+
checkVersion() {
|
|
3465
|
+
this.http.get('assets/version.json' + '?t=' + new Date().getTime())
|
|
3466
|
+
.subscribe((response) => {
|
|
3467
|
+
const hash = response.hash;
|
|
3468
|
+
this.currentHash = localStorage.getItem("version");
|
|
3469
|
+
const hashChanged = this.hasHashChanged(this.currentHash, hash);
|
|
3470
|
+
if (!hashChanged && !this.versionado) {
|
|
3471
|
+
this.versionado = true;
|
|
3472
|
+
if (confirm("Está disponible una actualización de Visorus ERP. El sistema se reiniciara para descargar los nuevos cambios.")) {
|
|
3473
|
+
location.reload();
|
|
3474
|
+
this.versionado = false;
|
|
3475
|
+
}
|
|
3476
|
+
else {
|
|
3477
|
+
this.versionado = false;
|
|
3478
|
+
}
|
|
3479
|
+
}
|
|
3480
|
+
}, (err) => {
|
|
3481
|
+
console.error(err, 'No se pudo obtener versión de software');
|
|
3482
|
+
});
|
|
3483
|
+
}
|
|
3484
|
+
hasHashChanged(currentHash, newHash) {
|
|
3485
|
+
if (!currentHash || currentHash === '{{POST_BUILD_ENTERS_HASH_HERE}}') {
|
|
3486
|
+
return false;
|
|
3487
|
+
}
|
|
3488
|
+
return currentHash === newHash;
|
|
3489
|
+
}
|
|
3490
|
+
}
|
|
3491
|
+
/** @nocollapse */ VersionCheckService.ɵfac = function VersionCheckService_Factory(t) { return new (t || VersionCheckService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3492
|
+
/** @nocollapse */ VersionCheckService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: VersionCheckService, factory: VersionCheckService.ɵfac, providedIn: 'root' });
|
|
3493
|
+
(function () {
|
|
3494
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(VersionCheckService, [{
|
|
3495
|
+
type: Injectable,
|
|
3496
|
+
args: [{
|
|
3497
|
+
providedIn: 'root'
|
|
3498
|
+
}]
|
|
3499
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3500
|
+
})();
|
|
3501
|
+
|
|
3502
|
+
class Agente {
|
|
3503
|
+
constructor() {
|
|
3504
|
+
// this.catalogoTipo= new CatalogoTipo();
|
|
3505
|
+
this.personaFisica = new PersonaFisica();
|
|
3506
|
+
}
|
|
3507
|
+
}
|
|
3508
|
+
|
|
3509
|
+
class AgenteService extends CrudService {
|
|
3510
|
+
constructor(httpClient) {
|
|
3511
|
+
super(httpClient, 'agente');
|
|
3512
|
+
this.httpClient = httpClient;
|
|
3513
|
+
}
|
|
3514
|
+
saveUsuarioAgente(usuario) {
|
|
3515
|
+
let url = this.getUrl('agente') + '/usuario';
|
|
3516
|
+
return this.getHttp().post(url, usuario, this.buildAuth());
|
|
3517
|
+
}
|
|
3518
|
+
getUsuarioAgente(id) {
|
|
3519
|
+
let url = this.getUrl('agente') + '/usuario/' + id;
|
|
3520
|
+
return this.getHttp().get(url, this.buildAuth());
|
|
3521
|
+
}
|
|
3522
|
+
obtenerAgenteEmpresa() {
|
|
3523
|
+
let url = this.geturl() + '/obtenerAgenteEmpresa';
|
|
3524
|
+
return this.getHttp().get(url, this.buildAuth());
|
|
3525
|
+
}
|
|
3526
|
+
}
|
|
3527
|
+
/** @nocollapse */ AgenteService.ɵfac = function AgenteService_Factory(t) { return new (t || AgenteService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3528
|
+
/** @nocollapse */ AgenteService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: AgenteService, factory: AgenteService.ɵfac, providedIn: 'root' });
|
|
3529
|
+
(function () {
|
|
3530
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AgenteService, [{
|
|
3531
|
+
type: Injectable,
|
|
3532
|
+
args: [{
|
|
3533
|
+
providedIn: 'root'
|
|
3534
|
+
}]
|
|
3535
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3536
|
+
})();
|
|
3537
|
+
|
|
3538
|
+
class Almacen {
|
|
3539
|
+
constructor() { }
|
|
3540
|
+
}
|
|
3541
|
+
|
|
3542
|
+
class DatoDireccion {
|
|
3543
|
+
constructor() {
|
|
3544
|
+
}
|
|
3545
|
+
}
|
|
3546
|
+
|
|
3547
|
+
class Banco {
|
|
3548
|
+
constructor() {
|
|
3549
|
+
this.datoDireccion = new DatoDireccion();
|
|
3550
|
+
}
|
|
3551
|
+
}
|
|
3552
|
+
|
|
3553
|
+
class BancoService extends CrudService {
|
|
3554
|
+
constructor(http) {
|
|
3555
|
+
super(http, '/banco');
|
|
3556
|
+
}
|
|
3557
|
+
}
|
|
3558
|
+
/** @nocollapse */ BancoService.ɵfac = function BancoService_Factory(t) { return new (t || BancoService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3559
|
+
/** @nocollapse */ BancoService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: BancoService, factory: BancoService.ɵfac, providedIn: 'root' });
|
|
3560
|
+
(function () {
|
|
3561
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BancoService, [{
|
|
3562
|
+
type: Injectable,
|
|
3563
|
+
args: [{
|
|
3564
|
+
providedIn: 'root'
|
|
3565
|
+
}]
|
|
3566
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3567
|
+
})();
|
|
3568
|
+
|
|
3569
|
+
class CatalogoTipo {
|
|
3570
|
+
constructor() { }
|
|
3571
|
+
}
|
|
3572
|
+
|
|
3573
|
+
class CatalogoTipoService extends CrudService {
|
|
3574
|
+
constructor(htt) {
|
|
3575
|
+
super(htt, '/catalogoTipo');
|
|
3576
|
+
}
|
|
3577
|
+
}
|
|
3578
|
+
/** @nocollapse */ CatalogoTipoService.ɵfac = function CatalogoTipoService_Factory(t) { return new (t || CatalogoTipoService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3579
|
+
/** @nocollapse */ CatalogoTipoService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: CatalogoTipoService, factory: CatalogoTipoService.ɵfac, providedIn: 'root' });
|
|
3580
|
+
(function () {
|
|
3581
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CatalogoTipoService, [{
|
|
3582
|
+
type: Injectable,
|
|
3583
|
+
args: [{
|
|
3584
|
+
providedIn: 'root'
|
|
3585
|
+
}]
|
|
3586
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3587
|
+
})();
|
|
3588
|
+
|
|
3589
|
+
class ClasificadorTipoService extends CrudService {
|
|
3590
|
+
constructor(http) {
|
|
3591
|
+
super(http, '/clasificadorTipo');
|
|
3592
|
+
}
|
|
3593
|
+
}
|
|
3594
|
+
/** @nocollapse */ ClasificadorTipoService.ɵfac = function ClasificadorTipoService_Factory(t) { return new (t || ClasificadorTipoService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3595
|
+
/** @nocollapse */ ClasificadorTipoService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: ClasificadorTipoService, factory: ClasificadorTipoService.ɵfac, providedIn: 'root' });
|
|
3596
|
+
(function () {
|
|
3597
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ClasificadorTipoService, [{
|
|
3598
|
+
type: Injectable,
|
|
3599
|
+
args: [{
|
|
3600
|
+
providedIn: 'root'
|
|
3601
|
+
}]
|
|
3602
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3603
|
+
})();
|
|
3604
|
+
|
|
3605
|
+
class ClaveMovimiento {
|
|
3606
|
+
constructor() { }
|
|
3607
|
+
}
|
|
3608
|
+
|
|
3609
|
+
class ClaveMovimientoService extends CrudService {
|
|
3610
|
+
constructor(http) {
|
|
3611
|
+
super(http, 'claveMovimiento');
|
|
3612
|
+
}
|
|
3613
|
+
}
|
|
3614
|
+
/** @nocollapse */ ClaveMovimientoService.ɵfac = function ClaveMovimientoService_Factory(t) { return new (t || ClaveMovimientoService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3615
|
+
/** @nocollapse */ ClaveMovimientoService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: ClaveMovimientoService, factory: ClaveMovimientoService.ɵfac, providedIn: 'root' });
|
|
3616
|
+
(function () {
|
|
3617
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ClaveMovimientoService, [{
|
|
3618
|
+
type: Injectable,
|
|
3619
|
+
args: [{
|
|
3620
|
+
providedIn: 'root'
|
|
3621
|
+
}]
|
|
3622
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3623
|
+
})();
|
|
3624
|
+
|
|
3625
|
+
class Cliente {
|
|
3626
|
+
constructor() {
|
|
3627
|
+
this.agenteCobrador = new Agente();
|
|
3628
|
+
this.agenteVendedor = new Agente();
|
|
3629
|
+
this.personaFisica = new PersonaFisica();
|
|
3630
|
+
this.personaMoral = new PersonaMoral();
|
|
3631
|
+
}
|
|
3632
|
+
}
|
|
3633
|
+
|
|
3634
|
+
class ClienteCuentaBanco {
|
|
3635
|
+
constructor() {
|
|
3636
|
+
this.banco = new Banco();
|
|
3637
|
+
this.estatus = true;
|
|
3638
|
+
}
|
|
3639
|
+
}
|
|
3640
|
+
|
|
3641
|
+
class Flete {
|
|
3642
|
+
constructor() { }
|
|
3643
|
+
}
|
|
3644
|
+
|
|
3645
|
+
class ClienteFlete {
|
|
3646
|
+
constructor() {
|
|
3647
|
+
this.cliente = new Cliente();
|
|
3648
|
+
this.flete = new Flete();
|
|
3649
|
+
this.estatus = true;
|
|
3650
|
+
}
|
|
3651
|
+
}
|
|
3652
|
+
|
|
3653
|
+
class ClienteCuentaBancoService extends CrudService {
|
|
3654
|
+
constructor(httpClient) {
|
|
3655
|
+
super(httpClient, '/clienteCuentaBanco');
|
|
3656
|
+
this.httpClient = httpClient;
|
|
3657
|
+
}
|
|
3658
|
+
saveAll(params) {
|
|
3659
|
+
let p = { 'cuentas': params };
|
|
3660
|
+
return this.httpClient.post(this.geturl(), p, this.buildAuth());
|
|
3661
|
+
}
|
|
3662
|
+
}
|
|
3663
|
+
/** @nocollapse */ ClienteCuentaBancoService.ɵfac = function ClienteCuentaBancoService_Factory(t) { return new (t || ClienteCuentaBancoService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3664
|
+
/** @nocollapse */ ClienteCuentaBancoService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: ClienteCuentaBancoService, factory: ClienteCuentaBancoService.ɵfac, providedIn: 'root' });
|
|
3665
|
+
(function () {
|
|
3666
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ClienteCuentaBancoService, [{
|
|
3667
|
+
type: Injectable,
|
|
3668
|
+
args: [{
|
|
3669
|
+
providedIn: 'root'
|
|
3670
|
+
}]
|
|
3671
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3672
|
+
})();
|
|
3673
|
+
|
|
3674
|
+
class ClienteFleteService extends CrudService {
|
|
3675
|
+
constructor(httpClient) {
|
|
3676
|
+
super(httpClient, '/clienteFlete');
|
|
3677
|
+
this.httpClient = httpClient;
|
|
3678
|
+
}
|
|
3679
|
+
saveAll(p) {
|
|
3680
|
+
let params = { fletes: p };
|
|
3681
|
+
return this.save(params);
|
|
3682
|
+
}
|
|
3683
|
+
}
|
|
3684
|
+
/** @nocollapse */ ClienteFleteService.ɵfac = function ClienteFleteService_Factory(t) { return new (t || ClienteFleteService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3685
|
+
/** @nocollapse */ ClienteFleteService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: ClienteFleteService, factory: ClienteFleteService.ɵfac, providedIn: 'root' });
|
|
3686
|
+
(function () {
|
|
3687
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ClienteFleteService, [{
|
|
3688
|
+
type: Injectable,
|
|
3689
|
+
args: [{
|
|
3690
|
+
providedIn: 'root'
|
|
3691
|
+
}]
|
|
3692
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3693
|
+
})();
|
|
3694
|
+
|
|
3695
|
+
class TipoContacto {
|
|
3696
|
+
constructor() {
|
|
3697
|
+
this.estatus = true;
|
|
3698
|
+
}
|
|
3699
|
+
}
|
|
3700
|
+
|
|
3701
|
+
class DatoContacto {
|
|
3702
|
+
constructor() {
|
|
3703
|
+
this.tipoContacto = new TipoContacto();
|
|
3704
|
+
}
|
|
3705
|
+
}
|
|
3706
|
+
|
|
3707
|
+
class DatoContactoService extends CrudService {
|
|
3708
|
+
constructor(http) {
|
|
3709
|
+
super(http, '/contacto');
|
|
3710
|
+
}
|
|
3711
|
+
}
|
|
3712
|
+
/** @nocollapse */ DatoContactoService.ɵfac = function DatoContactoService_Factory(t) { return new (t || DatoContactoService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3713
|
+
/** @nocollapse */ DatoContactoService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: DatoContactoService, factory: DatoContactoService.ɵfac, providedIn: 'root' });
|
|
3714
|
+
(function () {
|
|
3715
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DatoContactoService, [{
|
|
3716
|
+
type: Injectable,
|
|
3717
|
+
args: [{
|
|
3718
|
+
providedIn: 'root'
|
|
3719
|
+
}]
|
|
3720
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3721
|
+
})();
|
|
3722
|
+
|
|
3723
|
+
class DatoDireccionService extends CrudService {
|
|
3724
|
+
constructor(http) {
|
|
3725
|
+
super(http, '/datoDireccion');
|
|
3726
|
+
}
|
|
3727
|
+
}
|
|
3728
|
+
/** @nocollapse */ DatoDireccionService.ɵfac = function DatoDireccionService_Factory(t) { return new (t || DatoDireccionService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3729
|
+
/** @nocollapse */ DatoDireccionService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: DatoDireccionService, factory: DatoDireccionService.ɵfac, providedIn: 'root' });
|
|
3730
|
+
(function () {
|
|
3731
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DatoDireccionService, [{
|
|
3732
|
+
type: Injectable,
|
|
3733
|
+
args: [{
|
|
3734
|
+
providedIn: 'root'
|
|
3735
|
+
}]
|
|
3736
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3737
|
+
})();
|
|
3738
|
+
|
|
3739
|
+
class Departamento {
|
|
3740
|
+
constructor() {
|
|
3741
|
+
}
|
|
3742
|
+
}
|
|
3743
|
+
|
|
3744
|
+
class DepartamentoService extends CrudService {
|
|
3745
|
+
constructor(http) {
|
|
3746
|
+
super(http, '/departamento');
|
|
3747
|
+
}
|
|
3748
|
+
}
|
|
3749
|
+
/** @nocollapse */ DepartamentoService.ɵfac = function DepartamentoService_Factory(t) { return new (t || DepartamentoService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3750
|
+
/** @nocollapse */ DepartamentoService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: DepartamentoService, factory: DepartamentoService.ɵfac, providedIn: 'root' });
|
|
3751
|
+
(function () {
|
|
3752
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DepartamentoService, [{
|
|
3753
|
+
type: Injectable,
|
|
3754
|
+
args: [{
|
|
3755
|
+
providedIn: 'root'
|
|
3756
|
+
}]
|
|
3757
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3758
|
+
})();
|
|
3759
|
+
|
|
3760
|
+
class FormaPago {
|
|
3761
|
+
constructor() { }
|
|
3762
|
+
}
|
|
3763
|
+
|
|
3764
|
+
class Empresa {
|
|
3765
|
+
constructor() {
|
|
3766
|
+
this.datoDireccion = new DatoDireccion();
|
|
3767
|
+
this.personaMoral = new PersonaMoral();
|
|
3768
|
+
this.claveFormaPagoEfectivo = new FormaPago();
|
|
3769
|
+
}
|
|
3770
|
+
}
|
|
3771
|
+
|
|
3772
|
+
class ConfiguracionEmpresaAdministrativa {
|
|
3773
|
+
constructor() {
|
|
3774
|
+
this.empresa = new Empresa();
|
|
3775
|
+
}
|
|
3776
|
+
}
|
|
3777
|
+
|
|
3778
|
+
class EmpresaService extends CrudService {
|
|
3779
|
+
constructor(httpClient) {
|
|
3780
|
+
super(httpClient, '/empresa');
|
|
3781
|
+
this.httpClient = httpClient;
|
|
3782
|
+
}
|
|
3783
|
+
get() {
|
|
3784
|
+
// return super.get(1);
|
|
3785
|
+
return this.httpClient.get(this.getBaseUrl() + '/configuracionEmpresaAdministrativo/configuracionUsuario', this.buildAuth());
|
|
3786
|
+
}
|
|
3787
|
+
}
|
|
3788
|
+
/** @nocollapse */ EmpresaService.ɵfac = function EmpresaService_Factory(t) { return new (t || EmpresaService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3789
|
+
/** @nocollapse */ EmpresaService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: EmpresaService, factory: EmpresaService.ɵfac, providedIn: 'root' });
|
|
3790
|
+
(function () {
|
|
3791
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EmpresaService, [{
|
|
3792
|
+
type: Injectable,
|
|
3793
|
+
args: [{
|
|
3794
|
+
providedIn: 'root'
|
|
3795
|
+
}]
|
|
3796
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3797
|
+
})();
|
|
3798
|
+
|
|
3799
|
+
class FleteService extends CrudService {
|
|
3800
|
+
constructor(httpClient) {
|
|
3801
|
+
super(httpClient, '/flete');
|
|
3802
|
+
this.httpClient = httpClient;
|
|
3803
|
+
}
|
|
3804
|
+
}
|
|
3805
|
+
/** @nocollapse */ FleteService.ɵfac = function FleteService_Factory(t) { return new (t || FleteService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3806
|
+
/** @nocollapse */ FleteService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: FleteService, factory: FleteService.ɵfac, providedIn: 'root' });
|
|
3807
|
+
(function () {
|
|
3808
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FleteService, [{
|
|
3809
|
+
type: Injectable,
|
|
3810
|
+
args: [{
|
|
3811
|
+
providedIn: 'root'
|
|
3812
|
+
}]
|
|
3813
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3814
|
+
})();
|
|
3815
|
+
|
|
3816
|
+
class FormaPagoService extends CrudService {
|
|
3817
|
+
constructor(http) {
|
|
3818
|
+
super(http, '/FormaDePago');
|
|
3819
|
+
}
|
|
3820
|
+
}
|
|
3821
|
+
/** @nocollapse */ FormaPagoService.ɵfac = function FormaPagoService_Factory(t) { return new (t || FormaPagoService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3822
|
+
/** @nocollapse */ FormaPagoService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: FormaPagoService, factory: FormaPagoService.ɵfac, providedIn: "root" });
|
|
3823
|
+
(function () {
|
|
3824
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormaPagoService, [{
|
|
3825
|
+
type: Injectable,
|
|
3826
|
+
args: [{
|
|
3827
|
+
providedIn: "root"
|
|
3828
|
+
}]
|
|
3829
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3830
|
+
})();
|
|
3831
|
+
|
|
3832
|
+
class Moneda {
|
|
3833
|
+
constructor() { }
|
|
3834
|
+
}
|
|
3835
|
+
|
|
3836
|
+
class MonedaService extends CrudService {
|
|
3837
|
+
constructor(httpClient) {
|
|
3838
|
+
super(httpClient, '/moneda');
|
|
3839
|
+
this.httpClient = httpClient;
|
|
3840
|
+
}
|
|
3841
|
+
}
|
|
3842
|
+
/** @nocollapse */ MonedaService.ɵfac = function MonedaService_Factory(t) { return new (t || MonedaService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3843
|
+
/** @nocollapse */ MonedaService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: MonedaService, factory: MonedaService.ɵfac, providedIn: 'root' });
|
|
3844
|
+
(function () {
|
|
3845
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MonedaService, [{
|
|
3846
|
+
type: Injectable,
|
|
3847
|
+
args: [{
|
|
3848
|
+
providedIn: 'root'
|
|
3849
|
+
}]
|
|
3850
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3851
|
+
})();
|
|
3852
|
+
|
|
3853
|
+
class EstadoCivil {
|
|
3854
|
+
constructor() { }
|
|
3855
|
+
}
|
|
3856
|
+
|
|
3857
|
+
class Genero {
|
|
3858
|
+
constructor() { }
|
|
3859
|
+
}
|
|
3860
|
+
|
|
3861
|
+
class PersonaFisicaService extends CrudService {
|
|
3862
|
+
constructor(httpClient) {
|
|
3863
|
+
super(httpClient, '/PersonaFisica');
|
|
3864
|
+
this.httpClient = httpClient;
|
|
3865
|
+
}
|
|
3866
|
+
getGeneros() {
|
|
3867
|
+
return this.httpClient.get(this.getBaseUrl() + '/genero', this.buildAuth());
|
|
3868
|
+
}
|
|
3869
|
+
getEstadoCivil() {
|
|
3870
|
+
return this.httpClient.get(this.getBaseUrl() + '/estadoCivil', this.buildAuth());
|
|
3871
|
+
}
|
|
3872
|
+
}
|
|
3873
|
+
/** @nocollapse */ PersonaFisicaService.ɵfac = function PersonaFisicaService_Factory(t) { return new (t || PersonaFisicaService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3874
|
+
/** @nocollapse */ PersonaFisicaService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: PersonaFisicaService, factory: PersonaFisicaService.ɵfac, providedIn: "root" });
|
|
3875
|
+
(function () {
|
|
3876
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PersonaFisicaService, [{
|
|
3877
|
+
type: Injectable,
|
|
3878
|
+
args: [{
|
|
3879
|
+
providedIn: "root"
|
|
3880
|
+
}]
|
|
3881
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3882
|
+
})();
|
|
3883
|
+
|
|
3884
|
+
class ProveedorCuentaBanco {
|
|
3885
|
+
constructor() {
|
|
3886
|
+
this.banco = new Banco();
|
|
3887
|
+
this.estatus = true;
|
|
3888
|
+
}
|
|
3889
|
+
}
|
|
3890
|
+
|
|
3891
|
+
class ProveedorFlete {
|
|
3892
|
+
constructor() {
|
|
3893
|
+
this.proveedor = new Proveedor();
|
|
3894
|
+
this.flete = new Flete();
|
|
3895
|
+
this.estatus = true;
|
|
3896
|
+
}
|
|
3897
|
+
}
|
|
3898
|
+
|
|
3899
|
+
class ProveedorCuentaBancoService extends CrudService {
|
|
3900
|
+
constructor(httpClient) {
|
|
3901
|
+
super(httpClient, '/proveedorCuentaBanco');
|
|
3902
|
+
this.httpClient = httpClient;
|
|
3903
|
+
}
|
|
3904
|
+
saveAll(params) {
|
|
3905
|
+
let p = { 'cuentas': params };
|
|
3906
|
+
return this.httpClient.post(this.geturl(), p, this.buildAuth());
|
|
3907
|
+
}
|
|
3908
|
+
}
|
|
3909
|
+
/** @nocollapse */ ProveedorCuentaBancoService.ɵfac = function ProveedorCuentaBancoService_Factory(t) { return new (t || ProveedorCuentaBancoService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3910
|
+
/** @nocollapse */ ProveedorCuentaBancoService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: ProveedorCuentaBancoService, factory: ProveedorCuentaBancoService.ɵfac, providedIn: 'root' });
|
|
3911
|
+
(function () {
|
|
3912
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProveedorCuentaBancoService, [{
|
|
3913
|
+
type: Injectable,
|
|
3914
|
+
args: [{
|
|
3915
|
+
providedIn: 'root'
|
|
3916
|
+
}]
|
|
3917
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3918
|
+
})();
|
|
3919
|
+
|
|
3920
|
+
class ProveedorFleteService extends CrudService {
|
|
3921
|
+
constructor(httpClient) {
|
|
3922
|
+
super(httpClient, '/proveedorFlete');
|
|
3923
|
+
this.httpClient = httpClient;
|
|
3924
|
+
}
|
|
3925
|
+
saveAll(p) {
|
|
3926
|
+
let params = { fletes: p };
|
|
3927
|
+
return this.save(params);
|
|
3928
|
+
}
|
|
3929
|
+
}
|
|
3930
|
+
/** @nocollapse */ ProveedorFleteService.ɵfac = function ProveedorFleteService_Factory(t) { return new (t || ProveedorFleteService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3931
|
+
/** @nocollapse */ ProveedorFleteService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: ProveedorFleteService, factory: ProveedorFleteService.ɵfac, providedIn: 'root' });
|
|
3932
|
+
(function () {
|
|
3933
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProveedorFleteService, [{
|
|
3934
|
+
type: Injectable,
|
|
3935
|
+
args: [{
|
|
3936
|
+
providedIn: 'root'
|
|
3937
|
+
}]
|
|
3938
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3939
|
+
})();
|
|
3940
|
+
|
|
3941
|
+
class ClaveAumentoDisminucionService extends CrudService {
|
|
3942
|
+
constructor(http) {
|
|
3943
|
+
super(http, 'claveAumentoDisminucion');
|
|
3944
|
+
}
|
|
3945
|
+
}
|
|
3946
|
+
/** @nocollapse */ ClaveAumentoDisminucionService.ɵfac = function ClaveAumentoDisminucionService_Factory(t) { return new (t || ClaveAumentoDisminucionService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3947
|
+
/** @nocollapse */ ClaveAumentoDisminucionService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: ClaveAumentoDisminucionService, factory: ClaveAumentoDisminucionService.ɵfac, providedIn: 'root' });
|
|
3948
|
+
(function () {
|
|
3949
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ClaveAumentoDisminucionService, [{
|
|
3950
|
+
type: Injectable,
|
|
3951
|
+
args: [{
|
|
3952
|
+
providedIn: 'root'
|
|
3953
|
+
}]
|
|
3954
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3955
|
+
})();
|
|
3956
|
+
|
|
3957
|
+
class SerieDocumentoService extends CrudService {
|
|
3958
|
+
constructor(httpClient) {
|
|
3959
|
+
super(httpClient, 'serieDocumento');
|
|
3960
|
+
this.httpClient = httpClient;
|
|
3961
|
+
}
|
|
3962
|
+
getTipos() {
|
|
3963
|
+
return this.httpClient.get(this.getUrl('serieDocumento') + '/tipoSerie', this.buildAuth());
|
|
3964
|
+
}
|
|
3965
|
+
getReporte(params) {
|
|
3966
|
+
return this.httpClient.get(this.getUrl('serieDocumento') + '/descargaFormatoReporte' + this.serializeParams(params), this.buildAuth());
|
|
3967
|
+
}
|
|
3968
|
+
}
|
|
3969
|
+
/** @nocollapse */ SerieDocumentoService.ɵfac = function SerieDocumentoService_Factory(t) { return new (t || SerieDocumentoService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3970
|
+
/** @nocollapse */ SerieDocumentoService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: SerieDocumentoService, factory: SerieDocumentoService.ɵfac, providedIn: 'root' });
|
|
3971
|
+
(function () {
|
|
3972
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SerieDocumentoService, [{
|
|
3973
|
+
type: Injectable,
|
|
3974
|
+
args: [{
|
|
3975
|
+
providedIn: 'root'
|
|
3976
|
+
}]
|
|
3977
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3978
|
+
})();
|
|
3979
|
+
|
|
3980
|
+
class SerieDocumento {
|
|
3981
|
+
constructor() { }
|
|
3982
|
+
}
|
|
3983
|
+
|
|
3984
|
+
class TipoContactoService extends CrudService {
|
|
3985
|
+
constructor(http) {
|
|
3986
|
+
super(http, '/tipoContacto');
|
|
3987
|
+
}
|
|
3988
|
+
}
|
|
3989
|
+
/** @nocollapse */ TipoContactoService.ɵfac = function TipoContactoService_Factory(t) { return new (t || TipoContactoService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
3990
|
+
/** @nocollapse */ TipoContactoService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: TipoContactoService, factory: TipoContactoService.ɵfac, providedIn: 'root' });
|
|
3991
|
+
(function () {
|
|
3992
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TipoContactoService, [{
|
|
3993
|
+
type: Injectable,
|
|
3994
|
+
args: [{
|
|
3995
|
+
providedIn: 'root'
|
|
3996
|
+
}]
|
|
3997
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
3998
|
+
})();
|
|
3999
|
+
|
|
4000
|
+
class Ubicacion {
|
|
4001
|
+
constructor() { }
|
|
4002
|
+
}
|
|
4003
|
+
|
|
4004
|
+
class UbicacionService extends CrudService {
|
|
4005
|
+
constructor(http) {
|
|
4006
|
+
super(http, 'ubicacion');
|
|
4007
|
+
}
|
|
4008
|
+
}
|
|
4009
|
+
/** @nocollapse */ UbicacionService.ɵfac = function UbicacionService_Factory(t) { return new (t || UbicacionService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
4010
|
+
/** @nocollapse */ UbicacionService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: UbicacionService, factory: UbicacionService.ɵfac, providedIn: 'root' });
|
|
4011
|
+
(function () {
|
|
4012
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UbicacionService, [{
|
|
4013
|
+
type: Injectable,
|
|
4014
|
+
args: [{
|
|
4015
|
+
providedIn: 'root'
|
|
4016
|
+
}]
|
|
4017
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
4018
|
+
})();
|
|
4019
|
+
|
|
4020
|
+
class TipoCatalogo {
|
|
4021
|
+
}
|
|
4022
|
+
TipoCatalogo.ARTICULO = 2;
|
|
4023
|
+
TipoCatalogo.USO_CFDI = 11;
|
|
4024
|
+
|
|
4025
|
+
class AcreedorCuentaContableService extends CrudService {
|
|
4026
|
+
constructor(httpClient) {
|
|
4027
|
+
super(httpClient, 'acreedorCuentaContable');
|
|
4028
|
+
this.httpClient = httpClient;
|
|
4029
|
+
}
|
|
4030
|
+
cuentasContables() {
|
|
4031
|
+
let uRL = "/cuentaContable/obtieneCuentasContablesRecursivo/";
|
|
4032
|
+
return this.httpClient.get(this.getUrl() + uRL, this.buildAuth());
|
|
4033
|
+
}
|
|
4034
|
+
}
|
|
4035
|
+
/** @nocollapse */ AcreedorCuentaContableService.ɵfac = function AcreedorCuentaContableService_Factory(t) { return new (t || AcreedorCuentaContableService)(i0.ɵɵinject(i1.HttpClient)); };
|
|
4036
|
+
/** @nocollapse */ AcreedorCuentaContableService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: AcreedorCuentaContableService, factory: AcreedorCuentaContableService.ɵfac, providedIn: 'root' });
|
|
4037
|
+
(function () {
|
|
4038
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AcreedorCuentaContableService, [{
|
|
4039
|
+
type: Injectable,
|
|
4040
|
+
args: [{
|
|
4041
|
+
providedIn: 'root'
|
|
4042
|
+
}]
|
|
4043
|
+
}], function () { return [{ type: i1.HttpClient }]; }, null);
|
|
4044
|
+
})();
|
|
4045
|
+
|
|
4046
|
+
class CuentaContableModel {
|
|
4047
|
+
constructor() {
|
|
4048
|
+
}
|
|
4049
|
+
;
|
|
4050
|
+
}
|
|
4051
|
+
|
|
4052
|
+
class NormaInformacionFinancieraModel {
|
|
4053
|
+
constructor() { }
|
|
4054
|
+
;
|
|
4055
|
+
}
|
|
4056
|
+
|
|
4057
|
+
/*
|
|
4058
|
+
* Public API Surface of erp-core
|
|
4059
|
+
*/
|
|
4060
|
+
|
|
4061
|
+
/**
|
|
4062
|
+
* Generated bundle index. Do not edit.
|
|
4063
|
+
*/
|
|
4064
|
+
|
|
4065
|
+
export { AcreedorCuentaContableService, AcreedorService, Agente, AgenteService, Almacen, AlmacenService, Auth, AuthService, Authenticated, Banco, BancoService, CanActivateGuard, CatalogoAdicionalService, CatalogoTipo, CatalogoTipoService, CclistaComponent, CcseleccionDialogComponent, ClasificadorTipo, ClasificadorTipoService, ClaveAumentoDisminucionService, ClaveMovimiento, ClaveMovimientoService, Cliente, ClienteCuentaBanco, ClienteCuentaBancoService, ClienteFlete, ClienteFleteService, ClienteService, ConfiguracionEmpresaAdministrativa, ControlAccesoService, CoreLibModule, CrudService, CuentaContableModel, DatoContacto, DatoContactoService, DatoDireccion, DatoDireccionService, Departamento, DepartamentoService, Empresa, EmpresaService, Error404Component, EstadoCivil, FileService, Flete, FleteService, FormaPago, FormaPagoService, Genero, GlobalService, HttpLoaderFactory, InitService, LoadingComponent, LoadingScreenComponent, LoadingScreenService, LoadingService, LoginModalComponent, LoginModalService, MessageService, Moneda, MonedaService, NormaInformacionFinancieraModel, PaginateService, PdfModalComponent, PdfModalService, Persona, PersonaFisica, PersonaFisicaService, PersonaMoral, PersonaMoralService, Proveedor, ProveedorCuentaBanco, ProveedorCuentaBancoService, ProveedorFlete, ProveedorFleteService, ProveedorService, SeleccionaArticuloComponent, SelectAcreedorComponent, SelectClienteComponent, SelectProveedorComponent, SerieDocumento, SerieDocumentoService, SessionCajaService, SessionCreateComponent, StockService, TipoCatalogo, TipoContacto, TipoContactoService, Ubicacion, UbicacionService, Usuario, VersionCheckService, httpInterceptor };
|
|
4066
|
+
//# sourceMappingURL=visorus-erp-core.mjs.map
|