fix(cupang): 3열 프레임 높이를 그리드 행(1fr)로 고정 — ③ 목록만 스크롤

원인: .cpg-calc3 의 행 높이가 auto 라 카드가 화면 아래로 넘치도록 늘어났고,
페이지 스크롤도 없어서 아래쪽(마지막 상자, [+ 새 혼합 상자])이 잘렸다.

- grid-template-rows: minmax(0,1fr) 로 행을 컨테이너 높이에 고정
- 카드 overflow:hidden, ①표/②목록/③센터목록만 내부 스크롤
- 그동안 덧댄 !important 패치와 JS 높이 강제 지정 제거(충돌 정리)
- 2열/1열로 접히면 행이 여러 개라 카드 max-height(76vh)로 처리

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-01 17:38:51 +09:00
parent f1c16e8282
commit ca87c254c0
7 changed files with 33 additions and 71 deletions
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901x" />{% endblock %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901y" />{% endblock %}
{% block content %}
<section class="cpg">
@@ -1066,29 +1066,7 @@
syncConfirm();
}
// ── ①②③ 스크롤 영역 높이 ────────────────────────
// 세 영역 모두 화면 안에서만 스크롤한다(문서 전체는 스크롤하지 않음).
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 avail = window.innerHeight - top - 24;
var h = avail > 260 ? avail : Math.round(window.innerHeight * 0.6);
el.style.setProperty("max-height", h + "px", "important");
el.style.setProperty("overflow-y", "auto", "important");
});
}
window.addEventListener("resize", fitScrollAreas);
var pageScroller = document.querySelector(".erp-page");
if (pageScroller) pageScroller.addEventListener("scroll", fitScrollAreas, { passive: true });
function render() { renderSummary(); renderDist(); fitScrollAreas(); }
function render() { renderSummary(); renderDist(); }
// ── 수량 대화상자 ─────────────────────────────────
function openDialog(key, centerId) {
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901x" />{% endblock %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901y" />{% endblock %}
{% block content %}
<section class="cpg">
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901x" />{% endblock %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901y" />{% endblock %}
{% block content %}
<section class="cpg">
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901x" />{% endblock %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901y" />{% endblock %}
{% block content %}
<section class="cpg">
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901x" />{% endblock %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901y" />{% endblock %}
{% block content %}
<section class="cpg">
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901x" />{% endblock %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260901y" />{% endblock %}
{% block content %}
{# 출고 묶음 보기 — 상자 계산 화면과 같은 3열 구성. 읽기 전용(수정 없음). #}