每日对账默认收起麦麦垫付明细

This commit is contained in:
summer committed 2026-11-04 00:12:34 +08:00
1 parent 518513e630
commit 0e146739bc
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -1441,7 +1441,7 @@ function reportOwnerAdvanceIdentity(item){
function reportOwnerAdvancesHTML(business){
const advances=business.ownerAdvances,single=advances.from===advances.date,label=business.member==='owner'?'麦麦付款明细':'麦麦垫付明细';
const days=advances.days.length?advances.days:single?[{date:advances.date,amount:0,knownAmount:0,missingCount:0,pendingCount:0,items:[]}]:[];
return `<section class="report-owner-advances" aria-label="${e(business.name+label)}"><h3>${single?'当日':'按日核对'}${label}</h3><p class="small muted">按所属订单开单日、售后记录日归集;仅列所选日期,不累计历史垫付。垫付与扣除代收、转账后的净往来分别核对。</p>${days.map(day=>`<div class="report-owner-advance-day"><header><h4>${e(day.date)}</h4><span>${day.missingCount?'已知':''}${business.member==='owner'?'付款':'垫付'}小计 <strong>${e(reportOwnerAdvanceAmount(day.amount,day.knownAmount))}</strong></span></header>${day.items.some(item=>item.poolMaterial)?`<p class="report-owner-advance">${e(reportOwnerAdvanceFormula(business,day))}</p>`:''}${day.items.length?`<div class="table-wrap"><table class="report-owner-advance-table" aria-label="${e(day.date+' '+label)}"><thead><tr><th>日期</th><th>客户/单号</th><th>成本项目</th><th class="number">麦麦承担金额</th></tr></thead><tbody>${day.items.map(item=>`<tr${item.status==='recorded'?'':' class="report-pending-cost"'}><td>${e(item.date)}</td><td>${reportOwnerAdvanceIdentity(item)}</td><td>${e(item.name)}${item.source?`<small class="muted">${e(item.source)}</small>`:''}</td><td class="number">${e(reportOwnerAdvanceItemAmount(item))}</td></tr>`).join('')}</tbody></table></div>`:'<p class="small muted">当天没有已登记的'+(business.member==='owner'?'麦麦付款':'麦麦垫付')+'明细。</p>'}${day.pendingCount?'<p class="small muted">待核对项目尚未入账,预估金额不计垫付小计。</p>':''}</div>`).join('')||'<p class="small muted">所选月份暂无已登记的'+label+'。</p>'}</section>`;
return `<details class="report-owner-advances" aria-label="${e(business.name+label)}"><summary>${single?'当日':'按日核对'}${label}</summary><p class="small muted">按所属订单开单日、售后记录日归集;仅列所选日期,不累计历史垫付。垫付与扣除代收、转账后的净往来分别核对。</p>${days.map(day=>`<div class="report-owner-advance-day"><header><h4>${e(day.date)}</h4><span>${day.missingCount?'已知':''}${business.member==='owner'?'付款':'垫付'}小计 <strong>${e(reportOwnerAdvanceAmount(day.amount,day.knownAmount))}</strong></span></header>${day.items.some(item=>item.poolMaterial)?`<p class="report-owner-advance">${e(reportOwnerAdvanceFormula(business,day))}</p>`:''}${day.items.length?`<div class="table-wrap"><table class="report-owner-advance-table" aria-label="${e(day.date+' '+label)}"><thead><tr><th>日期</th><th>客户/单号</th><th>成本项目</th><th class="number">麦麦承担金额</th></tr></thead><tbody>${day.items.map(item=>`<tr${item.status==='recorded'?'':' class="report-pending-cost"'}><td>${e(item.date)}</td><td>${reportOwnerAdvanceIdentity(item)}</td><td>${e(item.name)}${item.source?`<small class="muted">${e(item.source)}</small>`:''}</td><td class="number">${e(reportOwnerAdvanceItemAmount(item))}</td></tr>`).join('')}</tbody></table></div>`:'<p class="small muted">当天没有已登记的'+(business.member==='owner'?'麦麦付款':'麦麦垫付')+'明细。</p>'}${day.pendingCount?'<p class="small muted">待核对项目尚未入账,预估金额不计垫付小计。</p>':''}</div>`).join('')||'<p class="small muted">所选月份暂无已登记的'+label+'。</p>'}</details>`;
}
function reportOwnerAdvancesText(business){
const advances=business.ownerAdvances,label=business.member==='owner'?'麦麦付款明细':'麦麦垫付明细';