优化库存管理

This commit is contained in:
gyq
2024-07-02 14:09:43 +08:00
parent 67207be4f2
commit 06101c6ed2
3 changed files with 16 additions and 13 deletions

View File

@@ -423,7 +423,7 @@ export function isPcBowser() {
* decimal你保留的几位,默认保留小数后两位
*/
export function formatDecimal(num, decimal = 2) {
num = num.toString();
num = num.toFixed(3).toString();
const index = num.indexOf(".");
if (index !== -1) {
num = num.substring(0, decimal + index + 1);