将助理成员显示名称统一为娜娜和小昊
This commit is contained in:
1 parent
f4ac7502d3
commit
518513e630
28 files changed
+120
-96
No files matched your search
@@ -59,7 +59,7 @@ function orderChangeDetailHTML(order){
|
||||
return `<section class="panel order-change-panel" id="order-change-panel"><div class="panel-title"><h2>变更申请与复核</h2>${request?'<span class="badge warn">待麦麦复核</span>':''}</div>${request?`<p><strong>本次申请:${e(orderChangeActionLabel(request))}。</strong>申请期间仍按原订单计账,本次申请尚未生效。麦麦同意后才更新原单;复核完成前暂停本单其他记账和取消申请。</p>${request.stale?'<div class="error" role="status">订单在申请后已有变动,原申请不能同意。请麦麦驳回后按最新订单重新申请。</div>':''}${canReview?`<div class="actions">${!request.stale?button('查看变更并复核','approve-order-change','primary',`data-id="${e(request.id)}"`):''}${button('驳回变更申请','reject-order-change','',`data-id="${e(request.id)}"`)}</div>`:'<p class="small muted">由麦麦账号核对原值与申请值后复核。</p>'}`:''}<details ${request?'open':''}><summary>变更申请与复核记录(${data.requests.length})</summary><ul class="timeline change-history">${data.requests.map(orderChangeHistoryHTML).join('')}</ul></details></section>`;
|
||||
}
|
||||
function orderChangeMoney(value){return value==null?'待补齐':'¥'+yuan(value);}
|
||||
function orderChangePayer(value){return ({owner:'麦麦',assistant:typeof teamMode==='function'&&teamMode()?'助理1':'助理',assistant2:'助理2'})[value]||'待补齐';}
|
||||
function orderChangePayer(value){return ({owner:'麦麦',assistant:'娜娜',assistant2:'小昊'})[value]||'待补齐';}
|
||||
function orderChangeCell(value){return e(value==null||value===''?'未填写':value).replace(/\n/g,'<br>');}
|
||||
function orderChangePair(title,before,after){const changed=String(before??'')!==String(after??'');return `<tr${changed?' class="order-change-modified"':''}><th scope="row">${e(title)}${changed?'<span class="change-mark">已修改</span>':''}</th><td>${orderChangeCell(before)}</td><td>${orderChangeCell(after)}</td></tr>`;}
|
||||
function orderChangeLineValue(line,kind){
|
||||
@@ -87,7 +87,7 @@ function orderChangeEffectiveExpenses(order){const corrected=new Set((order.corr
|
||||
function orderChangeExpensesValue(order){return orderChangeEffectiveExpenses(order).map(row=>`${row.date} · ${row.note||'实际费用'}\n${orderChangeMoney(row.amount)} · ${orderChangePayer(row.payer)}支付`).join('\n\n')||'无已记费用';}
|
||||
function orderChangePaymentsValue(order){
|
||||
const corrected=new Set((order.corrections||[]).filter(row=>row.type==='payment').map(row=>row.target));
|
||||
return order.payments.filter(row=>row.amount>0&&!corrected.has(row.id)).map(row=>`${row.date} · ${row.kind==='receipt'?'客户收款':'客户退款'}\n${orderChangeMoney(row.amount)} · ${row.account||'账户未提供'}`).join('\n\n')||'无有效收退款';
|
||||
return order.payments.filter(row=>row.amount>0&&!corrected.has(row.id)).map(row=>`${row.date} · ${row.kind==='receipt'?'客户收款':'客户退款'}\n${orderChangeMoney(row.amount)} · ${row.account?accountDisplayName(row.account):'账户未提供'}`).join('\n\n')||'无有效收退款';
|
||||
}
|
||||
function orderChangeInputMoney(value){try{return orderChangeMoney(LedgerCalc.cents(value));}catch{return '金额未提供';}}
|
||||
function orderChangeActionSummaryHTML(request){
|
||||
@@ -95,7 +95,7 @@ function orderChangeActionSummaryHTML(request){
|
||||
if(action==='edit')return '';
|
||||
const facts=[['申请动作',orderChangeActionLabel(request)],['业务日期',input.date||request.after.returned_date||request.after.date]];
|
||||
if(input.amount!==undefined)facts.push(['本次金额',orderChangeInputMoney(input.amount)]);
|
||||
if(input.account)facts.push(['退款账户',input.account]);
|
||||
if(input.account)facts.push(['退款账户',accountDisplayName(input.account)]);
|
||||
if(input.payer)facts.push(['实际付款人',orderChangePayer(input.payer)]);
|
||||
if(input.note)facts.push(['费用项目/说明',input.note]);
|
||||
if(input.reference)facts.push(['退款凭据备注',input.reference]);
|
||||
@@ -110,7 +110,7 @@ function orderChangeInventoryHTML(inventory){
|
||||
}
|
||||
function orderChangeComparisonHTML(raw){
|
||||
const request=validateOrderChangeRequest(raw),before=request.before,after=request.after;
|
||||
const basic=[['业务日期','date'],['客户称呼/代号','customer'],['开单人','salesperson'],['收款方式与收款人','payment_account'],['客户单备注','note'],['内部备注(客户不可见)','internal_note']].map(([title,key])=>orderChangePair(title,before[key],after[key])).join('')+
|
||||
const basic=[['业务日期','date'],['客户称呼/代号','customer'],['开单人','salesperson'],['收款方式与收款人','payment_account'],['客户单备注','note'],['内部备注(客户不可见)','internal_note']].map(([title,key])=>orderChangePair(title,key==='payment_account'?accountDisplayName(before[key]):before[key],key==='payment_account'?accountDisplayName(after[key]):after[key])).join('')+
|
||||
orderChangePair('成交取整方式',before.rounding_mode==='yuan'?'四舍五入到整数元':'保留到分',after.rounding_mode==='yuan'?'四舍五入到整数元':'保留到分')+
|
||||
orderChangePair('新增费用默认支付日期',before.fees_date||before.date,after.fees_date||after.date)+orderChangePair('交付日期',before.delivered_date,after.delivered_date);
|
||||
const summary=[['成交金额','total'],['收款净额','netReceived'],['货品成本','goodsCost'],['实际费用合计','directCost'],['利润','profit'],['双方待结净额','settlementDue']].map(([title,key])=>orderChangePair(title,orderChangeMoney(request.summary.before[key]),orderChangeMoney(request.summary.after[key]))).join('');
|
||||
|
||||
Reference in new issue
Block a user