zhangweicheng преди 7 години
родител
ревизия
03e4188405

+ 2 - 1
web/building_saas/js/global.js

@@ -9,7 +9,8 @@ function autoFlashHeight(){
     var toolsBarHeightD = $(".tools-bar-height-d").height();
     $(".main-data-side-q").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightQ-302);
     $(".main-data-side-d").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightD-302);
-    $(".main-data-top").height($(window).height()-headerHeight-toolsbarHeight-bottomContentHeight-1);
+    //$("#main .main-data-top").height($(window).height()-headerHeight-toolsbarHeight-bottomContentHeight-1);
+    $("#billsSpread").height($(window).height()-headerHeight-toolsbarHeight-bottomContentHeight-1);
     $("#project_glj_sheet").height($(window).height()-headerHeight-toolsbarHeight-bottomContentHeight-1);
     $(".main-data-full").height($(window).height()-headerHeight-toolsbarHeight-1);
     $(".main-data-full-fl").height($(window).height()-headerHeight-toolsbarHeight-37);

+ 1 - 1
web/building_saas/main/html/main.html

@@ -1175,7 +1175,7 @@
         <!-- endinject -->
 
         <script type="text/javascript">
-            //autoFlashHeight();
+            autoFlashHeight();
         </script>
 
         <SCRIPT type="text/javascript">

+ 17 - 7
web/building_saas/main/js/main.js

@@ -21,7 +21,10 @@ $(function () {
         $(e.relatedTarget.hash).removeClass('active');
         $("#subItems").addClass('active');
         $(gljOprObj.activeTab).addClass('active');
-        // do something
+        loadSize("main", function() {
+            projectObj.refreshMainSpread();
+            refreshSubSpread();
+        });
     });
 
     slideResize($("#main"), function() {
@@ -115,16 +118,23 @@ function loadSize(tag, callback) {
     if (tag === '') {
         return;
     }
+    let o_topHeight = $("#"+ tag +" .main-data-top").height();
+    let o_bottomHeight = $("#"+ tag +" .main-data-bottom").height();
     let topHeight = getLocalCache('topHeight:' + tag);
     let bottomHeight = getLocalCache('bottomHeight:' + tag);
     if (topHeight === null || bottomHeight === null) {
-        return;
+        $("#"+ tag +" .main-data-top").height(o_topHeight);
+        $("#"+ tag +" .main-data-bottom").height(o_bottomHeight);
+    }else {
+        const navHeight = $("#"+ tag +" .bottom-content").children('ul.nav').height() + 4;
+        topHeight = parseFloat(topHeight);
+        bottomHeight = parseFloat(bottomHeight);
+        console.log(topHeight);
+        console.log(bottomHeight);
+        $("#"+ tag +" .main-data-top").height(topHeight);
+        $("#"+ tag +" .main-data-bottom").height(bottomHeight - navHeight);
     }
-    const navHeight = $("#"+ tag +" .bottom-content").children('ul.nav').height() + 4;
-    topHeight = parseFloat(topHeight);
-    bottomHeight = parseFloat(bottomHeight);
-    $("#"+ tag +" .main-data-top").height(topHeight);
-    $("#"+ tag +" .main-data-bottom").height(bottomHeight - navHeight);
+
     // $("#"+ tag +" .bottom-content").height(bottomHeight);
     callback();
 }

+ 1 - 1
web/building_saas/main/js/models/fee_rate.js

@@ -426,7 +426,7 @@ var FeeRate = {
               //更新缓存
               let rate = me.getFeeRateByID(rateID);
               for(let dkey in doc){
-                  rate[dkey] = doc;
+                  rate[dkey] = doc[dkey];
               }
             if(callback){
                 callback();

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

@@ -19,7 +19,7 @@ let installationFeeObj={
             {headerName: "记取位置", headerWidth: 200, dataCode: "position", hAlign: "left", dataType: "String",cellType:'selectButton',getText:'forPosition'}
         ],
         view: {
-            lockColumns: [0,1,3,4,5,6,7,8,9]
+            lockColumns: [0,1,3,4,5,6,7,8,9,10]
         },
         getText:{
             forPosition:function (item,val) {//记取位置转换
@@ -383,7 +383,7 @@ let installationFeeObj={
         sheetCommonObj.showData(this.modifyFeeRuleSheet, this.modifyFeeRuleSetting, this.modifyFeeRuleData);
         this.modifyFeeRuleSheet.setRowCount(this.modifyFeeRuleData.length);
         let positionCol = _.findIndex(this.modifyFeeRuleSetting.header,{ 'dataCode': "position"});
-        this.modifyFeeRuleSheet.getRange(-1,positionCol, -1, 1, GC.Spread.Sheets.SheetArea.viewport).locked(ration_install.feeType=='子目费用'||ration_install.unifiedSetting==1);//设置选取位置列只读
+        this.modifyFeeRuleSheet.getRange(-1,positionCol, -1, 1, GC.Spread.Sheets.SheetArea.viewport).locked(ration_install.feeType=='子目费用');//设置选取位置列只读
     },
     showRationInstallationData:function (node) {
         var installationList = [];

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

@@ -599,9 +599,6 @@ var projectObj = {
                 that.project.projectMarkChecking();//是否需要重新进行造价计算
                 installationFeeObj.engineeringTypeChecking();//检查是否安装工程
                 //初始需要触发一次点击表格事件,sheet.getAutoFitWidth值(获取单元格文本长度)才正确
-                //autoFlashHeight();//设置界面高度
-               // that.mainSpread.refresh();
-                $(window).resize();
             }
             else {