9cfb341774
Tasks 008-016: KS-6a journal, KS-3 documents, payments with allocations, tech debt cleanup, financial privacy, document tree, storno mechanism, row-click UI, BOQ collapse/sticky header, and KS-2 export to Excel/Word via shared DTO architecture.
97 lines
4.3 KiB
HTML
97 lines
4.3 KiB
HTML
{% extends "base.html" %}
|
||
|
||
{% block title %}КС-6а — {{ project.name }}{% endblock %}
|
||
|
||
{% block content %}
|
||
<div class="container mt-4">
|
||
<nav class="mb-3">
|
||
<a href="/projects/{{ project.id }}" class="btn btn-outline-secondary btn-sm">← К проекту</a>
|
||
</nav>
|
||
|
||
<h2>КС-6а — Журнал выполненных работ</h2>
|
||
<p class="text-muted">{{ project.name }}</p>
|
||
|
||
<form method="get" action="/projects/{{ project.id }}/ks6a" class="card card-body mb-3">
|
||
<div class="row g-3 align-items-end">
|
||
<div class="col-md-3">
|
||
<label for="date_from" class="form-label">Дата с</label>
|
||
<input type="date" class="form-control" id="date_from" name="date_from" required
|
||
value="{{ date_from }}">
|
||
</div>
|
||
<div class="col-md-3">
|
||
<label for="date_to" class="form-label">Дата по</label>
|
||
<input type="date" class="form-control" id="date_to" name="date_to" required
|
||
value="{{ date_to }}">
|
||
</div>
|
||
<div class="col-md-4">
|
||
<label for="system_id" class="form-label">Система</label>
|
||
<select class="form-select" id="system_id" name="system_id">
|
||
<option value="all" {% if not system_id or system_id == 'all' %}selected{% endif %}>Все системы</option>
|
||
{% for system in systems %}
|
||
<option value="{{ system.id }}" {% if system_id|string == system.id|string %}selected{% endif %}>{{ system.name }}</option>
|
||
{% endfor %}
|
||
</select>
|
||
</div>
|
||
<div class="col-md-2">
|
||
<button type="submit" class="btn btn-primary w-100">Сформировать</button>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
{% if error %}
|
||
<div class="alert alert-danger" role="alert">{{ error }}</div>
|
||
{% endif %}
|
||
|
||
{% if date_from and date_to and not error %}
|
||
<div class="mb-2 text-muted">
|
||
Период: {{ date_from }} — {{ date_to }}
|
||
{% if system_id and system_id != 'all' %}
|
||
{% for system in systems %}{% if system_id|string == system.id|string %} · Система: {{ system.name }}{% endif %}{% endfor %}
|
||
{% else %} · Все системы{% endif %}
|
||
· Строк: {{ total_count }}
|
||
</div>
|
||
|
||
{% if rows %}
|
||
<div class="table-responsive">
|
||
<table class="table table-striped table-sm" style="table-layout: fixed;">
|
||
<colgroup>
|
||
<col style="width: 88px">
|
||
<col style="width: 120px">
|
||
<col style="width: 120px">
|
||
<col style="width: 70px">
|
||
<col>
|
||
<col style="width: 50px">
|
||
<col style="width: 80px">
|
||
</colgroup>
|
||
<thead>
|
||
<tr>
|
||
<th>Дата</th>
|
||
<th>Система</th>
|
||
<th>Раздел</th>
|
||
<th>№ поз.</th>
|
||
<th>Наименование</th>
|
||
<th>Ед.</th>
|
||
<th class="text-end text-nowrap">Кол-во</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{% for row in rows %}
|
||
<tr>
|
||
<td class="text-nowrap">{{ row.report.report_date.strftime('%d.%m.%Y') }}</td>
|
||
<td style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ row.work_item.system.name if row.work_item.system else '—' }}</td>
|
||
<td style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ row.work_item.section.name if row.work_item.section else '—' }}</td>
|
||
<td>{{ row.work_item.source_number or '' }}</td>
|
||
<td style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">{{ row.work_item.name }}</td>
|
||
<td>{{ row.work_item.unit or '' }}</td>
|
||
<td class="text-end text-nowrap">{{ row.completed_quantity|quantity2 }}</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
{% else %}
|
||
<div class="alert alert-info">За выбранный период работ не найдено.</div>
|
||
{% endif %}
|
||
{% endif %}
|
||
</div>
|
||
{% endblock %} |