feat(입출고): 날짜 칸을 ERP 공용 달력으로
발주 목록 기간, 발주일, 입고 예정일, 입고일을 erp-datepop 으로 교체. 국경일·대체공휴일을 빨강·이름으로 표시하고 마우스를 올리면 이름을 보여 준다. 필수 칸은 지우기를 빼고, 잠긴 입고일은 버튼도 비활성화. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,8 @@
|
||||
.io-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
||||
.io-filter .erp-select { width: auto; }
|
||||
.io-search { width: 260px; }
|
||||
.io-filter input[type="date"] { width: 150px; }
|
||||
.io .pj-date-btn { margin-top: 0; height: 34px; box-sizing: border-box; }
|
||||
.io .pj-date-btn:disabled { opacity: .5; cursor: not-allowed; }
|
||||
.io-date { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--color-midtone-gray); }
|
||||
.io-seg { display: inline-flex; padding: 2px; border: 1px solid var(--color-subtle-ash); border-radius: 10px; background: #fff; }
|
||||
.io-seg-btn { padding: 5px 12px; border-radius: 8px; font-size: 12.5px; color: var(--color-rich-black); text-decoration: none; white-space: nowrap; }
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user