diff --git a/tools/est-test/PLAN.md b/tools/est-test/PLAN.md index c35853b6f..8fe4b1262 100644 --- a/tools/est-test/PLAN.md +++ b/tools/est-test/PLAN.md @@ -1,4 +1,7 @@ ## Codex · EST 독립 테스트 앱 (2026-11-04) +- [x] 선택 행 자릿수·사사오입·절사·올림식 일괄 설정 → 선택 범위·재계산·취소 시험. + - 자체 검증: 업무·수량 시험 21개 통과, Edge에서 두 행 절사 2자리 설정·다른 행 유지·재계산·실행 취소 확인. + - [x] 일위·산근·기계 묶음 복사 시 기존 코드 충돌 방지 → 묶음·행 보존 시험. - 자체 검증: Edge에서 세 자료의 중복 코드 회피와 복사된 묶음 자식 행의 부모 연결 확인. diff --git a/tools/est-test/README.md b/tools/est-test/README.md index b45022ab8..010b8421f 100644 --- a/tools/est-test/README.md +++ b/tools/est-test/README.md @@ -6,6 +6,8 @@ 작업모드의 `자료 오류 검색`은 코드 중복, 연결 자료 누락, 연결된 품명·규격 차이와 계산 오류를 표시합니다. 항목의 `행 열기`로 해당 자료 위치로 이동할 수 있습니다. 품명·규격 차이는 사용자가 확인할 항목으로 표시합니다. +행을 선택한 뒤 편집 메뉴의 `선택 행 자릿수 설정`에서 처리방식과 소수 자릿수를 일괄 적용할 수 있습니다. 기존 계산 설정은 실행 취소로 되돌릴 수 있습니다. + 인쇄 미리보기는 화면의 100행 페이지 제한 없이 검색 결과/현재 호표의 전체 행을 표시합니다. 출력 범위에서 현재 자료의 모든 호표·행도 선택할 수 있습니다. 원본 인쇄 옵션의 41개 항목 중 CAD를 제외한 40개 서식 이름을 선택하며, ESTX에서 가져온 해당 프로젝트의 인쇄 설정을 우선 사용합니다. 내역·원가·호표/총괄·증감·동원·수량·공정은 표 자료로 출력합니다. 표지·갑지·설명서·시방서·심사 문서는 서식별 본문을 직접 입력합니다. 용지·방향·여백·글자 크기·페이지당 행·시작 쪽·업체명을 저장하고 인쇄/PDF로 출력합니다. ESTX 수정 저장은 서식별 여백과 페이지당 행 수를 반영합니다. 다른 웹 인쇄 설정의 ESTX 쓰기와 원본 인쇄 도형·병합·글꼴 배치의 동등성은 지원하지 않습니다. 별도 인쇄 서식으로 기성·물가변동의 내역서와 원가계산서, 연차 배분표와 연차별 내역서, 설계변경 원가 증감표를 선택할 수 있습니다. 기성은 선택한 회차를 출력하고 확정된 회차는 확정 당시 결과를 사용합니다. diff --git a/tools/est-test/index.html b/tools/est-test/index.html index a6624cdee..47c9f6c03 100644 --- a/tools/est-test/index.html +++ b/tools/est-test/index.html @@ -73,6 +73,7 @@ >
+
diff --git a/tools/est-test/native-business-actions.js b/tools/est-test/native-business-actions.js index 65467e791..4c1cfabda 100644 --- a/tools/est-test/native-business-actions.js +++ b/tools/est-test/native-business-actions.js @@ -45,7 +45,53 @@ const EstBusinessActions = (() => { const { state } = EstApp, project = state.project, round = currentRound(); - if (name === "apply-all-quantities") { + if (name === "set-row-precision") { + const rows = project.tables[state.view], + indices = [...state.selection].sort((a, b) => a - b); + if (!rows || !EstModel.columns(state.view).includes("DigetIndex")) + throw Error("이 자료에는 자릿수 설정이 없습니다."); + if (!indices.length || indices.some((index) => !rows[index])) + throw Error("설정할 행을 선택하세요."); + EstActions.form( + "선택 행 자릿수", + [ + { + name: "method", + label: "처리방식", + value: rows[indices[0]].DigetIndex || 0, + choices: [ + [0, "자동"], + [1, "사사오입"], + [2, "절사"], + [3, "올림식"], + ], + }, + { + name: "digits", + label: "소수 자릿수 (0~6)", + type: "number", + value: Math.max(0, Number(rows[indices[0]].Diget || 1) - 1), + }, + ], + (values) => { + const method = Number(values.method), + digits = Number(values.digits); + if ( + ![0, 1, 2, 3].includes(method) || + !Number.isInteger(digits) || + digits < 0 || + digits > 6 + ) + throw Error("자릿수는 0~6이고 처리방식을 선택해야 합니다."); + EstApp.change(() => { + for (const index of indices) { + rows[index].DigetIndex = method; + rows[index].Diget = method ? digits + 1 : 0; + } + }); + }, + ); + } else if (name === "apply-all-quantities") { const totals = EstQuantity.allTotals(project); if (confirm("모든 수량산출서와 수식표의 연결 수량을 합산해 내역에 반영하시겠습니까?")) EstApp.change(() => EstQuantity.applyTotals(project, totals));