TonyKang 4 år sedan
förälder
incheckning
4fe84b8dc9

+ 1 - 1
app/controller/report_controller.js

@@ -77,7 +77,7 @@ module.exports = app => {
                     pageShow = {};
                 }
                 // console.log(pageShow);
-                pageShow.showArchive = 1;
+                pageShow.showArchive = 0;
                 const tender = ctx.tender;
                 const stage = ctx.stage;
                 let stage_id = -1;

+ 7 - 5
app/public/report/js/rpt_main.js

@@ -215,11 +215,13 @@ let zTreeOprObj = {
         let me = this;
         const _set_archive_icon = function (tplNode) {
             let hasArchive = false;
-            for (let aItem of ARCHIVE_LIST) {
-                if (parseInt(aItem.rpt_id) === parseInt(tplNode.refId)) {
-                    hasArchive = true;
-                    tplNode.icon = "/public/css/ztree/img/diy/10.png";
-                    break;
+            if (PAGE_SHOW['showArchive']) {
+                for (let aItem of ARCHIVE_LIST) {
+                    if (parseInt(aItem.rpt_id) === parseInt(tplNode.refId)) {
+                        hasArchive = true;
+                        tplNode.icon = "/public/css/ztree/img/diy/10.png";
+                        break;
+                    }
                 }
             }
             if (!hasArchive) {

+ 1 - 1
app/view/report/index.ejs

@@ -65,7 +65,7 @@
                                     导出报表
                                 </div>
                             </div>
-                            <div class="panel" style="display:none" <% if (pageShow === null || parseInt(pageShow.showArchive) === 0 || isNaN(parseInt(pageShow.showArchive))) { %> style="display:none" <% } %>>
+                            <div class="panel" <% if (pageShow === null || parseInt(pageShow.showArchive) === 0 || isNaN(parseInt(pageShow.showArchive))) { %> style="display:none" <% } %>>
                                 <div class="panel-body">
                                     <div class="btn-group" role="group">
                                         <button id="btnArchiveRpt" type="button" class="btn btn-outline-primary btn-sm" data-toggle="modal" data-target="#guidang" disabled><i class="fa fa-archive"></i> 归档报表</button>