{% load seizou_tags seizou_icons masters_prices %} {# 部品の詳細の「取引先」のタブの中身 (block tab_rows と block tab_empty の両方から include する)。頭に「共通の単価を足す」と「取引先を足す」、取引先の行ごとに単価の行と見積書と「直す」「単価を足す」と行の「⋮」の赤の「削除」(作者の決め)。足す・直す・消すは小窓で開く (data-modal-form。JS の無いときは画面の全体)。 #} {# 包みの id (item-partners) は、小窓で保存か削除をした後の取り直し (item_detail.html の #item-partners-refresh) が入れ替える箱。取引先の行が無いときも同じ id の箱 (土台の空の枠と同じ箱を 1 つだけ持つ) を出す。共通の単価の行があれば、取引先の行が 0 件でも表を出し、その下に空の枠の箱を出す。 #} {# 部品の取引先の削除の入口は直すと同じ答え (can_edit_partner) で出す。can_write の tag は verb が update のときだけ pk を付けて URL を引くので、"delete" では URL を引けずにいつも真になる。削除の action は直すと同じ種類 (items)。単価の行も同じ (can_edit_price)。 #} {# 単価の「足す」「直す」「削除」は、金額を見られる人 (not seizou.hide_money) にだけ出す (金額の閲覧が無い人は単価の行の追加・編集・削除を保存できない。作者の決め。押しても断られる入口を出さない)。部品の取引先の行の「直す」と「削除」は金額の閲覧を見ない (作者の決め)。 #} {# 見積書の枡は添付ファイルの部品がある会社だけ (masters/_partner_quotes.html。attachments_tags の load は include の中)。共通の見積書は部品の添付ファイルの枠に付ける。 #} {% can_write "masters.PartnerItem" "add" as can_add_partner %}{% can_write "masters.PartnerItem" "update" as can_edit_partner %}{% can_write "masters.ItemPrice" "add" as can_add_price %}{% can_write "masters.ItemPrice" "update" as can_edit_price %}{% item_price_rows object tab.rows as price_rows %}
| 取引先 | 取引先の品番 | 取引先の品名 | 単価 | {% if "attachments" in seizou.parts %}見積書 | {% endif %}{% if can_edit_partner or can_add_price and not seizou.hide_money %}操作 | {% endif %}
|---|---|---|---|---|---|
| {% master_link row.obj.partner %} | {% if row.obj.partner_part_no %}{{ row.obj.partner_part_no }}{% else %}—{% endif %} | {% if row.obj.partner_item_name %}{{ row.obj.partner_item_name }}{% else %}—{% endif %} | {% include "masters/_item_price_list.html" with prices=row.prices %} | {% if "attachments" in seizou.parts %}{% include "masters/_partner_quotes.html" %} | {% endif %} {% if can_edit_partner or can_add_price and not seizou.hide_money %}
{% if can_edit_partner %}{% icon "pencil" "size-4" %}直す{% endif %}
{% if can_add_price and not seizou.hide_money %}{% icon "plus" "size-4" %}単価を足す{% endif %}
{% if can_edit_partner %}{% endif %}
| {% endif %}
| 共通 (どの取引先にも同じ単価) | — | — | {% include "masters/_item_price_list.html" with prices=price_rows.common %} | {% if "attachments" in seizou.parts %}下の「添付ファイル」の枠に付けます。 | {% endif %} {% if can_edit_partner or can_add_price and not seizou.hide_money %}{% if can_add_price and not seizou.hide_money %}{% icon "plus" "size-4" %}単価を足す{% endif %} | {% endif %}
まだありません。
{{ tab.label }}が入ると、ここに並びます。
{% if can_add_partner %}「取引先を足す」で、得意先や協力企業を何社でも足せます。取引先の品番は空のままでも足せます。
{% endif %} {% if "connect" in seizou.parts and "intake" in seizou.parts %}「注文を受け入れる」か「読み取りを受注にする」で相手の品番に自社の部品を選ぶと、その対応もここに足します。
{% endif %}