Initial commit

This commit is contained in:
Alex
2026-10-07 19:57:07 +00:00
commit 6e6035c789
131 changed files with 23101 additions and 0 deletions
+89
View File
@@ -0,0 +1,89 @@
{% extends "base.html" %}
{% block title %}{{ specification.specification_number }} - Спецификация{% endblock %}
{% block content %}
<div class="page-header">
<h1>Спецификация: {{ specification.specification_number }}</h1>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url_for('home') }}">Главная</a></li>
<li class="breadcrumb-item"><a href="{{ url_for('specifications_list') }}">Спецификации</a></li>
<li class="breadcrumb-item active">{{ specification.specification_number }}</li>
</ol>
</nav>
</div>
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-header">Реквизиты</div>
<div class="card-body">
<p><strong>ID:</strong> {{ specification.id }}</p>
<p><strong>Номер:</strong> {{ specification.specification_number }}</p>
<p><strong>Дата:</strong> {{ specification.specification_date.strftime('%Y-%m-%d') if specification.specification_date else 'N/A' }}</p>
<p><strong>Договор:</strong> {{ specification.contract.contract_number if specification.contract else 'N/A' }}</p>
<p><strong>Проект:</strong> {{ specification.project.name if specification.project else 'N/A' }}</p>
<p><strong>Описание:</strong> {{ specification.description or 'N/A' }}</p>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-header">Связанные закупки</div>
<div class="card-body">
{% if specification.purchases %}
<ul class="list-group">
{% for purchase in specification.purchases %}
<li class="list-group-item">
<a href="{{ url_for('purchase_detail', purchase_id=purchase.id) }}">{{ purchase.purchase_number }}</a>
({{ purchase.purchase_date.strftime('%Y-%m-%d') if purchase.purchase_date else 'N/A' }})
</li>
{% endfor %}
</ul>
{% else %}
<div class="text-muted">Нет связанных закупок</div>
{% endif %}
</div>
</div>
</div>
</div>
<div class="section-title">Позиции спецификации (SpecificationItems)</div>
<p class="text-muted">Потребность заказчика по каждому модулю.</p>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Модуль</th>
<th>Требуется</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for item in items %}
<tr>
<td><strong>{{ item.module.name }}</strong></td>
<td>{{ item.quantity }}</td>
<td>{{ item.description or 'N/A' }}</td>
</tr>
{% else %}
<tr>
<td colspan="3" class="text-center">Нет позиций</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="mt-4">
<a href="{{ url_for('specifications_list', project_id=specification.project_id) }}" class="btn btn-secondary">
К списку спецификаций
</a>
<a href="{{ url_for('project_detail', project_id=specification.project_id) }}" class="btn btn-secondary">
К проекту
</a>
</div>
{% endblock %}