- 원본 대조 = 설치본 실행파일 52개 화면 이름·버튼 글·한글 문자열 - 지움: conv_jb.py · excel_builder.py · view_dan_ilwi.js · view_kanjub_prt.js · /api/conv/jb-* · /api/report/csv · /api/stage/projects · /api/catalog · /api/export-xlsx - 낡은 시험 삭제(지운 기능 전용): conv_change 제비율표 3 · stage_api 공사별 설정 2 · report_sheets CSV 2줄 - 장부 F4-15 · F1-33 · F6-24 설명 고침 · stmate 시험 786 통과 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.6 KiB
JavaScript
41 lines
1.6 KiB
JavaScript
/**
|
|
* STMATE 내역 행 끼워 넣기 (app_modals.js) — api = window.STMATE_APP
|
|
* 내역 도구(wITNum · wBoqRate · wM_Rate · wExpnd)는 scr_ui_boq_dlg.js · 가격지 비교(wM_Boxa)·기준단가 수정(wM_Edt_Hal)은 scr_ui_dan.js
|
|
*/
|
|
(function (global) {
|
|
"use strict";
|
|
|
|
/**
|
|
* 내역 행 끼워 넣기 — 선택 행 앞(선택 없으면 끝) · 저장 원천(boq_rows)·계산 원천(boqItems) 함께
|
|
* 코드가 단가목록에 있으면 명칭·규격·단위를 단가목록 값으로
|
|
*/
|
|
function insertBoqRow(api, code, name, spec, unit, qty) {
|
|
const { ctx, renderWorkspace } = api;
|
|
const B = global.STMATE_UI_BOQ;
|
|
if (!ctx.dbfData || !ctx.dbfData.boq_rows) return alert("열린 내역서 없음");
|
|
ctx.dbfData.boq_deleted = ctx.dbfData.boq_deleted || [];
|
|
const model = {
|
|
rows: ctx.dbfData.boq_rows,
|
|
items: ctx.state.boqItems,
|
|
deleted: ctx.dbfData.boq_deleted,
|
|
};
|
|
const c = String(code || "").trim();
|
|
const cr = (ctx.dbfData.costn_rows || []).find((r) => String(r.CODE || "").trim() === c);
|
|
const row = B.makeRow(model, {
|
|
BDCODE1: c,
|
|
NAME1: cr ? cr.NAME || "" : name || "",
|
|
SIZE1: cr ? cr.SIZE || "" : spec || "",
|
|
UNIT1: cr ? cr.UNIT || "" : unit || "",
|
|
QTY1: String(Number(qty) || 0),
|
|
});
|
|
const ix = B.indexesOf(model.rows, ctx.uiState.boqSel || []);
|
|
const res = B.insertRows(model, ix.length ? ix[0] : model.rows.length, [row]);
|
|
if (!res.ok) alert(res.error);
|
|
ctx.uiState.boqSel = [row._recno];
|
|
renderWorkspace();
|
|
return row;
|
|
}
|
|
|
|
global.STMATE_APP_MODALS = { insertBoqRow };
|
|
})(window);
|