fix: allow force-close in trade review and hide strategy nav for intraday

统计核对结果允许强制清仓;日内户顶栏隐藏策略交易与策略交易记录。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-07 01:01:57 +08:00
parent 6745262412
commit 2a3d264c8f
6 changed files with 12 additions and 8 deletions
+2 -2
View File
@@ -1609,7 +1609,7 @@ TRADE_COMPLETED_RESULTS = (
TIME_CLOSE_RESULT,
)
REVIEW_RESULT_OPTIONS = ("止盈", "止损", "保本止盈", "移动止盈", "手动平仓", TIME_CLOSE_RESULT)
REVIEW_RESULT_OPTIONS = ("止盈", "止损", "保本止盈", "移动止盈", "手动平仓", "强制清仓", TIME_CLOSE_RESULT)
def parse_dt_for_trading_day(s):
@@ -9382,7 +9382,7 @@ def api_trade_record_review_update():
reviewed_pnl_raw = payload.get("reviewed_pnl_amount")
if reviewed_result and reviewed_result not in REVIEW_RESULT_OPTIONS:
return jsonify({"ok": False, "msg": "结果仅允许:止盈/止损/保本止盈/移动止盈/手动平仓"}), 400
return jsonify({"ok": False, "msg": "结果仅允许:" + "/".join(REVIEW_RESULT_OPTIONS)}), 400
try:
reviewed_open_dt = datetime.strptime(reviewed_opened_at[:19], "%Y-%m-%d %H:%M:%S")