zhongzewei 6 anos atrás
pai
commit
f9b2579398

+ 21 - 7
public/web/sheet/sheet_data_helper.js

@@ -146,9 +146,6 @@ var SheetDataHelper = {
         TipCellType.prototype.processMouseEnter = function (hitinfo) {
             let text = hitinfo.sheet.getText(hitinfo.row, hitinfo.col);
             let tag = hitinfo.sheet.getTag(hitinfo.row, hitinfo.col);
-       /*     let hintHeight = datas[hitinfo.row] ?
-                                datas[hitinfo.row].hintHeight ? datas[hitinfo.row].hintHeight : null
-                            : null; //定额库定额悬浮提示位置相关*/
             if(tag !== undefined && tag){
                 text = tag;
             }
@@ -201,14 +198,31 @@ var SheetDataHelper = {
                             divWidth = 590;
                            $(this._toolTipElement).width(divWidth);
                         }
-                        let top = setting.pos.y  + hitinfo.y - divHeight < 0 ? 0 : setting.pos.y  + hitinfo.y - divHeight;
-                        $(this._toolTipElement).css("top", top).css("left", setting.pos.x - divWidth);
+                        let top = setting.pos.y  + hitinfo.y - divHeight < 0 ? 0 :  setting.pos.y + hitinfo.cellRect.y - divHeight;
+                        if(hitinfo.col === 0){
+                            $(this._toolTipElement).css("top", top).css("left", setting.pos.x + hitinfo.cellRect.x - divWidth - 10);
+                        } else{
+                            $(this._toolTipElement).css("top", setting.pos.y + hitinfo.cellRect.y - divHeight - 10).css("left", setting.pos.x + hitinfo.cellRect.x - divWidth);
+                        }
                     }
                     else{
                         $(this._toolTipElement).css("top", setting.pos.y + hitinfo.y +15).css("left", setting.pos.x + hitinfo.x + 15);
                     }
-                    $(this._toolTipElement).show("fast");
-                    TREE_SHEET_HELPER.tipDiv = 'show';//做个标记
+                    if($(hitinfo.sheet.getParent().qo).attr('id') === 'stdSectionRations' &&
+                        hitinfo.col === 1){
+                        let value = hitinfo.sheet.getValue(hitinfo.row, hitinfo.col);
+                        let acStyle = hitinfo.sheet.getActualStyle(hitinfo.row, hitinfo.col),
+                            zoom = hitinfo.sheet.zoom();
+                        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){
+                            $(this._toolTipElement).show("fast");
+                            TREE_SHEET_HELPER.tipDiv = 'show';//做个标记
+                        }
+                    } else {
+                        $(this._toolTipElement).show("fast");
+                        TREE_SHEET_HELPER.tipDiv = 'show';//做个标记
+                    }
                 }
             }
         };

+ 3 - 0
web/building_saas/css/main.css

@@ -411,6 +411,9 @@ a{
     padding: 0;
     height:26px;
 }
+.custom-file-input {
+    cursor: pointer;
+}
 .custom-file-input:lang(zh) ~ .custom-file-label::after {
     content: "浏览";
 }

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

