feat(est-test): 표지·갑지 상세편집, 산출 줄 글자모양, 수량산출서 인쇄, 엑셀형 셀 테두리·음영·수량붙여넣기

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-12 18:53:58 +09:00
co-authored by Claude Opus 5.5
parent 3e7c477631
commit 67cb82d8d2
6 changed files with 118 additions and 3 deletions
+27
View File
@@ -63,6 +63,7 @@ const EstDocForms = (() => {
["docf-default", "기본양식으로 저장"],
["docf-init", kind === "gabgi" ? "갑지초기화" : "표지초기화"],
["docf-print", "인쇄"],
["docf-detail", "상세편집"],
]
.map(([a, l]) => `<button data-action="${a}" data-kind="${kind}">${l}</button>`)
.join("")}</div>`;
@@ -108,6 +109,29 @@ const EstDocForms = (() => {
if (project.docs) delete project.docs[kind];
}, false);
EstDocs.handle("doc-edit", state, { dataset: { kind } });
} else if (name === "docf-detail") {
// 상세편집: 인쇄 모양을 자유 편집(원본은 미리보기 ↔ 편집 전환). 저장하면 인쇄가 이 모양을 씀, 「상세편집 해제」로 칸 값 모양으로
const doc = state.project.docs?.[kind] || {};
const html = doc.detailHtml || EstDocs.html(kind === "gabgi" ? 8 : 9, state.project);
EstApp.showDialog(
`${kind === "gabgi" ? "갑지" : "표지"} 상세편집`,
`<div id="doc-detail" contenteditable="true" style="min-height:360px;max-height:480px;overflow:auto;border:1px solid #bbb;padding:8px;background:#fff">${EstDocEditor.clean(html)}</div><button data-action="docf-detail-save" data-kind="${kind}">저장</button> <button data-action="docf-detail-clear" data-kind="${kind}">상세편집 해제</button>`,
);
} else if (name === "docf-detail-save" || name === "docf-detail-clear") {
const html =
name === "docf-detail-save"
? EstDocEditor.clean(document.getElementById("doc-detail").innerHTML)
: null;
EstApp.byId("dialog").close();
EstApp.change((project) => {
project.docs ||= {};
project.docs[kind] = { ...(project.docs[kind] || {}) };
if (html) project.docs[kind].detailHtml = html;
else delete project.docs[kind].detailHtml;
}, false);
state.notice = html
? "상세편집 모양을 저장했습니다. 인쇄에 그대로 쓰입니다."
: "상세편집을 풀었습니다.";
} else if (name === "docf-print") {
EstApp.byId("dialog").close();
await EstReport.open();
@@ -117,6 +141,9 @@ const EstDocForms = (() => {
}
}
const names = new Set([
"docf-detail",
"docf-detail-save",
"docf-detail-clear",
"docf-list",
"docf-load",
"docf-delete",