feat(malaysia): 창고 POG를 면별 A4 1장(Side A/B/Ground)으로 분리

전체 1장 → 면마다 한 페이지로 출력. 행을 flex 균등 분배해
칸·글자 크게(cqh 2배) 한눈에 보이게. 시트별 page-break 적용.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 00:16:15 +09:00
parent 0ce932f0e2
commit fb114a222c
2 changed files with 55 additions and 49 deletions
+33 -30
View File
@@ -212,45 +212,48 @@
document.body.classList.remove("printing-cells");
}
// ── 창고 POG (전체 도면 A4 가로 1장) 미리보기 ──
// ── 창고 POG: 면(Side A/B/Ground)마다 A4 가로 1장 미리보기 ──
function openPOG() {
var board = document.getElementById("rv-board");
var pages = document.getElementById("pog-pages");
if (!board || !pages) return;
var sheet = document.createElement("div");
sheet.className = "pog-sheet";
// 머리말: 제목 + 창고/기준 재고조사
var head = document.createElement("div");
head.className = "pog-sheet-head";
var ttl = document.createElement("span");
ttl.className = "pog-t";
ttl.textContent = t("창고 POG", "Warehouse POG");
var meta = document.createElement("span");
meta.className = "pog-meta";
var wh = board.getAttribute("data-wh") || "";
var st = board.getAttribute("data-stocktake") || "";
meta.textContent = [wh, st].filter(Boolean).join(" | ");
head.appendChild(ttl);
head.appendChild(meta);
sheet.appendChild(head);
// 보드 통째로 복제 → 인터랙티브 요소 제거(체크박스/드래그)
var clone = board.cloneNode(true);
clone.removeAttribute("id");
clone.removeAttribute("style");
[].slice.call(clone.querySelectorAll(".rv-cell")).forEach(function (c) {
c.removeAttribute("draggable");
c.classList.remove("is-selected", "is-dragover", "dragging");
});
[].slice.call(clone.querySelectorAll(".rv-pick")).forEach(function (cb) {
cb.parentNode && cb.parentNode.removeChild(cb);
});
sheet.appendChild(clone);
var metaTxt = [wh, st].filter(Boolean).join(" | ");
pages.innerHTML = "";
pages.appendChild(sheet);
[].slice.call(board.querySelectorAll(".rv-side")).forEach(function (side) {
var sheet = document.createElement("div");
sheet.className = "pog-sheet";
// 머리말: 면 이름(Side A/B/Ground) + 창고/기준 재고조사
var head = document.createElement("div");
head.className = "pog-sheet-head";
var ttl = document.createElement("span");
ttl.className = "pog-t";
var h3 = side.querySelector("h3");
ttl.textContent = h3 ? h3.textContent.trim() : t("창고 POG", "Warehouse POG");
var meta = document.createElement("span");
meta.className = "pog-meta";
meta.textContent = metaTxt;
head.appendChild(ttl);
head.appendChild(meta);
sheet.appendChild(head);
// 면 복제 → 인터랙티브 요소 제거(체크박스/드래그)
var clone = side.cloneNode(true);
[].slice.call(clone.querySelectorAll(".rv-cell")).forEach(function (c) {
c.removeAttribute("draggable");
c.classList.remove("is-selected", "is-dragover", "dragging");
});
[].slice.call(clone.querySelectorAll(".rv-pick")).forEach(function (cb) {
cb.parentNode && cb.parentNode.removeChild(cb);
});
sheet.appendChild(clone);
pages.appendChild(sheet);
});
document.body.classList.add("printing-pog");
document.getElementById("pog-overlay").classList.add("is-open");
}