feat(workbench): 工程量公式、另存为导出与字段编辑历史等多项功能
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<style>
|
||||
:root{--c1:#123a6b;--c2:#1f5fae;--line:#c9d4e2;--head:#eef3fa;--bg:#f5f7fa;--txt:#1c2733;--muted:#5a6b7f}
|
||||
*{box-sizing:border-box}
|
||||
body{font-family:"Microsoft YaHei",system-ui,sans-serif;margin:0;background:var(--bg);color:var(--txt);font-size:13px}
|
||||
body{font-family:"Source Han Sans SC","Noto Sans SC","Source Han Sans CN","MiSans","HarmonyOS Sans SC","Microsoft YaHei",sans-serif;margin:0;background:var(--bg);color:var(--txt);font-size:13px}
|
||||
.wrap{margin:0 auto;padding:10px 16px 14px} /* 2026-10-07 去 1760 上限:面板吃满窗口(主人定) */
|
||||
/* h1 标题行与 .sub 统计行已于 2026-10-06 去掉(主人定),对应样式一并删除,不留死代码。 */
|
||||
/* 数据过期提示条已于 2026-10-11 取消(主人定):打开即自动升级(决策 34)后「需重导」口径不再成立。 */
|
||||
@@ -202,7 +202,7 @@ body.rawcol-dragging #dside{pointer-events:none} /* 拖过目录树表面不
|
||||
.pnode .ops span.pk:hover{background:#1a7f37;border-color:#1a7f37} /* 确认:绿 */
|
||||
.pnode input.ren{width:120px;padding:1px 6px;font-size:12px;border-radius:4px;border:1px solid #9fb6d4}
|
||||
/* 根目录工具排(2026-10-13 决策 48 主人定):+子目录 +平级 ✎ ↑ ↓ ✕ 常驻在此,
|
||||
作用于选中的目录;(未分类)被选中时除「+子目录」外全部禁用(灰 + 禁止光标 + 提示) */
|
||||
作用于选中的目录;没选中任何目录时除「+子目录」外全部禁用(灰 + 禁止光标 + 提示) */
|
||||
.rtbar{display:flex;align-items:center;gap:3px;flex-wrap:wrap;padding:2px 6px 7px 22px}
|
||||
.rtbar span{min-width:17px;height:17px;padding:0 4px;border-radius:4px;background:#fff;border:1px solid #c9d4e2;
|
||||
color:#34506f;font-size:11px;line-height:15px;text-align:center;cursor:pointer;white-space:nowrap;user-select:none}
|
||||
@@ -227,7 +227,7 @@ td.pcell input{width:100%;padding:3px 7px;font-size:12.5px;border:1px solid #9fb
|
||||
.newflag{display:inline-block;margin-left:6px;padding:0 5px;border-radius:3px;background:#fff7e6;
|
||||
border:1px solid #f0d9a8;color:#8a6d1a;font-size:11px}
|
||||
</style>
|
||||
<link rel="stylesheet" href="common.css">
|
||||
<link rel="stylesheet" href="common.css?v=20261017c">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
@@ -550,7 +550,7 @@ td.pcell input{width:100%;padding:3px 7px;font-size:12.5px;border:1px solid #9fb
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="common.js?v=20261016a"></script>
|
||||
<script src="common.js?v=20261017h"></script>
|
||||
<script src="period.js"></script>
|
||||
<script>
|
||||
const $=id=>document.getElementById(id);
|
||||
@@ -844,7 +844,7 @@ async function loadPrice(){
|
||||
if((!PD.picked || (PD.cur!==0 && !PDMAP[PD.cur])))
|
||||
PD.cur = PD.tree.length ? PD.tree[0].id : 0;
|
||||
const m=PDMAP[PD.cur];
|
||||
PD.curName=m?m.name:'(未分类)';
|
||||
PD.curName=m?m.name:'';
|
||||
PD.curPath=m?m.path:'';
|
||||
PD.curLeaf=PD.cur===0?true:!!m.leaf;
|
||||
await loadPriceRows();
|
||||
@@ -862,7 +862,7 @@ async function loadPriceRows(){
|
||||
async function pickDir(id){
|
||||
PD.cur=id; PD.picked=true; PD.editId=0; PD.addingRow=false; pdClear();
|
||||
const m=PDMAP[id];
|
||||
PD.curName=m?m.name:'(未分类)';
|
||||
PD.curName=m?m.name:'';
|
||||
PD.curPath=m?m.path:'';
|
||||
PD.curLeaf=id===0?true:!!m.leaf;
|
||||
await loadPriceRows();
|
||||
@@ -898,12 +898,12 @@ function renderTree(){
|
||||
</div>`;
|
||||
}
|
||||
/* ---- 根目录工具排(2026-10-13 决策 48 主人定:行内按钮全部收编到这里)----
|
||||
六个按钮作用于「当前选中的目录」(PD.cur);(未分类)是虚拟节点不可改删移 ——
|
||||
六个按钮作用于「当前选中的目录」(PD.cur);没选中任何目录(PD.cur 落空)时 ——
|
||||
除「+子目录」(此时=新增一级目录,与旧根按钮行为一致)外全部禁用并说明原因。 */
|
||||
function rtBtn(txt,title,fn,pd,on){
|
||||
const off=(on===false);
|
||||
const cls=((off?'dis ':'')+(pd?'pd':'')).trim();
|
||||
return `<span${cls?` class="${cls}"`:''} title="${off?'(未分类)不是真实目录:请先点选一个目录':title}"`
|
||||
return `<span${cls?` class="${cls}"`:''} title="${off?'请先点选一个目录':title}"`
|
||||
+ (off?'':` onclick="event.stopPropagation();${fn}"`)+`>${txt}</span>`;
|
||||
}
|
||||
function rootBarHTML(){
|
||||
@@ -984,7 +984,7 @@ async function dirPost(body){
|
||||
renderTree(); // 先重建 PDMAP 再读新 leaf——否则拿到旧状态,"最底层目录"提示会误判(2026-10-13 主人报)
|
||||
if(!dirExists(PD.cur)) PD.cur = PD.tree.length ? PD.tree[0].id : 0;
|
||||
const m=PDMAP[PD.cur];
|
||||
PD.curName=m?m.name:'(未分类)'; PD.curPath=m?m.path:''; PD.curLeaf=PD.cur===0?true:!!m.leaf;
|
||||
PD.curName=m?m.name:''; PD.curPath=m?m.path:''; PD.curLeaf=PD.cur===0?true:!!m.leaf;
|
||||
await loadPriceRows();
|
||||
return true;
|
||||
}
|
||||
@@ -1024,10 +1024,11 @@ function renderRows(){
|
||||
const editing=PD.editId||PD.addingRow;
|
||||
$('ptool').classList.toggle('editing', !!editing);
|
||||
if(editing) $('pdirsel').innerHTML=leavesHTML(PD.editId?curEditDir():PD.cur);
|
||||
$('pwhere').textContent = PD.curLeaf ? `当前:${PD.curName}(最底层目录,可挂价格行)`
|
||||
: `当前:${PD.curName}(含子目录,仅查看)`;
|
||||
$('pwhere').textContent = !PD.curName ? '当前:全部价格行(该批次未挂目录,历史数据)'
|
||||
: (PD.curLeaf ? `当前:${PD.curName}(最底层目录,可挂价格行)`
|
||||
: `当前:${PD.curName}(含子目录,仅查看)`);
|
||||
// (dsecH 显隐归 detLayout;这里只刷内容)
|
||||
$('dsecH').innerHTML = esc(PD.curPath || PD.curName)
|
||||
$('dsecH').innerHTML = esc(PD.curPath || PD.curName || '全部价格行')
|
||||
+ `<span class="crumb">${PD.curLeaf?'':'(含子目录汇总) '}共 ${PD.total} 条</span>`;
|
||||
tb.innerHTML=PD.rows.map(rowHTML).join('')
|
||||
+ (PD.addingRow?newRowHTML():'');
|
||||
|
||||
Reference in New Issue
Block a user