refactor(core): 清理骨架库与格式适配器并并轨导出回写逻辑
This commit is contained in:
@@ -629,15 +629,18 @@ body.histdrag{user-select:none}
|
||||
旧手工三选弹框(决策 231)取消,统一本弹框(cos/cos4 后端通道保留不动)。
|
||||
yhy=本软件专有格式(含审核等全部数据,不同租户相互交流;收方导入另立项)。 -->
|
||||
<div class="mask" id="expoptmask">
|
||||
<div class="dlg" style="width:420px;max-width:92vw">
|
||||
<div class="dlg" style="width:560px;max-width:92vw">
|
||||
<h4>导出</h4>
|
||||
<div class="mbody" style="display:flex;flex-direction:column;gap:10px;font-size:14px">
|
||||
<label id="expf_xlsx_lbl" style="display:flex;align-items:center;gap:8px;cursor:pointer">
|
||||
<input type="checkbox" id="expf_xlsx" onchange="expPick('xlsx')">导出excel</label>
|
||||
<label id="expf_yhy_lbl" style="display:flex;align-items:center;gap:8px;cursor:pointer">
|
||||
<input type="checkbox" id="expf_yhy" onchange="expPick('yhy')">导出yhy</label>
|
||||
<label id="expf_nat_lbl" style="display:flex;align-items:center;gap:8px;cursor:pointer">
|
||||
<input type="checkbox" id="expf_nat" onchange="expPick('nat')">导出原格式</label>
|
||||
<div class="mbody" style="display:flex;flex-direction:column;gap:14px;font-size:14px">
|
||||
<div style="display:flex;flex-wrap:wrap;align-items:center;gap:10px 24px">
|
||||
<label id="expf_xlsx_lbl" style="display:flex;align-items:center;gap:8px;cursor:pointer">
|
||||
<input type="checkbox" id="expf_xlsx" onchange="expPick('xlsx')">导出excel</label>
|
||||
<label id="expf_yhy_lbl" style="display:flex;align-items:center;gap:8px;cursor:pointer">
|
||||
<input type="checkbox" id="expf_yhy" onchange="expPick('yhy')">导出yhy</label>
|
||||
<label id="expf_nat_lbl" style="display:flex;align-items:center;gap:8px;cursor:pointer">
|
||||
<input type="checkbox" id="expf_nat" onchange="expPick('nat')">导出原格式</label>
|
||||
</div>
|
||||
<div style="font-size:12px;color:#5b6b80;line-height:1.7;white-space:normal;word-break:break-word">备注:YHY用于同软件数据交流。本软件主要是对历史造价的工料机的复用,积累数字资产,不涉及定额单价的计算,建议导出后到原软件重新进行计算设置(不是重算),如果您有需要打开的电子标书,可以联系我们,感谢。</div>
|
||||
</div>
|
||||
<div class="mfoot" style="display:flex;gap:8px;justify-content:flex-end">
|
||||
<button class="btn" onclick="expClose()">取消</button>
|
||||
@@ -1154,12 +1157,14 @@ function renderMergeTree(){
|
||||
+ '<th>名称<span class="rs"></span></th><th>规格型号<span class="rs"></span></th><th>单位<span class="rs"></span></th><th>数量<span class="rs"></span></th><th>除税编制价<span class="rs"></span></th><th>税率<span class="rs"></span></th><th>含税编制价<span class="rs"></span></th></tr></thead>';
|
||||
let no = 0;
|
||||
MDATA.groups.forEach((g, gi) => {
|
||||
const mg = g.mergeable !== false; // 决策 288 补记九:子级视野单码组也照列(mergeable=false 不可勾选合并)
|
||||
const qty = g.rows.reduce((s, r) => s + (Number(r.qty) || 0), 0);
|
||||
h += '<tbody class="mgrp" data-gi="' + gi + '">'
|
||||
+ '<tr class="mhead2" onclick="mTog(this)"><td><span class="tog" data-open="1">−</span></td>'
|
||||
+ '<td></td><td></td>'
|
||||
+ '<td class="gtitle" colspan="7" title="名称|规格|单位">' + esc(g.name || '—') + ' | ' + esc(g.spec || '—') + ' | ' + esc(g.unit || '—')
|
||||
+ ' <span style="color:#8a97a8;font-weight:400">' + g.rows.length + ' 条</span></td>'
|
||||
+ ' <span style="color:#8a97a8;font-weight:400">' + g.rows.length + ' 条</span>'
|
||||
+ (mg ? '' : ' <span style="color:#8a97a8;font-weight:400">· 单编码,无可并</span>') + '</td>'
|
||||
+ '<td class="r"><b>' + num(qty, 3) + '</b></td>'
|
||||
+ '<td></td><td></td></tr>';
|
||||
g.rows.forEach(r => {
|
||||
@@ -1168,6 +1173,7 @@ function renderMergeTree(){
|
||||
h += '<tr class="mrow">'
|
||||
+ '<td></td>'
|
||||
+ '<td class="c"><input type="radio" name="mgr' + gi + '" data-mid="' + r.id + '" data-lvl="' + r.lvl + '"'
|
||||
+ (mg ? '' : ' disabled')
|
||||
+ ' data-qty="' + (Number(r.qty) || 0) + '"'
|
||||
+ ' data-ntp="' + (r.ntp == null ? '' : r.ntp) + '" data-taxrate="' + (r.sub ? '' : (r.taxrate == null ? '' : r.taxrate)) + '" data-taxp="' + (r.taxp == null ? '' : r.taxp) + '"'
|
||||
+ ' data-ntp-org="' + (r.ntp_org == null ? '' : r.ntp_org) + '" data-ntp-expr="' + (r.ntp_expr == null ? '' : r.ntp_expr) + '"'
|
||||
@@ -1535,19 +1541,23 @@ async function haoEdit(td, tr, field){
|
||||
if(!r || !r.ok){ $('msg').textContent = (r && r.msg) || '保存失败'; td.textContent = cur; return; }
|
||||
$('msg').textContent = '已保存(各级汇总已实时联动)';
|
||||
lmeSyncAll(); // 决策 191:两卡+项目工料机页签立即跟随(不等待,浮层重开照常)
|
||||
// 浮层整层重开=全部行刷新(Σ 母行价/兄弟行联动可见)——延后一拍;
|
||||
// 先调 haoPopClose() 清模块级引用(let 不挂 window)——否则 haoPop 对同 nid 走「收起」分支(实测根因);
|
||||
// 重开后自动钉住,免回车引发的滚动/blur 误关(钉住浮层仍可点空白关闭)。
|
||||
// 决策 288 修(2026-11-08 主人定「精准更新,不用全部更新」):取数端点带 data_version 缓存
|
||||
// (任何写入即失效)→ 毫秒回取,**只改本行 含量/除税/含税 三格**,不整层重刷(无感)。
|
||||
try{
|
||||
const _nid = Number(pop.dataset.nid), _btn = HAO_BTN;
|
||||
if(typeof haoPopClose === 'function') haoPopClose();
|
||||
setTimeout(() => {
|
||||
try{
|
||||
const _b2 = document.querySelector('#tb1 .haobtn') || _btn;
|
||||
if(_b2) haoPop(_b2, _nid);
|
||||
if(typeof HAO_POP !== 'undefined' && HAO_POP){ HAO_POP.dataset.pinned = '1'; }
|
||||
}catch(e){}
|
||||
}, 250);
|
||||
const _pop = tr.closest('.haopop'), _nid = Number(pop.dataset.nid);
|
||||
if(_pop && typeof RVO.normApi === 'function'){
|
||||
fetch(RVO.normApi(_nid)).then(r => r.json()).then(d => {
|
||||
if(HAO_POP !== _pop) return;
|
||||
HAO_CACHE.set(String(_nid), (d && d.rows) || []);
|
||||
const nr = ((d && d.rows) || []).find(x => String(x[0]) === String(tr.dataset.code));
|
||||
if(nr){
|
||||
const _tds = tr.querySelectorAll('td');
|
||||
if(_tds[5]) _tds[5].textContent = r3(nr[5]);
|
||||
if(_tds[6]) _tds[6].textContent = rm(nr[6]);
|
||||
if(_tds[8]) _tds[8].textContent = rm(nr[7]);
|
||||
}
|
||||
}).catch(() => {});
|
||||
}
|
||||
}catch(e){}
|
||||
};
|
||||
inp.addEventListener('keydown', ev => {
|
||||
@@ -2772,7 +2782,7 @@ async function adoptAtt(x){
|
||||
}
|
||||
async function adoptLme(i){
|
||||
const x=VISIBLE_ROWS[i]; if(!x) return;
|
||||
if(CURTYPE!=='lme' || !CUR || !CUR.id) return; // 双保险:基准必须是工料机行
|
||||
if(CURTYPE!=='lme' || !CUR || !CUR.id){ dlMsg('请先在上方点选工料机行,再采纳历史价','warn'); return; } // 双保险:基准必须是工料机行(规格⑤:不静默,与清单采纳同款)
|
||||
// 替换前三价先抓(决策 160):行级改价落库后所在行三价被覆盖,备注要记的就是它
|
||||
const _t0=(LME_ROWS||[]).find(y=>y[0]===CUR.id);
|
||||
const _oldLme=_t0?{price:_t0[6],tax:_t0[7],taxp:_t0[8]}:null;
|
||||
|
||||
Reference in New Issue
Block a user