feat(stmate-test): 3차 화면·데이터 마무리 — 보호표시 · 공종번호 · 직종·노임 · 제비율표 편집 · 차수 칸 저장 · 계약 변환등록 = 울진 계약 STC · 장부 87.6%

- 시험 615 통과 · 브라우저 화면 13개·메뉴 90개 오류 0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-13 21:00:14 +09:00
co-authored by Claude Opus 5.5
parent e8b76dd65b
commit ffc2401870
36 changed files with 1907 additions and 78 deletions
+48
View File
@@ -222,7 +222,55 @@
return a.join("");
}
/**
* 시간당 노임산출계수 적용코드(wM_Set_JLab · Grd_BDLst → Grd_CONLTD) — 노무비(L) 코드 목록 고르기
* conKey = CONLD|CONTD|CON1D~4D · 짝 환산식 = RXXNM|RXTNM|RX1NM~4NM(빈 칸이면 RXXNM)
* 적용단가 = 일 노임(LAMT1) × 환산식(왼쪽부터) · JCDNM 자리 미만 버림(smt_eval.hourlyWage)
* 돌려줌 { formula, target: [{code,name,size,unit,price,hourly}], source: [고를 수 있는 L 코드 행] }
*/
const rxOf = (conKey) =>
conKey === "CONLD" ? "RXXNM" : (RX_SETS.find((x) => x.con === conKey) || {}).rx || "RXXNM";
function jlab(costnRows, ini, conKey, hourly) {
const i = ini || {};
const formula = String(i[rxOf(conKey)] || i.RXXNM || "").trim();
const digits = Number(String(i.JCDNM || "0").trim()) || 0;
const by = new Map((costnRows || []).map((r) => [String(r.CODE || "").trim(), r]));
const list = splitCodes(i[conKey]);
const rowOf = (c) => {
const r = by.get(c) || {};
const price = Number(r.LAMT1) || 0;
const h = hourly ? hourly(price, formula, digits) : null;
return {
code: c,
name: r.NAME || "",
size: r.SIZE || "",
unit: r.UNIT || "",
price,
hourly: h,
};
};
const inList = new Set(list);
const source = (costnRows || [])
.map((r) => String(r.CODE || "").trim())
.filter((c) => /^L\d{5}$/.test(c) && !inList.has(c))
.map(rowOf);
return { formula, target: list.map(rowOf), source };
}
// 선택코드 추가·삭제 — 차례 유지 · 겹침 없음 · 결과 = 이어 붙인 글(Start8x.Ini 값)
function jlabEdit(cur, add, del) {
const gone = new Set((del || []).map((c) => String(c).trim().toUpperCase()));
const out = splitCodes(cur).filter((c) => !gone.has(c));
for (const c of add || []) {
const k = String(c).trim().toUpperCase();
if (/^[A-Z]\d{5}$/.test(k) && !out.includes(k)) out.push(k);
}
return joinCodes(out);
}
global.STMATE_UI_SYS = {
jlab,
jlabEdit,
rxOf,
FIELDS,
RX_SETS,
XML_PRESET,