feat(est-test): 갑지·표지·공사설명서·시방서 편집과 인쇄

- 원본 문서 레코드(MIDAS) 읽기, 공사명 동기화, 공사금액 자동입력·한글금액
- 설명서·시방서 갑지 붙여넣기, 인쇄 미리보기 반영, 편집 시 ESTX 저장 거부

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-11 20:12:31 +09:00
co-authored by Claude Opus 5.5
parent c0d49e0bbb
commit ea50105ce5
11 changed files with 472 additions and 4 deletions
+7 -2
View File
@@ -34,7 +34,11 @@ const EstReport = (() => {
if (output) root.innerHTML = EstForms.grid(output);
else if (form) {
const total = state.project.calculation?.total || 0;
root.innerHTML = `<div class="document-text">${esc(settings.notes)}</div>${[8, 9].includes(form.Index) ? `<h2>공사금액 ${number(total)}원</h2><p>${esc(settings.company)}</p>` : ""}`;
const doc =
typeof EstDocs !== "undefined" ? EstDocs.html(Number(form.Index), state.project) : "";
root.innerHTML = doc
? `${doc}${settings.notes ? `<div class="document-text">${esc(settings.notes)}</div>` : ""}`
: `<div class="document-text">${esc(settings.notes)}</div>${[8, 9].includes(form.Index) ? `<h2>공사금액 ${number(total)}원</h2><p>${esc(settings.company)}</p>` : ""}`;
} else if (state.project.tables[state.view]) {
const rows = all
? state.project.tables[state.view].map((row, index) => ({ row, index }))
@@ -118,7 +122,8 @@ const EstReport = (() => {
}
function paginate(root, settings) {
const table = root.querySelector("table");
if (!table || root.querySelectorAll("table").length !== 1) return root.innerHTML;
if (!table || root.querySelectorAll("table").length !== 1 || table.closest(".document-gabgi"))
return root.innerHTML;
const rows = [...table.querySelectorAll("tbody>tr")],
pages = [];
for (let at = 0; at < rows.length; at += settings.rowsPerPage) {