zhangweicheng 7 лет назад
Родитель
Сommit
9b1d1ffc73

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

@@ -346,7 +346,7 @@ let calcBaseView = {
             }
         });
     },
-    onCalcBaseButtonClick:function (hitinfo) {
+    onCalcBaseButtonClick:function (hitinfo,type='bills') {
         let me = calcBaseView;
         hitinfo.sheet.setActiveCell(hitinfo.row, hitinfo.col);
         if(hitinfo.sheet.getParent() === projectObj.mainSpread){
@@ -356,7 +356,7 @@ let calcBaseView = {
         calcBaseView.confirmBtn.attr('toggle', 'calcBase');
         changeCalcBaseFeeRate('calcBase');
         $('#tabCalcBase').tab('show');
-        calcBaseView.initCalctor('ration');
+        calcBaseView.initCalctor(type);
     }
 };
 

+ 1 - 1
web/building_saas/main/js/views/calc_program_manage.js

@@ -40,7 +40,7 @@ let calcProgramManage = {
         //callback 和disable都是和 cusButton配套使用的
         callback:{
             calcBase:function (hitinfo) {
-                calcBaseView.onCalcBaseButtonClick(hitinfo);
+                calcBaseView.onCalcBaseButtonClick(hitinfo,'ration');
             }
         },
         disable:{

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

@@ -296,7 +296,7 @@ let MainTreeCol = {
         },
         calcBase: function (node) {
             let readOnly = projectReadOnly || !calcBaseView.ifEdit('bills', projectObj.project.mainTree.items.indexOf(node));
-            return sheetCommonObj.getCusButtonCellType(projectObj.onCommonTotalFeeButtonClick,readOnly) //projectObj.getCommonTotalFeeCellType();
+            return sheetCommonObj.getCusButtonCellType(calcBaseView.onCalcBaseButtonClick,readOnly)
         },
 
         // CSL, 2017-11-28
@@ -352,7 +352,8 @@ let MainTreeCol = {
 
         },
         commonTotalFee: function () {
-            return projectObj.getCommonTotalFeeCellType();
+            let readOnly = projectReadOnly || !calcBaseView.ifEdit('bills', projectObj.project.mainTree.items.indexOf(node));
+            return sheetCommonObj.getCusButtonCellType(projectObj.onCommonTotalFeeButtonClick,readOnly) //projectObj.getCommonTotalFeeCellType();
         }
     },
     editChecking:function(node){