diff --git a/lib/common/static/options_review.js b/lib/common/static/options_review.js index 346a850..dd8de8c 100644 --- a/lib/common/static/options_review.js +++ b/lib/common/static/options_review.js @@ -371,17 +371,41 @@ function hideJournalForm() { currentTradeId = null; var card = $("or-journal-card"); - if (card) card.hidden = true; + if (card) card.classList.add("or-journal-idle"); document.querySelectorAll(".or-trade-row").forEach(function (tr) { tr.classList.remove("or-row-active"); }); + ($("or-trade-id") || {}).value = ""; + ($("or-f-open") || {}).value = ""; + ($("or-f-close") || {}).value = ""; + ($("or-f-coin") || {}).value = ""; + ($("or-f-inst") || {}).value = ""; + ($("or-f-pnl") || {}).value = ""; + ($("or-f-hold") || {}).value = ""; + ($("or-f-strategy") || {}).value = ""; + ($("or-f-direction") || {}).value = ""; + ($("or-f-exit") || {}).value = ""; + ($("or-f-followed") || {}).value = ""; + ($("or-f-result") || {}).value = ""; + ($("or-f-entry") || {}).value = ""; + ($("or-f-note") || {}).value = ""; + setMoodTags(""); + resetUploadSlots(); + var summary = $("or-journal-summary"); + if (summary) { + summary.textContent = + "先点「同步」拉记录,再在下方列表点选一笔填入;截图槽位 5m/15m/1h/4h 可先传."; + } + var legsHost = $("or-legs-host"); + if (legsHost) legsHost.innerHTML = ""; + ($("or-save-status") || {}).textContent = ""; } function openJournalForm(tradeId) { currentTradeId = tradeId; var card = $("or-journal-card"); if (!card) return; - card.hidden = false; + card.classList.remove("or-journal-idle"); card.scrollIntoView({ behavior: "smooth", block: "start" }); document.querySelectorAll(".or-trade-row").forEach(function (tr) { tr.classList.toggle("or-row-active", Number(tr.getAttribute("data-id")) === tradeId); @@ -400,7 +424,7 @@ return; } fillForm(data.trade); - ($("or-save-status") || {}).textContent = ""; + ($("or-save-status") || {}).textContent = "已选中 #" + tradeId; }) .catch(function () { ($("or-save-status") || {}).textContent = "加载失败"; @@ -484,7 +508,10 @@ function saveEntry() { var tradeId = Number(($("or-trade-id") || {}).value || 0); - if (!tradeId) return; + if (!tradeId) { + alert("请先在下方列表点选一笔记录(若无记录请先点同步)"); + return; + } var strategy = (($("or-f-strategy") || {}).value || "").trim(); if (!strategy) { alert("请填写策略标签"); @@ -566,6 +593,7 @@ } ); bindUploadSlots(); + hideJournalForm(); setActiveTab("option_spot"); } diff --git a/lib/options/templates/options_review_panel.html b/lib/options/templates/options_review_panel.html index 2753a20..4138ef0 100644 --- a/lib/options/templates/options_review_panel.html +++ b/lib/options/templates/options_review_panel.html @@ -1,4 +1,4 @@ -{# OKX 期权复盘:三类 Tab + 列表 + 下方多周期截图复盘表单 #} +{# OKX 期权复盘:三类 Tab + 常驻复盘上传(同合约多周期截图) + 列表 #}
-先点「同步」拉记录,再在下方列表点选一笔,即可自动填入开平时间与盈亏;也可先上传截图再选记录保存.
+可只传部分周期;选文件后即时上传,保存后详情可查看
+可只传部分周期;选文件后即时上传(与合约复盘相同 5m/15m/1h/4h)
点选一行,上方复盘表单会自动填入该笔数据.
+