feat(est-test): 엑셀형 수량산출서 계산·편집과 원가 행 자리수

- 엑셀형 산출서 BIFF 수식 해석·다시 계산·수식줄 편집·4방향 합·수량으로 지정(가져올 때 값이 같은 합계 셀 추정 연결), 셀 편집 시 ESTX 저장 거부
- 원가 행 계산을 원본 c9d278 끝부분대로: 소수 4자리 반올림 뒤 원 미만 절사, Diget>0 행 자리맞춤(0x11293e8)
- 원가계산서 「선택 행 자릿수 설정」을 원본 선택항목 절하하기 대화로(도급액 행 거부, 입력 행 원금액 기준)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-12 12:24:06 +09:00
co-authored by Claude Opus 5.5
parent 39c147a8a4
commit d38d2a2893
17 changed files with 775 additions and 45 deletions
+2 -27
View File
@@ -191,34 +191,9 @@ const EstQuantitySheets = (() => {
return true;
}
// 엑셀형 수량산출서(원본 TFRMMULEXCEL) — 가져온 셀 값을 읽기 전용 격자로 보인다. 수식 셀은 저장된 계산값(굵게).
// 엑셀형 수량산출서(원본 TFRMMULEXCEL) — 편집 화면은 native-excel-view.js.
function excelView(sheet) {
if (!sheet?.excel?.length) return "";
const { esc, number } = EstApp;
const letter = (n) => {
let s = "";
for (n += 1; n > 0; n = Math.floor((n - 1) / 26))
s = String.fromCharCode(65 + ((n - 1) % 26)) + s;
return s;
};
return sheet.excel
.map(({ name, cells }) => {
const keys = Object.keys(cells).map((k) => k.split(",").map(Number));
if (!keys.length) return "";
const rows = Math.max(...keys.map(([r]) => r)) + 1,
cols = Math.min(40, Math.max(...keys.map(([, c]) => c)) + 1);
const body = Array.from({ length: rows }, (_, r) => {
const cellsHtml = Array.from({ length: cols }, (_, c) => {
const cell = cells[`${r},${c}`];
if (!cell) return "<td></td>";
const value = typeof cell.value === "number" ? number(cell.value) : esc(cell.value);
return `<td${cell.formula ? ' style="font-weight:bold" title="수식(저장된 계산값)"' : ""}>${value}</td>`;
}).join("");
return `<tr><th>${r + 1}</th>${cellsHtml}</tr>`;
}).join("");
return `<h4>엑셀형 산출서 · ${esc(name)} (읽기 전용)</h4><div style="overflow:auto;max-height:420px"><table class="sheet" style="font-size:11px"><thead><tr><th></th>${Array.from({ length: cols }, (_, c) => `<th>${letter(c)}</th>`).join("")}</tr></thead><tbody>${body}</tbody></table></div>`;
})
.join("");
return typeof EstExcelView === "undefined" ? "" : EstExcelView.render(sheet, EstApp.state);
}
return { copy, move, mark, free, excelView, matches, selector, handle };