第3项:旧界面与 React 共用对账、回收及基础业务规则

This commit is contained in:
黄健铭 committed 2026-12-05 07:43:18 -08:00
1 parent 54c05879d5
commit 389952f31c
65 files changed
+2265 -3800

No files matched your search

+1 -5
View File
@@ -219,11 +219,7 @@ async function loadMaterialQuote(entry = materialQuoteEntry) {
}
}
function materialPoolMg(value) {
const text = String(value ?? '').trim();
if (!/^\d+(?:\.\d{1,3})?$/.test(text)) return null;
const [whole, fraction = ''] = text.split('.'),
mg = BigInt(whole) * 1000n + BigInt(fraction.padEnd(3, '0'));
return mg > 0n && mg <= 100000000000n ? Number(mg) : null;
return LedgerValues.positiveMg(value);
}
function materialPoolRate(value) {
return value == null ? '待补采购' : yuan(value);