diff --git a/app/modules/cupang/templates/cupang/box_calc.html b/app/modules/cupang/templates/cupang/box_calc.html
index 2b147e8..771a9ad 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,42 @@
syncConfirm();
}
- function render() { renderSummary(); renderDist(); }
+ // ── 스크롤 영역 높이 (CSS 만으로 안 잡히는 경우 대비) ──
+ // 각 영역의 화면상 위치를 재서 "창 아래까지" 높이를 직접 준다.
+ // window.CPG_DEBUG = true 로 두면 계산값을 콘솔에 찍는다.
+ function fitScrollAreas() {
+ 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]
+ ];
+ panes.forEach(function (pair) {
+ var el = pair[1];
+ if (!el) return;
+ var top = el.getBoundingClientRect().top;
+ var avail = Math.floor(window.innerHeight - top - 16);
+ var h = avail > 200 ? avail : Math.round(window.innerHeight * 0.6);
+ 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);
+ if (window.CPG_DEBUG) {
+ console.log("[cpg fit]", pair[0], "top=", Math.round(top), "avail=", avail,
+ "set=", h, "client=", el.clientHeight, "scroll=", el.scrollHeight);
+ }
+ });
+ }
+
+ window.addEventListener("resize", fitScrollAreas);
+ window.cpgFit = fitScrollAreas; // 콘솔에서 수동 확인용
+
+ function render() {
+ renderSummary();
+ renderDist();
+ // 레이아웃이 확정된 다음 프레임에 높이를 잡는다
+ if (window.requestAnimationFrame) { window.requestAnimationFrame(fitScrollAreas); }
+ else { 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 4da7079..8deada8 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 e5c829d..232052f 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 93808e2..3051a45 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 c7cae53..f605ff4 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 cd4ca69..7595fac 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열 구성. 읽기 전용(수정 없음). #}