Browse Source

造价书工具栏,升级降级按钮有效性检查

zhangweicheng 4 years ago
parent
commit
cddd224919
2 changed files with 12 additions and 6 deletions
  1. 3 3
      web/building_saas/js/global.js
  2. 9 3
      web/building_saas/main/js/views/project_view.js

+ 3 - 3
web/building_saas/js/global.js

@@ -6,12 +6,12 @@ function autoFlashHeight(){
     let btntoolsbarHeight = $(".btn-toolbar").height();
     // var feeRateToolsbarHeight = $(".toolsbar_feeRate").height();
     let toolsBarHeightQ = $(".tools-bar-height-q").height();
-    let toolsBarHeightD = $(".tools-bar-height-d").height();
+    let toolsBarHeightD = $("#deToolsBar").height();
     let toolsBarHeightZ = $(".tools-bar-height-z").height();
     //$(".main-data-side-q").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightQ-302);
     $(".main-data-side-q").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightQ-$('#qd').find('.bottom-content').find('.p-0').height()-5);
-    //$(".main-data-side-d").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightD-302);
-    $(".main-data-side-d").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightD-$('#stdSectionRations').height()-5);
+  
+    //$(".main-data-side-d").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightD-$('#stdSectionRations').height());
     $(".main-data-side-zb").height(($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightZ));
     /*$(".main-data-side-zi").height($(window).height()-headerHeight-toolsbarHeight- toolsBarHeightZ - $(".main-data-side-zb").height());*/
     $('.main-content').width($(window).width()-$('.main-nav').width()-$('.main-side').width()-5);

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

@@ -97,6 +97,9 @@ var projectObj = {
                      if(node.children[0].data.type==billType.FX || node.children[0].data.type==billType.BX){ //焦点行子项是分项
                          return false;
                      }
+                     if(node.children.length>0&&node.children[0].sourceType !== that.project.Bills.getSourceType()){//有子项,并且子项不是清单
+                        return false;
+                    }
                 }
                 if(node.data.type == billType.BILL &&node.nextSibling){//焦点行是清单有后兄弟
                     if(node.data.calcBase&&node.data.calcBase!=""){//有基数计算
@@ -130,13 +133,16 @@ var projectObj = {
                 }else if(node.preSibling.data.calcBase&&node.preSibling.data.calcBase!=""){//前兄弟有基数计算
                     return false
                 }
-                if(node.preSibling.children.length>0){//前兄弟有子项,子项是分项,灰显。
-                    if(node.data.type==billType.FB&&(node.preSibling.children[0].data.type==billType.FX||node.preSibling.children[0].data.type==billType.BX)){//焦点行是分部前兄弟有子项,子项是分项,灰显。
+                if(node.preSibling.children.length>0){//前兄弟有子项,子项是定额/量价/工料机灰显
+                    if(node.data.type==billType.FB&&node.preSibling.children[0].sourceType !== that.project.Bills.getSourceType()){//焦点行是清单,子项不是清单
+                        return false
+                    }
+                   /*  if(node.data.type==billType.FB&&(node.preSibling.children[0].data.type==billType.FX||node.preSibling.children[0].data.type==billType.BX)){//焦点行是分部前兄弟有子项,子项是分项,灰显。
                         return false;
                     }
                     if(node.data.type==billType.BILL&&node.preSibling.children[0].sourceType !== that.project.Bills.getSourceType()){//焦点行是清单,子项不是清单
                         return false
-                    }
+                    } */
                 }
             }
             return true;