From 1047175346dc19ba39f983ba3c691e7912a794e0 Mon Sep 17 00:00:00 2001 From: king Date: Tue, 1 Sep 2026 17:29:37 +0900 Subject: [PATCH] =?UTF-8?q?fix(cupang):=20=E2=91=A2=20=EC=84=BC=ED=84=B0?= =?UTF-8?q?=20=EB=B6=84=EB=B0=B0=EB=8A=94=20=EB=82=B4=EC=9A=A9=EB=A7=8C?= =?UTF-8?q?=ED=81=BC=20=EB=8A=98=EC=96=B4=EB=82=98=EA=B2=8C=20(=ED=81=B4?= =?UTF-8?q?=EB=A6=AC=ED=95=91=20=EC=A0=9C=EA=B1=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 혼합 상자를 추가하면 칸이 아래로 늘어나야 하는데 카드/목록에 걸어둔 max-height + overflow:hidden 이 잘라내고 있었다. ③ 은 높이 제한과 클리핑을 없애고 넘치면 페이지가 스크롤되게 한다. ①(입력 표) ②(요약 목록) 의 내부 스크롤은 그대로 유지. Co-Authored-By: Claude Opus 5 --- .../cupang/templates/cupang/box_calc.html | 18 +++++------------- .../cupang/templates/cupang/box_rules.html | 2 +- .../cupang/templates/cupang/centers.html | 2 +- app/modules/cupang/templates/cupang/index.html | 2 +- .../cupang/templates/cupang/products.html | 2 +- app/modules/cupang/templates/cupang/view.html | 2 +- app/static/cupang.css | 18 ++++++++++++++---- 7 files changed, 24 insertions(+), 22 deletions(-) diff --git a/app/modules/cupang/templates/cupang/box_calc.html b/app/modules/cupang/templates/cupang/box_calc.html index 298e380..f3b6b69 100644 --- a/app/modules/cupang/templates/cupang/box_calc.html +++ b/app/modules/cupang/templates/cupang/box_calc.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %}
@@ -1066,33 +1066,25 @@ syncConfirm(); } - // ── 스크롤 영역 높이 고정 ────────────────────────── - // CSS(flex/grid) 만으로는 브라우저에 따라 높이가 안 잡혀 카드가 계속 - // 늘어난다. 화면에서 실제 위치를 재서 max-height 를 픽셀로 지정한다. + // ── ①② 스크롤 영역 높이 ────────────────────────── + // ③ 센터 분배는 내용만큼 아래로 늘어나야 하므로 건드리지 않는다 + // (넘치면 페이지가 스크롤된다). function fitScrollAreas() { var panes = [ document.querySelector(".cpg-calc-card .erp-table-wrap"), - document.querySelector(".cpg-calc-sum .cpg-sum-scroll"), - distList + document.querySelector(".cpg-calc-sum .cpg-sum-scroll") ]; panes.forEach(function (el) { if (!el) return; var top = el.getBoundingClientRect().top; var avail = window.innerHeight - top - 24; - // 화면 아래로 내려가 있는(3열이 접힌) 영역은 창 높이의 60% 를 쓴다. - // 그대로 두면 음수가 되어 아주 작은 높이로 잘린다. var h = avail > 260 ? avail : Math.round(window.innerHeight * 0.6); - // !important 로 박아 넣는다 — 다른 규칙에 밀리지 않게 el.style.setProperty("max-height", h + "px", "important"); el.style.setProperty("overflow-y", "auto", "important"); - el.style.setProperty("min-height", "0", "important"); - el.setAttribute("data-fit", h); }); } window.addEventListener("resize", fitScrollAreas); - var pageScroller = document.querySelector(".erp-page"); - if (pageScroller) pageScroller.addEventListener("scroll", fitScrollAreas, { passive: true }); function render() { renderSummary(); renderDist(); fitScrollAreas(); } diff --git a/app/modules/cupang/templates/cupang/box_rules.html b/app/modules/cupang/templates/cupang/box_rules.html index 91d3f9d..3e179b6 100644 --- a/app/modules/cupang/templates/cupang/box_rules.html +++ b/app/modules/cupang/templates/cupang/box_rules.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %}
diff --git a/app/modules/cupang/templates/cupang/centers.html b/app/modules/cupang/templates/cupang/centers.html index 2cf37c3..b19138a 100644 --- a/app/modules/cupang/templates/cupang/centers.html +++ b/app/modules/cupang/templates/cupang/centers.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %}
diff --git a/app/modules/cupang/templates/cupang/index.html b/app/modules/cupang/templates/cupang/index.html index ffe021c..01f5aae 100644 --- a/app/modules/cupang/templates/cupang/index.html +++ b/app/modules/cupang/templates/cupang/index.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %}
diff --git a/app/modules/cupang/templates/cupang/products.html b/app/modules/cupang/templates/cupang/products.html index ee46271..5962e23 100644 --- a/app/modules/cupang/templates/cupang/products.html +++ b/app/modules/cupang/templates/cupang/products.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %}
diff --git a/app/modules/cupang/templates/cupang/view.html b/app/modules/cupang/templates/cupang/view.html index f3881a3..ae5e1ed 100644 --- a/app/modules/cupang/templates/cupang/view.html +++ b/app/modules/cupang/templates/cupang/view.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %} {# 출고 묶음 보기 — 상자 계산 화면과 같은 3열 구성. 읽기 전용(수정 없음). #} diff --git a/app/static/cupang.css b/app/static/cupang.css index 250650a..1d43c2b 100644 --- a/app/static/cupang.css +++ b/app/static/cupang.css @@ -1494,10 +1494,10 @@ body.cpg-dragging { cursor: grabbing; user-select: none; } .cpg-dist-card::-webkit-scrollbar-thumb:hover { background: var(--color-midtone-gray); } /* ── 스크롤 최종 보정 — id 선택자 + !important 로 확정 ── */ +/* ③ 센터 목록은 내용만큼 늘어난다(자르지 않음). 넘치면 페이지가 스크롤. */ #cpg-dist-list { - max-height: 60vh !important; - overflow-y: auto !important; - min-height: 0 !important; + max-height: none !important; + overflow: visible !important; } .cpg-calc-card .erp-table-wrap { max-height: 52vh !important; @@ -1507,4 +1507,14 @@ body.cpg-dragging { cursor: grabbing; user-select: none; } max-height: 52vh !important; overflow-y: auto !important; } -.cpg-calc3 > .erp-card { max-height: 86vh !important; } +.cpg-calc3 > .cpg-dist-card { max-height: none !important; overflow: visible !important; } + +/* ③ 센터 분배 — 내용에 따라 높이가 늘어나도록 (클리핑/스크롤 제거) */ +.cpg-dist-card, +.cpg-calc3 > .cpg-dist-card { max-height: none !important; overflow: visible !important; } +.cpg-dist-card .cpg-dist-list, +#cpg-dist-list { + max-height: none !important; + overflow: visible !important; + min-height: 0; +}