zhongzewei 6 år sedan
förälder
incheckning
1e4c066b40

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

@@ -78,7 +78,7 @@
                       <a href="javascript:void(0)" class="btn btn-sm" id="upMove" title="上移"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
                       <a href="javascript:void(0)" class="btn btn-sm" id="downMove" title="下移"><i class="fa fa-arrow-down" aria-hidden="true"></i></a>
                     <span class="btn btn-sm">
-                      <a href="" data-toggle="dropdown"><span  data-placement="bottom" title="显示至..."><i class="fa fa-list-ol"></i></span></a>
+                      <a href="" data-toggle="dropdown" title="显示至..."><span  data-placement="bottom"><i class="fa fa-list-ol"></i></span></a>
                       <div class="dropdown-menu dropdown-menu-left" style="min-width: 6.5rem">
                       <a class="dropdown-item" href="javascript:void(0);" id="displayDXFY">大项费用</a>
                       <a class="dropdown-item" href="javascript:void(0);"  id="displayFB1">一级分部</a>
@@ -190,6 +190,15 @@
                                           <div class="col-4" style="width: 33%; float: left; margin: 0; padding:0;">
                                               <div class="main-data-bottom" id="add-rule" style="display: none;">
                                                   <div class="container-fluid my-2">
+                                                      <p style="text-align: center">
+                                                          <% if (projectData.property.lockBills == true) { %>
+                                                          <button class="btn btn-primary btn-sm disabled" type="button" id="use-to-current">应用到选中清单</button>
+                                                          <button class="btn btn-primary btn-sm disabled" type="button" id="use-to-all">应用到所有清单</button>
+                                                          <% } else { %>
+                                                          <button class="btn btn-primary btn-sm" type="button" id="use-to-current">应用到选中清单</button>
+                                                          <button class="btn btn-primary btn-sm" type="button" id="use-to-all">应用到所有清单</button>
+                                                          <% } %>
+                                                      </p>
                                                       <div class="mb-1 row">
                                                           <label class="col-5 px-0 col-form-label text-right">添加位置:</label>
                                                           <div class="col-7">
@@ -253,15 +262,6 @@
                                                               </select>
                                                           </div>
                                                       </div>
-                                                      <p style="text-align: center">
-                                                          <% if (projectData.property.lockBills == true) { %>
-                                                          <button class="btn btn-primary btn-sm disabled" type="button" id="use-to-current">应用到选中清单</button>
-                                                          <button class="btn btn-primary btn-sm disabled" type="button" id="use-to-all">应用到所有清单</button>
-                                                          <% } else { %>
-                                                          <button class="btn btn-primary btn-sm" type="button" id="use-to-current">应用到选中清单</button>
-                                                          <button class="btn btn-primary btn-sm" type="button" id="use-to-all">应用到所有清单</button>
-                                                          <% } %>
-                                                      </p>
                                                   </div>
                                               </div>
                                           </div>
@@ -843,8 +843,8 @@
                     </button>
                     <input type="hidden" id="actionType">
                 </div>
-                <div class="modal-body">
-                        <div style="width: 33%; float: left;">
+                <div class="modal-body" style="padding-left: 0; padding-right: 3px; margin-left: 0;">
+                        <div style="width: 20%; float: left;">
                             <div  class="modal-auto-height" id="componentTreeDiv" style=" height: 415px; overflow: hidden;">
                                 <!--<div class="print-list">-->
                                 <div style="width: 100%; height: 100%; overflow: auto">
@@ -853,7 +853,7 @@
                                 <!--</div>-->
                             </div>
                         </div>
-                        <div style="width:67%; padding-left: 8px; float: left;">
+                        <div style="width:80%; padding-left: 3px; float: left;">
                             <div class="row">
                                 <div class="col-12" id="gljRadios">
                                     <div class="row">

+ 3 - 3
web/building_saas/main/js/views/character_content_view.js

