Initial commit
This commit is contained in:
@@ -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 %}
|
||||
@@ -0,0 +1,65 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Список спецификаций{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="page-header">
|
||||
<h1>Спецификации</h1>
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{ url_for('home') }}">Главная</a></li>
|
||||
<li class="breadcrumb-item active">Спецификации</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
{% if project_id %}
|
||||
<div class="alert alert-info">
|
||||
Фильтр: Проект #{{ project_id }}
|
||||
<a href="{{ url_for('specifications_list') }}" class="btn btn-sm btn-link">Показать все</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="section-title">Список спецификаций</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Номер</th>
|
||||
<th>Дата</th>
|
||||
<th>Договор</th>
|
||||
<th>Проект</th>
|
||||
<th>Позиций</th>
|
||||
<th>Действие</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for spec in specifications %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('specification_detail', specification_id=spec.id) }}">{{ spec.specification_number }}</a></td>
|
||||
<td>{{ spec.specification_date.strftime('%Y-%m-%d') if spec.specification_date else 'N/A' }}</td>
|
||||
<td>{{ spec.contract.contract_number if spec.contract else 'N/A' }}</td>
|
||||
<td>{{ spec.project.name if spec.project else 'N/A' }}</td>
|
||||
<td>{{ spec.specification_items|length }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('specification_detail', specification_id=spec.id) }}" class="btn btn-sm btn-primary">
|
||||
Открыть
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6" class="text-center">Нет спецификаций</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<a href="{{ url_for('projects_list') }}" class="btn btn-secondary">
|
||||
К проектам
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user