Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
Pruebas-RTO
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 0e427762
authored
2024-07-31 13:17:01 -0300
by
Tu Nombre
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Enpiesa a andar la carga rapida
1 parent
b852e72b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
main.py
protected_static/cargarapida.js
main.py
View file @
0e42776
...
@@ -248,7 +248,7 @@ def ReporteEstatico():
...
@@ -248,7 +248,7 @@ def ReporteEstatico():
d
=
request
.
json
d
=
request
.
json
planilla
=
d
[
"numeroplanilla"
]
planilla
=
d
[
"numeroplanilla"
]
PlanillasCentTMP
[
planilla
]
=
d
PlanillasCentTMP
[
planilla
]
=
d
print
(
PlanillasCentTMP
)
#
print(PlanillasCentTMP)
except
Exception
as
E
:
except
Exception
as
E
:
estado
=
str
(
E
)
estado
=
str
(
E
)
...
...
protected_static/cargarapida.js
View file @
0e42776
...
@@ -60,17 +60,35 @@ function llendoTentativo(data) {
...
@@ -60,17 +60,35 @@ function llendoTentativo(data) {
//const patenteField = document.querySelector('input[name="patente"]');
//const patenteField = document.querySelector('input[name="patente"]');
// Establece el valor del campo de entrada con data.name
// Establece el valor del campo de entrada con data.name
console
.
log
(
data
.
name
)
//console.log(data
)
const
patenteFields
=
document
.
querySelectorAll
(
'input[name="patente"]'
);
const
patenteFields
=
document
.
querySelectorAll
(
'input[name="patente"]'
);
patenteFields
.
forEach
(
field
=>
{
patenteFields
.
forEach
(
field
=>
{
field
.
value
=
data
.
name
;
field
.
value
=
data
.
name
;
});
});
if
(
isStatusActive
(
name
.
resultado
))
{
if
(
isStatusActive
(
name
.
resultado
))
{
return
None
return
None
}
}
else
{
document
.
getElementById
(
"report"
).
style
.
display
=
"block"
;
document
.
getElementById
(
"report"
).
style
.
display
=
"block"
;
document
.
getElementById
(
"form"
).
style
.
display
=
"none"
;
document
.
getElementById
(
"form"
).
style
.
display
=
"none"
;
let
linea
=
JSON
.
parse
(
data
.
json_cent
);
let
inspaccion
=
linea
.
rta
//console.log(inspaccion)
fillResults
(
inspaccion
)
};
}
function
fillResults
(
results
)
{
const
r
=
document
.
getElementById
(
"report"
)
const
inputs
=
r
.
getElementsByTagName
(
"input"
);
Array
.
from
(
inputs
).
forEach
(
input
=>
{
if
(
input
.
name
==
"defecto"
)
return
;
const
sub
=
input
.
getAttribute
(
"sub"
);
const
value
=
results
[
sub
]
&&
results
[
sub
][
input
.
name
]
!==
undefined
?
results
[
sub
][
input
.
name
]
:
"?"
;
input
.
value
=
value
;
});
}
}
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment