Browse Source

feat: 隐藏相关按钮

zhangweicheng 4 years ago
parent
commit
a1cd66f6ad

+ 9 - 12
web/building_saas/main/html/main.html

@@ -138,7 +138,7 @@
                     <a class="dropdown-item btn-sm" href="javascript:void(0);" id="displayZD">最底层</a>
                     <a class="dropdown-item btn-sm" href="javascript:void(0);" id="displayZD">最底层</a>
                   </div>
                   </div>
                   <!-- <a href="javascript:void(0);" id="ZLFB_btn" class="dropdown-item" data-placement="bottom"><i class="fa fa-retweet" aria-hidden="true"></i> 整理清单</a> -->
                   <!-- <a href="javascript:void(0);" id="ZLFB_btn" class="dropdown-item" data-placement="bottom"><i class="fa fa-retweet" aria-hidden="true"></i> 整理清单</a> -->
-                  <a  href="javascript:void(0);" id="ZLFB_MENU" data-toggle="dropdown"  class="dropdown-item dropdown-toggle"><i class="fa fa-retweet" aria-hidden="true"></i> 整理清单</a>
+                 <!--  <a  href="javascript:void(0);" id="ZLFB_MENU" data-toggle="dropdown"  class="dropdown-item dropdown-toggle"><i class="fa fa-retweet" aria-hidden="true"></i> 整理清单</a>
                   <div style="position: relative;">
                   <div style="position: relative;">
                     <div id="ZLFB_MENU_sub" class="dropdown-menu dropdown-menu-left"
                     <div id="ZLFB_MENU_sub" class="dropdown-menu dropdown-menu-left"
                     style="min-width: 6.5rem; position: absolute; transform: translate3d(158px, 3px, 0px); top: -40px; left: 0px; will-change: transform;"
                     style="min-width: 6.5rem; position: absolute; transform: translate3d(158px, 3px, 0px); top: -40px; left: 0px; will-change: transform;"
@@ -147,7 +147,7 @@
                     <a class="dropdown-item btn-sm" href="javascript:void(0);" id="ZLQD_btn" >清单整理</a>
                     <a class="dropdown-item btn-sm" href="javascript:void(0);" id="ZLQD_btn" >清单整理</a>
                   
                   
                   </div>
                   </div>
