src/utils/summarizeTable.js
@@ -34,6 +34,15 @@ } }); return sums; }; } // 不含税总价计算 const calculateTaxExclusiveTotalPrice = (taxInclusiveTotalPrice, taxRate) => { const taxRateDecimal = taxRate / 100; return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(2); } // 含税总价计算 const calculateTaxIncludeTotalPrice = (taxInclusiveUnitPrice, quantity) => { return (taxInclusiveUnitPrice * quantity).toFixed(2); } // 导出函数供其他文件使用 export { summarizeTable }; export { summarizeTable, calculateTaxExclusiveTotalPrice ,calculateTaxIncludeTotalPrice};