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 ccd5b86e
authored
2024-02-19 12:04:39 -0300
by
Juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Se integra motor interno carbone
1 parent
812ee624
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
10 deletions
static/src/report.js
templates/form.html
test.txt
static/src/report.js
0 → 100644
View file @
ccd5b86
// script.js
function
agregarCampoAObjeto
(
nombreCampo
,
reportCampo
,
objeto
)
{
var
valor
=
document
.
getElementsByName
(
nombreCampo
)[
0
].
value
;
if
(
valor
!==
''
)
{
objeto
[
reportCampo
]
=
valor
;
}
}
document
.
getElementById
(
'boton_pdf_maha_reporte'
).
addEventListener
(
'click'
,
function
()
{
//var nombre = document.getElementById('nombre').value;
//var correo = document.getElementById('correo').value;
//var nombreInput = document.getElementsByName('nombre')[0]; // Selecciona el primer elemento con name="nombre"
//var correoInput = document.getElementsByName('correo')[0]; // Selecciona el primer elemento con name="correo"
var
solicitud
=
{
prueba
:
"prueba"
};
var
datos
=
{
solicitud
:
solicitud
,
template
:
'/home/administrador/repo_laika_hgt/uploads/Reporte_MAHA_V03.docx'
,
salida
:
'test_maha.pdf'
,
'convert_pdf'
:
true
};
//console.log(datos);
fetch
(
'https://reporte.hgt.com.ar/consulta/carbone'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json'
},
body
:
JSON
.
stringify
(
datos
)
})
.
then
(
response
=>
response
.
json
())
.
then
(
data
=>
{
console
.
log
(
data
);
//var pdfUrl = data.full_url;
window
.
open
(
pdfUrl
);
})
.
catch
(
error
=>
{
console
.
error
(
'Error:'
,
error
);
});
});
\ No newline at end of file
\ No newline at end of file
templates/form.html
View file @
ccd5b86
...
@@ -96,15 +96,7 @@
...
@@ -96,15 +96,7 @@
</div>
</div>
<div
class=
"PDFButtonContainerFixed"
>
<div
class=
"PDFButtonContainerFixed"
>
<button
class=
"PDFButton"
onclick=
<button
class=
"PDFButton"
id=
"boton_pdf_maha_reporte"
>
"window.open(
compile(
(new PDF1()).pdf( collectToConvert() ),
new jsPDF('landscape', 'pt', 'a4')
)
.output('bloburl')
)"
;
>
Linea 1
Linea 1
</button>
</button>
<!--
<!--
...
@@ -173,5 +165,7 @@
...
@@ -173,5 +165,7 @@
<span
class =
"X"
>
x
<span>
<span
class =
"X"
>
x
<span>
</div>
</div>
</div>
</div>
<script
src=
"{{ url_for('static', filename = 'src/report.js') }}"
></script>
</body>
</body>
</html>
</html>
\ No newline at end of file
\ No newline at end of file
test.txt
View file @
ccd5b86
...
@@ -8,4 +8,7 @@ Adrian Boveri
...
@@ -8,4 +8,7 @@ Adrian Boveri
Contraseña: 1601
Contraseña: 1601
Dolores Fernandez
Dolores Fernandez
Usuario: mdfernandez054
Usuario: mdfernandez054
Contraseña: md23645249
\ No newline at end of file
\ No newline at end of file
Contraseña: md23645249
Usuario: martinezh
Clave:hm621
\ No newline at end of file
\ No newline at end of file
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