zhangweicheng 6 лет назад
Родитель
Сommit
9e0596cbc7

+ 2 - 2
web/building_saas/main/js/views/main_tree_col.js

@@ -72,8 +72,8 @@ let MainTreeCol = {
         },
         maxPrice:function (node) {
             if(node.data.outPutMaxPrice == true){
-                if(node.data.maxPrice === null&&node.data.feesIndex &&node.data.feesIndex.common) return node.data.feesIndex.common.totalFee;
-                return node.data.maxPrice;
+                if(node.data.maxPrice === null&&node.data.feesIndex &&node.data.feesIndex.common) return node.data.feesIndex.common.unitFee?node.data.feesIndex.common.unitFee:"";
+                return node.data.maxPrice?node.data.maxPrice:"";
             }
             return "";
         }

+ 7 - 3
web/building_saas/main/js/views/project_view.js

@@ -541,7 +541,11 @@ var projectObj = {
             } else {
                 if (node.sourceType === project.Bills.getSourceType()) {
                     if(fieldName == "maxPrice"){
-                        value = scMathUtil.roundToString(value,getDecimal("totalPrice", node))
+                        if(value == null){
+                            value = "";
+                        }else {
+                            value = scMathUtil.roundToString(value,getDecimal("unitPrice", node))
+                        }
                     }
                     project.Bills.updateField(node.source, fieldName, value, false);
                 } else if (node.sourceType === project.Ration.getSourceType()) {
@@ -961,9 +965,9 @@ var projectObj = {
 
                     // 综合单价、综合合价,小数部分应补0对齐。  CSL
                     // if (col.data.field.hasSubStr("common")){
-                        if (col.data.field.hasSubStr(".totalFee")||col.data.field.hasSubStr("maxPrice"))
+                        if (col.data.field.hasSubStr(".totalFee"))
                             col.data.formatter = MainTreeCol.getNumberFormatter(decimalObj.ration.totalPrice, true);
-                        else if (col.data.field.hasSubStr(".unitFee"))
+                        else if (col.data.field.hasSubStr(".unitFee")||col.data.field.hasSubStr("maxPrice"))
                             col.data.formatter = MainTreeCol.getNumberFormatter(decimalObj.ration.unitPrice, true);
                     // }