fix期权复盘与数据统计双口径盈亏,并修复卖回封顶导致盈利单冻成亏损。

平仓卖光可卖币后再按账户差分结算复盘;数据统计改为历史币盈亏×卖回价;复盘展示初始权利金与盈利率,并附历史修复脚本。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-13 09:10:13 +08:00
parent d4de6a23ae
commit 9d77a430e5
16 changed files with 2858 additions and 2242 deletions
@@ -76,7 +76,8 @@
}
.or-list-loading{opacity:.55;pointer-events:none;transition:opacity .12s ease}
.or-trades-table-wrap,.or-reviewed-table-wrap{min-height:9.5rem;overflow-x:auto}
.or-reviewed-table{min-width:980px}
.or-reviewed-table{min-width:1180px}
.or-trades-table{min-width:960px}
.or-kpi-row{
display:grid;grid-template-columns:repeat(6,minmax(0,1fr));
gap:8px;margin-bottom:12px;
@@ -237,7 +238,9 @@
<tr>
<th>类型</th>
<th>标的/合约</th>
<th>初始权利金</th>
<th>盈亏</th>
<th>盈利率</th>
<th>开仓时间</th>
<th>平仓时间</th>
<th>持有</th>
@@ -245,7 +248,7 @@
</tr>
</thead>
<tbody id="or-trades-tbody">
<tr><td colspan="7" class="muted">加载中…</td></tr>
<tr><td colspan="9" class="muted">加载中…</td></tr>
</tbody>
</table>
</div>
@@ -280,6 +283,8 @@
data-lpignore="true" data-1p-ignore="true" data-form-type="other">
<input type="text" id="or-f-pnl" name="or_f_pnl" placeholder="盈亏(U)"
autocomplete="off" inputmode="decimal" data-lpignore="true" data-1p-ignore="true" data-form-type="other">
<input type="text" id="or-f-initial-prem" name="or_f_initial_prem" placeholder="初始权利金(U)" readonly autocomplete="off">
<input type="text" id="or-f-profit-rate" name="or_f_profit_rate" placeholder="盈利率" readonly autocomplete="off">
<input type="text" id="or-f-hold" name="or_f_hold" placeholder="持有时长" readonly autocomplete="off">
</div>
<div class="or-form-grid2">
@@ -403,7 +408,9 @@
<th>类型</th>
<th>标的/合约</th>
<th>方向</th>
<th>初始权利金</th>
<th>盈亏</th>
<th>盈利率</th>
<th>开仓时间</th>
<th>平仓时间</th>
<th>持仓时长</th>
@@ -414,7 +421,7 @@
</tr>
</thead>
<tbody id="or-reviewed-tbody">
<tr><td colspan="11" class="muted">加载中…</td></tr>
<tr><td colspan="13" class="muted">加载中…</td></tr>
</tbody>
</table>
</div>