fix(stmate-test): resolve 5 UI/calculation issues found during browser control verification
This commit is contained in:
@@ -188,8 +188,39 @@
|
||||
renderWorkspace();
|
||||
});
|
||||
onClick("modal-apply-expnd", () => {
|
||||
const code = ($("expnd-code") || {}).value;
|
||||
const ilwi =
|
||||
(ctx.state.ilwiItems || []).find((x) => x.code === code) || ctx.state.ilwiItems[0];
|
||||
if (ilwi && ilwi.lines && ilwi.lines.length) {
|
||||
ilwi.lines.forEach((ln, idx) => {
|
||||
const r = ctx.state.resources.find((x) => x.id === ln.refId || x.code === ln.refId);
|
||||
const recno = (Date.now() % 90000) + idx + 1;
|
||||
ctx.state.boqItems.push({
|
||||
id: "BOQ_" + recno,
|
||||
code: r ? r.code : ln.refId,
|
||||
name: `[전개] ${r ? r.name : ln.refId}`,
|
||||
refId: ln.refId,
|
||||
rowType: "normal",
|
||||
qty: ln.qty || 1,
|
||||
changedQty: ln.qty || 1,
|
||||
_recno: recno,
|
||||
});
|
||||
if (ctx.dbfData && ctx.dbfData.boq_rows) {
|
||||
ctx.dbfData.boq_rows.splice(5 + idx, 0, {
|
||||
_recno: recno,
|
||||
ITNUM: "",
|
||||
BDCODE1: r ? r.code : ln.refId,
|
||||
NAME1: `[전개] ${r ? r.name : ln.refId}`,
|
||||
SIZE1: r ? r.spec : "",
|
||||
UNIT1: r ? r.unit : "식",
|
||||
QTY1: String(ln.qty || 1),
|
||||
ENDCODE: "0.0000",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
closeModal();
|
||||
alert("선택 공종의 일위대가/산근 구성행이 전개되었습니다.");
|
||||
renderWorkspace();
|
||||
});
|
||||
bindEach(".btn-apply-qty-expr", "onclick", (btn) => {
|
||||
const id = btn.getAttribute("data-id");
|
||||
@@ -455,6 +486,13 @@
|
||||
const code = $("ilwi-btn-apply-f9").getAttribute("data-code");
|
||||
const txt = ($("smt-formula-textarea") || {}).value || "";
|
||||
ctx.uiState.editedSmtMap[code] = txt;
|
||||
if (ctx.dbfData && ctx.dbfData.costn_memos) {
|
||||
const prev = ctx.dbfData.costn_memos[code] || { code, blockNo: 1 };
|
||||
ctx.dbfData.costn_memos[code] = Object.assign({}, prev, {
|
||||
text: txt,
|
||||
byteLen: txt.length,
|
||||
});
|
||||
}
|
||||
const evalRes = ViewDanIlwi.evaluateSmtFormulaText(txt, ctx);
|
||||
if (evalRes.sumT > 0)
|
||||
ViewPrjBoq.syncCostnUnitPrice(ctx, code, evalRes.sumM, evalRes.sumL, evalRes.sumS);
|
||||
|
||||
Reference in New Issue
Block a user