zhongzewei преди 7 години
родител
ревизия
191f7f5159

+ 8 - 0
web/building_saas/complementary_ration_lib/html/anzhuang.html

@@ -13,6 +13,14 @@
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
     <link rel="stylesheet" href="/lib/jquery-contextmenu/jquery.contextMenu.css">
     <!--endinject-->
+    <style type="text/css">
+        .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active{
+            border: 2px solid #ff6501;
+            color: #495057;
+            background-color: #fff;
+            border-bottom: 1px solid #fff;
+        }
+    </style>
 </head>
 
 <body>

+ 8 - 0
web/building_saas/complementary_ration_lib/html/dinge.html

@@ -13,6 +13,14 @@
     <link rel="stylesheet" href="/lib/jquery-contextmenu/jquery.contextMenu.css" type="text/css">
     <link rel="stylesheet" href="/lib/spreadjs/sheets/css/gc.spread.sheets.sc.css" type="text/css">
     <!--endinject-->
+    <style type="text/css">
+        .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active{
+            border: 2px solid #ff6501;
+            color: #495057;
+            background-color: #fff;
+            border-bottom: 1px solid #fff;
+        }
+    </style>
 </head>
 <body>
 <div class="header">

+ 8 - 0
web/building_saas/complementary_ration_lib/html/fuzhu.html

@@ -12,6 +12,14 @@
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
     <link rel="stylesheet" href="/lib/spreadjs/sheets/css/gc.spread.sheets.sc.css" type="text/css">
     <!--endinject-->
+    <style type="text/css">
+        .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active{
+            border: 2px solid #ff6501;
+            color: #495057;
+            background-color: #fff;
+            border-bottom: 1px solid #fff;
+        }
+    </style>
 </head>
 
 <body>

+ 6 - 0
web/building_saas/complementary_ration_lib/html/gongliao.html

@@ -16,6 +16,12 @@
     <!--endinject-->
     <style type="text/css">
         .ztree li span.button.add{margin-right:2px;background-position:-144px 0;vertical-align:top;*vertical-align:middle}
+        .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active{
+            border: 2px solid #ff6501;
+            color: #495057;
+            background-color: #fff;
+            border-bottom: 1px solid #fff;
+        }
     </style>
 </head>
 

+ 16 - 11
web/building_saas/complementary_ration_lib/js/coe.js

@@ -20,17 +20,22 @@ var pageObj = {
             $(this).attr('href', "/complementaryRation/installation" + "?repository=" + getQueryString("repository"))
         });
         var libID = getQueryString("repository");
