本地手续费配置(标准×2),持仓/交易记录/复盘/统计展示扣费后盈亏

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-15 15:22:40 +08:00
parent 9ba9733523
commit bea7804d47
11 changed files with 669 additions and 20 deletions
+17 -4
View File
@@ -16,7 +16,7 @@
<th>成交</th><th>止损(开仓)</th><th>止盈</th>
<th>基数</th><th>杠杆</th><th>持仓分钟</th>
<th>开仓时间</th><th>平仓时间</th>
<th>盈亏(元)</th><th>结果</th><th>操作</th>
<th>盈亏(元)</th><th>手续费</th><th>净盈亏</th><th>结果</th><th>操作</th>
</tr>
</thead>
<tbody>
@@ -74,6 +74,12 @@
<input type="hidden" name="close_price" value="{{ t.close_price or '' }}">
<input type="hidden" name="symbol_name" value="{{ t.symbol_name or t.symbol }}">
</td>
<td><span class="cell-readonly text-muted">{{ t.fee if t.fee is not none else '-' }}</span></td>
<td>
<span class="cell-readonly {% if t.pnl_net and t.pnl_net > 0 %}text-profit{% elif t.pnl_net and t.pnl_net < 0 %}text-loss{% endif %}">
{{ t.pnl_net if t.pnl_net is not none else '-' }}
</span>
</td>
<td>
<span class="cell-readonly cell-edit-hide">
{% if t.result == '止盈' %}<span class="badge profit">{{ t.result }}</span>
@@ -99,7 +105,7 @@
</td>
</tr>
{% else %}
<tr><td colspan="14" class="text-muted">暂无交易记录</td></tr>
<tr><td colspan="16" class="text-muted">暂无交易记录</td></tr>
{% endfor %}
</tbody>
</table>
@@ -208,7 +214,7 @@
<table>
<thead>
<tr>
<th>平仓</th><th>品种</th><th>方向</th><th>盈亏</th><th>情绪单</th><th>详情</th><th></th>
<th>平仓</th><th>品种</th><th>方向</th><th>盈亏</th><th>手续费</th><th>净盈亏</th><th>情绪单</th><th>详情</th><th></th>
</tr>
</thead>
<tbody>
@@ -222,6 +228,12 @@
{% elif r.pnl and r.pnl < 0 %}<span class="badge loss">{{ r.pnl }}</span>
{% else %}{{ r.actual_pnl or '-' }}{% endif %}
</td>
<td class="text-muted">{{ r.fee if r.fee is not none else '-' }}</td>
<td>
{% if r.pnl_net and r.pnl_net > 0 %}<span class="badge profit">{{ r.pnl_net }}</span>
{% elif r.pnl_net and r.pnl_net < 0 %}<span class="badge loss">{{ r.pnl_net }}</span>
{% else %}-{% endif %}
</td>
<td>{% if r.is_emotion %}<span class="badge emotion">情绪单</span>{% else %}-{% endif %}</td>
<td>
<button type="button" class="btn-link review-view-btn" data-review='{{ {
@@ -233,6 +245,7 @@
"open_time": r.open_time, "close_time": r.close_time,
"holding_duration": r.holding_duration,
"initial_pnl": r.initial_pnl, "actual_pnl": r.actual_pnl, "pnl": r.pnl,
"fee": r.fee, "pnl_net": r.pnl_net,
"open_type": r.open_type,
"exit_trigger": r.exit_trigger, "exit_supplement": r.exit_supplement,
"watch_after_breakeven": r.watch_after_breakeven,
@@ -244,7 +257,7 @@
<td><a href="{{ url_for('del_review', rid=r.id) }}" class="btn-del" onclick="return confirm('删除?')"></a></td>
</tr>
{% else %}
<tr><td colspan="7" class="text-muted">暂无复盘记录</td></tr>
<tr><td colspan="9" class="text-muted">暂无复盘记录</td></tr>
{% endfor %}
</tbody>
</table>