From e49abc4b8cea6a9049639be43fd1d163391e031a Mon Sep 17 00:00:00 2001 From: king Date: Tue, 1 Sep 2026 17:50:06 +0900 Subject: [PATCH] =?UTF-8?q?fix(cupang):=203=EC=97=B4=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=E2=91=A2=20=EC=B9=B4=EB=93=9C=20=EC=9E=90=EC=B2=B4=EB=A5=BC=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A1=A4=EB=9F=AC=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 카드 높이는 grid 행(1fr)으로 화면에 맞춰져 있으므로 카드에 overflow-y:auto 를 걸면 안쪽 구조와 무관하게 스크롤된다. 목록은 자연 높이로 두고 헤더는 sticky. JS 높이 계산 대상에서 ③ 제외(①② 만 유지). Co-Authored-By: Claude Opus 5 --- .../cupang/templates/cupang/box_calc.html | 10 +++---- .../cupang/templates/cupang/box_rules.html | 2 +- .../cupang/templates/cupang/centers.html | 2 +- .../cupang/templates/cupang/index.html | 2 +- .../cupang/templates/cupang/products.html | 2 +- app/modules/cupang/templates/cupang/view.html | 2 +- app/static/cupang.css | 27 +++++++++++++++++++ 7 files changed, 37 insertions(+), 10 deletions(-) diff --git a/app/modules/cupang/templates/cupang/box_calc.html b/app/modules/cupang/templates/cupang/box_calc.html index e553486..dc007dc 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 %}
@@ -1067,16 +1067,16 @@ } // ── 스크롤 영역 높이 ────────────────────────────── - // 넓은 화면(3열): 카드 안쪽에서만 스크롤 → 카드 아래끝까지를 높이로 준다. - // 좁은 화면(2열/1열): 카드가 세로로 쌓이므로 높이를 풀고 페이지가 스크롤. + // ①② 만 대상. ③ 센터 분배는 카드 자체가 스크롤러다(CSS). + // 넓은 화면(3열): 카드 아래끝까지를 높이로 준다. + // 좁은 화면(2열/1열): 높이를 풀고 페이지가 스크롤. var FRAME_MIN_WIDTH = 1501; function fitScrollAreas() { var wide = window.innerWidth >= FRAME_MIN_WIDTH; var panes = [ [".cpg-calc-card .erp-table-wrap", document.querySelector(".cpg-calc-card .erp-table-wrap")], - [".cpg-sum-scroll", document.querySelector(".cpg-calc-sum .cpg-sum-scroll")], - ["#cpg-dist-list", distList] + [".cpg-sum-scroll", document.querySelector(".cpg-calc-sum .cpg-sum-scroll")] ]; panes.forEach(function (pair) { var el = pair[1]; diff --git a/app/modules/cupang/templates/cupang/box_rules.html b/app/modules/cupang/templates/cupang/box_rules.html index 95355c9..4b23e84 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 b1f21be..de5f936 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 dadf404..7059eb4 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 003c8f2..ca28da1 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 eda4c65..86bbeba 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 693d1a3..b432a06 100644 --- a/app/static/cupang.css +++ b/app/static/cupang.css @@ -1512,3 +1512,30 @@ body.cpg-dragging { cursor: grabbing; user-select: none; } overflow: visible; } } + +/* ── 넓은 화면(3열): ③ 카드 자체가 스크롤러 ── + 카드 높이는 그리드 행(1fr)로 화면에 맞춰져 있으므로, 카드에 스크롤을 걸면 + 안쪽 구조와 무관하게 항상 스크롤된다. 헤더는 위에 고정. */ +@media (min-width: 1501px) { + .cpg-calc3 > .cpg-dist-card { + overflow-y: auto !important; + overflow-x: hidden !important; + scrollbar-gutter: stable; + } + .cpg-dist-card .cpg-card-head { + position: sticky; top: 0; z-index: 3; + background: var(--color-canvas-white); + padding-bottom: 8px; + } + /* 안쪽 목록은 자연 높이 — 스크롤은 카드가 담당 */ + .cpg-dist-card .cpg-dist-list { + max-height: none !important; + overflow: visible !important; + flex: 0 0 auto; + } + .cpg-calc3 > .cpg-dist-card::-webkit-scrollbar { width: 10px; } + .cpg-calc3 > .cpg-dist-card::-webkit-scrollbar-thumb { + background: var(--color-subtle-ash); border-radius: 999px; + } + .cpg-calc3 > .cpg-dist-card::-webkit-scrollbar-thumb:hover { background: var(--color-midtone-gray); } +}