From c3d2141474d4567f0528286068a7b45f95a3107a Mon Sep 17 00:00:00 2001 From: king Date: Tue, 1 Sep 2026 17:10:55 +0900 Subject: [PATCH] =?UTF-8?q?fix(cupang):=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20?= =?UTF-8?q?=EC=98=81=EC=97=AD=20=EB=86=92=EC=9D=B4=EB=A5=BC=20JS=20?= =?UTF-8?q?=EB=A1=9C=20=EC=A7=81=EC=A0=91=20=EA=B3=84=EC=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CSS flex/grid 만으로는 브라우저에 따라 높이가 잡히지 않아 카드가 계속 늘어났다. render()/resize 시 각 영역의 화면 위치를 재서 max-height 를 픽셀로 지정한다(① 표 / ② 요약 목록 / ③ 센터 목록). Co-Authored-By: Claude Opus 5 --- .../cupang/templates/cupang/box_calc.html | 24 +++++++++++++++++-- .../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 +- 6 files changed, 27 insertions(+), 7 deletions(-) diff --git a/app/modules/cupang/templates/cupang/box_calc.html b/app/modules/cupang/templates/cupang/box_calc.html index 0172a88..d7adc52 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,7 +1066,27 @@ syncConfirm(); } - function render() { renderSummary(); renderDist(); } + // ── 스크롤 영역 높이 고정 ────────────────────────── + // 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 + ]; + panes.forEach(function (el) { + if (!el) return; + var top = el.getBoundingClientRect().top; + var h = Math.max(160, window.innerHeight - top - 24); + el.style.maxHeight = h + "px"; + el.style.overflowY = "auto"; + }); + } + + window.addEventListener("resize", fitScrollAreas); + + function render() { renderSummary(); renderDist(); fitScrollAreas(); } // ── 수량 대화상자 ───────────────────────────────── function openDialog(key, centerId) { diff --git a/app/modules/cupang/templates/cupang/box_rules.html b/app/modules/cupang/templates/cupang/box_rules.html index 8fb093f..7d6662b 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 fa24c6e..0158f3b 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 8b98e31..aca1900 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 a1fc1f0..27fa257 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 8d7d6db..c09a2cb 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열 구성. 읽기 전용(수정 없음). #}