Initial commit
This commit is contained in:
@@ -0,0 +1,189 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ project.name }} - Проект{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="page-header">
|
||||
<h1>Проект: {{ project.name }}</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('projects_list') }}">Проекты</a></li>
|
||||
<li class="breadcrumb-item active">{{ project.name }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="stat-card">
|
||||
<div class="stat-value">{{ stats.total_received }}</div>
|
||||
<div class="stat-label">Всего получено</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="stat-card">
|
||||
<div class="stat-value">{{ stats.total_allocated }}</div>
|
||||
<div class="stat-label">Распределено</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="stat-card">
|
||||
<div class="stat-value">{{ stats.total_remaining }}</div>
|
||||
<div class="stat-label">Свободно</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="stat-card">
|
||||
<div class="stat-value">{{ stats.systems_count }}</div>
|
||||
<div class="stat-label">Систем</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-title">Заказчики</div>
|
||||
<ul class="list-group">
|
||||
{% for customer in customers %}
|
||||
<li class="list-group-item">{{ customer.name }}{% if customer.description %} - {{ customer.description }}{% endif %}</li>
|
||||
{% else %}
|
||||
<li class="list-group-item">Нет заказчиков</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<div class="section-title">Системы</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Название</th>
|
||||
<th>Заказчик</th>
|
||||
<th>Гарданты</th>
|
||||
<th>Модули</th>
|
||||
<th>Действие</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for system in systems %}
|
||||
<tr>
|
||||
<td>{{ system.id }}</td>
|
||||
<td><a href="{{ url_for('system_detail', system_id=system.id) }}">{{ system.name }}</a></td>
|
||||
<td>{{ system.customer.name if system.customer else 'N/A' }}</td>
|
||||
<td>{{ system.guardians|length }}</td>
|
||||
<td>{{ system.system_modules|length }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('system_detail', system_id=system.id) }}" class="btn btn-sm btn-primary">
|
||||
Открыть
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6">Нет систем в этом проекте</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section-title">Спецификации</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Номер</th>
|
||||
<th>Дата</th>
|
||||
<th>Договор</th>
|
||||
<th>Действие</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for contract in contracts %}
|
||||
{% for spec in contract.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>{{ contract.contract_number }}</td>
|
||||
<td><a href="{{ url_for('specification_detail', specification_id=spec.id) }}" class="btn btn-sm btn-secondary">Открыть</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4">Нет спецификаций</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for purchase in purchases %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('purchase_detail', purchase_id=purchase.id) }}">{{ purchase.purchase_number }}</a></td>
|
||||
<td>{{ purchase.purchase_date.strftime('%Y-%m-%d') if purchase.purchase_date else 'N/A' }}</td>
|
||||
<td>{{ purchase.vendor.name if purchase.vendor else 'N/A' }}</td>
|
||||
<td>{{ purchase.purchase_items|length }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('purchase_detail', purchase_id=purchase.id) }}" class="btn btn-sm btn-primary">
|
||||
Открыть
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="5">Нет закупок</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section-title">Ресурсы</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Модуль</th>
|
||||
<th>Получено</th>
|
||||
<th>Invoice</th>
|
||||
<th>Specification</th>
|
||||
<th>Действие</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for resource in resources %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('resource_detail', resource_id=resource.id) }}">{{ resource.id }}</a></td>
|
||||
<td>{{ resource.module.name if resource.module else 'N/A' }}</td>
|
||||
<td>{{ resource.quantity }}</td>
|
||||
<td>{{ resource.invoice_number if resource.invoice_number else 'N/A' }}</td>
|
||||
<td>{{ resource.specification_number if resource.specification_number else 'N/A' }}</td>
|
||||
<td>
|
||||
<a href="{{ url_for('resource_detail', resource_id=resource.id) }}" class="btn btn-sm btn-primary">
|
||||
Открыть
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6">Нет ресурсов</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user