@@ -2161,8 +2161,22 @@ $('#recColSetting').click(function () {
 $('#property_default').click(function () {
     let project = projectObj.project,
         projectID = project.ID();
-    //todo 清除窗口拖动比例缓存
-
+    //清单精灵/指引窗口比例
+    removeLocalCache('farwidth:stdBillsGuidanceTab');
+    removeLocalCache('nearwidth:stdBillsGuidanceTab');
+    removeLocalCache('farheight:#zy');
+    removeLocalCache('nearheight:#zy');
+    //定额库窗口比例
+    removeLocalCache('farwidth:stdRationTab');
+    removeLocalCache('nearwidth:stdRationTab');
+    removeLocalCache('farheight:#de');
+    removeLocalCache('nearheight:#de');
+    //主界面窗口比例
+    removeLocalCache('farheight:#main');
+    removeLocalCache('nearheight:#main');
+    //人材机汇总窗口比例
+    removeLocalCache('farheight:#project-glj-main');
+    removeLocalCache('nearheight:#project-glj-main');
     CommonAjax.post('/pm/api/defaultSettings', {user_id: userID, projectID: projectID}, function (rstData) {
         window.location.href = `/main?project=${projectID}`;
     });

+ 6 - 44
web/building_saas/main/js/views/std_billsGuidance_lib.js

@@ -111,49 +111,7 @@ const billsGuidance = (function () {
                     return;
                 }
                 if(node.children.length === 0){
-                    //插入清单
-                    if (/\//.test(node.data.unit)) {
-                        let canAdd = true;
-                        $.bootstrapLoading.start();
-                        let existB = projectObj.project.Bills.sameStdCodeBillsData(node.data.code);
-                        if (existB) {
-                            let std = JSON.parse(JSON.stringify(node.data));
-                            std.unit = existB.unit;
-                            canAdd = ProjectController.addBills(projectObj.project, projectObj.mainController, std);
-                            if(canAdd !== null || canAdd !== false){
-                                //插入选中的定额
-                                let addRationDatas = currentLib.type && currentLib.type === libType.elf ? getInsertElfRationData() : getInsertRationData(getCheckedRows());
-                                insertRations(addRationDatas);
-                            }
-                            if(canAdd === false && $.bootstrapLoading.isLoading()){
-                                $.bootstrapLoading.end();
-                            }
-                        } else {
-                            ConfirmModal.stdBillsUnit.check(node.data, function (std) {
-                                canAdd = ProjectController.addBills(projectObj.project, projectObj.mainController, std);
-                               /* if(canAdd !== null || canAdd !== false){
-                                    //插入选中的定额
-                                    let addRationDatas = currentLib.type && currentLib.type === libType.elf ? getInsertElfRationData() : getInsertRationData(getCheckedRows());
-                                    insertRations(addRationDatas);
-                                }*/
-                                if(canAdd === false && $.bootstrapLoading.isLoading()){
-                                    $.bootstrapLoading.end();
-                                }
-                            }, function () {
-                                if($.bootstrapLoading.isLoading()){
-                                    $.bootstrapLoading.end();
-                                }
-                            });
-                        }
-                    }
-                    else {
-                        let insert = billsLibObj.insertBills(stdBillsJobData, stdBillsFeatureData, node);
-                        /*if(insert){
-                            //插入选中的定额
-                            let addRationDatas = currentLib.type && currentLib.type === libType.elf ? getInsertElfRationData() : getInsertRationData(getCheckedRows());
-                            insertRations(addRationDatas);
-                        }*/
-                    }
+                    billsLibObj.insertBills(stdBillsJobData, stdBillsFeatureData, node);
                 }
                 else {
                     node.setExpanded(!node.expanded);
@@ -379,7 +337,11 @@ const billsGuidance = (function () {
     function buildHeader(sheet, headers) {
         let fuc = function () {
             sheet.setColumnCount(headers.length);
-            sheet.setRowHeight(0, 40, GC.Spread.Sheets.SheetArea.colHeader);
+            sheet.setRowHeight(0, 30, GC.Spread.Sheets.SheetArea.colHeader);
+            sheet.setColumnWidth(0, sheet.getParent() === bills.workBook ? 15 : 25, GC.Spread.Sheets.SheetArea.rowHeader);
+            if(sheet.getParent() === elfItem.workBook || sheet.getParent() === guideItem.workBook){
+                sheet.setRowHeight(0, 25, GC.Spread.Sheets.SheetArea.colHeader);
+            }
             for(let i = 0, len = headers.length; i < len; i++){
                 sheet.setValue(0, i, headers[i].name, GC.Spread.Sheets.SheetArea.colHeader);
                 sheet.setColumnWidth(i, headers[i].width, GC.Spread.Sheets.SheetArea.colHeader);

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

@@ -314,6 +314,7 @@ var rationLibObj = {
         }, {
             "width":220,
             "readOnly": true,
+            "showHint": true,
             "head":{
                 "titleNames":["名称"],
                 "spanCols":[1],