{% load seizou_icons seizou_tags %} {# 読み取りを受注にするの入力のカード (intake/extraction_accept.html が include する)。 #} {# 写した元: core/_form_card.html (候補 C91。受信した注文の受け入れ connect/_inbox_accept_card.html と同じ形。納品書を作る shipping/_deliverynote_create_card.html と同じ作り)。form の開きの tag・頭の案内の 1 行・hidden の欄・next と confirmed の hidden・下の行 (キャンセルと保存。黄の知らせの後の「このまま保存」を含む)・_enter_guard.html は写した元の字のまま。 #} {# 変えた所: 欄の格子を、得意先の品番ごとの欄 1 つに枠 1 つにした (form.part_rows)。枠の左にその品番の読み取った明細の行 (行番号・得意先の品番・品名・数量と単位・納期・単価)、右に欄。sm 以上は 2 列、phone は縦に重ねる。枠に入らない見える欄 (form.other_fields) は写した元の格子で枠の後ろに出す。 #} {# 枠の左の値は intake/_lines.html の同じ枡と同じ filter と字。空の数量・納期・単価は薄い「—」(connect/_order_head.html と同じ字)。単価は金額の閲覧の無い人 (seizou.hide_money) には dt も dd も出さない。 #} {# 枠の箱と外の包みに「grid gap-x-6」の字を入れない (試験が入力のカードの欄の格子をその字で探すため。tests/test_core_screen_polish.py・tests/test_small_inputs_modal.py)。data-accept-part は試験が枠を探す印で、見た目に効かない。 #}
{% csrf_token %} {% if form|has_required %}

{% icon "info" "size-4" %}「必須」の欄を埋めて「{% firstof form.submit_label_plain form.submit_label "保存" %}」を押します。入れた値は、止まったときも消えません{% if form.is_multipart %} (ファイルは選び直します){% endif %}。

{% endif %} {# 欄の無い form (形の違う明細だけの読み取り) は枠も格子も描かない (写した元と同じ。候補 C24) #} {% if form.part_rows %}
{% for row in form.part_rows %}{% with field=row.field %}
{% for line in row.lines %} {% if forloop.first %}
{% else %}
{% endif %}

行 {{ line.line_no|default_if_none:"" }}{{ line.part_no }}{{ line.part_name }}

数量
{% if line.qty is not None and line.qty != "" %}{{ line.qty }}{% if line.unit %} {{ line.unit }}{% endif %}{% else %}—{% endif %}
納期
{% if line.due_date is not None and line.due_date != "" %}{{ line.due_date|default_if_none:"" }}{% else %}—{% endif %}
{% if not seizou.hide_money %}
単価
{% if line.unit_price is not None and line.unit_price != "" %}{{ line.unit_price|default_if_none:""|yen }}{% else %}—{% endif %}
{% endif %}
{% endfor %}
{% if field.field.required %}必須{% else %}任意{% endif %}
{% if field.widget_type == "clearablefile" or field.widget_type == "file" %}{% include "core/_file_field.html" %}{% else %}{{ field }}{% endif %} {% if field.errors %}

{% icon "alert" "size-4" %}{{ field.errors|join:" " }}

{% endif %} {% if field.widget_type == "clearablefile" or field.widget_type == "file" %}{% if form.is_bound and field.data %}

{% icon "alert" "size-4" %}ファイルは選び直してください。止まった画面では、選んだファイルが外れます。

{% endif %}{% endif %} {# 欄の下の字。form の warning_help_fields に名前のある欄だけ、data-tone="warning" の間は黄の字にする (JS は class を触らず data-tone だけを付け外しする = R19。例 出荷の数量が残りを超えた時の shipping/shipment-form.js。初見テスト R5 の V61)。ほかの欄は今の class のまま灰 #} {% if field.help_text %}

{{ field.help_text }}

{% endif %}
{% endwith %}{% endfor %}
{% endif %} {% if form.other_fields %}
{% for field in form.other_fields %} {% if field.widget_type == "checkbox" %}
{% if field.errors %}

{% icon "alert" "size-4" %}{{ field.errors|join:" " }}

{% endif %} {% if field.help_text %}

{{ field.help_text }}

{% endif %}
{% else %}
{% if field.field.required %}必須{% else %}任意{% endif %}
{% if field.widget_type == "clearablefile" or field.widget_type == "file" %}{% include "core/_file_field.html" %}{% else %}{{ field }}{% endif %} {% if field.errors %}

{% icon "alert" "size-4" %}{{ field.errors|join:" " }}

{% endif %} {% if field.widget_type == "clearablefile" or field.widget_type == "file" %}{% if form.is_bound and field.data %}

{% icon "alert" "size-4" %}ファイルは選び直してください。止まった画面では、選んだファイルが外れます。

{% endif %}{% endif %} {# 欄の下の字。form の warning_help_fields に名前のある欄だけ、data-tone="warning" の間は黄の字にする (JS は class を触らず data-tone だけを付け外しする = R19。例 出荷の数量が残りを超えた時の shipping/shipment-form.js。初見テスト R5 の V61)。ほかの欄は今の class のまま灰 #} {% if field.help_text %}

{{ field.help_text }}

{% endif %}
{% endif %} {% endfor %}
{% endif %} {% for field in form.hidden_fields %}{{ field }}{% endfor %} {% if next_url %}{% endif %}{# 開いた元の画面の道 (?next=)。止まって描き直しても、保存の後もそこへ戻す (土台の BaseFormView.next_url) #} {% if warnings %}{% endif %} {# 下の行 (キャンセルと保存)。画面の全体では開いた時から窓の下の端に貼り付け (seizou-save-row。scripts/css/input.css。C21)、左の字の置き場 (seizou-save-slot) に書きかけの字 (core/_save_bar.html。黄の知らせの後は描かない) を置く。小窓 (in_modal) は今の形のまま (貼り付けず、字も描かない)。class は組み立てず tag を丸ごと書く (R19)。 #} {# 小窓で見える欄が 0 個のときは、上の空き (mt-6・pt-6) と何も区切らない線 (border-t) を描かない (U69・a-blind-15。候補 C24)。画面の全体では行は窓の下の帯になって流れの外に出るので、欄の無い form のカードの中には空きも線も残らない。中身の無いカードの枠は scripts/css/input.css が描かない (C113) #} {% if in_modal %} {% if form.visible_fields %}
{% else %}
{% endif %} {% else %}
{% if not warnings %}{% include "core/_save_bar.html" %}{% endif %}
{% endif %} {% if cancel_url %}{% icon "arrow-left" "size-4" %}キャンセル{% endif %} {# 実行のボタン: 黄の知らせの後は「このまま保存」(黄)、取消の確かめ (form.danger) は削除の確かめと同じ赤 (manuals/confirm.html。U125。候補 C24)、ほかは主の色 #} {% if warnings %} {% elif form.danger %} {% else %}{% endif %}
{% include "core/_enter_guard.html" %}