Browse Source

fix: 修复预付款本期金额输入框的输入显示值没有进行舍入的bug

lanjianrong 5 years ago
parent
commit
2e9390eaf5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/public/js/advance_audit.js

+ 2 - 2
app/public/js/advance_audit.js

@@ -204,10 +204,10 @@ $(document).ready(function () {
                 // 限制不能超过最大值
                 val = re_amount
             }
-            // $(this).val(fixedToSub(val, decimal)) // 重新赋值限制只有两位小数
+            $(this).val(fixedToSub(val, decimal)) // 重新赋值限制只有两位小数
             const pay_a_input = $(`.pay-input[data-type=${reverse(type)}]`)
             pay_ratio = parseFloat(ZhCalc.mul(ZhCalc.div(val, advancePayTotal), 100).toFixed(2))
-            cur_amount = val
+            cur_amount = ZhCalc.round(val, decimal)
             pay_a_input.val(pay_ratio)
             const total = parseFloat(ZhCalc.add(val, p_amount).toFixed(decimal)).toString().split('.')[1]
             // 截止本期金额文案更新