diff --git a/lib/common/static/instance_page.css b/lib/common/static/instance_page.css index 8a3480b..8e7a0c2 100644 --- a/lib/common/static/instance_page.css +++ b/lib/common/static/instance_page.css @@ -22,8 +22,24 @@ .card h2{font-size:1rem;margin-bottom:10px;color:#d4d9ff} .form-row{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px;align-items:center} .form-row > input:not([type=checkbox]):not([type=radio]),.form-row > select{flex:0 1 auto;width:10rem;max-width:200px;min-width:7rem} - #add-order-form #sltp-mode{min-width:12.5rem;max-width:16rem;width:auto} + /* 实盘下单监控:分层布局 */ + .order-monitor-form{display:flex;flex-direction:column;gap:10px;margin-bottom:4px} + .order-monitor-form .om-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px} + .order-monitor-form .om-row-policy > input:not([type=checkbox]):not([type=radio]), + .order-monitor-form .om-row-policy > select{flex:0 1 auto;width:10rem;max-width:200px;min-width:7rem} + .order-monitor-form #sltp-mode{min-width:12.5rem;max-width:16rem;width:auto} + .order-monitor-form .om-field{display:flex;flex-direction:column;gap:4px;min-width:7.5rem} + .order-monitor-form .om-field-lab{font-size:.72rem;color:#9aa3c7;line-height:1;letter-spacing:.02em} + .order-monitor-form .om-field input{width:9.5rem;max-width:160px;box-sizing:border-box} + .order-monitor-form .om-live-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding-bottom:2px;margin-left:auto} + .order-monitor-form .om-row-opts{align-items:center;gap:12px;padding-top:2px} + .order-monitor-form .om-check{display:inline-flex;align-items:center;gap:5px;font-size:.82rem;color:#cfd3ef;cursor:pointer;user-select:none} + .order-monitor-form .om-time-close{display:inline-flex;align-items:center;gap:6px;font-size:.82rem;color:#cfd3ef} + .order-monitor-form .om-time-close select{width:auto;min-width:4.2rem;max-width:5.5rem;padding:6px 8px} + .order-monitor-form .om-row-action{padding-top:2px} + .order-monitor-form .om-submit{min-width:11rem;padding:10px 18px;font-weight:600} .order-plan-preview{display:flex;gap:18px;flex-wrap:wrap;align-items:center;margin:4px 0 10px;padding:10px 12px;background:#151a28;border:1px solid #2a3150;border-radius:8px;font-size:.85rem} + #add-order-form #sltp-mode{min-width:12.5rem;max-width:16rem;width:auto} .order-preview-risk{color:#ff6b6b} .order-preview-risk strong{color:#ff8f8f;font-weight:600} .order-preview-profit{color:#4cd97f} diff --git a/lib/common/static/instance_theme.css b/lib/common/static/instance_theme.css index 60b9e3b..30181b4 100644 --- a/lib/common/static/instance_theme.css +++ b/lib/common/static/instance_theme.css @@ -1959,6 +1959,15 @@ html[data-theme="light"] .order-plan-preview { border-color: #b8c8d8 !important; } +html[data-theme="light"] .order-monitor-form .om-field-lab { + color: #5a6a82; +} + +html[data-theme="light"] .order-monitor-form .om-check, +html[data-theme="light"] .order-monitor-form .om-time-close { + color: #3a4a62; +} + html[data-theme="light"] .order-preview-rr { color: #4a6078 !important; } @@ -5680,6 +5689,36 @@ html[data-theme="light"] .options-review-wrap .or-reviewed-table tbody tr:hover max-width: 100%; } + body.inst-phone .order-monitor-form .om-row { + align-items: stretch; + } + + body.inst-phone .order-monitor-form .om-row-policy > input:not([type="checkbox"]):not([type="radio"]), + body.inst-phone .order-monitor-form .om-row-policy > select, + body.inst-phone .order-monitor-form #sltp-mode, + body.inst-phone .order-monitor-form .om-field, + body.inst-phone .order-monitor-form .om-live-meta, + body.inst-phone .order-monitor-form .om-check, + body.inst-phone .order-monitor-form .om-time-close, + body.inst-phone .order-monitor-form .order-entry-model-row, + body.inst-phone .order-monitor-form .om-submit { + flex: 1 1 100% !important; + width: 100% !important; + max-width: 100% !important; + min-width: 0; + box-sizing: border-box; + margin-left: 0; + } + + body.inst-phone .order-monitor-form .om-field input { + width: 100% !important; + max-width: 100% !important; + } + + body.inst-phone .order-monitor-form .om-live-meta { + padding-bottom: 0; + } + body.inst-phone .order-plan-preview { flex-direction: column; align-items: flex-start; diff --git a/lib/instance/templates/embed_boot_scripts.html b/lib/instance/templates/embed_boot_scripts.html index 62827b7..b2e3d70 100644 --- a/lib/instance/templates/embed_boot_scripts.html +++ b/lib/instance/templates/embed_boot_scripts.html @@ -1279,6 +1279,12 @@ if(fullMarginEl){ } const sltpModeEl = document.getElementById("sltp-mode"); +function setOmFieldVisible(inputEl, show){ + if(!inputEl) return; + inputEl.style.display = show ? "" : "none"; + const wrap = inputEl.closest(".om-field"); + if(wrap) wrap.style.display = show ? "" : "none"; +} function toggleSltpMode(){ const mode = sltpModeEl ? sltpModeEl.value : "fixed_rr"; const slEl = document.getElementById("order-sl"); @@ -1289,14 +1295,14 @@ function toggleSltpMode(){ if(!slEl || !tpEl || !slPctEl || !tpPctEl){ return; } const pct = mode === "pct"; const fixed = mode === "fixed_rr"; - slEl.style.display = pct ? "none" : ""; - tpEl.style.display = (pct || fixed) ? "none" : ""; - if(fixedRrEl) fixedRrEl.style.display = fixed ? "" : "none"; + setOmFieldVisible(slEl, !pct); + setOmFieldVisible(tpEl, !(pct || fixed)); + setOmFieldVisible(fixedRrEl, fixed); slEl.required = !pct; tpEl.required = !pct && !fixed; if(fixedRrEl) fixedRrEl.required = fixed; - slPctEl.style.display = pct ? "" : "none"; - tpPctEl.style.display = pct ? "" : "none"; + setOmFieldVisible(slPctEl, pct); + setOmFieldVisible(tpPctEl, pct); slPctEl.required = pct; tpPctEl.required = pct; refreshOrderTpPreview(); diff --git a/lib/instance/templates/embed_page_fragment.html b/lib/instance/templates/embed_page_fragment.html index efc9014..e9a2d07 100644 --- a/lib/instance/templates/embed_page_fragment.html +++ b/lib/instance/templates/embed_page_fragment.html @@ -97,50 +97,7 @@ {% endif %} {% include order_rule_tips_tpl %} -
- {% include 'order_plan_preview_bar.html' %} + {% include 'order_monitor_open_form.html' %}