All checks were successful
Deploy MES Core / deploy (push) Successful in 13s
70 lines
2.7 KiB
HTML
70 lines
2.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Список к закупке</title>
|
|
<style>
|
|
body { font-family: Arial, sans-serif; font-size: 12px; line-height: 1.4; color: #333; margin: 20px; }
|
|
h2 { font-size: 18px; margin-bottom: 20px; text-align: center; }
|
|
h3 { font-size: 14px; margin-top: 20px; margin-bottom: 10px; border-bottom: 1px solid #ccc; padding-bottom: 5px; }
|
|
table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
|
|
th, td { border: 1px solid #ddd; padding: 6px 8px; }
|
|
th { background-color: #f5f5f5; font-weight: bold; text-align: center; }
|
|
td { text-align: left; vertical-align: top; }
|
|
.text-center { text-align: center; }
|
|
.text-right { text-align: right; }
|
|
.marks { height: 26px; }
|
|
@media print {
|
|
body { margin: 0; }
|
|
button { display: none; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div style="text-align: right; margin-bottom: 20px; display: flex; gap: 10px; justify-content: flex-end;">
|
|
<button onclick="window.print()" style="padding: 5px 15px; cursor: pointer;">Распечатать</button>
|
|
<button onclick="try { window.close(); } catch (e) {} if (!window.closed) { window.history.back(); }" style="padding: 5px 15px; cursor: pointer;">Закрыть</button>
|
|
</div>
|
|
|
|
<h2>Список к закупке от {% now "d.m.Y" %}</h2>
|
|
|
|
{% for type_key, items in print_data.items %}
|
|
<h3>
|
|
{% for code, label in type_labels.items %}
|
|
{% if code == type_key %}{{ label }}{% endif %}
|
|
{% endfor %}
|
|
</h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 6%;">№ п/п</th>
|
|
<th style="width: 24%;">Сделка(и)</th>
|
|
<th style="width: 42%;">Наименование</th>
|
|
<th style="width: 10%;">Кол-во, шт</th>
|
|
<th style="width: 18%;">Отметки</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in items %}
|
|
<tr>
|
|
<td class="text-right">{{ forloop.counter }}</td>
|
|
<td>
|
|
{% if item.deals %}
|
|
{{ item.deals|join:", " }}
|
|
{% else %}
|
|
-
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ item.component_label }}</td>
|
|
<td class="text-right">{{ item.required_qty }}</td>
|
|
<td class="marks"> </td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% empty %}
|
|
<p class="text-center">Нет данных для печати по выбранным фильтрам.</p>
|
|
{% endfor %}
|
|
|
|
</body>
|
|
</html> |