@@ -1061,9 +1061,9 @@ let pageCCOprObj = {
     refreshView: function(node, refreshData) {
         // 更新清单行特征列或内容列
         let updateCol = [
-            { name: 'itemCharacterText', col: 4 },
-            { name: 'jobContentText', col: 5 },
-            { name: 'name', col: 2 }
+            { name: 'itemCharacterText', col: colSettingObj.getColByField('itemCharacterText')},
+            { name: 'jobContentText', col: colSettingObj.getColByField('jobContentText')},
+            { name: 'name', col: colSettingObj.getColByField('name')}
         ];
         if (updateCol === '') {
             return;

+ 6 - 5
web/building_saas/main/js/views/glj_view.js

@@ -82,12 +82,12 @@ var gljOprObj = {
         header: [
             {headerName: "选择", headerWidth: 40, dataCode: "select", hAlign: "center", vAlign: "center", cellType: "checkBox"},
             {headerName: "编码", headerWidth: 80, dataCode: "code", dataType: "String", formatter: "@", hAlign: "left", vAlign: "center"},
-            {headerName: "名称", headerWidth: 120, dataCode: "name", dataType: "String", hAlign: "left", vAlign: "center"},
-            {headerName: "规格型号", headerWidth: 80, dataCode: "specs", dataType: "String", hAlign: "center", vAlign: "center"},
+            {headerName: "名称", headerWidth: 240, dataCode: "name", dataType: "String", hAlign: "left", vAlign: "center"},
+            {headerName: "规格型号", headerWidth: 190, dataCode: "specs", dataType: "String", hAlign: "left", vAlign: "center"},
             {headerName: "单位", headerWidth: 40, dataCode: "unit", dataType: "String", hAlign: "center", vAlign: "center"},
-            {headerName: "单价", headerWidth: 80, dataCode: "basePrice", dataType: "Number", formatter: "0.00", hAlign: "right", vAlign: "center"},
-            {headerName: "类型", headerWidth: 80, dataCode: "gljType", dataType: "String", hAlign: "center", vAlign: "center"},
-            {headerName: "是否新增", headerWidth: 80, dataCode: "isComplementary", dataType: "String", hAlign: "center", vAlign: "center", cellType: "checkBox"}
+            {headerName: "单价", headerWidth: 55, dataCode: "basePrice", dataType: "Number", formatter: "0.00", hAlign: "right", vAlign: "center"},
+            {headerName: "类型", headerWidth: 60, dataCode: "gljType", dataType: "String", hAlign: "center", vAlign: "center"},
+            {headerName: "新增", headerWidth: 40, dataCode: "isComplementary", dataType: "String", hAlign: "center", vAlign: "center", cellType: "checkBox"}
         ],
         view: {
             lockColumns: [0, 1, 2, 3, 4, 5, 6]
@@ -1260,6 +1260,7 @@ $(function () {
             gljOprObj.gljLibSpresd = sheetCommonObj.buildSheet($('#gljLibSheet')[0], gljOprObj.gljLibSheetSetting, gljOprObj.stdGLJ.length + gljOprObj.complementaryGLJs.length);
             gljOprObj.gljLibSpresd.bind(GC.Spread.Sheets.Events.ButtonClicked, gljOprObj.onButtonClick);
             gljOprObj.gljLibSheet = gljOprObj.gljLibSpresd.getSheet(0);
+            gljOprObj.gljLibSheet.setColumnWidth(0, 20, GC.Spread.Sheets.SheetArea.rowHeader);
             gljOprObj.gljLibSheet.options.isProtected = true;
             gljOprObj.gljLibSheet.name('glj_lib');
         }

+ 6 - 0
web/building_saas/main/js/views/sub_view.js

@@ -185,6 +185,9 @@ function updateBillsOprRation() {
 // 应用到选中清单
 let isSaving = false;
 $("#use-to-current").click(function() {
+    if($(this).hasClass('disabled')){
+        return false;
+    }
     if(projectReadOnly){
         return false;
     }
@@ -221,6 +224,9 @@ function addRuleUseToBills(setting, nodes) {
 }
 // 应用到所有的清单
 $("#use-to-all").click(function() {
+    if($(this).hasClass('disabled')){
+        return false;
+    }
     if(projectReadOnly){
         return false;
     }

+ 22 - 0
web/building_saas/pm/js/pm_gc.js

@@ -343,6 +343,28 @@ const gcTreeObj = {
                 hitinfo.sheet.repaint();
             }
         };
+        TreeNodeCellType.prototype.processMouseEnter = function (hitinfo) {
+            let text = hitinfo.sheet.getText(hitinfo.row, hitinfo.col);
+            let value = hitinfo.sheet.getValue(hitinfo.row, hitinfo.col);
+            let tag = hitinfo.sheet.getTag(hitinfo.row, hitinfo.col);
+            let acStyle = hitinfo.sheet.getActualStyle(hitinfo.row, hitinfo.col),
+                zoom = hitinfo.sheet.zoom();
+            let node = tree.items[hitinfo.row];
+            let nodeIndent = node ? (node.depth() + 1) * indent +  node.depth() * levelIndent + imgWidth + 3 : 0;
+            let textLength = this.getAutoFitWidth(value, text, acStyle, zoom, {sheet: hitinfo.sheet, row: hitinfo.row, col: hitinfo.col, sheetArea: GC.Spread.Sheets.SheetArea.viewport});
+            let cellWidth = hitinfo.sheet.getCell(-1, hitinfo.col).width();
+            if(textLength > cellWidth - nodeIndent){
+                TREE_SHEET_HELPER.showTipsDiv(text,{pos: {}},hitinfo);
+            }
+        };
+        TreeNodeCellType.prototype.processMouseLeave = function (hitinfo) {
+            TREE_SHEET_HELPER.tipDiv = 'hide';
+            if (TREE_SHEET_HELPER._toolTipElement) {
+                $(TREE_SHEET_HELPER._toolTipElement).hide();
+                TREE_SHEET_HELPER._toolTipElement = null;
+            };
+            TREE_SHEET_HELPER.tipDivCheck();//延时检查:当tips正在show的时候,就调用了hide方法,会导致tips一直存在,所以设置一个超时处理
+        }
         return new TreeNodeCellType();
     },
     getBaseCell: function () {

+ 25 - 0
web/building_saas/pm/js/pm_newMain.js

@@ -5,6 +5,7 @@
  * @date 2017/8/22
  * @version
  */
+//todo: 全部、分享、回收站树统一
 let Tree = null;//
 let movetoZTree = null;
 let copytoZTree = null;
@@ -623,6 +624,7 @@ const projTreeObj = {
         }
     },
     getTreeNodeCell: function (tree) {
+        let me = projTreeObj;
         let indent = 20;
         let levelIndent = -5;
         let halfBoxLength = 5;
@@ -853,6 +855,29 @@ const projTreeObj = {
             }
             return false;
         };
+        TreeNodeCellType.prototype.processMouseEnter = function (hitinfo) {
+            let text = hitinfo.sheet.getText(hitinfo.row, hitinfo.col);
+            let value = hitinfo.sheet.getValue(hitinfo.row, hitinfo.col);
+            let tag = hitinfo.sheet.getTag(hitinfo.row, hitinfo.col);
+            let acStyle = hitinfo.sheet.getActualStyle(hitinfo.row, hitinfo.col),
+                zoom = hitinfo.sheet.zoom();
+            let node = me.tree.items[hitinfo.row];
+            let nodeIndent = node ? (node.depth() + 1) * indent +  node.depth() * levelIndent + imgWidth + 3 : 0;
+            let textLength = this.getAutoFitWidth(value, text, acStyle, zoom, {sheet: hitinfo.sheet, row: hitinfo.row, col: hitinfo.col, sheetArea: GC.Spread.Sheets.SheetArea.viewport});
+            let cellWidth = hitinfo.sheet.getCell(-1, hitinfo.col).width();
+            if(textLength > cellWidth - nodeIndent){
+                TREE_SHEET_HELPER.showTipsDiv(text,{pos: {}},hitinfo);
+            }
+        };
+        TreeNodeCellType.prototype.processMouseLeave = function (hitinfo) {
+            let me = this;
+            TREE_SHEET_HELPER.tipDiv = 'hide';
+            if (TREE_SHEET_HELPER._toolTipElement) {
+                $(TREE_SHEET_HELPER._toolTipElement).hide();
+                TREE_SHEET_HELPER._toolTipElement = null;
+            };
+            TREE_SHEET_HELPER.tipDivCheck();//延时检查:当tips正在show的时候,就调用了hide方法,会导致tips一直存在,所以设置一个超时处理
+        }
         return new TreeNodeCellType();
     },
     setCellValue: function (cell, node,sheet) {

+ 22 - 0
web/building_saas/pm/js/pm_share.js

@@ -349,6 +349,28 @@ const pmShare = (function () {
             }
             return false;
         };
+        TreeNodeCellType.prototype.processMouseEnter = function (hitinfo) {
+            let text = hitinfo.sheet.getText(hitinfo.row, hitinfo.col);
+            let value = hitinfo.sheet.getValue(hitinfo.row, hitinfo.col);
+            let tag = hitinfo.sheet.getTag(hitinfo.row, hitinfo.col);
+            let acStyle = hitinfo.sheet.getActualStyle(hitinfo.row, hitinfo.col),
+                zoom = hitinfo.sheet.zoom();
+            let node = tree.items[hitinfo.row];
+            let nodeIndent = node ? (node.depth() + 1) * indent +  node.depth() * levelIndent + imgWidth + 3 : 0;
+            let textLength = this.getAutoFitWidth(value, text, acStyle, zoom, {sheet: hitinfo.sheet, row: hitinfo.row, col: hitinfo.col, sheetArea: GC.Spread.Sheets.SheetArea.viewport});
+            let cellWidth = hitinfo.sheet.getCell(-1, hitinfo.col).width();
+            if(textLength > cellWidth - nodeIndent){
+                TREE_SHEET_HELPER.showTipsDiv(text,{pos: {}},hitinfo);
+            }
+        };
+        TreeNodeCellType.prototype.processMouseLeave = function (hitinfo) {
+            TREE_SHEET_HELPER.tipDiv = 'hide';
+            if (TREE_SHEET_HELPER._toolTipElement) {
+                $(TREE_SHEET_HELPER._toolTipElement).hide();
+                TREE_SHEET_HELPER._toolTipElement = null;
+            };
+            TREE_SHEET_HELPER.tipDivCheck();//延时检查:当tips正在show的时候,就调用了hide方法,会导致tips一直存在,所以设置一个超时处理
+        }
         return new TreeNodeCellType();
     }
     //