Sync CTP monitors on strategy page load for roll trading.

Revive and sync active monitors from live positions before listing roll candidates, show ineligible monitors with reasons, and validate eligibility on preview.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-02 21:55:50 +08:00
parent 4657d26f5e
commit 3c53b2063f
3 changed files with 59 additions and 3 deletions
+13
View File
@@ -221,6 +221,19 @@
if (btnRollE) btnRollE.hidden = true;
return;
}
if (rollMonitorSel) {
var opt = rollMonitorSel.options[rollMonitorSel.selectedIndex];
if (opt && opt.getAttribute('data-eligible') === '0') {
showPreview(
rollPrev,
opt.getAttribute('data-block') || '当前监控不可滚仓',
false,
false
);
if (btnRollE) btnRollE.hidden = true;
return;
}
}
btnRollP.disabled = true;
jsonPost('/api/strategy/roll/preview', rollPayload).then(function (d) {
if (!d.ok) {