diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js index 9be126dc..65a739ff 100644 --- a/pc4mobx/hrmSalary/util/index.js +++ b/pc4mobx/hrmSalary/util/index.js @@ -119,7 +119,7 @@ export const padding0 = (num, length) => { }; export const toDecimal_n = (x, num) => { if (isNaN(parseFloat(x))) return false; - let f = Math.round(x * 100) / 100; + let f = Math.round(x * Math.pow(10, num)) / Math.pow(10, num); let s = f.toString(); let rs = s.indexOf("."); if (rs < 0) {