diff --git a/static/modules/finance.js b/static/modules/finance.js index 337ad60..139f218 100644 --- a/static/modules/finance.js +++ b/static/modules/finance.js @@ -297,10 +297,9 @@ function renderFinance() { { key: '_expand', label: '' }, { key: 'client_name', label: '客户' }, { key: 'customer_name', label: '项目名称' }, { key: 'sign_amount', label: '签约金额' }, { key: 'rev', label: '已确收' }, { key: 'gross', label: '毛利' }, { key: 'gross_rate', label: '毛利率' }, - { key: 'payment', label: '回款' }, { key: 'pay_rate', label: '回款率' }, + { key: 'payment', label: '回款' }, { key: 'pending', label: '待回款' }, { key: 'pay_rate', label: '回款率' }, { key: 'cost', label: '成本' }, { key: 'paid', label: '支出' }, { key: 'paid_rate', label: '付款率' }, { key: 'cashflow', label: '现金流' }, - { key: 'pending', label: '待回款' }, ]; const UNSIGNED_COLS = [ { key: 'client_name', label: '客户' }, { key: 'customer_name', label: '项目名称' }, { key: 'sign_amount', label: '签约金额' }, @@ -340,7 +339,7 @@ function renderFinance() { const cfCls = cashflow >= 0 ? 'text-green-600' : 'text-red-600'; const pending = rev - payment; const pendingCls = pending > 0 ? 'text-red-600' : pending < 0 ? 'text-green-600' : 'text-slate-400'; - const pendingVal = pending ? money(pending) : ''; + const pendingVal = pending ? (pending > 0 ? '+' : '') + money(pending) : ''; var budgetArr = []; var expenseArr = []; try { budgetArr = JSON.parse(pf.budget_data || "[]"); } catch(e) {} @@ -363,7 +362,7 @@ function renderFinance() { var bCf = bPay - ePaid; return '' + m + '' + (bRev ? money(bRev) : '—') + '' + (bGross ? money(bGross) : '—') + '' + (bPay ? money(bPay) : '—') + '' + (eCost ? money(eCost) : '—') + '' + (ePaid ? money(ePaid) : '—') + '' + (bCf ? money(bCf) : '—') + '' + (bRev - bPay ? money(bRev - bPay) : '—') + ''; }).join(''); - return `${esc(pf.client_name || "")}${esc(pf.customer_name)}${money(pf.sign_amount)}${fmtNoUnit(rev)}${fmtNoUnit(gross)}${grossR}${fmtNoUnit(payment)}${payR}${fmtNoUnit(cost)}${fmtNoUnit(paid)}${paidR}${cf}${pendingVal}${detailRows}
月份确收毛利回款成本支出现金流待回款
`; + return `${esc(pf.client_name || "")}${esc(pf.customer_name)}${money(pf.sign_amount)}${fmtNoUnit(rev)}${fmtNoUnit(gross)}${grossR}${fmtNoUnit(payment)}${pendingVal}${payR}${fmtNoUnit(cost)}${fmtNoUnit(paid)}${paidR}${cf}${detailRows}
月份确收毛利回款成本支出现金流待回款
`; }; // 待签约简版行 const tdRowUnsigned = (pf, cost, gross) => { diff --git a/static/modules/plan.js b/static/modules/plan.js index bb77336..b18bc13 100644 --- a/static/modules/plan.js +++ b/static/modules/plan.js @@ -306,11 +306,11 @@ function renderPlan() { { key: 'gross', label: '毛利' }, { key: 'gross_rate', label: '毛利率' }, { key: 'payment', label: '回款' }, + { key: 'pending', label: '待回款' }, { key: 'pay_rate', label: '回款率' }, { key: 'cost', label: '当期成本' }, { key: 'paid', label: '当期流出' }, { key: 'cashflow', label: '现金流' }, - { key: 'pending', label: '待回款' }, ]; const UNSIGNED_COLS = [ { key: 'client_name', label: '客户' }, @@ -369,7 +369,7 @@ function renderPlan() { const cfCls = cashflow >= 0 ? 'text-green-600' : 'text-red-600'; const pending = rev - payment; const pendingCls = pending > 0 ? 'text-red-600' : pending < 0 ? 'text-green-600' : 'text-slate-400'; - const pendingVal = pending ? money(pending) : ''; + const pendingVal = pending ? (pending > 0 ? '+' : '') + money(pending) : ''; var budgetArr = []; var expenseArr = []; try { budgetArr = JSON.parse(pf.budget_data || "[]"); } catch(e) {} @@ -392,7 +392,7 @@ function renderPlan() { var bCf = bPay - ePaid; return '' + m + '' + (bRev ? money(bRev) : '—') + '' + (bGross ? money(bGross) : '—') + '' + (bPay ? money(bPay) : '—') + '' + (eCost ? money(eCost) : '—') + '' + (ePaid ? money(ePaid) : '—') + '' + (bCf ? money(bCf) : '—') + '' + (bRev - bPay ? money(bRev - bPay) : '—') + ''; }).join(''); - return `${esc(pf.client_name || "")}${esc(pf.customer_name)}${planInlineSelect('weight', pf.id, 'weight', pf.weight || '20%', ['20%','40%','60%','80%','100%'])}${planInlineSelect('ptype', pf.id, 'project_type', pf.project_type || '待签约', ['待签约','已签约'])}${money(pf.sign_amount)}${fmtNoUnit(rev)}${fmtNoUnit(gross)}${grossR}${fmtNoUnit(payment)}${payR}${fmtNoUnit(cost)}${fmtNoUnit(paid)}${cf}${pendingVal}${detailRows}
月份确收毛利回款当期成本当期流出现金流待回款
`; + return `${esc(pf.client_name || "")}${esc(pf.customer_name)}${planInlineSelect('weight', pf.id, 'weight', pf.weight || '20%', ['20%','40%','60%','80%','100%'])}${planInlineSelect('ptype', pf.id, 'project_type', pf.project_type || '待签约', ['待签约','已签约'])}${money(pf.sign_amount)}${fmtNoUnit(rev)}${fmtNoUnit(gross)}${grossR}${fmtNoUnit(payment)}${pendingVal}${payR}${fmtNoUnit(cost)}${fmtNoUnit(paid)}${cf}${detailRows}
月份确收毛利回款当期成本当期流出现金流待回款
`; }; // 待签约简版行 const tdRowUnsigned = (pf, cost, gross) => { diff --git a/templates/index.html b/templates/index.html index b0305b4..dfd44a7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -84,7 +84,7 @@
-

OPC Manager v1.2.0.29

+

OPC Manager v1.2.0.30

科普 OPC 工作台