Browse Source

调整‘支付审批报表’目录显示

Tony Kang 2 years ago
parent
commit
044b2d030e
1 changed files with 8 additions and 0 deletions
  1. 8 0
      app/controller/report_controller.js

+ 8 - 0
app/controller/report_controller.js

@@ -90,6 +90,14 @@ module.exports = app => {
                 let stage_times = -1;
                 let stage_status = -1;
                 const treeNodes = await ctx.service.rptTreeNode.getNodesByProjectId([-1, tender.data.project_id]);
+                const filterNames = ['01.支付审批报表'];
+                if (treeNodes && treeNodes.length > 0) {
+                    for (let tIdx = treeNodes.length - 1; tIdx >= 0; tIdx--) {
+                        if (filterNames.includes(treeNodes[tIdx].name)) {
+                            treeNodes.splice(tIdx, 1);
+                        }
+                    }
+                }
                 const custTreeNodes = await ctx.service.rptTreeNodeCust.getCustFoldersByUserId(this.ctx.session.sessionUser.accountId);
                 const custCfg = await ctx.service.rptCustomizeCfg.getCustomizeCfgByUserId('Administrator');
                 const stageList = await ctx.service.stage.getValidStagesShort(tender.id);