diff --git a/app/modules/cupang/templates/cupang/box_calc.html b/app/modules/cupang/templates/cupang/box_calc.html index 00ae37b..dbf4312 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 %}
@@ -766,10 +766,9 @@ return (contents[key] || []).filter(function (it) { return it.product_code === code; })[0]; } - // 상자에 담기 — 용량만큼만 들어간다. 담은 수량을 돌려준다. + // 상자에 담기 — 용량은 표시용일 뿐, 이동은 막지 않는다(넘치면 100% 초과 표시). function mixPut(key, code, name, qty) { - var room = mixRoomFor(key, code); - var put = Math.min(room, qty); + var put = qty; if (put <= 0) return 0; var hit = mixItem(key, code); if (hit) { hit.quantity += put; } @@ -809,12 +808,9 @@ return found; } - // 상자 → 상자 이동. 실제로 옮긴 수량을 돌려준다(자리만큼만). + // 상자 → 상자 이동. 용량과 무관하게 요청한 수량을 옮긴다. function moveUnits(fromKey, toKey, code, name, qty) { - var room = mixRoomFor(toKey, code); - var move = Math.min(qty, room); - if (move <= 0) return 0; - var pulled = mixPull(fromKey, code, move); + var pulled = mixPull(fromKey, code, qty); if (!pulled) return 0; mixPut(toKey, code, name, pulled); return pulled; @@ -974,7 +970,7 @@ mixKeysOf(cid).forEach(function (k) { if (k === fromKey) return; var room = mixRoomFor(k, code); - opts += '"; }); opts += ''; @@ -994,8 +990,7 @@ (entry.count > 1 ? '(' + it.quantity + "개 × " + entry.count + "상자)" : "") + ""; } - var canAdd = mixRoomFor(entry.key, it.product_code) > 0 && - !!boxHaving(cid, it.product_code, entry.key); + var canAdd = !!boxHaving(cid, it.product_code, entry.key); return '
  • ' + esc(it.product_name) + "" + '' + '' + @@ -1273,13 +1270,9 @@ if (entry && entry.key.indexOf("m:") === 0) { e.stopImmediatePropagation(); // 뒤 핸들러가 또 지우지 않게 (contents[entry.key] || []).slice().forEach(function (it) { - var left = it.quantity; - while (left > 0) { - var dest = boxWithRoom(dcid, it.product_code, entry.key) || newMixBox(dcid); - var moved = moveUnits(entry.key, dest, it.product_code, it.product_name, left); - if (!moved) break; - left -= moved; - } + var rest = mixKeysOf(dcid).filter(function (k) { return k !== entry.key; }); + var dest = boxWithRoom(dcid, it.product_code, entry.key) || rest[0] || newMixBox(dcid); + moveUnits(entry.key, dest, it.product_code, it.product_name, it.quantity); }); syncMix(entry.key); render(); @@ -1295,7 +1288,8 @@ var cid = centerOfKey(key); var item = mixItem(key, code); if (!item) return; - var to = boxWithRoom(cid, code, key) || newMixBox(cid); + var others = mixKeysOf(cid).filter(function (k) { return k !== key; }); + var to = boxWithRoom(cid, code, key) || others[0] || newMixBox(cid); var n = moveUnits(key, to, code, item.product_name, 1); if (!n) { msg.textContent = "옮길 자리가 없습니다."; return; } render(); @@ -1308,9 +1302,6 @@ var ikey = inc.getAttribute("data-key"); var icode = inc.getAttribute("data-code"); var icid = centerOfKey(ikey); - if (mixRoomFor(ikey, icode) <= 0) { - msg.textContent = "이 상자에 더 들어갈 자리가 없습니다."; return; - } var from = boxHaving(icid, icode, ikey); if (!from) { msg.textContent = "다른 상자에 이 제품이 없습니다."; return; } var src = mixItem(from, icode); diff --git a/app/modules/cupang/templates/cupang/box_rules.html b/app/modules/cupang/templates/cupang/box_rules.html index 8facdc4..3ebb6f6 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 6ec8aba..858298a 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 d711df1..0b60663 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 0542670..0276507 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 dac57c4..115d2a8 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열 구성. 읽기 전용(수정 없음). #} diff --git a/app/static/cupang.css b/app/static/cupang.css index 7e281e4..7e9a30d 100644 --- a/app/static/cupang.css +++ b/app/static/cupang.css @@ -1453,3 +1453,15 @@ body.cpg-dragging { cursor: grabbing; user-select: none; } flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; } + +/* ③ 목록 스크롤 — 부모 높이 계산에 기대지 않도록 최대 높이를 직접 준다 */ +.cpg-dist-card .cpg-dist-list { + max-height: min(72vh, 820px); + overflow-y: auto; + overflow-x: hidden; +} +/* ①② 도 같은 방식으로 안전장치 */ +.cpg-calc-card .erp-table-wrap { max-height: min(64vh, 720px); } +.cpg-calc-sum .cpg-sum-scroll { max-height: min(64vh, 720px); } +/* 용량 초과 표시 */ +.cpg-mix-fill.is-over { color: var(--color-callout-red); font-weight: 600; }