Files
Fulfillment-Backend/templates/documents/deal.html

162 lines
7.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="/static/js/JsBarcode.all.min.js"></script>
<title>Сделка</title>
<style>
@import url("https://fonts.googleapis.com/css?family=Libre+Barcode+128");
@import url("https://fonts.googleapis.com/css?family=Barlow+Condensed:300,400,700");
</style>
</head>
<body>
<script>
JsBarcode(".barcode").init();
</script>
<div class="doc-container">
<div>
<div>
<!--#region Header -->
<div class="deal-name-id-container">
<div class="medium-text bold">
Название сделки: {{ deal.name }}
</div>
<div class="medium-text deal-id">
ID:{{ deal.id }}
</div>
</div>
<hr/>
<div class="medium-text">
Дата создания: {{ now().strftime("%d.%m.%Y, %H:%M") }}
</div>
<div class="medium-text">
Текущий статус: {{ current_status_str }}
</div>
<div class="medium-text">
{% if deal.comment %}
Комментарий к сделке: {{ deal.comment }}
{% else %}
Комментарий к сделке отсутствует
{% endif %}
</div>
<hr/>
<!--#endregion -->
<!--#region General services -->
<div class="large-text bold">
Клиент: {{ deal.client.name }}
</div>
<div class="medium-text bold">
Дата отгрузки: {{ last_status.next_status_deadline.strftime("%d.%m.%Y") }}
</div>
{% if deal.base_marketplace.name %}
<div class="medium-text bold">Маркетплейс: {{ deal.base_marketplace.name }}</div>
{% endif %}
{% if deal.shipping_warehouse.name %}
<div class="medium-text bold">Склад отгрузки: {{ deal.shipping_warehouse.name }}</div>
{% endif %}
<table>
<thead>
<tr>
<th>Общие услуги</th>
<th>Количество</th>
<th>Сумма</th>
</tr>
<tfoot>
</tfoot>
</thead>
<tbody>
{% for service in deal.services %}
<tr>
<td>{{ service.service.name }}</td>
<td>{{ '{:,}'.format(service.quantity) }} шт.</td>
<td>{{ '{:,}'.format(service.price * service.quantity).replace(',', ' ') }} Р</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="medium-text total align-right bold">
Итого: {{ general_services_total }} Р
</div>
<!--#endregion -->
<!--#region Product services -->
{% for product in deal.products %}
<div style="page-break-inside: avoid">
<hr/>
<div style="display: flex">
{% if product.product.images|length != 0 %}
<div class="img-container">
<img class="product-img" src="data:image/jpeg;base64,{{ product_images[loop.index0] }}"
alt="Фото товара"/>
</div>
{% endif %}
<div style="margin: 12px 0">
<div class="medium-text bold">
{{ loop.index }}. {{ product.product.name }}
</div>
<div class="product-data">
<div class="small-text">Артикул: {{ product.product.article }}</div>
{% if product.product.brand %}
<div class="small-text">Бренд: {{ product.product.brand }}</div>
{% endif %}
{% if product.product.color %}
<div class="small-text">Цвет: {{ product.product.color }}</div>
{% endif %}
{% if product.product.size %}
<div class="small-text">Размер: {{ product.product.size }}</div>
{% endif %}
{% if product.quantity %}
<div class="small-text">Количество: {{ product.quantity }}</div>
{% endif %}
{% if product.product.additional_info %}
<div class="small-text">
Доп. информация: {{ product.product.additional_info }}
</div>
{% endif %}
</div>
</div>
</div>
<hr/>
<div style="text-align: right">
<div class="barcode-container">
<div class="barcode">
{{ encode128(product.product.barcodes[0].barcode, "A") }}
</div>
<div class="barcode-text">
{{ product.product.barcodes[0].barcode }}
</div>
</div>
</div>
</div>
<table>
<thead>
<tr>
<th>Наименование услуги</th>
<th>Цена</th>
<th>Сумма</th>
</tr>
<tfoot>
</tfoot>
</thead>
<tbody>
{% for service in product.services %}
<tr>
<td>{{ service.service.name }}</td>
<td>{{ '{:,}'.format(product.quantity) }} Р</td>
<td>{{ '{:,}'.format(service.price * product.quantity).replace(',', ' ') }} Р</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="medium-text total align-right bold">
Итого: {{ product_services_totals[loop.index0] }} Р
</div>
{% endfor %}
<!--#endregion -->
</div>
</div>
</div>
</body>
</html>