Browse Source

公式计算

chenshilong 7 years ago
parent
commit
3f176f738d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      web/building_saas/main/js/models/calc_program.js

+ 3 - 1
web/building_saas/main/js/models/calc_program.js

@@ -782,7 +782,9 @@ class CalcProgram {
             if (treeNode.data.programID) treeNode.data.programID = null;
 
             let f = treeNode.data.feeRate ? treeNode.data.feeRate : 100;
-            let q = treeNode.data.quantity ? treeNode.data.quantity : 0;
+            // let q = treeNode.data.quantity ? treeNode.data.quantity : 0;
+            if (!treeNode.data.quantity) treeNode.data.quantity = 1;
+            let q = treeNode.data.quantity;
             let b = treeNode.data.calcBaseValue ? treeNode.data.calcBaseValue : 0;
             let uf = (b * f * q / 100).toDecimal(decimalObj.bills.unitPrice);
             let tuf = uf;