fix(cupang): 스크롤 영역 높이를 JS 로 직접 계산

CSS flex/grid 만으로는 브라우저에 따라 높이가 잡히지 않아 카드가 계속
늘어났다. render()/resize 시 각 영역의 화면 위치를 재서
max-height 를 픽셀로 지정한다(① 표 / ② 요약 목록 / ③ 센터 목록).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-01 17:10:55 +09:00
parent 6962b79f28
commit c3d2141474
6 changed files with 27 additions and 7 deletions
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901s" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901t" />{% endblock %}
{% block content %} {% block content %}
<section class="cpg"> <section class="cpg">
@@ -1066,7 +1066,27 @@
syncConfirm(); 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) { function openDialog(key, centerId) {
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901s" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901t" />{% endblock %}
{% block content %} {% block content %}
<section class="cpg"> <section class="cpg">
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901s" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901t" />{% endblock %}
{% block content %} {% block content %}
<section class="cpg"> <section class="cpg">
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901s" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901t" />{% endblock %}
{% block content %} {% block content %}
<section class="cpg"> <section class="cpg">
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901s" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901t" />{% endblock %}
{% block content %} {% block content %}
<section class="cpg"> <section class="cpg">
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901s" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901t" />{% endblock %}
{% block content %} {% block content %}
{# 출고 묶음 보기 — 상자 계산 화면과 같은 3열 구성. 읽기 전용(수정 없음). #} {# 출고 묶음 보기 — 상자 계산 화면과 같은 3열 구성. 읽기 전용(수정 없음). #}