{% extends "core/base.html" %} {% load seizou_guide seizou_icons seizou_tags %} {% load seizou_outcome %} {% block content %} {# 最初の画面: 本物の集計だけの数字のカード、最近の受注、入口のカード。部品が無い物は出さない (偽の数字を置かない)。 #} {# 並びは、数字のカード (会社の KPI) → 今日やること (左。個人のタスク。core の dashboard.today_tasks) と納期アラート (右) → 出荷の図と生産の図 → 最近の受注 (左) と注文の入口の図 (右) → よく使う画面 (本人の決め 11-03 11:0x。今日やることは作者の決め 11-05 で足し、本人の決め 11-05 09:4x で数字のカードの直下へ。本人の決め 11-05 11:0x で今日やることを半分の幅にして納期アラートと並べ、注文の入口を最近の受注の右へ)。 #} {# 出荷と生産の図と納期アラート (core の dashboard が読む。部品が無ければ None で、節ごと出さない。金額を見られない人には金額の図を出さない)。受注の行はどこを押しても受注の詳細へ移る (行の中の link はそのまま動く)。 #} {# 数字のカードは dashboard_stats() の並び (6 枚目 = 今月の支払の見込み。受入の部品があるとき。7 枚目 = 今月の入金。入金の表があるとき)。6 枚のときは xl で 3 列 × 2 段、2xl で 1 段。7 枚のときは xl 以上で 4 列 × 2 段 (2xl で 7 列に並べると 1 枚が狭い)。金額を見られない人には 6 枚目と 7 枚目が出ない (HomeView が並びから外す)。 #} {# 8 枚目 = 手入力せずに取り込んだ明細 (受注の部品があるとき。開発の記録 docs/nights/20261104/N83.md)。8 枚のときも xl 以上で 4 列 × 2 段。detail のあるカードは数の下に 1 行 (4 枚目は受注の件数、8 枚目は入力を省けた時間 ≒ m 分)。 #} {# compare のあるカード (「今月の◯◯」= 今月の受注・今月の支払の見込み・今月の入金。dashboard_stats が core.dashboard の *_month_compare で付ける) は、数の横に「▲ +n 先月より」の札 (core/_stat_delta.html。増えた = 緑、減った = 赤、同じ = 灰) と、数の下に今月の日ごとの数の細い線 (inline SVG。JS を使わない。座標は dashboard.sparkline)。線は箱の幅に伸び縮みし (preserveAspectRatio="none")、太さは伸びない (vector-effect)。本人の決め 11-07 18:2x〜18:4x「2もいい」。受け渡しの seizou-部品の6案-20261107/指示書.md の 3。 #} {# help のあるカードは題の横に (i) のボタンを置き、押すと数え方の 1 文を小窓 (base.html の #seizou-modal) に出す。中身は格子の後ろの template を写し、字は textContent で入れる (決め 11-06 22:2x。吹き出しは窓の端と左のメニューの下で切れ、閉じていても頁を横に広げ、読み上げで説明が 2 回入ったため = 作者の決め)。 #} {# 今日やること: 手を動かす物のある段だけを、件数の字と移る先の画面の名前のボタンで 1 行ずつ (作者の決め)。行が 1 つも無い会社は、同じ枠に「はじめての方へ」の題で流れの段の並びを出す。枠は 1 つ (aria-labelledby を 2 つにしない)。部品も取引先も 0 の会社には、流れの段の上に「最初にすること」(取引先 → 部品 → 受注の入口。作者の決めの会期中の小さい版) を出す。 #} {# 行き先 (url) のあるカードは、外側を div にし、点線の下の右に行き先の画面の名前の link (「部品マスターを見る」など。名前は HomeView が url から引いた stat.screen) を置く。外側の押下も同じ url へ移る (受注の行と同じ onclick。中の link と (i) のボタンの押下は除く)。作者の決め (カードを入口と見なかった) と作者の決め (link の中に (i) のボタンが入れ子) の直し。 #} {# phone (640px 未満) もカードを 2 列に並べ、カードの中の余白は p-4 (sm から p-6)、phone の数のカードの大きい数だけ text-2xl (sm から text-3xl)。決め 11-06 22:2x (作者の決めで、phone では 8 枚が 1 列に並び、今日やることが 3 画面目から始まったため)。base.html の見た目の約束 (カードの余白 p-6・字の大きさの 4 段) の外の例外。 #} {% if stats %}
{{ stat.label }}
{% if stat.help %}{% endif %}{{ stat.value|yen:0 }}{% if stat.compare %} {% include "core/_stat_delta.html" with compare=stat.compare money=True %}{% endif %}
{% else %}{{ stat.value|comma }} {{ stat.unit }}{% if stat.compare %} {% include "core/_stat_delta.html" with compare=stat.compare money=False %}{% endif %}
{% endif %} {% if stat.compare %}{% endif %} {% if stat.detail %}{{ stat.detail }}
{% endif %} {# mt-auto: 横に並ぶカードで、補助の 1 行の点線の高さをそろえる (見出しや補助が折り返しても)。 #}{{ stat.note }}
{% if stat.url %}{% endif %}手を動かす物のある段だけが並びます。
今は手を動かす物がありません。業務の流れの段を押すと、その画面が開きます。
{# 最初にすること (作者の決めの会期中の小さい版): 部品も取引先も 0 の会社にだけ、取引先 → 部品 → 受注の順の入口を枠だけのボタンで並べる (流れの段の上)。 #} {# 数は数字のカードの先頭の 2 枚 (dashboard_stats が部品・取引先の順に先頭へ置き、HomeView は並びを変えずに url だけ外す)。並びが違うときと数が読めない (None) ときは出さない (偽の案内を置かない)。 #} {# 入口のボタンは書ける人にだけ (決め 11-04 12:5x。can_write は部署で開けない人にも偽)。1 つも出せない人には題ごと出さない。矢印は前の段の li に入れる (流れの段と同じ形)。済んだ印は次の版で (作者の決め)。 #} {% with items=stats.0 partners=stats.1 %} {% if items.url_name == "masters:item_list" and items.value == 0 and partners.url_name == "masters:partner_list" and partners.value == 0 %} {% url 'masters:partner_create' as partner_create_url %}{% url 'masters:partner_import' as partner_import_url %}{% url 'masters:item_create' as item_create_url %}{% url 'masters:item_import' as item_import_url %}{% url 'orders:order_create' as order_create_url %} {% can_write "masters.Partner" as can_add_partner %}{% can_write "masters.Item" as can_add_item %}{% can_write "orders.Order" as can_add_order %} {% if can_add_partner and partner_create_url or can_add_item and item_create_url or can_add_order and order_create_url %}取引先と部品を登録してから、受注を入れます。
遅れている納期はありません。
{% endif %} {% if alerts.overdue.count or alerts.soon.count %}| 受注番号 | 状況 | 納期 | 得意先 | 品番 | 品名 | 残 |
|---|---|---|---|---|---|---|
| {% if row.order_url %}{{ row.order_no }}{% else %}{{ row.order_no }}{% endif %} | {{ row.days }} 日遅れ | {{ row.due_date|date:"Y-m-d" }}{% with day=row.due_date|weekday_ja %}{% if day %} ({{ day }}){% endif %}{% endwith %} | {% master_link row.customer %} | {% master_link row.item row.item.part_no %} | {{ row.item.name }} | {{ row.remaining|comma }} |
| {% if row.order_url %}{{ row.order_no }}{% else %}{{ row.order_no }}{% endif %} | {% if row.days == 0 %}今日{% else %}あと {{ row.days }} 日{% endif %} | {{ row.due_date|date:"Y-m-d" }}{% with day=row.due_date|weekday_ja %}{% if day %} ({{ day }}){% endif %}{% endwith %} | {% master_link row.customer %} | {% master_link row.item row.item.part_no %} | {{ row.item.name }} | {{ row.remaining|comma }} |
直近 6 か月の出荷はまだありません。
| 月 | 出荷件数 | 数量 | {% if not seizou.hide_money %}金額 | {% endif %}
|---|---|---|---|
| {{ month.key }} | {{ month.shipment_count|comma }} | {{ month.shipment_qty|floatformat:"-2g" }} | {% if not seizou.hide_money %}{% if month.shipment_amount is not None %}{{ month.shipment_amount|yen:0 }}{% else %}—{% endif %} | {% endif %}
直近 6 か月の指示書と実績はまだありません。
| 月 | 発行件数 | 発行の数量 | 完成の数 |
|---|---|---|---|
| {{ month.key }} | {{ month.issued_count|comma }} | {{ month.issued_qty|floatformat:"-2g" }} | {% if month.completed_qty is not None %}{{ month.completed_qty|floatformat:"-2g" }}{% else %}—{% endif %} |
| 受注番号 | 受注日 | 得意先 | {% if not seizou.hide_money %}金額 | {% endif %}状態 |
|---|---|---|---|---|
| {% if order.url %}{{ order.obj.order_no }}{% else %}{{ order.obj.order_no }}{% endif %} | {{ order.obj.order_date|date:"Y-m-d" }}{% with day=order.obj.order_date|weekday_ja %}{% if day %} ({{ day }}){% endif %}{% endwith %} | {% master_link order.obj.customer %} | {% if not seizou.hide_money %}{% if order.total is not None %}{{ order.total|yen:0 }}{% else %}—{% endif %} | {% endif %}{% status_badge order.obj small=True %} |
受注はまだありません。
受注を入れると、新しい順に 5 件ここに並びます。
得意先ごとの注文の入口と、今月の明細の数です。入口が違っても、明細は 1 か所の受注に集まります。