Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
formularioConformidad
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fernando José Palomino Aquino
formularioConformidad
Commits
c2b1c58b
Commit
c2b1c58b
authored
Mar 05, 2025
by
Fernando José Palomino Aquino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EDIT] AJUSTE DE DATOS Y CANTIDAD EN STRING
parent
524a9611
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
75 deletions
+59
-75
conformidad.componente.ts
src/app/pages/conformidad/conformidad.componente.ts
+14
-26
conformidad.helper.ts
src/app/pages/conformidad/helper/conformidad.helper.ts
+14
-28
modalArticuloOC.componente.html
...nformidad/modalArticuloOC/modalArticuloOC.componente.html
+1
-1
modalEvidencia.componente.ts
...s/conformidad/modalEvidencia/modalEvidencia.componente.ts
+0
-1
modalFirma.componente.ts
...app/pages/conformidad/modalFirma/modalFirma.componente.ts
+0
-7
modalTicket.componente.ts
...p/pages/conformidad/modalTicket/modalTicket.componente.ts
+1
-1
ordensalida.componente.ts
src/app/pages/ordensalida/ordensalida.componente.ts
+1
-2
conformidad.service.ts
src/app/service/conformidad_service/conformidad.service.ts
+28
-9
No files found.
src/app/pages/conformidad/conformidad.componente.ts
View file @
c2b1c58b
...
...
@@ -249,17 +249,15 @@ export class ConformidadComponent implements AfterViewInit {
cargosUnidos
,
unidades
]
=
await
Promise
.
all
([
this
.
conformidadHelper
.
cargar
Personal
(),
this
.
conformidadHelper
.
cargar
Sedes
(),
this
.
conformidadHelper
.
gestionConformidad
({
opcion
:
9
}),
this
.
conformidadHelper
.
cargar
CargosU
(),
this
.
conformidadHelper
.
cargar
DatosTPRest
(
1
),
//PERSONAL
this
.
conformidadHelper
.
cargar
DatosTPRest
(
2
),
// SEDES
this
.
conformidadHelper
.
listadosConformidad
({
accion
:
4
}),
// TIPO DE TRABAJO
this
.
conformidadHelper
.
cargar
DatosTPRest
(
4
),
// UNIDADES
this
.
conformidadHelper
.
listadoGeneralHorizon
({
accion
:
5
})
]);
this
.
obtenerFormControl
(
this
.
datos_servicio
,
'busquedaTickets'
)?.
disable
();
//this.datos_servicio.get('busquedaTickets')?.disable();
//this.personal_list = personal;
this
.
sede_list
=
sede
;
this
.
cargosU_list
=
cargosUnidos
;
this
.
zona_list
=
[{
value
:
1
,
viewValue
:
'NORTE'
},{
value
:
2
,
viewValue
:
'SUR'
},{
value
:
3
,
viewValue
:
'ESTE'
},{
value
:
4
,
viewValue
:
'CENTRO'
}];
...
...
@@ -371,7 +369,6 @@ export class ConformidadComponent implements AfterViewInit {
data
:
{
requerimientoInfo
}
});
dialogRef
.
afterClosed
().
subscribe
(
result
=>
{
//console.log(`Dialog result: ${result}`);
});
}
else
{
const
ticketinfo
=
await
this
.
conformidadHelper
.
listadoGeneralTickets
({
...
...
@@ -380,14 +377,9 @@ export class ConformidadComponent implements AfterViewInit {
start
:
0
});
const
dialogRef
=
this
.
dialog
.
open
(
modalTicketComponent
,
{
/*width: '100%',
maxWidth: '90%',
minWidth: '50%',
height: '50%',*/
data
:
{
ticketinfo
}
});
dialogRef
.
afterClosed
().
subscribe
(
result
=>
{
//console.log(`Dialog result: ${result}`);
});
}
...
...
@@ -512,7 +504,6 @@ export class ConformidadComponent implements AfterViewInit {
numero
:
item
.
num_ticket
}));
console
.
log
(
mapeoResultado
);
this
.
ticketsFiltrados
=
mapeoResultado
;
}
...
...
@@ -662,7 +653,7 @@ export class ConformidadComponent implements AfterViewInit {
}
const
registroConformidad
=
await
this
.
conformidadHelper
.
gestionConformidad
({
op
cion
:
1
,
ac
cion
:
1
,
codlocal
:
datosPersonal
.
sedePersonal
+
''
,
fechainicio
:
this
.
formatoFechaRegistro
(
datosPersonal
.
minFechaTrabajo
||
new
Date
()
)
,
fechafin
:
this
.
formatoFechaRegistro
(
datosPersonal
.
maxFechaTrabajo
||
new
Date
()
)
,
...
...
@@ -703,12 +694,9 @@ export class ConformidadComponent implements AfterViewInit {
this
.
ConformidadService
.
progresoSubida
.
next
(
0
);
// Reiniciar progreso
const
RegistroArchivos
:
{
status
:
boolean
,
mensaje
:
string
}
=
await
this
.
conformidadHelper
.
subidaEvidencia3
(
paramsRegistroArchivos
);
const
responseRegistroArchivos
:
{
status
:
boolean
,
mensaje
:
string
}
=
await
this
.
conformidadHelper
.
subidaEvidencia3
(
paramsRegistroArchivos
);
if
(
RegistroArchivos
.
status
)
{
// REGISTROS DE EVIDENCIAS CONFIRMADAS Y REGISTRADAS
if
(
response
RegistroArchivos
.
status
)
{
// REGISTROS DE EVIDENCIAS CONFIRMADAS Y REGISTRADAS
Notiflix
.
Loading
.
change
(
`Registro de Personal...`
);
...
...
@@ -716,7 +704,7 @@ export class ConformidadComponent implements AfterViewInit {
const
paramsRegistroPersonal
=
personal
.
map
((
item
)
=>
{
return
{
opcion
:
8
,
accion
:
11
,
codconformidad
:
codigoConformidad
,
codper
:
item
.
id
,
}
...
...
@@ -741,7 +729,7 @@ export class ConformidadComponent implements AfterViewInit {
const
paramsRequerimientos
=
requerimientoRelacionados
.
map
((
item
)
=>
{
return
{
op
cion
:
3
,
ac
cion
:
3
,
codconformidad
:
codigoConformidad
,
codrequerimiento
:
parseInt
(
item
.
codigo
)
};
...
...
@@ -768,7 +756,7 @@ export class ConformidadComponent implements AfterViewInit {
const
paramsRegistroTickets
=
ticketsRelacionados
.
map
((
item
)
=>
{
return
{
opcion
:
12
,
accion
:
4
,
codconformidad
:
codigoConformidad
,
codrequerimiento
:
parseInt
(
item
.
codigo
)
};
...
...
@@ -828,7 +816,7 @@ export class ConformidadComponent implements AfterViewInit {
if
(
statusOrdenSalida
)
{
// UNION DE LA ORDEN DE SALIDA CON LA CONFORMIDAD
const
relacionarOrdenConformidad
=
await
this
.
conformidadHelper
.
gestionConformidad
({
opcion
:
6
,
accion
:
5
,
codconformidad
:
codigoConformidad
,
codordensalida
:
respuestaOrdenSalida
.
data
.
codordensalida
});
...
...
@@ -873,10 +861,10 @@ export class ConformidadComponent implements AfterViewInit {
this
.
mostrarAlertaError
(
'FALLO DE REGISTRO'
,
'ERROR AL REGISTRAR EL PERSONAL'
);
}
}
else
{
this
.
mostrarAlertaError
(
'ERROR DE SUBIDA DE EVIDENCIA'
,
RegistroArchivos
.
mensaje
);
this
.
mostrarAlertaError
(
'ERROR DE SUBIDA DE EVIDENCIA'
,
response
RegistroArchivos
.
mensaje
);
//Agregar el eliminar registro y eliminar Documento.
await
this
.
conformidadHelper
.
eliminar
Archivo
({
op
cion
:
1
,
await
this
.
conformidadHelper
.
eliminar
Conformidad
({
ac
cion
:
1
,
codconformidad
:
codigoConformidad
});
}
...
...
src/app/pages/conformidad/helper/conformidad.helper.ts
View file @
c2b1c58b
...
...
@@ -8,31 +8,9 @@ export class ConformidadHelper {
constructor
(
public
ConformidadService
:
ConformidadService
)
{}
async
cargarPersonal
(){
const
respuesta
=
await
this
.
ConformidadService
.
listadoGeneral
(
1
);
if
(
respuesta
?.
status
){
return
respuesta
.
data
;
}
else
{
return
[];
}
}
async
cargarSedes
(){
const
respuesta
=
await
this
.
ConformidadService
.
listadoGeneral
(
2
);
if
(
respuesta
?.
status
){
return
respuesta
.
data
;
}
else
{
return
[];
}
}
async
cargarCargosU
(){
const
respuesta
=
await
this
.
ConformidadService
.
listadoGeneral
(
4
);
if
(
respuesta
?.
status
){
return
respuesta
.
data
;
}
else
{
return
[];
}
async
cargarDatosTPRest
(
tipo
:
number
)
{
const
respuesta
=
await
this
.
ConformidadService
.
listadoGeneral
(
tipo
);
return
respuesta
?.
status
?
respuesta
.
data
:
[];
}
async
listadoGeneralHorizon
(
json
:
any
){
...
...
@@ -62,14 +40,22 @@ export class ConformidadHelper {
}
}
async
listadosConformidad
(
json
:
any
){
const
respuesta
=
await
this
.
ConformidadService
.
listadosConformidad
(
json
);
if
(
respuesta
?.
status
)
{
return
respuesta
.
json
;
}
else
{
return
[];
}
}
async
subidaEvidencia3
(
json
:
any
){
const
respuesta
=
await
this
.
ConformidadService
.
subidaEvidencia3
(
json
);
//console.log(respuesta);
return
respuesta
}
async
eliminar
Archivo
(
json
:
any
){
const
respuesta
=
await
this
.
ConformidadService
.
eliminar
Archivo
(
json
);
async
eliminar
Conformidad
(
json
:
any
){
const
respuesta
=
await
this
.
ConformidadService
.
eliminar
Conformidad
(
json
);
return
respuesta
}
...
...
src/app/pages/conformidad/modalArticuloOC/modalArticuloOC.componente.html
View file @
c2b1c58b
...
...
@@ -22,7 +22,7 @@
<mat-label>
CANTIDAD :
</mat-label>
<mat-form-field
class=
"w-full"
>
<mat-label>
Ingrese cantidad
</mat-label>
<input
formControlName=
"cantidadArticulo"
matInput
soloNumeros=
"entero"
maxlength=
"5"
placeholder=
"Máx. 5 dígitos"
>
<input
formControlName=
"cantidadArticulo"
matInput
maxlength=
"5"
placeholder=
"Máx. 5 dígitos"
>
</mat-form-field>
</div>
...
...
src/app/pages/conformidad/modalEvidencia/modalEvidencia.componente.ts
View file @
c2b1c58b
...
...
@@ -27,6 +27,5 @@ export class modalEvidenciaComponent {
@
Inject
(
MAT_DIALOG_DATA
)
public
data
:
any
)
{
//console.log(data);
}
}
src/app/pages/conformidad/modalFirma/modalFirma.componente.ts
View file @
c2b1c58b
...
...
@@ -49,7 +49,6 @@ export class modalFirmaComponent implements AfterViewInit {
public
data
:
any
,
public
dialogRef
:
MatDialogRef
<
modalFirmaComponent
>
)
{
console
.
log
(
data
);
}
...
...
@@ -115,10 +114,7 @@ export class modalFirmaComponent implements AfterViewInit {
const
nombre
=
'FirmaConformidad.jpg'
;
this
.
dialogRef
.
close
({
blob
,
nombre
,
size
});
//this.dialogRef.close(sign);
//console.log(blob);
}
dataURLToBlob
(
dataURL
:
string
):
Blob
{
...
...
@@ -137,12 +133,9 @@ export class modalFirmaComponent implements AfterViewInit {
drawComplete
(
event
:
TouchEvent
)
{
const
sign
=
this
.
signaturePad
.
toDataURL
();
//console.log(sign);
//this.signImage.emit(sign);
}
drawStart
(
event
:
TouchEvent
)
{
//console.log('Start drawing', event);
}
}
src/app/pages/conformidad/modalTicket/modalTicket.componente.ts
View file @
c2b1c58b
...
...
@@ -108,6 +108,6 @@ export class modalTicketComponent implements AfterViewInit {
}
async
ngAfterViewInit
():
Promise
<
void
>
{
this
.
contenedorMensaje
.
nativeElement
.
innerHTML
=
this
.
datosPrincipales
.
mensaje
;
this
.
contenedorMensaje
.
nativeElement
.
innerHTML
=
this
.
datosPrincipales
.
mensaje
.
replace
(
/<figure>.*
?
<
\/
figure>/
s
,
""
)
;
}
}
src/app/pages/ordensalida/ordensalida.componente.ts
View file @
c2b1c58b
...
...
@@ -37,7 +37,7 @@ interface listaArticulos{
codigo
:
string
,
nombre
:
string
,
unidad
:
string
,
cantidad
:
number
,
cantidad
:
string
,
estado
:
number
,
}
...
...
@@ -189,7 +189,6 @@ export class ordenSalidaComponent implements OnInit {
});
dialogRef
.
afterClosed
().
subscribe
(
result
=>
{
console
.
log
(
result
);
if
(
!
result
.
Cancelado
){
const
NuevaFila
:
listaArticulos
=
{
...
...
src/app/service/conformidad_service/conformidad.service.ts
View file @
c2b1c58b
...
...
@@ -88,7 +88,7 @@ export class ConformidadService {
async
gestionConformidad
(
json
:
any
)
{
const
Parametros
=
{
opcion
:
json
.
op
cion
||
0
,
accion
:
json
.
ac
cion
||
0
,
codconformidad
:
json
.
codconformidad
||
0
,
codper
:
json
.
codper
||
0
,
codlocal
:
json
.
codlocal
||
''
,
...
...
@@ -108,13 +108,33 @@ export class ConformidadService {
try
{
const
respuesta
=
await
axios
.
post
(
this
.
t_facturacion_electronica_link
+
'/api/v1/conformidad/registrarConformidad'
,
Parametros
);
//console.log(respuesta);
return
respuesta
.
data
;
}
catch
(
e
)
{
return
e
;
}
}
async
listadosConformidad
(
json
:
any
)
{
const
Parametros
=
{
accion
:
json
.
accion
||
0
,
codconformidad
:
json
.
codconformidad
||
0
,
codper
:
json
.
codper
||
0
,
codlocal
:
json
.
codlocal
||
''
,
fechainicio
:
json
.
fechainicio
||
'1999-01-01'
,
fechafin
:
json
.
fechafin
||
'1999-01-01'
,
codtipotrabajo
:
json
.
codtipotrabajo
||
0
};
try
{
const
respuesta
=
await
axios
.
post
(
this
.
t_facturacion_electronica_link
+
'/api/v1/conformidad/listadosConformidad'
,
Parametros
);
return
respuesta
.
data
;
}
catch
(
e
)
{
return
e
;
}
}
async
creacionCarpeta
(
json
:
any
)
{
let
respuesta
:
any
;
const
url
=
`
${
this
.
t_redireccionamiento
}
/google/drive/carpeta`
;
...
...
@@ -198,7 +218,7 @@ export class ConformidadService {
const
responseBody
=
await
response
.
json
();
if
(
responseBody
?.
status
)
{
await
this
.
registroArchivo
({
await
this
.
gestionDocumentos
({
codconformidad
:
datos
.
codconformidad
||
0
,
tipoEvidencia
:
datos
.
tipoEvidencia
||
0
,
idDrive
:
responseBody
.
data
.
archivo_id
||
""
,
...
...
@@ -251,7 +271,7 @@ export class ConformidadService {
}
async
registroArchivo
(
json
:
any
)
{
async
gestionDocumentos
(
json
:
any
)
{
const
parametros
=
{
accion
:
1
,
codconformidad
:
json
.
codconformidad
||
0
,
...
...
@@ -264,7 +284,7 @@ export class ConformidadService {
};
try
{
const
respuesta
=
await
axios
.
post
(
this
.
t_facturacion_electronica_link
+
'/api/v1/conformidad/
registro
Documentos'
,
parametros
);
const
respuesta
=
await
axios
.
post
(
this
.
t_facturacion_electronica_link
+
'/api/v1/conformidad/
gestion
Documentos'
,
parametros
);
return
respuesta
.
data
;
}
catch
(
e
)
{
...
...
@@ -272,7 +292,7 @@ export class ConformidadService {
}
}
async
eliminar
Archivo
(
json
:
any
){
async
eliminar
Conformidad
(
json
:
any
){
const
parametros
=
{
accion
:
1
,
codconformidad
:
json
.
codconformidad
||
0
,
...
...
@@ -291,13 +311,12 @@ export class ConformidadService {
const
parametros
=
{
accion
:
json
.
accion
||
0
,
codOrdenSalida
:
json
.
codOrdenSalida
||
0
,
codlocal
:
json
.
codlocal
||
''
,
descripcion
:
json
.
descripcion
||
''
,
fechaRegistro
:
json
.
fechaRegistro
||
''
,
descripcion
:
json
.
descripcion
||
''
,
codArticulo
:
json
.
codArticulo
||
''
,
nombreArticulo
:
json
.
nombreArticulo
||
''
,
unidad
:
json
.
unidad
||
'-'
,
cantidad
:
json
.
cantidad
||
0
,
cantidad
:
json
.
cantidad
||
'0'
,
estado
:
json
.
estado
||
0
,
numordensalida
:
json
.
numordensalida
||
''
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment