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 f5704771
authored
2024-08-07 11:35:46 -0300
by
Tu Nombre
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Corrijo manejo templates
1 parent
ed9a5698
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
main.py
reportes.py
static/src/carbone.js
main.py
View file @
f570477
...
@@ -75,7 +75,10 @@ def consulta_reporte():
...
@@ -75,7 +75,10 @@ def consulta_reporte():
tipo
=
request
.
json
[
'tipo'
]
tipo
=
request
.
json
[
'tipo'
]
ejes
=
request
.
json
[
'cantidadEjes'
]
ejes
=
request
.
json
[
'cantidadEjes'
]
combustible
=
request
.
json
[
'conbustible'
]
combustible
=
request
.
json
[
'conbustible'
]
return
json
.
dumps
({
"reporte"
:
Repo
.
BuscarReporteDefecto
(
linea
,
tipo
,
ejes
)})
return
json
.
dumps
(
{
"reporte"
:
Repo
.
BuscarReporteDefecto
(
linea
,
tipo
,
ejes
,
combustible
)
})
@app.route
(
'/historico'
)
@app.route
(
'/historico'
)
...
@@ -385,7 +388,7 @@ def gotolinea(driver_abs,answer):
...
@@ -385,7 +388,7 @@ def gotolinea(driver_abs,answer):
element_1
.
click
()
element_1
.
click
()
answer
[
"header"
][
"linea_numero"
]
=
linea
answer
[
"header"
][
"linea_numero"
]
=
linea
answer
[
"header"
][
"vehiculo_tipo"
]
=
cat
answer
[
"header"
][
"vehiculo_tipo"
]
=
cat
answer
[
'header'
][
"ReporteInspeccion"
]
=
Repo
.
BuscarReporteDefecto
(
linea
,
cat
)
answer
[
'header'
][
"ReporteInspeccion"
]
=
Repo
.
BuscarReporteDefecto
(
linea
,
cat
,
conbustible
=
conv
)
#Hay que ver esto
...
...
reportes.py
View file @
f570477
...
@@ -19,12 +19,12 @@ def BuscarReporteDefecto(linea,tipo,cantidadEjes=2,conbustible="Nafta"):
...
@@ -19,12 +19,12 @@ def BuscarReporteDefecto(linea,tipo,cantidadEjes=2,conbustible="Nafta"):
try
:
try
:
rta
=
data
[
linea
][
tipo
][
cantidadEjes
]
rta
=
data
[
linea
][
tipo
][
cantidadEjes
]
except
:
except
:
rta
=
f
"Error, reporte no encontrado {linea}, tipo: {tipo}, ejes {cantidadEjes}"
# rta = configuracion.reporte_defecto[cantidadEjes]
# rta = configuracion.reporte_defecto[cantidadEjes]
print
(
rta
=
""
)
rta
=
""
#if rta in ["",False]:
#if rta in ["",False]:
# rta = configuracion.reporte_defecto[cantidadEjes]
# rta = configuracion.reporte_defecto[cantidadEjes]
#print(rta)
#print(rta)
print
(
f
"Error, reporte no encontrado {linea}, tipo: {tipo}, ejes {cantidadEjes}, convustible={conbustible}"
)
return
rta
return
rta
static/src/carbone.js
View file @
f570477
...
@@ -24,7 +24,7 @@ function Reportar (){
...
@@ -24,7 +24,7 @@ function Reportar (){
if
(
template
.
value
!==
""
)
{
if
(
template
.
value
!==
""
)
{
generarReporteTemplate
(
template
.
value
)
generarReporteTemplate
(
template
.
value
)
}
else
{
}
else
{
message
(
"Error en la
carga de reporte anote el numero de planilla y consulte a soporte
"
)
message
(
"Error en la
generacion de reporte anote el numero de planilla y consulte a soporte, puede que no este cargado el template o falte algun dato
"
)
}
}
}
}
...
...
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