Sfoglia il codice sorgente

定额库章节名称动态列宽

zhongzewei 6 anni fa
parent
commit
a433b19390

+ 7 - 4
web/building_saas/complementary_glj_lib/html/tools-gongliaoji.html

@@ -60,6 +60,9 @@
                 </div>
                 <div class="modal-body" style="padding-left: 0; padding-right: 3px; margin-left: 0;">
                         <div style="width: 36%; float: left;">
+                            <input type="radio" class="glj-radio" name="glj" value="allGljs">所有&nbsp;&nbsp;
+                            <input type="radio" class="glj-radio" name="glj" value="stdGljs">标准&nbsp;&nbsp;
+                            <input type="radio" class="glj-radio" name="glj" value="complementaryGljs">补充&nbsp;&nbsp;
                             <div  class="modal-auto-height" id="componentTreeDiv" style="overflow: hidden">
                                 <!--<div class="print-list">-->
                                 <div style="width: 100%; height: 100%; overflow: auto">
@@ -73,9 +76,9 @@
                                 <div class="col-12" id="gljRadios">
                                     <div class="row">
                                         <div class="col-7" style="margin-top: 5px;">
-                                            <input type="radio" class="glj-radio" name="glj" value="allGljs">所有&nbsp;&nbsp;
+                           <!--                 <input type="radio" class="glj-radio" name="glj" value="allGljs">所有&nbsp;&nbsp;
                                             <input type="radio" class="glj-radio" name="glj" value="stdGljs">标准&nbsp;&nbsp;
-                                            <input type="radio" class="glj-radio" name="glj" value="complementaryGljs">补充&nbsp;&nbsp;
+                                            <input type="radio" class="glj-radio" name="glj" value="complementaryGljs">补充&nbsp;&nbsp;-->
                                         </div>
                                         <div class="input-group col-5" style="margin-bottom: 5px;">
                                             <input type="text" class="form-control form-control-sm" placeholder="请输入筛选编码或名称" value="" id="gljSearchKeyword">
@@ -245,7 +248,7 @@
             //解决spreadjs sheet初始化没高度宽度
             $('#modalCon').width($(window).width()*0.5);
             $('#componentTreeDiv').height($(window).height() - 300);
-            $("#componentSheet").height($("#componentTreeDiv").height()-21.6);
+            $("#componentSheet").height($("#componentTreeDiv").height() - 15);
             $("#componentSheet").width($('#modalCon').width() * 0.63);
             pageOprObj.initPage($("#GLJListSheet")[0], $('#gljComponentSheet')[0], $("#componentSheet")[0]);
         });
@@ -253,7 +256,7 @@
         $(window).resize(function () {
             $('#modalCon').width($(window).width()*0.5);
             $('#componentTreeDiv').height($(window).height() - 300);
-            $("#componentSheet").height($("#componentTreeDiv").height()-21.6);
+            $("#componentSheet").height($("#componentTreeDiv").height()-15);
             $("#componentSheet").width($('#modalCon').width()* 0.63);
         });
   	</SCRIPT>

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

@@ -30,7 +30,7 @@ function autoFlashHeight(){
     $(".gc-list").height($(window).height()-headerHeight-toolsbarHeight-40);
     $(".share-list").height($(window).height()-headerHeight-toolsbarHeight-40);
     $(".form-view").height($(window).height()-headerHeight-ftoolsbarHeight);
-    $(".form-list").height($(window).height()-headerHeight-50 );
+    $(".form-list").height($(window).height()-headerHeight);
     $('#comments').find('textarea').height($('#comments').height() - 25);
     typeof(adaptiveTzjnrWidth)== 'function' ?adaptiveTzjnrWidth():''
 };

+ 4 - 0
web/building_saas/main/js/controllers/material_controller.js

@@ -215,6 +215,10 @@ let MaterialController = {
         }
     },
     onReplaceButtonClick:function(e, args){
+        //项目只读
+        if(projectReadOnly) {
+            return;
+        }
         let me = MaterialController;
         let sheet = args.sheet, row = args.row, col = args.col;
         let dataCode = me.setting.header[col].dataCode, item = me.datas[row], doc = {};

+ 5 - 0
web/building_saas/main/js/views/side_tools.js

@@ -1,6 +1,10 @@
 /**
  * Created by Mai on 2017/6/16.
  */
+$(window).resize(function() {
+    sheetCommonObj.setColumnWidthByRate($('#stdRationChapter').width() - 40, rationLibObj.rationChapterSpread, rationLibObj.rationChapterTreeSetting.cols);
+    rationLibObj.refreshSpread();
+});
 //造价书与清单定额库左右拖动
 let sideResizeEles = {};
 sideResizeEles.id = 'stdRationTab';
@@ -21,6 +25,7 @@ slideResize(sideResizeEles, {min: 250, max: $('#zaojiashu').width()-260}, 'width
         billsGuidance.refreshWorkBook();
     }
     else if(sideResizeEles.id === 'stdRationTab'){
+        sheetCommonObj.setColumnWidthByRate($('#stdRationChapter').width() - 40, rationLibObj.rationChapterSpread, rationLibObj.rationChapterTreeSetting.cols);
         rationLibObj.refreshSpread();
     }
     else{

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

@@ -84,6 +84,7 @@ var rationLibObj = {
             var rationChapterTree = idTree.createNew({id: 'ID', pid: 'ParentID', nid: 'NextSiblingID', rootId: -1, autoUpdate: false});
             that.tree = rationChapterTree;
             var rationChapterTreeController = TREE_SHEET_CONTROLLER.createNew(rationChapterTree, that.rationChapterSpread.getActiveSheet(), that.rationChapterTreeSetting);
+            sheetCommonObj.setColumnWidthByRate($('#stdRationChapter').width() - 40, that.rationChapterSpread, that.rationChapterTreeSetting.cols);
             rationChapterTree.loadDatas(datas);
             //读取展开收起状态
             let currentExpState = sessionStorage.getItem('stdRationLibExpState');
@@ -285,6 +286,7 @@ var rationLibObj = {
         "defaultRowHeight": 21,
         "treeCol": 0,
         "cols":[{
+            "rateWidth": 1,
             "width":400,
             "readOnly": true,
             "head":{