feat: tech specification for a group of deals
This commit is contained in:
@@ -28,8 +28,8 @@
|
||||
{% if common_product.color %}
|
||||
<div class="small-text">Цвет: {{ common_product.color }}</div>
|
||||
{% endif %}
|
||||
{% if product_data.deal_products|length > 1 %}
|
||||
{% if common_deal_product.quantity %}
|
||||
{% if product_data.deal_products|length > 1 or product_data.warehouses_and_quantities|length > 1 %}
|
||||
{% if product_data.quantity %}
|
||||
<div class="small-text">Суммарное количество: {{ product_data.quantity }}</div>
|
||||
{% endif %}
|
||||
{% if product_data.additional_info %}
|
||||
@@ -80,7 +80,7 @@
|
||||
</div>
|
||||
<!--#endregion -->
|
||||
<!--#region Product comment -->
|
||||
{% if product_data.deal_products|length == 1 and common_deal_product.comment %}
|
||||
{% if product_data.deal_products|length == 1 and common_deal_product.comment %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -88,9 +88,29 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ common_deal_product.comment }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
<!--#endregion -->
|
||||
<!--#region Product warehouses and quantities -->
|
||||
{% if product_data.warehouses_and_quantities|length > 1 %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Склад отгрузки</th>
|
||||
<th>Количество</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in product_data.warehouses_and_quantities %}
|
||||
<tr>
|
||||
<td>{{ common_deal_product.comment }}</td>
|
||||
<td>{{ row[0] }}</td>
|
||||
<td>{{ row[1] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,62 +1,67 @@
|
||||
<!--#region Header -->
|
||||
<div class="deal-name-id-container">
|
||||
<div class="medium-text bold">
|
||||
Название сделки: {{ data.deal.name }}
|
||||
<div style="page-break-inside: avoid">
|
||||
{% if index != 0 %}
|
||||
<hr/>
|
||||
{% endif %}
|
||||
<div class="deal-name-id-container">
|
||||
<div class="medium-text bold">
|
||||
Название сделки: {{ deal.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="medium-text">
|
||||
Дата создания: {{ now().strftime("%d.%m.%Y, %H:%M") }}
|
||||
</div>
|
||||
<div class="medium-text">
|
||||
Текущий статус: {{ data.current_status_str }}
|
||||
</div>
|
||||
<div class="medium-text">
|
||||
{% if data.deal.comment %}
|
||||
Комментарий к сделке: {{ data.deal.comment }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<hr/>
|
||||
<!--#endregion -->
|
||||
<!--#region General services -->
|
||||
<div class="large-text bold">
|
||||
Клиент: {{ data.deal.client.name }}
|
||||
</div>
|
||||
<div class="medium-text bold">
|
||||
<hr/>
|
||||
<div class="medium-text">
|
||||
Дата создания: {{ now().strftime("%d.%m.%Y, %H:%M") }}
|
||||
</div>
|
||||
<div class="medium-text">
|
||||
Текущий статус: {{ data.deal_status_str[deal.current_status] }}
|
||||
</div>
|
||||
<div class="medium-text">
|
||||
{% if deal.comment %}
|
||||
Комментарий к сделке: {{ deal.comment }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<hr/>
|
||||
<!--#endregion -->
|
||||
<!--#region General services -->
|
||||
<div class="large-text bold">
|
||||
Клиент: {{ deal.client.name }}
|
||||
</div>
|
||||
<div class="medium-text bold">
|
||||
|
||||
Дата отгрузки:
|
||||
{% if data.deal.delivery_date %}
|
||||
{{ data.deal.delivery_date.strftime("%d.%m.%Y") }}
|
||||
Дата отгрузки:
|
||||
{% if deal.delivery_date %}
|
||||
{{ deal.delivery_date.strftime("%d.%m.%Y") }}
|
||||
{% else %}
|
||||
Не указана
|
||||
{% endif %}
|
||||
</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 %}
|
||||
{% if deal.services|length > 0 %}
|
||||
<table style="margin-bottom: 40px">
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
Не указана
|
||||
<div style="margin-bottom: 40px"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if data.deal.base_marketplace.name %}
|
||||
<div class="medium-text bold">Маркетплейс: {{ data.deal.base_marketplace.name }}</div>
|
||||
{% endif %}
|
||||
{% if data.deal.shipping_warehouse.name %}
|
||||
<div class="medium-text bold">Склад отгрузки: {{ data.deal.shipping_warehouse.name }}</div>
|
||||
{% endif %}
|
||||
{% if data.deal.services|length > 0 %}
|
||||
<table style="margin-bottom: 40px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Общие услуги</th>
|
||||
<th>Количество</th>
|
||||
</tr>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for service in data.deal.services %}
|
||||
<tr>
|
||||
<td>{{ service.service.name }}</td>
|
||||
<td>{{ '{:,}'.format(service.quantity) }} шт.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<div style="margin-bottom: 40px"></div>
|
||||
{% endif %}
|
||||
<!--#endregion -->
|
||||
@@ -29,7 +29,7 @@
|
||||
font-size: 18px;
|
||||
}
|
||||
@top-right {
|
||||
content: "ID:{{ data.deal.id }}";
|
||||
content: "{{ data.deal_ids_header }}";
|
||||
border: solid black 1px;
|
||||
border-radius: 6px;
|
||||
padding: 12px 2px;
|
||||
@@ -44,7 +44,11 @@
|
||||
<div class="doc-container">
|
||||
<div>
|
||||
<div>
|
||||
{% include "deal/deal-services.html" %}
|
||||
{% for deal in data.deals %}
|
||||
{% with index = loop.index0 %}
|
||||
{% include "deal/deal-services.html" %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
{% for product_data in data.products.values() %}
|
||||
{% with index = loop.index %}
|
||||
{% include "deal/deal-product-services.html" %}
|
||||
|
||||
Reference in New Issue
Block a user