diff --git a/lib/common/static/options_panel.js b/lib/common/static/options_panel.js index cba1fab..c8677d5 100644 --- a/lib/common/static/options_panel.js +++ b/lib/common/static/options_panel.js @@ -1674,6 +1674,21 @@ return fmt(n, 2) + "倍"; } + function profitExitHint(mult, req, premCcy) { + const n = Number(mult); + const m = Number.isFinite(n) && n > 0 ? n : 1; + const needFactor = 1 + m; + const factorTxt = Math.abs(needFactor - Math.round(needFactor)) < 1e-9 + ? String(Math.round(needFactor)) + : fmt(needFactor, 2); + let hint = formatProfitExitMultLabel(m) + "=盈利达权利金×" + fmt(m, 2) + + " → 需回收≥权利金×" + factorTxt; + if (req != null) { + hint += " · 即≥" + fmtPremiumAmt(req, premCcy) + " " + premCcy; + } + return hint; + } + function renderProfitExitRow(p) { const inst = p.inst_id || ""; if (p.hedge_plan_target) { @@ -1694,6 +1709,7 @@ const statePe = String(p.profit_exit_state || (enabled ? "active" : "idle")); const req = p.profit_exit_required_recycle; const premCcy = posPremiumCcy(p); + const hintMult = Number.isFinite(multNum) && multNum > 0 ? multNum : serverMult; let statusTxt = enabled ? ("监控中 · " + multLabel) : "未开启"; if (enabled && statePe === "closing") statusTxt = "平仓挂单中 · " + multLabel; return ( @@ -1710,7 +1726,7 @@ '' + statusTxt + "" + '' + (enabled - ? ("1倍=盈利=权利金" + (req != null ? (" · 需回收≥" + fmtPremiumAmt(req, premCcy) + " " + premCcy) : "")) + ? profitExitHint(hintMult, req, premCcy) : "开启后自选倍数;达标按买一限价平;可随时关闭") + "" + ""