diff --git a/app/modules/cupang/templates/cupang/box_calc.html b/app/modules/cupang/templates/cupang/box_calc.html index 2eca0a5..493e170 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 %}
@@ -29,16 +29,24 @@
+ + + + + + + + + - - - - - - + + + + + @@ -106,11 +114,10 @@ '" + '' + '' + - '' + '' + '' + '' + - ''; + ''; tbody.appendChild(tr); if (code) tr.querySelector(".cpg-calc-name").value = code; return tr; @@ -119,7 +126,6 @@ function clearResults() { Array.prototype.forEach.call(tbody.querySelectorAll(".cpg-calc-row"), function (tr) { tr.querySelector(".cpg-calc-box").textContent = "—"; - tr.querySelector(".cpg-calc-upb").textContent = "—"; tr.querySelector(".cpg-calc-boxes").textContent = "—"; tr.querySelector(".cpg-calc-rem").textContent = "—"; tr.querySelector(".cpg-calc-req").textContent = "—"; @@ -158,12 +164,13 @@ results.forEach(function (res, i) { var tr = items[i] && items[i]._tr; if (!tr) return; - tr.querySelector(".cpg-calc-box").textContent = res.box_name || "—"; - tr.querySelector(".cpg-calc-upb").textContent = res.units_per_box ? res.units_per_box + "개" : "미설정"; + tr.querySelector(".cpg-calc-box").textContent = res.units_per_box + ? (res.box_name || "-") + " · " + res.units_per_box + "개" + : "미설정"; if (res.configured) { - tr.querySelector(".cpg-calc-boxes").textContent = res.full_boxes + "박스"; - tr.querySelector(".cpg-calc-rem").textContent = res.remainder_units + "개"; - tr.querySelector(".cpg-calc-req").textContent = res.required_boxes + "박스"; + tr.querySelector(".cpg-calc-boxes").textContent = res.full_boxes; + tr.querySelector(".cpg-calc-rem").textContent = res.remainder_units; + tr.querySelector(".cpg-calc-req").textContent = res.required_boxes; tr.classList.remove("cpg-calc-warn"); } else { tr.querySelector(".cpg-calc-boxes").textContent = "—"; diff --git a/app/modules/cupang/templates/cupang/box_rules.html b/app/modules/cupang/templates/cupang/box_rules.html index 6f5c78a..dc96aed 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 3f8d552..2518557 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/detail.html b/app/modules/cupang/templates/cupang/detail.html index 74f3a88..6f6015f 100644 --- a/app/modules/cupang/templates/cupang/detail.html +++ b/app/modules/cupang/templates/cupang/detail.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/form.html b/app/modules/cupang/templates/cupang/form.html index 77b3d32..de1a4fd 100644 --- a/app/modules/cupang/templates/cupang/form.html +++ b/app/modules/cupang/templates/cupang/form.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 2198f10..b74ba4f 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 92e8fb7..6b9425b 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/static/cupang.css b/app/static/cupang.css index f8325c3..fdd5121 100644 --- a/app/static/cupang.css +++ b/app/static/cupang.css @@ -327,11 +327,20 @@ .cpg-sort.is-asc .cpg-sort-ind::after { content: "▲"; opacity: 1; } .cpg-sort.is-desc .cpg-sort-ind::after { content: "▼"; opacity: 1; } -/* 박스 계산기 */ +/* 박스 계산기 — 가로 스크롤이 생기지 않게 열 폭·여백을 좁게 잡는다. */ +.cpg-calc-table { table-layout: fixed; width: 100%; } +.cpg-calc-table th, .cpg-calc-table td { padding: 8px 6px; } .cpg-calc-table .cpg-calc-num { text-align: right; white-space: nowrap; } .cpg-calc-table th.cpg-calc-num { text-align: right; } -.cpg-calc-table .cpg-calc-name { min-width: 240px; } -.cpg-calc-table .cpg-calc-qty { width: 96px; text-align: right; } +.cpg-calc-table .cpg-calc-name { width: 100%; min-width: 0; } +.cpg-calc-table .cpg-calc-qty { width: 100%; min-width: 0; text-align: right; padding-left: 6px; padding-right: 6px; } +.cpg-calc-table .cpg-calc-box { white-space: nowrap; font-size: 13px; } +.cpg-calc-table .cpg-calc-act { text-align: center; } +.cpg-calc-table .cpg-calc-del { padding: 2px 8px; line-height: 1.4; } +.cpg-calc-table col.cpg-col-qty { width: 76px; } +.cpg-calc-table col.cpg-col-box { width: 108px; } +.cpg-calc-table col.cpg-col-n { width: 54px; } +.cpg-calc-table col.cpg-col-act { width: 40px; } .cpg-calc-row.cpg-calc-warn { background: color-mix(in srgb, var(--color-callout-red) 8%, transparent); } .cpg-calc-actions { margin-top: 12px; gap: 8px; align-items: center; } .cpg-calc-sum { margin-top: 16px; } @@ -514,3 +523,9 @@ background: var(--color-canvas-white); } .cpg-calc-actions { flex-wrap: wrap; } + +/* 1열/2열 카드 높이를 맞춘다(요약이 비어 있을 때는 왼쪽만 표시). */ +.cpg-calc-layout { align-items: stretch; } +.cpg-calc-layout > .erp-card { display: flex; flex-direction: column; } +.cpg-calc-card .erp-table-wrap { flex: 1 1 auto; } +.cpg-calc-sum { overflow: auto; max-height: min(78vh, 900px); }
제품명 수량박스명입수량박스 수남은 낱개총 필요 박스동작박스 / 입수량박스낱개필요