anomalies.html
2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js"></script>
	<script src="{{ url_for('static', filename = 'src/ajax.js') }}"></script>
	<script src="{{ url_for('static', filename = 'src/div.js') }}"></script>
	<script src="{{ url_for('static', filename = 'src/pdf3.js') }}"></script>
	<script src="{{ url_for('static', filename = 'src/forms.js') }}"></script>
	<link rel="stylesheet" href="{{ url_for('static', filename = 'styles/general.css') }}">
	<!--INCLUIMOS LA FUENTE-->
	<link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/cmu-typewriter" type="text/css" />
	<title>Pruebas de Alineamiento</title>
</head>
<body>
<style>
	table {
		width: 75%;
		border: 2px solid black;
	}
	th,
	td {
		width: 50%;
		border: none;
		text-align: center;
		padding: 1%;
	}
	th {
		width: 50%;
		border-right: 2px solid black;
	}
	tr {
		border-right: 2px solid black;
	}
	p {
		word-break: break-all;
	}
</style>
<div>
	<h1>Informe para Taller de Mantenimiento</h1>
	Fecha: {{ anomalies['header']['fecha'] }}
	<br>
	Razón Social: {{ anomalies['header']['cp'] }} - {{ anomalies['header']['rsocial'] }}
	<br>
	Patente: {{ anomalies['header']['patente'] }}
	<br>
	{% for a in anomalies['anomalies'] %}
	<table>
		<tr>
			<th rowspan="{{ (anomalies['anomalies'][a] | length) + 1 }}"><p>{{ a }}</p></th>
		</tr>
		{% for e in anomalies['anomalies'][a] %}
		<tr>
			<td><p>{{ e['description'] }} - {{ e['severity'] }}</p></td>
		</tr>
		{% endfor %}
	</table>
	<br>
</div>
{% endfor %}
<div class="PDFButtonContainerFixed" style="top: 50px;">
	<button class="PDFButton" 
	onclick="window.open(
		compile(
			(new PDF3()).pdf( {{ anomalies }} ),
			new jsPDF('portrait', 'pt', 'a4')
		)
		.output('bloburl')
	);">
		Generar PDF
	</button>
</div>
<div class="PDFButtonContainerFixed" style="top: 200px;">
	<button class="PDFButton" onclick="location.reload()">
		Volver
	</button>
</div>
</body>