浏览代码

变更清单四舍五入问题

ellisran 6 天之前
父节点
当前提交
df32b17d2b
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      app/public/js/change_information.js

+ 6 - 5
app/public/js/change_information.js

@@ -1907,7 +1907,7 @@ $(document).ready(() => {
             select.camount = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
             cInfo.spamount = select.spamount;
             cInfo.camount_expr = select.camount_expr;
-            cInfo.camount = validText;
+            cInfo.camount = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
             // console.log(select);
             delete cInfo.waitingLoading;
 
@@ -3911,10 +3911,10 @@ $(document).ready(() => {
             }
             select.spamount = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
             select.camount_expr = exprQuantity.expr;
-            select.camount = validText;
+            select.camount = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
             cInfo.spamount = select.spamount;
             cInfo.camount_expr = select.camount_expr;
-            cInfo.camount = validText;
+            cInfo.camount = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
             // console.log(select);
             delete cInfo.waitingLoading;
 
@@ -4433,10 +4433,10 @@ $(document).ready(() => {
             }
             select.spamount = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
             select.camount_expr = exprQuantity.expr;
-            select.camount = validText;
+            select.camount = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
             cInfo.spamount = select.spamount;
             cInfo.camount_expr = select.camount_expr;
-            cInfo.camount = validText;
+            cInfo.camount = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
             // console.log(select);
             delete cInfo.waitingLoading;
 
@@ -4449,6 +4449,7 @@ $(document).ready(() => {
                 };
                 const refreshData = ledgerTree.loadPostData(loadResult);
                 ledgerTreeSpreadObj.refreshTree(ledgerSheet, refreshData);
+                ledgerTreeSpreadObj.loadExprToInput();
             }, function () {
                 select.camount = orgValue;
                 select.camount_expr = orgExprValue;