feat(입출고): 날짜 칸을 ERP 공용 달력으로

발주 목록 기간, 발주일, 입고 예정일, 입고일을 erp-datepop 으로 교체.
국경일·대체공휴일을 빨강·이름으로 표시하고 마우스를 올리면 이름을 보여 준다.
필수 칸은 지우기를 빼고, 잠긴 입고일은 버튼도 비활성화.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 14:11:45 +09:00
parent 01208ea4d4
commit 212a3dd6b0
12 changed files with 168 additions and 16 deletions
+12
View File
@@ -21,6 +21,18 @@
}
function fmt(n) { return n.toLocaleString("ko-KR"); }
// ── 날짜 칸 = ERP 공용 달력(프로젝트와 같은 모양, 국경일·대체공휴일 빨강·이름, 마우스를 올리면 이름) ──
// 필수 칸은 [지우기]를 뺀다 — 숨긴 required 칸이 비면 브라우저가 안내 없이 저장을 막는다.
if (window.ErpDatePop) {
let holidays = {};
try { holidays = JSON.parse((document.getElementById("io-holidays") || {}).textContent || "{}"); } catch (_) { holidays = {}; }
document.querySelectorAll('input[type="date"]').forEach(function (input) {
const pop = window.ErpDatePop.enhance(input, { label: input.getAttribute("aria-label") || "날짜",
format: window.ErpDatePop.fmtFull, clear: !input.required, holidays: holidays });
if (pop) pop.button.disabled = input.disabled;
});
}
// ── 목록 줄 누르기 → 발주서 ──
document.addEventListener("click", function (e) {
const row = e.target.closest(".io-row-link");