diff --git a/app/Views/bag/order_phone_manage.php b/app/Views/bag/order_phone_manage.php index 63eacba..6fd04e7 100644 --- a/app/Views/bag/order_phone_manage.php +++ b/app/Views/bag/order_phone_manage.php @@ -18,7 +18,7 @@
접수 리스트(전화)
-
+
@@ -39,7 +39,7 @@ -
+
지정판매소 정보
@@ -289,6 +289,25 @@ }).join(''); recalcTotals(); + syncListHeight(); // 상세 카드 높이 확정 후 접수 리스트 높이를 맞춘다 + } + + // 접수 리스트 스크롤 높이를 지정판매소 정보(상세) 카드 높이에 맞춘다. + // offsetHeight는 화면 zoom(텍스트 줄이기)과 무관한 레이아웃 px라, 배율과 상관없이 두 카드가 같은 높이가 되고 하단 공백이 생기지 않는다. + const listScrollEl = document.getElementById('list-scroll'); + const detailCardEl = document.getElementById('detail-card'); + function syncListHeight() { + if (!listScrollEl || !detailCardEl) return; + const listCard = listScrollEl.closest('section'); + const header = listCard ? listCard.firstElementChild : null; + listScrollEl.style.height = '0px'; // 리스트를 접어 상세 카드의 본래 높이를 측정 + const target = detailCardEl.offsetHeight - (header ? header.offsetHeight : 0); + listScrollEl.style.height = Math.max(160, target) + 'px'; + } + window.addEventListener('resize', syncListHeight); + window.addEventListener('storage', function (e) { if (e.key === 'jrj_font_scale') syncListHeight(); }); + if ('ResizeObserver' in window && detailCardEl) { + new ResizeObserver(function () { syncListHeight(); }).observe(detailCardEl); } // ── 포장 명세 탭: 주문 품목을 박스/팩/낱장 단위 행으로 펼침 ────────── @@ -415,6 +434,7 @@ firstRow.classList.add('bg-blue-100'); renderDetail(selectedId); } + syncListHeight(); })();