Подправил интерфейс реестра, вывод на печать, добавил уборку станка из сменки
All checks were successful
Deploy MES Core / deploy (push) Successful in 12s
All checks were successful
Deploy MES Core / deploy (push) Successful in 12s
This commit is contained in:
@@ -19,7 +19,14 @@
|
|||||||
{% for wi in workitems %}
|
{% for wi in workitems %}
|
||||||
<tr class="workitem-row" data-href="{% url 'workitem_detail' wi.id %}">
|
<tr class="workitem-row" data-href="{% url 'workitem_detail' wi.id %}">
|
||||||
<td class="small">{{ wi.date|date:"d.m.y" }}</td>
|
<td class="small">{{ wi.date|date:"d.m.y" }}</td>
|
||||||
<td><span class="text-accent fw-bold">{{ wi.deal.number|default:"-" }}</span></td>
|
<td>
|
||||||
|
<span
|
||||||
|
class="text-accent fw-bold"
|
||||||
|
title="{% if wi.deal.description %}{{ wi.deal.description|striptags }}{% endif %}{% if wi.deal.company %}{% if wi.deal.description %} · {% endif %}{{ wi.deal.company.name }}{% endif %}{% if wi.deal.due_date %}{% if wi.deal.description or wi.deal.company %} · {% endif %}до {{ wi.deal.due_date|date:'d.m.Y' }}{% endif %}"
|
||||||
|
>
|
||||||
|
{{ wi.deal.number|default:"-" }}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% if wi.machine %}
|
{% if wi.machine %}
|
||||||
<span class="badge bg-dark border border-secondary">{{ wi.workshop.name|default:"—" }}/{{ wi.machine.name }}</span>
|
<span class="badge bg-dark border border-secondary">{{ wi.workshop.name|default:"—" }}/{{ wi.machine.name }}</span>
|
||||||
@@ -33,7 +40,10 @@
|
|||||||
{{ wi.operation.name|default:wi.stage|default:"—" }}
|
{{ wi.operation.name|default:wi.stage|default:"—" }}
|
||||||
</td>
|
</td>
|
||||||
<td class="fw-bold">
|
<td class="fw-bold">
|
||||||
{{ wi.entity.drawing_number|default:"—" }} {{ wi.entity.name }}
|
{% if wi.entity.drawing_number %}
|
||||||
|
{{ wi.entity.drawing_number }}
|
||||||
|
{% endif %}
|
||||||
|
{{ wi.entity.name }}
|
||||||
</td>
|
</td>
|
||||||
<td class="small text-muted">
|
<td class="small text-muted">
|
||||||
{% if wi.entity.planned_material %}
|
{% if wi.entity.planned_material %}
|
||||||
|
|||||||
@@ -56,7 +56,6 @@
|
|||||||
<th style="width:160px;">Материал</th>
|
<th style="width:160px;">Материал</th>
|
||||||
<th style="width:80px;" class="center">План</th>
|
<th style="width:80px;" class="center">План</th>
|
||||||
<th style="width:80px;" class="center">Факт</th>
|
<th style="width:80px;" class="center">Факт</th>
|
||||||
<th style="width:90px;">Статус</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -75,7 +74,6 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="center">{{ wi.quantity_plan }}</td>
|
<td class="center">{{ wi.quantity_plan }}</td>
|
||||||
<td class="center">{{ wi.quantity_done }}</td>
|
<td class="center">{{ wi.quantity_done }}</td>
|
||||||
<td>{{ wi.status|default:"planned" }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -509,7 +509,7 @@ class RegistryView(LoginRequiredMixin, ListView):
|
|||||||
it.fact_bar_class = 'bg-success' if it.status in ['done', 'partial'] else 'bg-warning'
|
it.fact_bar_class = 'bg-success' if it.status in ['done', 'partial'] else 'bg-warning'
|
||||||
context['items'] = items
|
context['items'] = items
|
||||||
|
|
||||||
work_qs = WorkItem.objects.select_related('deal', 'entity', 'entity__planned_material', 'operation', 'machine', 'workshop')
|
work_qs = WorkItem.objects.select_related('deal', 'deal__company', 'entity', 'entity__planned_material', 'operation', 'machine', 'workshop')
|
||||||
|
|
||||||
m_ids = [int(i) for i in self.request.GET.getlist('m_ids') if str(i).isdigit()]
|
m_ids = [int(i) for i in self.request.GET.getlist('m_ids') if str(i).isdigit()]
|
||||||
if m_ids:
|
if m_ids:
|
||||||
@@ -881,8 +881,9 @@ class WorkItemUpdateView(LoginRequiredMixin, View):
|
|||||||
wi.quantity_reported = qty_reported
|
wi.quantity_reported = qty_reported
|
||||||
changed_fields.append('quantity_reported')
|
changed_fields.append('quantity_reported')
|
||||||
|
|
||||||
if machine_id is not None and role in ['admin', 'technologist', 'master']:
|
if role in ['admin', 'technologist', 'master'] and 'machine_id' in request.POST:
|
||||||
wi.machine_id = machine_id
|
# Пустое значение из селекта «— без станка —» должно очищать привязку станка.
|
||||||
|
wi.machine_id = (int(machine_id) if machine_id is not None else None)
|
||||||
changed_fields.append('machine')
|
changed_fields.append('machine')
|
||||||
|
|
||||||
if date_raw and role in ['admin', 'technologist']:
|
if date_raw and role in ['admin', 'technologist']:
|
||||||
|
|||||||
@@ -40,6 +40,14 @@ body {
|
|||||||
color: #e9ecef !important;
|
color: #e9ecef !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navbar.sticky-top {
|
||||||
|
z-index: 1030;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar.sticky-top {
|
||||||
|
z-index: 1030;
|
||||||
|
}
|
||||||
|
|
||||||
/* --- РЕЕСТР --- */
|
/* --- РЕЕСТР --- */
|
||||||
|
|
||||||
/* Делаем строку таблицы визуально кликабельной */
|
/* Делаем строку таблицы визуально кликабельной */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<nav class="navbar navbar-expand-lg border-bottom shadow-sm">
|
<nav class="navbar navbar-expand-lg border-bottom shadow-sm sticky-top">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<a class="navbar-brand fw-bold text-accent" href="/">
|
<a class="navbar-brand fw-bold text-accent" href="/">
|
||||||
<i class="bi bi-gear-fill me-2"></i>ShiftFlow
|
<i class="bi bi-gear-fill me-2"></i>ShiftFlow
|
||||||
|
|||||||
Reference in New Issue
Block a user