diff --git a/tools/est-test/PLAN.md b/tools/est-test/PLAN.md index 57d79da07..12b27b373 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] 선택 행 예정공정표에 표시(원본 mnuShowSchedule) — 내역서에서 고른 상세 행만 공정표에 넣음(이미 있는 행은 건너뜀). + - 검증완료: 바인딩·공정표 시험 통과. ORCA 브라우저에서 3행 고름 → 공정 3개, 다시 눌러도 3개, 샘플 복구. - [x] 셀복사·셀붙여넣기(원본 ActionCellCopy·ActionCellPaste) — 마지막으로 누른 칸의 열을 고른 행들(없으면 그 행)만큼 복사(시스템 클립보드에도 글자로), 다른 칸을 누르고 붙이면 그 행부터 아래로 차례로 넣음(열 달라도 됨, 수치 칸은 수치만, 코드·결과비목 칸 거부). - 검증완료: 바인딩 시험 통과. ORCA 브라우저에서 자재 품명 2칸 복사 → 6번째 행 규격부터 붙여넣기(경유·휘발유), 코드 칸 거부, 샘플 복구. - [x] 산출 줄 잘라내기·복사·붙여넣기(원본 TFRMMULWORD popCut·popCopy·popPaste) — 산출 줄마다 복사·잘라내기·아래 붙여넣기. 붙일 때 수량 지정 표지를 떼고 글만(같은 항목이 두 번 잡히지 않게), 수량 지정된 줄은 잘라내기 거부. diff --git a/tools/est-test/index.html b/tools/est-test/index.html index c80e18952..968493140 100644 --- a/tools/est-test/index.html +++ b/tools/est-test/index.html @@ -138,7 +138,8 @@ > + >
diff --git a/tools/est-test/native-schedule.js b/tools/est-test/native-schedule.js index a1c733e2b..a33cd6144 100644 --- a/tools/est-test/native-schedule.js +++ b/tools/est-test/native-schedule.js @@ -86,11 +86,12 @@ const EstSchedule = (() => { } return { rows, sourceKey }; } - function fromEstimate(project, makeId) { + // only = 고른 내역 행(예정공정표에 표시 mnuShowSchedule) — 없으면 모든 상세 행 + function fromEstimate(project, makeId, only) { const { rows, sourceKey } = estimateRows(project), existing = new Set((project.schedule || []).map(sourceKey).filter(Boolean)); return [...rows.entries()] - .filter(([key]) => !existing.has(key)) + .filter(([key, row]) => !existing.has(key) && (!only || only.has(row))) .map(([key, row]) => ({ id: makeId(), SourceKey: key, @@ -208,10 +209,23 @@ const EstSchedule = (() => { if (!node) return; const p = EstApp.state.project; if ( - ["schedule-import", "schedule-weights", "schedule-progress"].includes(node.dataset.action) + ["schedule-import", "schedule-weights", "schedule-progress", "schedule-mark"].includes( + node.dataset.action, + ) ) { try { - if (node.dataset.action === "schedule-import") { + if (node.dataset.action === "schedule-mark") { + const state = EstApp.state, + picked = new Set( + [...state.selection].map((i) => p.tables.EstMainDat[i]).filter(Boolean), + ); + if (state.view !== "EstMainDat" || !picked.size) + throw Error("내역서에서 공정표에 표시할 행을 고르세요."); + const added = fromEstimate(p, EstApp.uid, picked); + EstApp.change(() => (p.schedule ||= []).push(...added), false); + state.notice = `${added.length}행을 예정공정표에 넣었습니다.`; + EstApp.render(); + } else if (node.dataset.action === "schedule-import") { const added = fromEstimate(p, EstApp.uid); EstApp.change(() => (p.schedule ||= []).push(...added), false); } else {