fix无法按新真盈亏公式更新的旧单标记为缺价未核。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -451,6 +451,11 @@
|
||||
var badgeExtra = reviewed
|
||||
? ' <span class="or-badge" style="background:rgba(61,214,140,.2)">已复盘</span>'
|
||||
: "";
|
||||
var needsMark = String(t.status_raw || "") === "缺价未核";
|
||||
if (needsMark) {
|
||||
badgeExtra +=
|
||||
' <span class="or-badge" style="background:rgba(255,170,60,.28)" title="缺开仓价或卖回价,未能按新真盈亏公式更新">缺价未核</span>';
|
||||
}
|
||||
return (
|
||||
'<tr class="or-trade-row' +
|
||||
active +
|
||||
@@ -471,7 +476,7 @@
|
||||
'<td class="' +
|
||||
pnlClass(t.realized_pnl_total) +
|
||||
'">' +
|
||||
fmtPnl(t.realized_pnl_total) +
|
||||
(needsMark ? '<span class="muted" title="未能按新公式更新">—</span>' : fmtPnl(t.realized_pnl_total)) +
|
||||
"</td>" +
|
||||
'<td class="' +
|
||||
pnlClass(pr) +
|
||||
@@ -565,13 +570,18 @@
|
||||
var entry = t.entry || {};
|
||||
var direction = t.direction_view || entry.direction_view || "";
|
||||
var entryLogic = t.entry_logic || entry.entry_logic || "";
|
||||
var needsMarkR = String(t.status_raw || "") === "缺价未核";
|
||||
return (
|
||||
'<tr class="or-reviewed-row" data-id="' +
|
||||
t.id +
|
||||
'">' +
|
||||
"<td><span class=\"or-badge\">" +
|
||||
escapeHtml(t.source_label || t.source_type) +
|
||||
"</span></td>" +
|
||||
"</span>" +
|
||||
(needsMarkR
|
||||
? ' <span class="or-badge" style="background:rgba(255,170,60,.28)" title="缺开仓价或卖回价,未能按新真盈亏公式更新">缺价未核</span>'
|
||||
: "") +
|
||||
"</td>" +
|
||||
"<td>" +
|
||||
escapeHtml(tradeContractLabel(t)) +
|
||||
"</td>" +
|
||||
@@ -584,7 +594,7 @@
|
||||
'<td class="' +
|
||||
pnlClass(t.realized_pnl_total) +
|
||||
'">' +
|
||||
fmtPnl(t.realized_pnl_total) +
|
||||
(needsMarkR ? '<span class="muted" title="未能按新公式更新">—</span>' : fmtPnl(t.realized_pnl_total)) +
|
||||
"</td>" +
|
||||
'<td class="' +
|
||||
pnlClass(resolveProfitRate(t)) +
|
||||
|
||||
Reference in New Issue
Block a user