chenshilong 7 年之前
父節點
當前提交
94b3d8af9c

+ 7 - 7
web/building_saas/main/js/models/calc_program.js

@@ -751,8 +751,8 @@ class CalcProgram {
         for (let node of treeNodes){delete node.changed};
         projectObj.mainController.refreshTreeNode(treeNodes);
 
-        if (activeSubSheetIs(subSheetIndex.ssiCalcProgram)) {
-            calcProgramObj.showData(me.project.mainTree.selected, false);
+        if (activeSubSheetIs(subSheetIndex.ssiCalcProgram)) {    // 批量树结点计算后,计算程序早已今非昔比,所以这里要重新计算一下。
+            calcProgramObj.showData(me.project.mainTree.selected, true);
         };
     };
 
@@ -1099,11 +1099,11 @@ class CalcProgram {
         return changedNodes;
     };
 
-    /* 计算所有树结点(分3种情况),并返回发生变动的零散的多个树结点。
-    参数取值如下:
-    calcAllType.catAll       计算所有树结点 (不指定参数时的默认值)
-    calcAllType.catBills     计算所有清单 (改变项目属性中清单取费算法时会用到)
-    calcAllType.catRations   计算所有定额、工料机形式的定额、量价,因为它们都走自己的计算程序 (改变人工系数、费率值、工料机单价时会用到) */
+    /* 计算所有树结点(分3种情况),并返回发生变动的零散的多个树结点。参数取值如下:
+        calcAllType.catAll       计算所有树结点 (不指定参数时的默认值)
+        calcAllType.catBills     计算所有清单 (改变项目属性中清单取费算法时会用到)
+        calcAllType.catRations   计算所有定额、工料机形式的定额、量价,因为它们都走自己的计算程序 (改变人工系数、费率值、工料机单价时会用到)
+    */
     calcAllNodes(calcType = calcAllType.catAll){
         let me = this;
         let changedNodes = [];

+ 3 - 1
web/building_saas/main/js/views/main_tree_col.js

@@ -152,7 +152,9 @@ let MainTreeCol = {
             return MainTreeCol.readOnly.glj(node) || MainTreeCol.readOnly.billsParent(node)
         },
         forMarketPrice: function (node) {
-            return MainTreeCol.readOnly.bills(node) || (node.sourceType === ModuleNames.ration && (node.data.type == rationType.ration||node.data.type== rationType.volumePrice)) || gljOprObj.marketPriceReadOnly(node);
+            return MainTreeCol.readOnly.bills(node) ||
+                (node.sourceType === ModuleNames.ration && node.data.type == rationType.ration) ||
+                gljOprObj.marketPriceReadOnly(node);
         },
         forContain:function (node) {
             return MainTreeCol.readOnly.non_ration(node)&&!MainTreeCol.readOnly.glj(node);

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

@@ -475,13 +475,15 @@ var projectObj = {
                     if(col.data.field ==='quantity'){
                         col.showHint = true;
                     }
-                    // for test digit. CSLAAAAA
-                    if (col.data.field.hasSubStr("totalFee"))
-                       col.data.formatter = MainTreeCol.getNumberFormatter(decimalObj.ration.totalPrice, false)
-                    else if (col.data.field.hasSubStr("unitFee"))
-                        col.data.formatter = MainTreeCol.getNumberFormatter(decimalObj.ration.unitPrice, false)
-                    else if (col.data.field == "quantity")
-                        col.data.formatter = MainTreeCol.getNumberFormatter(decimalObj.ration.quantity, false);
+
+                    // 综合单价、综合合价,小数部分应补0对齐。  CSLAAAAA
+                    if (col.data.field.hasSubStr("common")){
+                        if (col.data.field.hasSubStr("totalFee"))
+                            col.data.formatter = MainTreeCol.getNumberFormatter(decimalObj.ration.totalPrice, true)
+                        else if (col.data.field.hasSubStr("unitFee"))
+                            col.data.formatter = MainTreeCol.getNumberFormatter(decimalObj.ration.unitPrice, true)
+                    }
+
                 });
 
                 that.mainController = TREE_SHEET_CONTROLLER.createNew(that.project.mainTree, that.mainSpread.getActiveSheet(), that.project.projSetting.mainGridSetting);