-        var libName = storageUtil.getSessionCache("RationGrp","repositoryID_" + libID);
-        if (libName) {
-            let $rationName = $(`<div id='rationname' class='navbar-text'>${libName}</div>`);
-            $('.header-logo').after($rationName);
-        };
-        this.gljLibID = storageUtil.getSessionCache("gljLib", "repositoryID_" + libID);
-        this.libID = libID;
-        coeOprObj.buildSheet($('#mainSpread')[0]);
-        gljAdjOprObj.buildSheet($('#contentSpread')[0]);
-        coeOprObj.getCoeList();
-        gljAdjOprObj.getGljItemsOcc();
+        let me = this;
+        CommonAjax.post('/complementaryRation/api/getRationLibs', {ids: [libID]}, function (rstData) {
+            if(rstData.length > 0){
+                let libName = rstData[0].dispName;
+                if (libName) {
+                    let $rationName = $(`<div id='rationname' class='navbar-text'>${libName}</div>`);
+                    $('.header-logo').after($rationName);
+                };
+                me.gljLibID = rstData[0].gljLib;
+                me.libID = libID;
+                coeOprObj.buildSheet($('#mainSpread')[0]);
+                gljAdjOprObj.buildSheet($('#contentSpread')[0]);
+                coeOprObj.getCoeList();
+                gljAdjOprObj.getGljItemsOcc();
+            }
+        });
 
     },
     showData: function(sheet, setting, data) {

+ 19 - 15
web/building_saas/complementary_ration_lib/js/installation.js

@@ -56,22 +56,26 @@ let feeItemObj = {
             this.setOptions(this.workBook, this.setting.options);
             this.bindEvents(this.sheet);
             this.rationRepId = parseInt(getQueryString("repository"));
-            let libName = storageUtil.getSessionCache("RationGrp","repositoryID_" + this.rationRepId);
-            if (libName) {
-                let $rationName = $(`<div id='rationname' class='navbar-text'>${libName}</div>`);
-                $('.header-logo').after($rationName);
-            }
-            //init sectionSpread
-            se.buildSheet();
-            //init feeRuleSpread
-            fr.buildSheet();
-            //init installation
-            this.getInstallation(this.rationRepId, function (rstData) {
-                me.cache = rstData;
-                sheetCommonObj.showData(me.sheet, me.setting, me.cache);
-                me.initSelection(me.cache[0]);
+            CommonAjax.post('/complementaryRation/api/getRationLibs', {ids: [this.rationRepId]}, function (rstData) {
+                if(rstData.length > 0){
+                    let libName = rstData[0].dispName;
+                    if (libName) {
+                        let $rationName = $(`<div id='rationname' class='navbar-text'>${libName}</div>`);
+                        $('.header-logo').after($rationName);
+                    }
+                    //init sectionSpread
+                    se.buildSheet();
+                    //init feeRuleSpread
+                    fr.buildSheet();
+                    //init installation
+                    me.getInstallation(me.rationRepId, function (rstData) {
+                        me.cache = rstData;
+                        sheetCommonObj.showData(me.sheet, me.setting, me.cache);
+                        me.initSelection(me.cache[0]);
+                    });
+                    //init batchSectionSpread
+                }
             });
-            //init batchSectionSpread
         }
     },
     bindEvents: function (sheet) {

+ 0 - 2
web/building_saas/complementary_ration_lib/js/main.js

@@ -7,9 +7,7 @@ let compleRationMain = {
         let scFunc = function (rstData) {
             $("#comple_ration_table").empty();
             for(let i = 0; i < rstData.length; i++){
-                storageUtil.setSessionCache("RationGrp","repositoryID_" + rstData[i].ID, rstData[i].dispName);
                 if(rstData[i].gljLib !== undefined && rstData[i].gljLib && rstData[i].gljLib != -1){
-                    storageUtil.setSessionCache("gljLib","repositoryID_" + rstData[i].ID, rstData[i].gljLib);
                     let id = rstData[i].ID;
                     let libName = rstData[i].dispName;
                     $("#comple_ration_table").append(

+ 22 - 20
web/building_saas/complementary_ration_lib/js/repository_glj.js

@@ -18,27 +18,29 @@ var pageOprObj = {
     rationLibName : null,
     rationLibId: null,
     initPage : function(container) {
-        var me = this, rationLibId = getQueryString("repository"),//获取定额库参数
-            rationLibName = storageUtil.getSessionCache("RationGrp","repositoryID_" + rationLibId);
+        var me = this, rationLibId = getQueryString("repository");//获取定额库参数
         me.rationLibId = rationLibId;
-        if (rationLibName) {
-            me.rationLibName = rationLibName;
-            let $rationName = $(`<div id='rationname' class='navbar-text'>${me.rationLibName}</div>`);
-            $('.header-logo').after($rationName);
-            repositoryGljObj.buildSheet(container);
-            //repositoryGljObj.getRationGljIds(rationLibId);
-            repositoryGljObj.getGljDistType(function () {
-                repositoryGljObj.currentRepositoryId = parseInt(rationLibId);
-                //引用的工料机库
-                let gljLibID = storageUtil.getSessionCache("gljLib", "repositoryID_" + rationLibId);
-                if(gljLibID && typeof gljLibID !== 'undefined'){
-                    repositoryGljObj.getGljTree(gljLibID, function () {
-                        repositoryGljObj.getGljItems(gljLibID);
-                    });
-                }
-                sheetCommonObj.shieldAllCells(repositoryGljObj.workBook.getSheet(0), repositoryGljObj.setting);
-            });
-        }
+        //getRationLibName
+        CommonAjax.post('/complementaryRation/api/getRationLibs', {ids: [rationLibId]}, function (rstData) {
+            if(rstData.length > 0){
+                me.rationLibName = rstData[0].dispName;
+                let $rationName = $(`<div id='rationname' class='navbar-text'>${me.rationLibName}</div>`);
+                $('.header-logo').after($rationName);
+                repositoryGljObj.buildSheet(container);
+                repositoryGljObj.getGljDistType(function () {
+                    repositoryGljObj.currentRepositoryId = parseInt(rationLibId);
+                    //引用的工料机库
+                    let gljLibID = rstData[0].gljLib;
+                    if(gljLibID && typeof gljLibID !== 'undefined'){
+                        repositoryGljObj.getGljTree(gljLibID, function () {
+                            repositoryGljObj.getGljItems(gljLibID);
+                        });
+                    }
+                    sheetCommonObj.shieldAllCells(repositoryGljObj.workBook.getSheet(0), repositoryGljObj.setting);
+                });
+            }
+        });
+
     }
 }
 repositoryGljObj = {

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

@@ -13,6 +13,7 @@ function autoFlashHeight(){
     //$(".main-data-side-d").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightD-302);
     $(".main-data-side-d").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightD-$('#stdSectionRations').height()-5);
     $('.main-content').width($(window).width()-$('.main-nav').width()-$('.main-side').width()-5);
+    $('#glj_tree_div .modal-content').width($(window).width() < 1020 + 20 ? $(window).width() - 20 : 1020);
     //$("#main .main-data-top").height($(window).height()-headerHeight-toolsbarHeight-bottomContentHeight-1);
     $("#billsSpread").height($(window).height()-headerHeight-toolsbarHeight-mainBottomContentHeight-1);
     $("#project_glj_sheet").height($(window).height()-headerHeight-toolsbarHeight-gljBottomContentHeight-25);

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

@@ -634,7 +634,7 @@
     <!--工料机选择窗口-->
     <div class="modal fade" id="glj_tree_div" data-backdrop="static">
         <div class="modal-dialog modal-lg" role="document" id="modalCon">
-            <div class="modal-content" style="width: 1020px;">
+            <div class="modal-content" style="width: 1020px; left:50%; transform: translate(-50%,0%);">
                 <div class="modal-header">
                     <h5 class="modal-title">请选择工料机</h5>
                     <button type="button" class="close" data-dismiss="modal" aria-label="Close">

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

@@ -347,6 +347,9 @@ function getGLJData(actionType) {
         $.bootstrapLoading.end();
         console.log(+new Date());
         $("#glj_tree_div").modal({show:true});
+        setTimeout(function(){
+            gljOprObj.gljLibSpresd.refresh();
+        }, 200);
     })
 }
 

+ 11 - 7
web/building_saas/main/js/views/project_view.js

@@ -21,6 +21,7 @@ var projectObj = {
     },
     treeSelectedChanged: function (node) {
         let project = projectObj.project;
+        let mainSheet = projectObj.mainController.sheet;
         //设置选中行底色和恢复前选中行底色
         let refreshNodes = [node];
         if(!project.mainTree.preSelected){
@@ -478,16 +479,21 @@ var projectObj = {
     mainSpreadLeaveCell: function (sender, info) {
         let colSetting = projectObj.mainController.setting.cols[info.col];
         projectObj.lastCol = colSetting;
+        projectObj.lastCell = {row: info.row, col: info.col};
     },
     //repaint 动态下拉框
     mainSpreadEnterCell: function (sender, info) {
         let colSetting = projectObj.mainController.setting.cols[info.col];
         if(colSetting.data.field === 'unit' || (projectObj.lastCol&&projectObj.lastCol.data.field === 'unit')||colSetting.data.field ==='subType'
             || (projectObj.lastCol&&projectObj.lastCol.data.field === 'subType') || colSetting.data.field === 'programID' ||(projectObj.lastCol&&projectObj.lastCol.data.field === 'programID')){
-            /*let hideRowFilter =new GC.Spread.Sheets.Filter.HideRowFilter(info.sheet.getRange(-1, info.col, -1, 1));
-            info.sheet.rowFilter(hideRowFilter);
-            info.sheet.resumePaint();*/
-            info.sheet.repaint();
+            let rects = [];
+            rects.push(info.sheet.getCellRect(info.row, info.col));
+            if(projectObj.lastCell){
+                rects.push(info.sheet.getCellRect(projectObj.lastCell.row, projectObj.lastCell.col));
+            }
+            for(let rect of rects){
+                info.sheet.repaint(rect);
+            }
         }
     },
     mainSpreadEditStarting: function (sender, info) {
@@ -672,7 +678,6 @@ var projectObj = {
                 console.log(`时间——${endTime - startTime}`);
                 that.project.projectMarkChecking();//是否需要重新进行造价计算
                 installationFeeObj.engineeringTypeChecking();//检查是否安装工程
-                //初始需要触发一次点击表格事件,sheet.getAutoFitWidth值(获取单元格文本长度)才正确
                 autoFlashHeight();
                 projectObj.refreshMainSpread();
                 $.bootstrapLoading.end();
@@ -1246,13 +1251,12 @@ var projectObj = {
         TREE_SHEET_HELPER.massOperationSheet(sheet, function () {
             for(let node of nodes){
                 if(node && node.serialNo()!= -1){
-                    //console.log(me.getNodeColorStyle(sheet, node).backColor);
                     sheet.getRange(node.serialNo(), -1, 1, -1).backColor(me.getNodeColorStyle(sheet, node).backColor);
                     //sheet.setStyle(node.serialNo(), -1, me.getNodeColorStyle(sheet, node));
                 }
             }
         });
-     
+
     },
     loadLockBillsButton:function () {
         if(projectInfoObj.projectInfo.property.lockBills == true){