Split options review open/close times into separate columns.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -285,7 +285,7 @@
|
||||
if (!tbody) return;
|
||||
var wrap = beginListLoad("or-trades-wrap", soft);
|
||||
if (!soft) {
|
||||
tbody.innerHTML = '<tr><td colspan="6" class="muted">加载中…</td></tr>';
|
||||
tbody.innerHTML = '<tr><td colspan="7" class="muted">加载中…</td></tr>';
|
||||
}
|
||||
var p = baseQs();
|
||||
p.set("reviewed", "0");
|
||||
@@ -299,7 +299,7 @@
|
||||
.then(function (data) {
|
||||
if (doSync) setSyncStatus("本地记录已加载");
|
||||
if (!data.ok) {
|
||||
tbody.innerHTML = '<tr><td colspan="6" class="muted">加载失败</td></tr>';
|
||||
tbody.innerHTML = '<tr><td colspan="7" class="muted">加载失败</td></tr>';
|
||||
endListLoad(wrap);
|
||||
return;
|
||||
}
|
||||
@@ -311,7 +311,7 @@
|
||||
tradesCache = {};
|
||||
if (!rows.length) {
|
||||
tbody.innerHTML =
|
||||
'<tr><td colspan="6" class="muted">暂无待复盘记录</td></tr>';
|
||||
'<tr><td colspan="7" class="muted">暂无待复盘记录</td></tr>';
|
||||
endListLoad(wrap);
|
||||
return;
|
||||
}
|
||||
@@ -336,9 +336,10 @@
|
||||
'">' +
|
||||
fmtPnl(t.realized_pnl_total) +
|
||||
"</td>" +
|
||||
'<td class="muted" style="font-size:12px">' +
|
||||
'<td class="muted" style="font-size:12px;white-space:nowrap">' +
|
||||
escapeHtml(t.opened_at || "—") +
|
||||
"<br>" +
|
||||
"</td>" +
|
||||
'<td class="muted" style="font-size:12px;white-space:nowrap">' +
|
||||
escapeHtml(t.closed_at || "—") +
|
||||
"</td>" +
|
||||
"<td>" +
|
||||
@@ -371,7 +372,7 @@
|
||||
endListLoad(wrap);
|
||||
})
|
||||
.catch(function () {
|
||||
tbody.innerHTML = '<tr><td colspan="6" class="muted">加载失败</td></tr>';
|
||||
tbody.innerHTML = '<tr><td colspan="7" class="muted">加载失败</td></tr>';
|
||||
endListLoad(wrap);
|
||||
});
|
||||
}
|
||||
@@ -384,7 +385,7 @@
|
||||
if (!tbody) return;
|
||||
var wrap = beginListLoad("or-reviewed-wrap", soft);
|
||||
if (!soft) {
|
||||
tbody.innerHTML = '<tr><td colspan="6" class="muted">加载中…</td></tr>';
|
||||
tbody.innerHTML = '<tr><td colspan="8" class="muted">加载中…</td></tr>';
|
||||
}
|
||||
var p = baseQs();
|
||||
p.set("reviewed", "1");
|
||||
@@ -397,7 +398,7 @@
|
||||
})
|
||||
.then(function (data) {
|
||||
if (!data.ok) {
|
||||
tbody.innerHTML = '<tr><td colspan="6" class="muted">加载失败</td></tr>';
|
||||
tbody.innerHTML = '<tr><td colspan="8" class="muted">加载失败</td></tr>';
|
||||
endListLoad(wrap);
|
||||
return;
|
||||
}
|
||||
@@ -408,7 +409,7 @@
|
||||
var rows = data.trades || [];
|
||||
reviewedCache = {};
|
||||
if (!rows.length) {
|
||||
tbody.innerHTML = '<tr><td colspan="6" class="muted">暂无复盘记录</td></tr>';
|
||||
tbody.innerHTML = '<tr><td colspan="8" class="muted">暂无复盘记录</td></tr>';
|
||||
endListLoad(wrap);
|
||||
return;
|
||||
}
|
||||
@@ -430,13 +431,19 @@
|
||||
'">' +
|
||||
fmtPnl(t.realized_pnl_total) +
|
||||
"</td>" +
|
||||
'<td class="muted" style="font-size:12px;white-space:nowrap">' +
|
||||
escapeHtml(t.opened_at || "—") +
|
||||
"</td>" +
|
||||
'<td class="muted" style="font-size:12px;white-space:nowrap">' +
|
||||
escapeHtml(t.closed_at || "—") +
|
||||
"</td>" +
|
||||
"<td>" +
|
||||
escapeHtml(t.strategy_tag || "—") +
|
||||
"</td>" +
|
||||
"<td>" +
|
||||
escapeHtml(t.result_tag || "—") +
|
||||
"</td>" +
|
||||
'<td class="muted" style="font-size:12px">' +
|
||||
'<td class="muted" style="font-size:12px;white-space:nowrap">' +
|
||||
escapeHtml(t.reviewed_at || "—") +
|
||||
"</td>" +
|
||||
"</tr>"
|
||||
@@ -451,7 +458,7 @@
|
||||
endListLoad(wrap);
|
||||
})
|
||||
.catch(function () {
|
||||
tbody.innerHTML = '<tr><td colspan="6" class="muted">加载失败</td></tr>';
|
||||
tbody.innerHTML = '<tr><td colspan="8" class="muted">加载失败</td></tr>';
|
||||
endListLoad(wrap);
|
||||
});
|
||||
}
|
||||
@@ -502,8 +509,8 @@
|
||||
["合约/计划", tradeTitle(t)],
|
||||
["盈亏", fmtPnl(t.realized_pnl_total)],
|
||||
["持有", fmtHold(t.hold_seconds)],
|
||||
["开仓", t.opened_at || "—"],
|
||||
["平仓", t.closed_at || "—"],
|
||||
["开仓时间", t.opened_at || "—"],
|
||||
["平仓时间", t.closed_at || "—"],
|
||||
["策略", e.strategy_tag || "—"],
|
||||
["方向", e.direction_view || "—"],
|
||||
["结果", e.result_tag || "—"],
|
||||
|
||||
@@ -79,13 +79,14 @@
|
||||
<th>类型</th>
|
||||
<th>标的/合约</th>
|
||||
<th>盈亏</th>
|
||||
<th>开/平</th>
|
||||
<th>开仓时间</th>
|
||||
<th>平仓时间</th>
|
||||
<th>持有</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="or-trades-tbody">
|
||||
<tr><td colspan="6" class="muted">加载中…</td></tr>
|
||||
<tr><td colspan="7" class="muted">加载中…</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -189,13 +190,15 @@
|
||||
<th>类型</th>
|
||||
<th>标的/合约</th>
|
||||
<th>盈亏</th>
|
||||
<th>开仓时间</th>
|
||||
<th>平仓时间</th>
|
||||
<th>策略</th>
|
||||
<th>结果</th>
|
||||
<th>复盘时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="or-reviewed-tbody">
|
||||
<tr><td colspan="6" class="muted">加载中…</td></tr>
|
||||
<tr><td colspan="8" class="muted">加载中…</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -224,4 +227,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/options_review.js?v=10"></script>
|
||||
<script src="/static/options_review.js?v=11"></script>
|
||||
|
||||
Reference in New Issue
Block a user