feat: 决策59-63--类似清单对比区右栏/价格目录树改版/导入整份拒绝/数据目录拍平 + det类型传参修复
This commit is contained in:
@@ -552,7 +552,7 @@ td.pcell input{width:100%;padding:3px 7px;font-size:12.5px;border:1px solid #9fb
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="common.js?v=20261013m"></script>
|
||||
<script src="common.js?v=20261013p"></script>
|
||||
<script src="period.js"></script>
|
||||
<script>
|
||||
const $=id=>document.getElementById(id);
|
||||
@@ -773,7 +773,7 @@ function rowProj(r){ // 工程(序号倒序:第一行是总数,往下递
|
||||
<td class="r">${r.rows_lme??0}</td>
|
||||
<td class="c">${inqCell(r)}</td>
|
||||
<td class="c">${ell(r.imported_at||'')}</td>
|
||||
<td class="c"><a href="javascript:det(${r.id},'${esc(r.name).replace(/'/g,"")}')">明细</a>
|
||||
<td class="c"><a href="javascript:det(${r.id},'${esc(r.name).replace(/'/g,"")}','${r.kind||'project'}')">明细</a>
|
||||
<a href="javascript:edit(${r.id})">编辑</a>
|
||||
<a href="javascript:delBatch(${r.id},'${esc(r.name).replace(/'/g,"")}','清单 ${r.rows_bill??0} 条、工料机 ${r.rows_lme??0} 条')">删除</a></td>
|
||||
</tr>`;
|
||||
@@ -797,7 +797,7 @@ function rowPrice(r){ // 信息价 / 市场价:序号/纳入/名称/发布单
|
||||
<td class="c">${ell(r.imported_at||'')}</td>
|
||||
<td class="l">${att}</td>
|
||||
<td class="l">${ell(r.note||'—')}</td>
|
||||
<td class="c"><a href="javascript:det(${r.id},'${nm}')">明细</a>
|
||||
<td class="c"><a href="javascript:det(${r.id},'${nm}','${r.kind||'info'}')">明细</a>
|
||||
<a href="javascript:edit(${r.id})">编辑</a>
|
||||
<a href="javascript:delBatch(${r.id},'${nm}','价格 ${r.rows_price??0} 条${r.attach_name?'、附件 '+r.attach_name:''}')">删除</a></td>
|
||||
</tr>`;
|
||||
@@ -882,8 +882,7 @@ function leavesHTML(sel){
|
||||
if(n.leaf) out.push({id:n.id,name:p?p+' / '+n.name:n.name});
|
||||
if(n.children&&n.children.length) walk(n.children,p?p+' / '+n.name:n.name);
|
||||
});})(PD.tree,'');
|
||||
return '<option value="0">(未分类)</option>'
|
||||
+ out.map(o=>`<option value="${o.id}"${o.id===sel?' selected':''}>${esc(o.name)}</option>`).join('');
|
||||
return out.map(o=>`<option value="${o.id}"${o.id===sel?' selected':''}>${esc(o.name)}</option>`).join('');
|
||||
}
|
||||
/* ---- 树渲染:编辑态(改名/新建)与确认态(↑↓✕)都整树重画,状态在 PD ---- */
|
||||
function renderTree(){
|
||||
@@ -897,14 +896,8 @@ function renderTree(){
|
||||
<span style="font-weight:400;color:#6b7280;font-size:11.5px">(${grand} 条)</span></div>
|
||||
${rootBarHTML()}
|
||||
<div class="children">${renderNodes(PD.tree,0,0)}
|
||||
<div class="pnode${PD.cur===0?' on':''}" style="${PD.cur===0?'':'color:#9aa4b2'}" onclick="pickDir(0)">
|
||||
<span class="pnar em"></span><span class="nm">(未分类)</span><span class="cnt">${PD.nUncat}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="treefoot"><div class="tipp">
|
||||
先点选目录,再用上方根目录按钮:+子目录 +平级 ✎ ↑ ↓ ✕(↑↓✕ 均需二次确认)。<br>
|
||||
只有最底层目录(没有子目录)可以挂价格行、新增行。拖右侧分隔条调目录栏宽度(会记住),正中小把手可收起/展开。
|
||||
</div></div>`;
|
||||
</div>`;
|
||||
}
|
||||
/* ---- 根目录工具排(2026-10-13 决策 48 主人定:行内按钮全部收编到这里)----
|
||||
六个按钮作用于「当前选中的目录」(PD.cur);(未分类)是虚拟节点不可改删移 ——
|
||||
@@ -956,7 +949,7 @@ function nodeHTML(n){
|
||||
// 展开 / 折叠把手:有子级可点,叶子放透明占位保持同级对齐(2026-10-13 主人定)
|
||||
const hasKids=n.children&&n.children.length;
|
||||
const ar=hasKids
|
||||
? `<span class="pnar" title="展开 / 折叠" onclick="${stop}pdFold(${n.id})">${PD.fold[n.id]?'▸':'▾'}</span>`
|
||||
? `<span class="pnar" title="展开 / 折叠" onclick="${stop}pdFold(${n.id})">${PD.fold[n.id]?'+':'−'}</span>`
|
||||
: '<span class="pnar em"></span>';
|
||||
let mid;
|
||||
if(PD.ren===n.id){
|
||||
@@ -1193,8 +1186,10 @@ function detLayout(mode){
|
||||
$('dsecH').style.display = price?'block':'none';
|
||||
$('ptool').style.display = price?'flex':'none';
|
||||
}
|
||||
async function det(id,name){
|
||||
async function det(id,name,kind){
|
||||
DID=id; dt.textContent=name;
|
||||
if(kind) KIND=kind; // 2026-10-14 修:类型随批次传入——此前用全局 KIND(上一次/页签遗留)判断布局,
|
||||
// 从「入库项目」页签直接开信息价明细会走错分支、目录树空白
|
||||
const isPrice=(KIND!=='project');
|
||||
// 价格类(信息价/市场价)只有一张价格明细表 → 不显示 4 个标签
|
||||
$('dtabs').style.display = isPrice?'none':'flex';
|
||||
|
||||
Reference in New Issue
Block a user