Files
specs/app/templates/specifications/detail.html
T
2026-10-07 19:57:07 +00:00

90 lines
3.6 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.
{% 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 %}