{# 复盘表单:首行按字段宽度比例;下单类型/开仓类型与离场触发同一行 #}
{% macro journal_form_fields(entry_reason_options, order_type_options) -%}
<div class="form-grid journal-form-row1">
    <input type="datetime-local" name="open_datetime" class="journal-field-datetime" required>
    <input type="datetime-local" name="close_datetime" class="journal-field-datetime" required>
    <input name="coin" class="journal-field-coin" placeholder="BTC" required>
    <input name="tf" class="journal-field-tf" placeholder="5m" required>
    <input name="pnl" class="journal-field-num" placeholder="盈亏(U)" required>
    <input name="expect_rr" class="journal-field-num" placeholder="预期RR">
    <input name="real_rr" class="journal-field-num" placeholder="实际RR">
</div>
<div class="form-grid journal-form-row2">
    <select name="direction" id="journal-direction" class="journal-field-direction" required title="做多/做空">
        <option value="">方向(必选)</option>
        <option value="long">做多</option>
        <option value="short">做空</option>
    </select>
    <select name="order_type" id="journal-order-type" class="journal-field-order-type" required title="下单来源:下单监控/关键位/趋势回调/顺势加仓">
        <option value="">下单类型(必选)</option>
        {% for ot in order_type_options %}
        <option value="{{ ot }}">{{ ot }}</option>
        {% endfor %}
    </select>
    <select name="entry_reason" id="journal-entry-reason" class="journal-field-entry-reason" required title="日内:假破/结构突破/回调触价/突破触价;趋势户:反转/顺势/波段小分歧等">
        <option value="">开仓类型(必选)</option>
        {% for er in entry_reason_options %}
        <option value="{{ er }}">{{ er }}</option>
        {% endfor %}
    </select>
    <select name="early_exit_trigger" required title="平仓如何触发">
        <option value="">离场触发(必选)</option>
        <option value="止盈">止盈</option>
        <option value="保本止盈">保本止盈</option>
        <option value="移动止盈">移动止盈</option>
        <option value="时间平仓">时间平仓</option>
        <option value="强制清仓">强制清仓</option>
        <option value="手动平仓">手动平仓</option>
        <option value="止损">止损</option>
        <option value="其他">其他</option>
    </select>
    <input name="early_exit_note" id="early-exit-note" placeholder="离场补充(仅手工平仓必填)">
    <select name="post_breakeven_stare"><option value="否">保本后盯盘:否</option><option value="是">保本后盯盘:是</option></select>
</div>
{%- endmacro %}
