feat(b09): 자재단가대비표 머리 — 견적 「면」 뺌 · 다른 출처 「면」 → 「출처」 · 견적서 = 견적 아래 (183-2)
- 출처 묶음 둘째 칸 머리 「출처」(값 = M01 면수 · 유가 기준일 그대로 · 관급 출처 열 그대로) - 견적 묶음 = 단가 · 견적서(맨 끝 견적서 열 지움) · 견적 면 수기 칸 · 고침 갈래 지움(저장 quote_page 는 그대로 읽힘) - 시험: test_183_2_b09_compare_head · test_171_1 안내 글 판정 고침 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SE9MxeXTu2uaDZ55BJowAY
This commit is contained in:
@@ -6,8 +6,9 @@
|
|||||||
* 관급 · 별도 줄(183-1 · 서버가 거른 입력) · 수량 = 역전개 총수량 · 비고 = 쓰는 곳(`usesOf`)
|
* 관급 · 별도 줄(183-1 · 서버가 거른 입력) · 수량 = 역전개 총수량 · 비고 = 쓰는 곳(`usesOf`)
|
||||||
*
|
*
|
||||||
* 고칠 칸 = 자재단가대비표 적용 단가(빈칸으로 지우면 최저 자동) · 관급 / 별도 칸 누름 = 표시 바꿈
|
* 고칠 칸 = 자재단가대비표 적용 단가(빈칸으로 지우면 최저 자동) · 관급 / 별도 칸 누름 = 표시 바꿈
|
||||||
* · 견적 단가 · 면 손입력 · 적용 「출처」 칸 누름 = 고를 출처 돌림(값 있는 출처만 · 견적이 높아도)
|
* · 견적 단가 손입력 · 적용 「출처」 칸 누름 = 고를 출처 돌림(값 있는 출처만 · 견적이 높아도)
|
||||||
* · 「견적서」 칸 누름 = 파일 모달(`B09_Estimation_UI_Tabs_Base_Quote`)(166-4)
|
* · 「견적서」 칸(견적 묶음 아래 · 183-2) 누름 = 파일 모달(`B09_Estimation_UI_Tabs_Base_Quote`)(166-4)
|
||||||
|
* · 출처 묶음 둘째 칸 = 「출처」(M01 면수 · 유가 기준일 값 그대로 · 183-2 · 견적엔 없음)
|
||||||
* 이동 = 재료비목록표 줄 → 대비표 · 중기목록표 줄 → 중기사용료 블록 · 블록 줄 → 경비 · 기초 · 대비표
|
* 이동 = 재료비목록표 줄 → 대비표 · 중기목록표 줄 → 중기사용료 블록 · 블록 줄 → 경비 · 기초 · 대비표
|
||||||
* ========================================================================== */
|
* ========================================================================== */
|
||||||
|
|
||||||
@@ -149,26 +150,24 @@ export const buildCompare: TabBuild = ({ sheets, user, setUser }): TabTable => {
|
|||||||
text("name", "품명", 180),
|
text("name", "품명", 180),
|
||||||
text("spec", "규격", 140),
|
text("spec", "규격", 140),
|
||||||
text("unit", "단위", 56),
|
text("unit", "단위", 56),
|
||||||
...SOURCES.flatMap((s) => [money(`p:${s}`, "단가", [s]), text(`g:${s}`, "면", 64, [s])]),
|
// 183-2 — 견적 = 단가 · 견적서 · 그 밖 = 단가 · 출처(면수 값)
|
||||||
|
...SOURCES.flatMap((s) => [
|
||||||
|
money(`p:${s}`, "단가", [s]),
|
||||||
|
s === "견적" ? text("files", "견적서", 72, [s]) : text(`g:${s}`, "출처", 64, [s]),
|
||||||
|
]),
|
||||||
money("lowest", "최저"),
|
money("lowest", "최저"),
|
||||||
money("applied", "적용 단가", ["적용"]),
|
money("applied", "적용 단가", ["적용"]),
|
||||||
text("applied_from", "출처", 80, ["적용"]),
|
text("applied_from", "출처", 80, ["적용"]),
|
||||||
text("supply", "관급 · 별도", 80),
|
text("supply", "관급 · 별도", 80),
|
||||||
text("files", "견적서", 72),
|
|
||||||
],
|
],
|
||||||
rows: out,
|
rows: out,
|
||||||
frozen: 2,
|
frozen: 2,
|
||||||
hint: "적용 단가 = 출처 중 최저(0 · 빈칸 뺌 · 견적 포함) 자동 · 칸에 넣으면 사용자 값 · 지우면 다시 최저 · 「출처」 칸 누름 = 고를 출처 돌림(값 있는 출처 · 견적이 높아도 고름) · 견적 단가 · 면 = 수기 입력 · 「관급 · 별도」 칸 누름 = 없음 → 관급 → 별도 · 「견적서」 칸 누름 = 파일 올리기 · 보기",
|
hint: "적용 단가 = 출처 중 최저(0 · 빈칸 뺌 · 견적 포함) 자동 · 칸에 넣으면 사용자 값 · 지우면 다시 최저 · 「출처」 칸 누름 = 고를 출처 돌림(값 있는 출처 · 견적이 높아도 고름) · 견적 단가 = 수기 입력 · 「관급 · 별도」 칸 누름 = 없음 → 관급 → 별도 · 「견적서」 칸 누름 = 파일 올리기 · 보기",
|
||||||
editable: (_i, key) => key === "applied" || key === "p:견적" || key === "g:견적",
|
editable: (_i, key) => key === "applied" || key === "p:견적",
|
||||||
onEdit: (i, key, value) => {
|
onEdit: (i, key, value) => {
|
||||||
const row = out[i];
|
const row = out[i];
|
||||||
if (!row) return;
|
if (!row) return;
|
||||||
const cell = mine(String(row.key));
|
const cell = mine(String(row.key));
|
||||||
if (key === "g:견적") {
|
|
||||||
if (value.trim()) cell.quote_page = value.trim();
|
|
||||||
else delete cell.quote_page;
|
|
||||||
return put(String(row.key), cell);
|
|
||||||
}
|
|
||||||
const v = parseNumber(value);
|
const v = parseNumber(value);
|
||||||
if (v === undefined) return;
|
if (v === undefined) return;
|
||||||
const field = key === "applied" ? "applied" : key === "p:견적" ? "quote" : null;
|
const field = key === "applied" ? "applied" : key === "p:견적" ? "quote" : null;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ SPOTS = {
|
|||||||
"B09_Estimation/B09_Estimation_Calc_Bill.ts": ['"수기 줄 — 연결 없음(우클릭 [연결])"'],
|
"B09_Estimation/B09_Estimation_Calc_Bill.ts": ['"수기 줄 — 연결 없음(우클릭 [연결])"'],
|
||||||
"B09_Estimation/B09_Estimation_Calc_Bill.py": ['"수기 줄 — 연결 없음(우클릭 [연결])"'],
|
"B09_Estimation/B09_Estimation_Calc_Bill.py": ['"수기 줄 — 연결 없음(우클릭 [연결])"'],
|
||||||
"B09_Estimation/B09_Estimation_Sangeun.py": ['f"수기 줄 {'],
|
"B09_Estimation/B09_Estimation_Sangeun.py": ['f"수기 줄 {'],
|
||||||
"B09_Estimation/B09_Estimation_UI_Tabs_Base.ts": ["견적 단가 · 면 = 수기 입력"],
|
"B09_Estimation/B09_Estimation_UI_Tabs_Base.ts": ["견적 단가 = 수기 입력"],
|
||||||
"B09_Estimation/B09_Estimation_UI_Tabs_Total.ts": ['"수기 입력"', '"수기 입력 = 안전관리비'],
|
"B09_Estimation/B09_Estimation_UI_Tabs_Total.ts": ['"수기 입력"', '"수기 입력 = 안전관리비'],
|
||||||
"ui_template/ui_template_locale_b2.ts": [
|
"ui_template/ui_template_locale_b2.ts": [
|
||||||
"수량 원천: 수기 입력(직접비)",
|
"수량 원천: 수기 입력(직접비)",
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
"""183-2 자재단가대비표 머리 — 견적 「면」 뺌 · 다른 출처 「면」 → 「출처」(값 그대로) · 견적서 = 견적 아래.
|
||||||
|
|
||||||
|
소스 시험(열 정의 · 고칠 칸) — 셈 · 저장(`quote_page` 남음)은 안 바뀜(test_166_4).
|
||||||
|
"""
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parents[2]
|
||||||
|
SRC = (ROOT / "B09_Estimation" / "B09_Estimation_UI_Tabs_Base.ts").read_text(encoding="utf-8")
|
||||||
|
|
||||||
|
|
||||||
|
def _compare() -> str:
|
||||||
|
start = SRC.index("export const buildCompare")
|
||||||
|
return SRC[start : SRC.index("export const buildMaterial")]
|
||||||
|
|
||||||
|
|
||||||
|
def test_견적은_단가_견적서_그_밖은_단가_출처():
|
||||||
|
body = _compare()
|
||||||
|
assert (
|
||||||
|
's === "견적" ? text("files", "견적서", 72, [s]) : text(`g:${s}`, "출처", 64, [s])' in body
|
||||||
|
)
|
||||||
|
assert '"면"' not in body # 면 머리 없음
|
||||||
|
assert body.count('text("files", "견적서"') == 1 # 맨 끝 견적서 열 지움
|
||||||
|
|
||||||
|
|
||||||
|
def test_견적_면_수기_칸_없앰():
|
||||||
|
body = _compare()
|
||||||
|
assert 'key === "g:견적"' not in body and "quote_page" not in body
|
||||||
|
assert "견적 단가 = 수기 입력" in body and "견적 단가 · 면" not in body
|
||||||
Reference in New Issue
Block a user