{% load seizou_tags seizou_icons orders_board %}{% comment %} 注文残の一覧 (注残の盤) の行の部分。orders/_rows.html が、行があるときに include する (空の一覧は core/_rows.html)。 core/_rows.html の「行がある時」の部分 (表の箱・見出し・ページ送り・partial のときの _list_meta.html の oob) を写して、次を変える。 - 欄は列の名前で出し分ける: 受注番号は受注の詳細への link、納期までは「n 日遅れ」(赤)・「今日」・「あと n 日」の字 (orders.board.BoardRow.days_left_label。ダッシュボードの納期アラートと同じ型 = W01 の直し 11-07)、指示書の「未」と空の進捗は薄い字、 計画の終了日が納期より後なら印、判断は印の code ごとに色の印 (字は orders.board.JUDGEMENTS)。 - 数量・出荷済み・検収・残・在庫は土台の数の欄 (columns の kind = number。右寄せと負の赤は土台)。納期までも kind = number のまま (CSV と並び替えは稼働日の数のまま) で、枡の字だけ名前で出す。検収が 0 の行・在庫の無い行・納期の無い行の「—」も名前で出す。 - 日付の枡 (納期・計画の終了日・受注日) は土台と同じく曜日の 1 字を添える (決め N132。W04 の直し 11-07)。CSV は日付のまま。 - 在庫: stock の部品の在庫数。合計は出さない (合計の行の枡は空)。 - 預かり (N184。決め 11-06 18:3x): receiving の引当の合計。0 と部品の無い会社は「—」。合計は出さない (合計の行の枡は空)。 引当の合計が受注の数より少ない行には、値の横に「預かり待ち」の札 (会社の設定 receiving_required が off でないときだけ = 本体の決め 11-06 20:1x。判断は orders.board.BoardRow.receiving_waiting)。 - 行は data-row-menu を持ち、最後に「操作」の列 (orders/_row_menu.html。⋮ と右クリックの同じメニュー)。行に onclick は無い。 - 合計の行 (数量・出荷済み・検収・残) は tag board_totals が、絞り込みの後の全部の明細から出す (盤の columns に total は書かない)。 - 「出荷する」「指示書を発行する」「入荷を記録する」(N184)「発注する」の項目は tag can_write (core の access.can_write_model と同じ判定) が出し分ける (権限の無い人には出さない = 決め 11-04 00:0x)。行ごとでなく 1 回だけ呼ぶ。 - 行の選ぶ欄 (受注番号の枡の中。name が line、form が board-bulk) は、orderline_list.html の帯の form の値になる。帯のボタンが 1 つも出ない人には欄を出さない。 取消の受注と残の無い明細には出さない。欄は見せない class (sr-only) で、行の link と ⋮ の外を押すと orders/board-select.js が欄を切り替え、 選んだ行に data-tone を付ける (行の固定の class が主色の薄い地にする。決め 11-04 22:4x)。全部を選ぶ・外すは帯の 2 つのボタン。 列を足さずに受注番号の枡に入れるのは、既にある盤の試験が枡の番号と合計の行の枡の数を見るため (N124)。 - 「実績を入れる」も同じ tag (progress の部品を部署で開ける人だけ。実績の記録は編集の権限が要らないので、決めるのは部署の判定 = 決め 11-04 12:5x)。 class の中に {{ }} と {% if %} を書かない (R19)。見た目の違う欄は、要素ごと if で出し分ける。 写した元: core/_rows.html (11-03 の main)。土台の表の形が変わったら、ここも合わせる。 {% endcomment %} {% can_write "workorders.WorkOrder" as can_issue %} {% can_write "shipping.Shipment" as can_ship %} {% can_write "purchasing.PurchaseOrder" as can_po %} {% can_write "progress.Progress" as can_progress %} {% can_write "receiving.Receiving" as can_receive %} {% url 'shipping:shipment_bulk_create' as bulk_ship_url %}{% url 'purchasing:purchaseorder_create' as bulk_po_url %} {# 表の箱を包む要素。右に続きがあるときだけ、箱の印 (data-scroll-hint) を見る JS がこの要素に印を付け、この要素の中に「→」のボタンを作る (右の端の影はやめた。11-07 の決め。C34)。 #}
| {% else %} | {% endif %} {% if col.sortable %}{{ col.label }}{% if sort == col.name %}{% icon "chevron-up" "size-4 text-primary" %}{% elif sort == col.desc_name %}{% icon "chevron-down" "size-4 text-primary" %}{% else %}{% icon "chevrons-up-down" "size-4 text-base-content/60" %}{% endif %}{% else %}{{ col.label }}{% endif %} | {% endfor %}操作 | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {% if bulk_ship_url and can_ship or bulk_po_url and can_po %}{% if row.obj.order.status != "cancelled" and row.obj.remaining_total > 0 %}{% endif %}{% endif %}{{ cell.value|default_if_none:"" }} | {% elif col.name == "due_date" or col.name == "board__plan_end" or col.name == "order__order_date" %}{% if cell.value %}{{ cell.value|date:"Y-m-d" }}{% with day=cell.value|weekday_ja %}{% if day %} ({{ day }}){% endif %}{% endwith %}{% if col.name == "board__plan_end" and row.obj.board.plan_late %} 納期より後{% endif %} | {% else %}— | {% endif %} {% elif col.name == "board__days_left" and cell.value is None %}— | {% elif col.name == "board__days_left" %}{% if cell.negative %}{{ row.obj.board.days_left_label }}{% else %}{{ row.obj.board.days_left_label }}{% endif %} | {% elif col.name == "board__acceptance_total" and not cell.value %}— | {% elif col.name == "board__stock_balance" and cell.value is None %}— | {% elif col.name == "board__allocated" %}{% if cell.value %}{{ cell.value|yen_if:cell.money }}{% else %} | —{% endif %}{% if row.obj.board.receiving_waiting %} 預かり待ち{% endif %} | {% elif col.name == "board__workorder_label" %}{% if cell.value == "未" %}{{ cell.value }} | {% else %}{{ cell.value }} | {% endif %} {% elif col.name == "board__progress_label" %}{% if cell.value %}{{ cell.value }} | {% else %}— | {% endif %} {% elif col.name == "board__judgement" %}{% with code=row.obj.board.judgement_code %}{% if code == "late" %}{{ cell.value }}{% elif code == "ship" %}{{ cell.value }}{% elif code == "need_workorder" %}{{ cell.value }}{% elif code == "making" %}{{ cell.value }}{% else %}{{ cell.value }}{% endif %}{% endwith %} | {% elif cell.numeric %}{% if cell.negative %}{{ cell.value|yen_if:cell.money }}{% else %}{{ cell.value|yen_if:cell.money }}{% endif %} | {% elif cell.datetime %}{{ cell.value|date:"Y-m-d H:i" }} | {% elif cell.date %}{{ cell.value|date:"Y-m-d" }}{% with day=cell.value|weekday_ja %}{% if day %} ({{ day }}){% endif %}{% endwith %} | {% elif cell.master %}{% master_link cell.master cell.value %} | {% elif cell.code %}{{ cell.value|default_if_none:"" }} | {% elif cell.boolean %}{% bool_mark cell.value %} | {% else %}{{ cell.value|default_if_none:"" }} | {% endif %} {% endif %}{% endfor %} {% endfor %}{% include "orders/_row_menu.html" with line=row.obj can_issue=can_issue can_ship=can_ship can_po=can_po can_progress=can_progress can_receive=can_receive %} |
| {{ sums.qty|comma }} | {% elif col.name == "shipped_total" %}{{ sums.shipped|comma }} | {% elif col.name == "remaining_total" %}{{ sums.remaining|comma }} | {% elif col.name == "board__acceptance_total" %}{{ sums.accepted|comma }} | {% elif forloop.first %}合計 | {% else %}{% endif %}{% endfor %} |
{{ paginator.count|comma }} 件中 {{ page_obj.start_index|comma }}–{{ page_obj.end_index|comma }} 件
{% if paginator.num_pages > 1 %} {% endif %}