Files
qihuo/modules/web/templates/strategy_records.html
T
dekun e5a586f903 Restructure into modules/ with single-process CTP and config/ layout.
Move business code under modules/, env template to config/, PM2 single qihuo process, and _legacy shims for old imports.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 14:42:16 +08:00

59 lines
3.4 KiB
HTML

{# Copyright (c) 2025-2026 马建军. All rights reserved. 专有软件,详见 LICENSE.zh-CN.txt #}
{% extends "base.html" %}
{% block title %}策略记录 - 国内期货 · 交易复盘系统{% endblock %}
{% block extra_css %}
<style>
.strategy-preview{background:var(--card-inner);border:1px solid var(--card-border);border-radius:8px;padding:.65rem .85rem;font-size:.78rem;line-height:1.5}
.strategy-preview-table{width:100%;border-collapse:collapse;font-size:.72rem;min-width:520px}
.strategy-preview-table th,.strategy-preview-table td{padding:.35rem .4rem;border-bottom:1px solid var(--table-border);text-align:right;white-space:nowrap}
.strategy-preview-table th:first-child,.strategy-preview-table td:first-child{text-align:left}
.strategy-preview-table thead th{color:var(--text-muted);font-weight:600;background:var(--list-item-bg)}
</style>
{% endblock %}
{% block content %}
<div class="split-grid">
<div class="card card-scroll">
<h2>趋势回调</h2>
{% if trend_rows %}
<ul class="list">{% for r in trend_rows %}
<li class="list-item"><span>{{ r.symbol }} {{ r.result_label }} · {{ r.closed_at or r.created_at }}</span></li>
{% endfor %}</ul>
{% else %}<p class="empty-hint">暂无记录</p>{% endif %}
</div>
<div class="card card-scroll">
<h2>顺势加仓</h2>
{% if roll_rows %}
<ul class="list">{% for r in roll_rows %}
<li class="list-item">
<details style="width:100%">
<summary>{{ r.symbol }} {{ r.result_label }} · {{ r.closed_at or r.created_at }}</summary>
<div class="strategy-preview" style="margin-top:.55rem">
<p>方向:{{ '多' if r.direction == 'long' else '空' }}</p>
<p>首仓手数:{{ r.detail.first_lots or '—' }} · 加仓次数:{{ r.detail.add_count or 0 }} · 加仓手数:{{ r.detail.add_lots or 0 }} · 当前总手数:{{ r.detail.total_lots or '—' }}</p>
<p>最新止损:{{ r.detail.latest_stop_loss or '—' }} · 平仓价格:{{ r.detail.close_price or '—' }} · 盈利情况:{{ r.detail.pnl if r.detail.pnl is not none else '—' }}</p>
{% if r.detail.legs %}
<table class="strategy-preview-table">
<thead><tr><th></th><th>方式</th><th>手数</th><th>成交/触发价</th><th>新SL</th><th>时间</th></tr></thead>
<tbody>
{% for l in r.detail.legs %}
<tr>
<td>{{ l.leg_index or loop.index }}</td>
<td>{{ l.add_mode }}</td>
<td>{{ l.lots or '—' }}</td>
<td>{{ l.fill_price or l.breakthrough_price or l.limit_price or '—' }}</td>
<td>{{ l.new_stop_loss or '—' }}</td>
<td>{{ l.created_at or '—' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
</details>
</li>
{% endfor %}</ul>
{% else %}<p class="empty-hint">暂无记录</p>{% endif %}
</div>
</div>
{% endblock %}