-                  </div>
+                  </div> -->
 
 
                   <% if (region === '重庆市' || region === '广东省') { %>
                   <% if (region === '重庆市' || region === '广东省') { %>
                   <a id="interface-dropdown" href="javascript:void(0);" data-toggle="dropdown"
                   <a id="interface-dropdown" href="javascript:void(0);" data-toggle="dropdown"
@@ -210,10 +210,10 @@
                 <!-- <li class="nav-item">
                 <!-- <li class="nav-item">
                               <a class="nav-link px-3 right-nav-link"  href="javascript:void(0)" id = 'locateTab' relaPanel="#locate">查找定位</a>
                               <a class="nav-link px-3 right-nav-link"  href="javascript:void(0)" id = 'locateTab' relaPanel="#locate">查找定位</a>
                           </li>-->
                           </li>-->
-                <li class="nav-item">
+             <!--    <li class="nav-item">
                   <a class="nav-link px-1 right-nav-link" href="javascript:void(0)" id='stdBillsGuidanceTab'
                   <a class="nav-link px-1 right-nav-link" href="javascript:void(0)" id='stdBillsGuidanceTab'
                     relaPanel="#zy">标准清单</a>
                     relaPanel="#zy">标准清单</a>
-                </li>
+                </li> -->
                 <!-- <li class="nav-item">
                 <!-- <li class="nav-item">
                               <a class="nav-link px-3" href="javascript:void(0)" id = 'stdBillsTab' relaPanel="#qd">清单规则</a>
                               <a class="nav-link px-3" href="javascript:void(0)" id = 'stdBillsTab' relaPanel="#qd">清单规则</a>
                           </li>-->
                           </li>-->
@@ -222,13 +222,12 @@
                     relaPanel="#de">定额库</a>
                     relaPanel="#de">定额库</a>
                 </li>
                 </li>
 
 
-                <li class="nav-item dropdown">
+            <!--     <li class="nav-item dropdown">
                   <a class="nav-link dropdown-toggle more" data-toggle="dropdown" href="#" role="button"
                   <a class="nav-link dropdown-toggle more" data-toggle="dropdown" href="#" role="button"
                     aria-haspopup="true" aria-expanded="false">更多</a>
                     aria-haspopup="true" aria-expanded="false">更多</a>
                   <div class="dropdown-menu" id="div_more_dropdown_right">
                   <div class="dropdown-menu" id="div_more_dropdown_right">
                     <a class="dropdown-item  right-nav-link" href="javascript:void(0)" id='locateTab'
                     <a class="dropdown-item  right-nav-link" href="javascript:void(0)" id='locateTab'
                       relaPanel="#locate">查找定位</a>
                       relaPanel="#locate">查找定位</a>
-                    <!--<a class="dropdown-item" data-toggle="tab" href="#sqpz" role="tab">书签批注</a>-->
                     <script>
                     <script>
                       //2018-11-23  zhang 模板库移动到更多下拉框
                       //2018-11-23  zhang 模板库移动到更多下拉框
                       if (G_SHOW_BLOCK_LIB) {
                       if (G_SHOW_BLOCK_LIB) {
@@ -238,7 +237,7 @@
                       }
                       }
                     </script>
                     </script>
                   </div>
                   </div>
-                </li>
+                </li> -->
               </ul>
               </ul>
             </div>
             </div>
           </div>
           </div>
@@ -1927,11 +1926,9 @@
         <div class="modal-body" style="padding-top: 0px;padding-bottom: 0px;">
         <div class="modal-body" style="padding-top: 0px;padding-bottom: 0px;">
           <div class="row" style="height:210px">
           <div class="row" style="height:210px">
             <!--sjs id设置在这个div-->
             <!--sjs id设置在这个div-->
-            <div class=" col-8" style="overflow: hidden" id="feeItemSheet">
-            </div>
-            <div class=" col-4" style="overflow: hidden" id="install_setting">
+            <div class=" col-12" style="overflow: hidden" id="feeItemSheet"></div>
+      <!-- <div class=" col-4" style="overflow: hidden" id="install_setting">
               <div style="height: 100px;">
               <div style="height: 100px;">
-                <!--<div class="setting_title">整个项目统一计取</div>-->
                 <fieldset class="form-group" style="border:1px solid #b3b3b3;padding: 15px">
                 <fieldset class="form-group" style="border:1px solid #b3b3b3;padding: 15px">
                   <legend class="legend">分项费用:</legend>
                   <legend class="legend">分项费用:</legend>
                   <div class="form-check">
                   <div class="form-check">
@@ -1949,7 +1946,7 @@
                   </div>
                   </div>
                 </fieldset>
                 </fieldset>
               </div>
               </div>
-            </div>
+            </div> -->
           </div>
           </div>
           <div class="row" style="height:270px; margin-top: 5px">
           <div class="row" style="height:270px; margin-top: 5px">
             <!--sjs id设置在这个div-->
             <!--sjs id设置在这个div-->

+ 5 - 4
web/building_saas/main/js/models/ration.js

@@ -581,10 +581,11 @@ var Ration = {
             let needInstall = false;
             let needInstall = false;
             if (selected === null) { return null; }
             if (selected === null) { return null; }
             if (selected.sourceType === project.Bills.getSourceType() && selected.depth() > 0) {
             if (selected.sourceType === project.Bills.getSourceType() && selected.depth() > 0) {
-                if(selected.data.type === billType.FB){
+               /*  if(selected.data.type === billType.FB){
                     return null;
                     return null;
-                }
-                else if (selected.source.children.length > 0) {
+                } 
+                else */
+                if (selected.source.children.length > 0) {
                     alert('当前清单已有清单子项,不能套用定额。');
                     alert('当前清单已有清单子项,不能套用定额。');
                 } else if (selected.data.calcBase&&selected.data.calcBase!="") {
                 } else if (selected.data.calcBase&&selected.data.calcBase!="") {
                     alert('当前有基数计算,不能插入定额/量价/人材机。');
                     alert('当前有基数计算,不能插入定额/量价/人材机。');
@@ -852,9 +853,9 @@ var Ration = {
             if (calcTools.isRationCategory(node)) return true;
             if (calcTools.isRationCategory(node)) return true;
             if (calcTools.isBill(node)){
             if (calcTools.isBill(node)){
                 if (node.data.type == billType.FX || node.data.type == billType.BX) return true;  // 分项、补项
                 if (node.data.type == billType.FX || node.data.type == billType.BX) return true;  // 分项、补项
+                if (calcTools.isLeafBill(node) && node.data.type == billType.FB) return true; //叶子分部,可添加
                 if (calcTools.isLeafBill(node)
                 if (calcTools.isLeafBill(node)
                     && (node.data.type != billType.DXFY)
                     && (node.data.type != billType.DXFY)
-                    && (node.data.type != billType.FB)
                     && project.Bills.isMeasure(node)) return true;  // 叶子清单项
                     && project.Bills.isMeasure(node)) return true;  // 叶子清单项
             };
             };
 
 

+ 1 - 0
web/building_saas/main/js/views/glj_view_contextMenu.js

@@ -373,6 +373,7 @@ var gljContextMenu = {
                         installationFeeObj.applyRuleTo('FX',gljContextMenu.selectedRow);
                         installationFeeObj.applyRuleTo('FX',gljContextMenu.selectedRow);
                     },
                     },
                     visible: function(key, opt){
                     visible: function(key, opt){
+                        return false
                         return subSpread.getActiveSheet().name()=='rationInstallSheet';
                         return subSpread.getActiveSheet().name()=='rationInstallSheet';
                     }
                     }
                 },
                 },

+ 4 - 4
web/building_saas/main/js/views/installation_fee_view.js

@@ -17,7 +17,7 @@ let installationFeeObj={
             {headerName: "材料(%)", headerWidth: 70, dataCode: "material", hAlign: "right", dataType: "String"},
             {headerName: "材料(%)", headerWidth: 70, dataCode: "material", hAlign: "right", dataType: "String"},
             {headerName: "机械(%)", headerWidth: 70, dataCode: "machine", hAlign: "right", dataType: "String"},
             {headerName: "机械(%)", headerWidth: 70, dataCode: "machine", hAlign: "right", dataType: "String"},
             {headerName: "费用类型", headerWidth: 100, dataCode: "feeType", hAlign: "center", dataType: "String",cellType:'comboBox',options:installFeeType},
             {headerName: "费用类型", headerWidth: 100, dataCode: "feeType", hAlign: "center", dataType: "String",cellType:'comboBox',options:installFeeType},
-            {headerName: "记取位置", headerWidth: 200, dataCode: "position", hAlign: "left", dataType: "String",cellType:'selectButton',getText:'forPosition'}
+            /* {headerName: "记取位置", headerWidth: 200, dataCode: "position", hAlign: "left", dataType: "String",cellType:'selectButton',getText:'forPosition'} */
         ],
         ],
         view: {
         view: {
             lockColumns: [0,1,3,4,5,6,7,8,9,10]
             lockColumns: [0,1,3,4,5,6,7,8,9,10]
@@ -49,7 +49,7 @@ let installationFeeObj={
             {headerName: "计取", headerWidth: 50, dataCode: "isCal", dataType: "String",cellType: "checkBox"},
             {headerName: "计取", headerWidth: 50, dataCode: "isCal", dataType: "String",cellType: "checkBox"},
             {headerName: "费用项", headerWidth: 300, dataCode: "feeItem", hAlign: "left", dataType: "String"},
             {headerName: "费用项", headerWidth: 300, dataCode: "feeItem", hAlign: "left", dataType: "String"},
             {headerName: "费用类型", headerWidth: 100, dataCode: "feeType", hAlign: "center", dataType: "String",cellType:'comboBox',options:installFeeType},
             {headerName: "费用类型", headerWidth: 100, dataCode: "feeType", hAlign: "center", dataType: "String",cellType:'comboBox',options:installFeeType},
-            {headerName: "记取位置", headerWidth: 180, dataCode: "displayPosition", hAlign: "left", dataType: "String",cellType:'selectButton'}
+            /* {headerName: "记取位置", headerWidth: 180, dataCode: "displayPosition", hAlign: "left", dataType: "String",cellType:'selectButton'} */
         ],
         ],
         view: {
         view: {
             lockColumns: [0,1]
             lockColumns: [0,1]
@@ -68,7 +68,7 @@ let installationFeeObj={
             {headerName: "人工(%)", headerWidth: 75, dataCode: "labour", hAlign: "right", dataType: "String"},
             {headerName: "人工(%)", headerWidth: 75, dataCode: "labour", hAlign: "right", dataType: "String"},
             {headerName: "材料(%)", headerWidth: 75, dataCode: "material", hAlign: "right", dataType: "String"},
             {headerName: "材料(%)", headerWidth: 75, dataCode: "material", hAlign: "right", dataType: "String"},
             {headerName: "机械(%)", headerWidth: 75, dataCode: "machine", hAlign: "right", dataType: "String"},
             {headerName: "机械(%)", headerWidth: 75, dataCode: "machine", hAlign: "right", dataType: "String"},
-            {headerName: "记取位置", headerWidth: 180, dataCode: "position", hAlign: "left", dataType: "String",cellType:'selectButton'}
+           /*  {headerName: "记取位置", headerWidth: 180, dataCode: "position", hAlign: "left", dataType: "String",cellType:'selectButton'} */
         ],
         ],
         view: {
         view: {
             lockColumns: [0, 2]
             lockColumns: [0, 2]
@@ -118,7 +118,7 @@ let installationFeeObj={
             {headerName: "其中人工(%)", headerWidth: 100, dataCode: "labour", hAlign: "right", dataType: "String"},
             {headerName: "其中人工(%)", headerWidth: 100, dataCode: "labour", hAlign: "right", dataType: "String"},
             {headerName: "其中材料(%)", headerWidth: 100, dataCode: "material", hAlign: "right", dataType: "String"},
             {headerName: "其中材料(%)", headerWidth: 100, dataCode: "material", hAlign: "right", dataType: "String"},
             {headerName: "其中机械(%)", headerWidth: 100, dataCode: "machine", hAlign: "right", dataType: "String"},
             {headerName: "其中机械(%)", headerWidth: 100, dataCode: "machine", hAlign: "right", dataType: "String"},
-            {headerName: "记取位置", headerWidth: 100, dataCode: "position", hAlign: "left", dataType: "String",cellType:'selectButton',getText:'forPosition'}
+            /* {headerName: "记取位置", headerWidth: 100, dataCode: "position", hAlign: "left", dataType: "String",cellType:'selectButton',getText:'forPosition'} */
         ],
         ],
         view: {
         view: {
             lockColumns: [0, 1]
             lockColumns: [0, 1]

+ 2 - 0
web/building_saas/main/js/views/project_view.js

@@ -1391,6 +1391,7 @@ var projectObj = {
                         return true;//除了清单,其它类型都只读
                         return true;//除了清单,其它类型都只读
                     },
                     },
                     visible: function(key, opt){
                     visible: function(key, opt){
+                        return false
                         if(project.mainTree.selected){
                         if(project.mainTree.selected){
                             return project.Bills.isFBFX(project.mainTree.selected );//不属于分部分项的话隐藏
                             return project.Bills.isFBFX(project.mainTree.selected );//不属于分部分项的话隐藏
                         }else {
                         }else {
@@ -1411,6 +1412,7 @@ var projectObj = {
                         return true;
                         return true;
                     },
                     },
                     visible: function(key, opt){
                     visible: function(key, opt){
+                        return false
                         if(project.mainTree.selected){
                         if(project.mainTree.selected){
                             return  project.Bills.isFBFX(project.mainTree.selected)==true?false:true;
                             return  project.Bills.isFBFX(project.mainTree.selected)==true?false:true;
                         }else {
                         }else {