173 lines
4.2 KiB
HTML
173 lines
4.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Техническая спецификация</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.container {
|
|
width: 80%;
|
|
margin: auto;
|
|
page-break-inside: avoid;
|
|
padding-top: 50px;
|
|
}
|
|
|
|
.barcode {
|
|
margin: 10px;
|
|
float: right;
|
|
height: 100px;
|
|
}
|
|
|
|
.product {
|
|
border-bottom: 1px solid #ddd;
|
|
padding-top: 50px;
|
|
}
|
|
|
|
.service-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.service-table th, .service-table td {
|
|
border: 1px solid #ddd;
|
|
padding: 8px;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.page-header {
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
text-align: right;
|
|
padding: 10px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.page-break {
|
|
page-break-after: always;
|
|
}
|
|
|
|
hr {
|
|
border: 1px solid black;
|
|
}
|
|
|
|
.product-info {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.product-info img {
|
|
margin-right: 20px;
|
|
}
|
|
|
|
h4, p {
|
|
margin-top: 5px;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
@media print {
|
|
@page {
|
|
size: A4 portrait;
|
|
margin: 20mm;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="page-header">
|
|
<p>ID: {{ deal.id }}</p>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<h4>{{ deal.name }}</h4>
|
|
<hr>
|
|
<p>Дата создания: {{ deal.createdAt }}</p>
|
|
<p>Текущий статус: {{ deal.status }}</p>
|
|
<hr>
|
|
<h3>Клиент: {{ deal.clientName }}</h3>
|
|
<h4>Дата отгрузки: {{ deal.deliveryDate }}</h4>
|
|
<h4>Маркетплейс: {{ deal.baseMarketplace }}</h4>
|
|
<h4>Склад отгрузки: {{ deal.shippingWarehouse }}</h4>
|
|
|
|
<h2>Услуги сделки</h2>
|
|
<table class="service-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Услуга</th>
|
|
<th>Количество</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for service in deal.services %}
|
|
<tr>
|
|
<td>{{ service.name }}</td>
|
|
<td>{{ service.quantity }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% for product in deal.products %}
|
|
{% if not loop.first %}
|
|
<div class="page-break"></div>
|
|
{% endif %}
|
|
<div class="product">
|
|
<hr>
|
|
<div class="product-info">
|
|
{% if product.imageUrl %}
|
|
<img src="{{ product.imageUrl }}" alt="Картинка продукта" width="150"/>
|
|
{% endif %}
|
|
<div>
|
|
<h4>{{ product.name }}</h4>
|
|
<p>Артикул продавца: {{ product.article }}</p>
|
|
<p><strong>Размер:</strong> {{ product.size }}</p>
|
|
<p>Количество: {{ product.quantity }}</p>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
{% if product.barcode %}
|
|
<img src="{{ product.barcode }}" class="barcode" alt="Barcode"/>
|
|
{% endif %}
|
|
|
|
{% if product.comment %}
|
|
<table class="service-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Комментарий</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>{{ product.comment }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
|
|
<table class="service-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Наименование услуги</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for service in product.services %}
|
|
<tr>
|
|
<td>{{ service.name }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</body>
|
|
</html> |