{% extends "base.html" %} {% block title %}{{ plan.name }}{% endblock %} {% block breadcrumb %}

Rüstpläne / {{ plan.name }}

{% endblock %} {% block heading %}{{ plan.name }}{% endblock %} {% block content %}
{# Linke Spalte: Plan-Header + Steps #}

Plan-Daten

Bauteil: {{ plan.item_ident }}{% if plan.item_description %} · {{ plan.item_description[:60] }}{% endif %}

{# === Stammdaten === #}
{# === Werkstück === #}

Werkstück

{# === Spannmittel === #}

Spannmittel & Nullpunkt

{# === Qualität === #}

Qualität & Prüfung

{# === Betriebsmittel === #}

Betriebsmittel & Sicherheit

{# Steps-Liste #}

Rüst-Schritte ({{ plan.steps|length }})

Reihenfolge laut seq · Summe geplante Zeit: {% set sum_min = plan.steps | sum(attribute='est_minutes') %} {{ sum_min }} min {% if sum_min != plan.est_minutes %} ⚠ weicht von Plan-Rüstzeit {{ plan.est_minutes }} min ab{% endif %}

{% for s in plan.steps %} {% else %} {% endfor %}
# Aktion Detail Werkzeug / Slot Zeit
{{ loop.index }} {% set ico, label = ACTION_LABELS.get(s.action, ('📝', s.action)) %} {{ ico }} {{ label }} {{ s.detail or '—' }} {% if s.tool_name %}{{ s.tool_name }}{% endif %} {% if s.slot_no %}
Slot {{ s.slot_no }}
{% endif %} {% if not s.tool_name and not s.slot_no %}—{% endif %}
{{ s.est_minutes }} min
Noch keine Schritte. Erste hinzufügen unten ↓
{# Step hinzufügen #}

+ Schritt hinzufügen

{# Rechte Spalte: Sidebar mit Aktionen #}

Plan-Info

Bauteil
{% if plan.item_id %} {{ plan.item_ident }} {% else %} {{ plan.item_ident }} {% endif %}
Maschine
{{ plan.machine_name or '— allgemein —' }}
Erstellt
{{ plan.created_at[:16] }}
{% if plan.updated_at %}
Geändert
{{ plan.updated_at[:16] }}
{% endif %}
{# ============== BAUTEIL-INFOS (Werkstoff aus Plan, Bestand+Lagerort aus Item) ============== #} {% if item_full or plan.material %}

Bauteil-Daten

{{ (item_full.description if item_full else '') or '—' }}

{% if plan.material %}
Werkstoff
{{ plan.material }}
{% endif %} {% if plan.raw_dimensions %}
Rohteil-Maße
{{ plan.raw_dimensions }}
{% endif %} {% if plan.finished_dimensions %}
Fertigteil-Maße
{{ plan.finished_dimensions }}
{% endif %} {% if item_full %} {% if item_full.location %}
Lagerort
{{ item_full.location }}
{% endif %}
Bestand
{{ item_full.quantity_total or 0 }} {% if item_full.quantity_min %} (Min: {{ item_full.quantity_min }}) {% endif %}
{% endif %}
{% endif %} {# ============== CNC-BEDINGUNGEN (Spannmittel, NC, Toleranzen, Kühlmittel) ============== #} {% if plan.clamping_type or plan.nc_program or plan.tolerances or plan.coolant or plan.zero_point %}

CNC-Bedingungen

{% if plan.clamping_type %}
Spannmittel
{{ plan.clamping_type }} {% if plan.clamping_size %} · {{ plan.clamping_size }}{% endif %} {% if plan.clamping_torque_nm %} · {{ plan.clamping_torque_nm }} Nm{% endif %}
{% endif %} {% if plan.zero_point %}
Werkstück-Nullpunkt
{{ plan.zero_point }}
{% endif %} {% if plan.nc_program %}
NC-Programm
{{ plan.nc_program }}
{% endif %} {% if plan.tolerances %}
Toleranz-Norm
{{ plan.tolerances }}
{% endif %} {% if plan.coolant %}
Kühlmittel
{{ plan.coolant }}
{% endif %} {% if plan.first_article %}
Erstmusterprüfung Pflicht vor Serie
{% endif %} {% if plan.revision %}
Zeichnungs-Rev.
{{ plan.revision }}
{% endif %}
{% endif %} {# ============== PRÜFUNG (multiline) ============== #} {% if plan.inspection_dimensions or plan.inspection_tools %}

Prüfung

{% if plan.inspection_dimensions %}
Prüfmaße
{{ plan.inspection_dimensions }}
{% endif %} {% if plan.inspection_tools %}
Prüfmittel
{{ plan.inspection_tools }}
{% endif %}
{% endif %} {# ============== SICHERHEIT ============== #} {% if plan.safety_notes %}

⚠ Sicherheit / PSA

{{ plan.safety_notes }}
{% endif %} {# ============== ZEICHNUNGEN & ANHÄNGE ============== #} {% if item_attachments %} {% endif %} {# ============== AKTIVE AUFTRÄGE MIT DIESEM PLAN ============== #} {% if linked_jobs %} {% endif %} {# ============== MATERIAL-CHARGEN (Rückverfolgbarkeit) ============== #} {% if item_lots %}

📦 Material-Chargen

Aktuelle Wareneingänge für dieses Bauteil

{% for l in item_lots %}
Charge: {{ l.charge or l.lot_number }}
{{ l.supplier or '—' }}{% if l.received_at %} · {{ l.received_at[:10] }}{% endif %}
Menge: {{ l.quantity or 0 }}
{% endfor %}
{% endif %}

Verwendung

Dieser Rüstplan wird im Shopfloor angezeigt wenn ein Bediener einen Job für dieses Bauteil auf {% if plan.machine_name %}der Maschine {{ plan.machine_name }}{% else %}irgendeiner Maschine{% endif %} startet.

{% endblock %}