diff --git a/tools/est-test/PLAN.md b/tools/est-test/PLAN.md index 0d6637532..8c7d44ae4 100644 --- a/tools/est-test/PLAN.md +++ b/tools/est-test/PLAN.md @@ -487,6 +487,8 @@ ative-standard.js에 표준시장단가 원천(SilJukDat)과 내역 행(EstMainD - 남음: 구성비·요율 전환(CalcBase), 약어 표시(SName), 제비율 기준 문서 보기(원본 한글 파일). - [x] 수량산출서 검색·전체보기(원본 TFRMMULLANG btnSerch·btnAllDisplay — 빈칸·|·괄호 무시 포함 검색) — 고르기 줄을 `native-quantity-sheets.js` 로 옮겨 700줄 제한 유지. - 검증완료: `test_est_quantity_sheets.py` 검색 시험 포함 수량 시험 22개 통과. ORCA 브라우저에서 「집수」 검색 → 항목에 집수정이 있는 「배수」만·선택 이동, 전체보기 → 3개 복귀, 샘플 복구. + - [x] 인쇄 용지 A0·A1·B4 와 인쇄 기본양식(원본 TFRMSCHEDULE mnuA0~B4 · TFRMESTPREVIEW2 mnuFormatSave·mnuFromatOpen) — 용지 A4·A3·B4·A1·A0(A0·A1 은 mm 크기, 가로면 바꿔 씀), 인쇄 창 「기본양식저장」(용지·여백·글자·줄 수 등, 서식 고르기·본문 글 제외 — 양식 보관함 종류 print) · 「기본양식열기」. + - 검증완료: 바인딩·양식 시험 3개 통과. ORCA 브라우저에서 A1 가로 → @page 841mm 594mm, 기본양식 저장 뒤 A4 로 바꾸고 열기 → A1 복원, 양식·설정 지워 복구. - [x] 원가계산서 내용 삭제·기본양식으로 저장(원본 TFRMWONGABASE popupContentDel A7 · popupSaveAsMain) — 원가계산서(W) 「선택 줄 내용 삭제」: 연결·금액·비율·요율·산출근거·자리 비움(이름·기호 유지, 재계산 없음). 양식 목록 「기본양식으로 저장」: 이름 「기본양식」 — 새 내역서를 만들 때 원가계산서로 씀. - 검증완료: 양식·원가·바인딩 시험 8개 통과. ORCA 브라우저에서 간접노무비 줄 내용 삭제(이름 유지·식·요율·금액 비움), 기본양식 저장 → 새 내역서 원가 31줄, 양식 지우고 샘플 복구. - [x] 갑지·표지 양식(원본 TFRMGABGI·TFRMCOVER popupSaveFormat·popupLoadFormat·popupFormatTableS·popupSaveToDefault·popupInit·popupPrint) — 편집 창 위 단추: 양식목록(불러오기·지우기), 양식저장하기(이름), 기본양식으로 저장(처음 여는 갑지·표지에 채움), 초기화(문서 지우고 다시 열기), 인쇄(서식 8·9 미리보기로). 양식은 서버 보관함 종류 document 에 { docKind, fields }, 공사명은 넣지 않음. diff --git a/tools/est-test/forms-store.cjs b/tools/est-test/forms-store.cjs index 72024ddde..9600169ee 100644 --- a/tools/est-test/forms-store.cjs +++ b/tools/est-test/forms-store.cjs @@ -3,7 +3,7 @@ const fs = require("node:fs"); const path = require("node:path"); -const kinds = new Set(["wonga", "document", "machformula", "options"]); +const kinds = new Set(["wonga", "document", "machformula", "options", "print"]); const LIMIT = 2 * 1024 * 1024; function file(directory) { diff --git a/tools/est-test/native-actions.js b/tools/est-test/native-actions.js index e311a2d54..a61124e6d 100644 --- a/tools/est-test/native-actions.js +++ b/tools/est-test/native-actions.js @@ -284,6 +284,8 @@ const EstActions = (() => { else if (name === "import-xlsx") EstApp.byId("excel-file").click(); else if (name === "print") await EstReport.open(); else if (name === "print-document") EstReport.print(); + else if (name === "print-default-save") await EstReport.saveDefault(); + else if (name === "print-default-open") await EstReport.openDefault(); else if (name === "csv") { const rows = activeRows(), keys = EstModel.columns(state.view); diff --git a/tools/est-test/native-model.js b/tools/est-test/native-model.js index 6b3e719c8..b1be9070b 100644 --- a/tools/est-test/native-model.js +++ b/tools/est-test/native-model.js @@ -337,7 +337,7 @@ const EstModel = (() => { throw Error("인쇄 설정 범위 오류"); } if ( - (s.paper != null && !["A3", "A4"].includes(s.paper)) || + (s.paper != null && !["A0", "A1", "A3", "A4", "B4"].includes(s.paper)) || (s.orientation != null && !["landscape", "portrait"].includes(s.orientation)) ) throw Error("인쇄 용지/방향 오류"); diff --git a/tools/est-test/native-report.js b/tools/est-test/native-report.js index 17065bd10..fab02d150 100644 --- a/tools/est-test/native-report.js +++ b/tools/est-test/native-report.js @@ -23,6 +23,13 @@ const EstReport = (() => { marginRight: settings.marginRight ?? settings.margin ?? 12, }; } + // 원본 공정표 용지(mnuA0·A1·A3·A4·B4) — CSS 낱말이 없는 A0·A1 은 mm 로 + function pageSize(paper, orientation) { + const mm = { A0: [841, 1189], A1: [594, 841] }[paper]; + if (!mm) return `${paper} ${orientation}`; + const [w, h] = orientation === "landscape" ? [mm[1], mm[0]] : mm; + return `${w}mm ${h}mm`; + } function preview(all = false) { const { state, esc } = EstApp; const settings = setting(), @@ -106,7 +113,7 @@ const EstReport = (() => { : state.project.calculation; const errors = [...(totals?.errors || []), ...(output?.errors || [])]; const source = `${esc(state.project.name)} · ${esc(title)} -