支持三人台账、库存更正审批与每日人数增量

This commit is contained in:
summer committed 2026-10-25 14:19:24 +08:00
1 parent 8d9039aacf
commit f6bdfcf10d
57 files changed
+2536 -564

No files matched your search

+6 -3
View File
@@ -1,12 +1,15 @@
'use strict';
// 手续费预览使用整数分;真实费用由服务端按每笔客户付款生成。
(function(root){
const isAccount=account=>['助理信用卡','麦麦信用卡'].includes(account);
const isAccount=account=>['助理信用卡','助理1信用卡','麦麦信用卡','助理2信用卡'].includes(account);
const ratePermille=6;
const normalizeAccount=account=>isAccount(account)?'麦麦信用卡':account;
const note=(rate=ratePermille)=>`信用卡手续费(${rate}‰)`;
const isFee=item=>item?.system==='credit_card'||String(item?.key||'').startsWith('card_fee:');
function amount(cents){
if(!Number.isSafeInteger(cents)||cents<0||cents>100000000000)throw new Error('客户付款金额无效');
return Math.floor((cents*4+500)/1000);
return Math.floor((cents*ratePermille+500)/1000);
}
const api={isAccount,isFee,amount};
const api={isAccount,isFee,amount,ratePermille,normalizeAccount,note};
if(typeof module==='object'&&module.exports)module.exports=api;else root.CreditCardFees=api;
})(typeof globalThis==='object'?globalThis:this);