refactor(cost): 优化LME成员去重与措施清单标签还原,清理临时核查脚本
This commit is contained in:
@@ -2119,9 +2119,11 @@ function haoRes(tg) {
|
||||
return;
|
||||
}
|
||||
const base = (typeof RVO.lmeApi === 'function') ? RVO.lmeApi() : RVO.lmeApi;
|
||||
// 2026-11-04:先占位再取数——此前 open 标记在 then 里才置位,fetch 期间连点「+」会插两套
|
||||
tr.dataset.open = '1'; tg.textContent = '−';
|
||||
fetch(base + '&code=' + encodeURIComponent(tg.dataset.code)).then(r => r.json()).then(d => {
|
||||
if (tr.dataset.open !== '1') return; // 期间被收起:丢弃迟到响应
|
||||
const rows = (d && d.rows) || [];
|
||||
tr.dataset.open = '1'; tg.textContent = '−';
|
||||
const frag = document.createElement('tbody');
|
||||
// 决策 188:子级行挂 data-pcode/data-ccode + 标题提示(工作台侧单击可编辑 含量/除税/含税)
|
||||
frag.innerHTML = rows.length
|
||||
@@ -2137,6 +2139,8 @@ function haoRes(tg) {
|
||||
let nx = tr.nextElementSibling;
|
||||
while (nx && nx.classList.contains('resk')) nx = nx.nextElementSibling;
|
||||
while (frag.firstChild) tr.parentNode.insertBefore(frag.firstChild, nx);
|
||||
}).catch(() => { // 取数失败:回退成未展开,别卡成假「−」
|
||||
if (tr.dataset.open === '1') { tr.dataset.open = '0'; tg.textContent = '+'; }
|
||||
});
|
||||
}
|
||||
/* ---- 树 / 内容 分隔条(2026-10-07,主人要求)----
|
||||
|
||||
Reference in New Issue
Block a user