Przeglądaj źródła

feat: TASK #5580 + code sync

Tony Kang 1 dzień temu
rodzic
commit
c5262fe3d2

+ 159 - 5
app/controller/report_controller.js

@@ -4,6 +4,7 @@
  * Created by Tony on 2019/7/5.
  * Created by Tony on 2019/7/5.
  */
  */
 
 
+const audit = require('../const/audit');
 const tenderMenu = require('../../config/menu').tenderMenu;
 const tenderMenu = require('../../config/menu').tenderMenu;
 const measureType = require('../const/tender').measureType;
 const measureType = require('../const/tender').measureType;
 const auditConst = require('../const/audit');
 const auditConst = require('../const/audit');
@@ -1411,21 +1412,174 @@ module.exports = app => {
             await this._indexForContract(ctx, sourceTypeConst.sourceType.contract, -600, preUrl, thisUrl);
             await this._indexForContract(ctx, sourceTypeConst.sourceType.contract, -600, preUrl, thisUrl);
         }
         }
 
 
-        async indexForCostManager(ctx) {
+        async getTypeStages(ctx, stage_type, sort = 'DESC') {
+            const stages = await this.ctx.service.costStage.getAllStages(ctx.tender.id, stage_type, sort);
+            for (const s of stages) {
+                if (s.audit_status !== audit.common.status.checked) {
+                    await this.ctx.service.costStage.loadUser(s);
+                    s.is_join = s.userIds.indexOf(this.ctx.session.sessionUser.accountId) >= 0;
+                    // 实时计算 // 暂不开放
+                    // await this.ctx.service.costStage.calcRealtime(s);
+                } else {
+                    const auditors = await this.ctx.service.costStageAudit.getAuditors(s.id, s.audit_times);
+                    s.is_join = auditors.findIndex(a => { return a.audit_id === this.ctx.session.sessionUser.accountId; }) >= 0;
+                }
+                s.can_del = (s.create_user_id === ctx.session.sessionUser.accountId || ctx.session.sessionUser.is_admin)
+                    && (s.audit_status === audit.common.status.uncheck || s.audit_status === audit.common.status.checkNo);
+            }
+            if (this.ctx.session.sessionUser.is_admin || this.ctx.permission.cost.visitor || this.ctx.permission.cost[stage_type + '_add']) return stages;
+            return stages.filter(s => { return s.is_join; });
+        }
+
+        async indexForCostManager(ctx, source_type, show_stage_id) {
             // 成本管理报表入口
             // 成本管理报表入口
             try {
             try {
-                const ledge_stage_type = this.ctx.service.costStage.stageType.ledger.key;
+                // const ledge_stage_type = this.ctx.service.costStage.stageType.ledger.key;
+                // const ledge_stages = await this.getTypeStages(ctx, ledge_stage_type);
+                // const book_stage_type = this.ctx.service.costStage.stageType.book.key;
+                // const book_stages = await this.getTypeStages(ctx, book_stage_type);
                 const analysis_stage_type = this.ctx.service.costStage.stageType.analysis.key;
                 const analysis_stage_type = this.ctx.service.costStage.stageType.analysis.key;
-                const book_stage_type = this.ctx.service.costStage.stageType.book.key;
-                const ledge_stages = await this.getTypeStages(ctx, ledge_stage_type);
                 const analysis_stages = await this.getTypeStages(ctx, analysis_stage_type);
                 const analysis_stages = await this.getTypeStages(ctx, analysis_stage_type);
-                const book_stages = await this.getTypeStages(ctx, book_stage_type);
                 // await this._getCostManagerViewData(ctx);
                 // await this._getCostManagerViewData(ctx);
+                // 普通报表界面需要的信息
+                const pageShow = ctx.session.sessionProject.page_show;
+                pageShow.closeWatermark = 1;
+                pageShow.showArchive = 1;
+                pageShow.closeShowAllCustomized = 0;
+                // const tenderId = ctx.params.tid || -1; // 标段级别有
+                const tenderId = ctx.params.tid || -1;
+                const bglObj = {};
+                // const bglObj = { status: stage_status };
+                bglObj.BUSINESS_ID = ctx.params.id;
+                // cost_stage_id: uuid
+                const stage = analysis_stages[0]; // 默认取最新的cost- analysis stage
+                const stage_order = stage.stage_order;
+                const sorder = -1;
+                const stage_times = stage.audit_times;
+                // const stage_status = -1;
+                const stage_status = stage.audit_status;
+                const project_id = ctx.subProject.id;
+                // const { treeNodes, custCfg, commonArrs } = await this._createNodes(ctx, sourceTypeConst.sourceType.contract, project_id);
+                const { treeNodes, custCfg, commonArrs, allTreeItems, allIndivTreeItems } = await this._createNodes(ctx, source_type, project_id);
+                // const custTreeFolders = await this._getCustFolder(ctx, this.ctx.session.sessionUser.accountId, tenderId);
+                const custTreeFolders = [];
+                const rpt_tpl_items = { customize: [], common: [] };
+                if (custTreeFolders.length > 0) {
+                    const cust_select_item = JSON.parse(custTreeFolders[0].rpt_tpl_items);
+                    if (cust_select_item.common) rpt_tpl_items.common = cust_select_item.common;
+                    if (cust_select_item.customize) rpt_tpl_items.customize = cust_select_item.customize;
+                }
+                const unitList = await ctx.service.constructionUnit.getAllDataByCondition({ where: { pid: project_id } }); // 找公司章用的
+                const cust_select_keys = JSON.stringify(['common', 'customize']);
+                const roleList = await ctx.service.signatureRole.getSignatureRolesByTenderId(tenderId);
+                const usedList = await ctx.service.signatureUsed.getSignatureUsedByTenderId(tenderId);
+                const prjAccList = await this._getPrjAccList(ctx, pageShow);
+                this._resetAccCompanySignPath(ctx, prjAccList);
+
+                // 分类列表
+                const categoryData = await this.ctx.service.category.getAllCategory(ctx.subProject);
+                // 获取用户权限
+                const accountInfo = await this.ctx.service.projectAccount.getDataById(this.ctx.session.sessionUser.accountId);
+                const userPermission = accountInfo !== undefined && accountInfo.permission !== '' ? JSON.parse(accountInfo.permission) : null;
+                // 获取用户可查看的标段
+                const tenderList = await this.ctx.service.tender.getList('', userPermission);
+                for (const t of tenderList) {
+                    if (t.ledger_status === auditConst.ledger.status.checked) {
+                        t.lastStage = await this.ctx.service.stage.getLastestStage(t.id, true);
+                    }
+                }
+                const { accountList, newAccountGroup, advance } = await this._getInvolveAcc(ctx, tenderId);
+
+                const cid = this.ctx.helper._.map(treeNodes, 'id');
+                const customSelects = {};
+                customSelects.audit_select = [];
+                customSelects.gather_select = await ctx.service.rptCustomDefine.getCustomSelectByRpt(cid,
+                    reportConst.rptCustomType[JV.NODE_CUS_GATHER_SELECT], tenderId, -1);
+                customSelects.stage_select = await ctx.service.rptCustomDefine.getCustomSelectByRpt(cid,
+                    reportConst.rptCustomType[JV.NODE_CUS_STAGE_SELECT], tenderId, -1);
+                customSelects.change_select = await ctx.service.rptCustomDefine.getCustomSelectByRpt(cid,
+                    reportConst.rptCustomType[JV.NODE_CUS_CHANGE_SELECT], tenderId, -1);
+                customSelects.material_sum_select = await ctx.service.rptCustomDefine.getCustomSelectByRpt(cid,
+                    reportConst.rptCustomType[JV.NODE_CUS_MATERIAL_SUM_SELECT], tenderId, -1);
+
+
+                const renderData = {
+                    accountGroup: newAccountGroup,
+                    accountList,
+                    unitList: JSON.stringify(unitList),
+                    tender: null,
+                    tenderInfo: null,
+                    rpt_tpl_data: JSON.stringify(treeNodes),
+                    cust_tpl_data: JSON.stringify(rpt_tpl_items),
+                    all_common_tpl_data: JSON.stringify(allTreeItems),
+                    all_indivi_tpl_data: JSON.stringify(allIndivTreeItems),
+                    cust_select_keys,
+                    cust_cfg: JSON.stringify(custCfg),
+                    project_id,
+                    tender_id: tenderId,
+                    budget_id: -1,
+                    sp_id: -1,
+                    tender_name: '',
+                    detail_id: -1,
+                    stg_id: show_stage_id,
+                    stg_order: stage_order,
+                    cur_order: sorder,
+                    stg_times: stage_times,
+                    stg_status: stage_status,
+                    stage_list: '[]',
+                    prj_account_list: JSON.stringify(prjAccList),
+                    role_list: JSON.stringify(roleList),
+                    used_list: JSON.stringify(usedList),
+                    tenderMenu,
+                    // preUrl,
+                    // thisUrl,
+                    measureType,
+                    categoryData,
+                    tenderList,
+                    auditConst: auditConst.stage,
+                    ledgerAuditConst: auditConst.ledger,
+                    jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.report.main),
+                    customSelects,
+                    rptCustomType: reportConst.rptCustomType,
+                    advanceList: JSON.stringify([]),
+                    advanceAuditList: JSON.stringify([]),
+                    materialAdjList: JSON.stringify([]),
+                    materialAdjAuditList: JSON.stringify([]),
+                    materialList: [],
+                    stages: [],
+                    dataSelects: {},
+                    pageShow,
+                    // authMobile: accountInfo.auth_mobile,
+                    shenpiConst,
+                    archiveList: [],
+                    lastAuditor: null,
+                    rpt_id: ctx.query.rpt_id,
+                    isAdmin: false,
+                    prePay: JSON.stringify(advance),
+                    OSS_PATH: ctx.app.config.fujianOssPath,
+                    viewPmData: PermissionCheck.viewPmData(this.ctx.session.sessionUser.permission),
+                    source_type,
+                    bglObj: JSON.stringify(bglObj),
+                    changes: 'null',
+                    otherChangeList: 'null',
+                    otherHintName: '',
+                    bizId: bglObj.BUSINESS_ID,
+                    permissions: '[]',
+                    types_from: '',
+                    is_setting: false,
+                };
+                await this.layout('report/index.ejs', renderData, 'report/rpt_all_popup.ejs');
             } catch (err) {
             } catch (err) {
+                console.log(err);
+                this.log(err);
                 //
                 //
             }
             }
         }
         }
 
 
+        async indexForCostAnalysis(ctx) {
+            await this.indexForCostManager(ctx, sourceTypeConst.sourceType.cost_analysis, -800);
+        }
+
         /**
         /**
          * 报表打印页面
          * 报表打印页面
          *
          *

+ 1 - 1
app/public/report/js/rpt_public.js

@@ -330,7 +330,7 @@ function restoreSignCells(pageObj, bkSignCells, bkTxtSignCells, bkPicSignCells)
 function filterUnchkTplTreeNode(topNode, srcData) {
 function filterUnchkTplTreeNode(topNode, srcData) {
     const _chkAndSpliceItem = function(pNode, pStr) {
     const _chkAndSpliceItem = function(pNode, pStr) {
         let rst = false;
         let rst = false;
-        if (srcData.indexOf(pStr + pNode.name) < 0) {
+        if (srcData.length > 0 && srcData.indexOf(pStr + pNode.name) < 0) {
             if (pNode.items && pNode.items.length > 0) {
             if (pNode.items && pNode.items.length > 0) {
                 for (let subIdx = pNode.items.length - 1; subIdx >= 0; subIdx--) {
                 for (let subIdx = pNode.items.length - 1; subIdx >= 0; subIdx--) {
                     if (!_chkAndSpliceItem(pNode.items[subIdx], pStr + pNode.name + FOLDER_SEPERATER)) {
                     if (!_chkAndSpliceItem(pNode.items[subIdx], pStr + pNode.name + FOLDER_SEPERATER)) {

+ 1 - 1
app/router.js

@@ -561,7 +561,7 @@ module.exports = app => {
     app.post('/sp/:id/cost/member', sessionAuth, subProjectCheck, projectManagerCheck, 'costController.member');
     app.post('/sp/:id/cost/member', sessionAuth, subProjectCheck, projectManagerCheck, 'costController.member');
     app.post('/sp/:id/cost/memberSave', sessionAuth, subProjectCheck, projectManagerCheck, 'costController.memberSave');
     app.post('/sp/:id/cost/memberSave', sessionAuth, subProjectCheck, projectManagerCheck, 'costController.memberSave');
     app.post('/sp/:id/cost/templateSet', sessionAuth, subProjectCheck, projectManagerCheck, 'subProjController.templateSet');
     app.post('/sp/:id/cost/templateSet', sessionAuth, subProjectCheck, projectManagerCheck, 'subProjController.templateSet');
-    // app.get('/sp/:id/cost/tender/:tid/report', sessionAuth, subProjectCheck, tenderCheck, tenderPermissionCheck, 'reportController.indexForCostManager');
+    app.get('/sp/:id/cost/tender/:tid/report', sessionAuth, subProjectCheck, tenderCheck, tenderPermissionCheck, 'reportController.indexForCostAnalysis');
     app.get('/sp/:id/cost/tender/:tid/ledger', sessionAuth, subProjectCheck, tenderCheck, tenderPermissionCheck, 'costController.ledger');
     app.get('/sp/:id/cost/tender/:tid/ledger', sessionAuth, subProjectCheck, tenderCheck, tenderPermissionCheck, 'costController.ledger');
     app.get('/sp/:id/cost/tender/:tid/book', sessionAuth, subProjectCheck, tenderCheck, tenderPermissionCheck, 'costController.book');
     app.get('/sp/:id/cost/tender/:tid/book', sessionAuth, subProjectCheck, tenderCheck, tenderPermissionCheck, 'costController.book');
     app.get('/sp/:id/cost/tender/:tid/analysis', sessionAuth, subProjectCheck, tenderCheck, tenderPermissionCheck, 'costController.analysis');
     app.get('/sp/:id/cost/tender/:tid/analysis', sessionAuth, subProjectCheck, tenderCheck, tenderPermissionCheck, 'costController.analysis');

+ 1 - 1
app/view/cost/list_menu_list.ejs

@@ -6,7 +6,7 @@
 <nav-menu title="财务账面" url="/sp/<%= ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/book" ml="3" active="<%= (ctx.url.indexOf('book') >= 0 ? 1 : -1) %>"></nav-menu>
 <nav-menu title="财务账面" url="/sp/<%= ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/book" ml="3" active="<%= (ctx.url.indexOf('book') >= 0 ? 1 : -1) %>"></nav-menu>
 <nav-menu title="成本分析" url="/sp/<%= ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/analysis" ml="3" active="<%= (ctx.url.indexOf('analysis') >= 0 ? 1 : -1) %>"></nav-menu>
 <nav-menu title="成本分析" url="/sp/<%= ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/analysis" ml="3" active="<%= (ctx.url.indexOf('analysis') >= 0 ? 1 : -1) %>"></nav-menu>
 <nav-menu title="汇总分析" url="/sp/<%= ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/gather" ml="3" active="<%= (ctx.url.indexOf('gather') >= 0 ? 1 : -1) %>"></nav-menu>
 <nav-menu title="汇总分析" url="/sp/<%= ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/gather" ml="3" active="<%= (ctx.url.indexOf('gather') >= 0 ? 1 : -1) %>"></nav-menu>
-<!-- <nav-menu title="输出报表" url="/sp/<%= ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/report" ml="3" active="<%= (ctx.url.indexOf('analysis') >= 0 ? 1 : -1) %>"></nav-menu> -->
+<nav-menu title="输出报表" url="/sp/<%= ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/report" ml="3" active="<%= (ctx.url.indexOf('report') >= 0 ? 1 : -1) %>"></nav-menu>
 <% if (ctx.session.sessionUser.is_admin) { %>
 <% if (ctx.session.sessionUser.is_admin) { %>
 <nav-menu title="审批流程" url="/sp/<%= ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/flow" ml="3" active="<%= (ctx.url.indexOf('flow') >= 0 ? 1 : -1) %>"></nav-menu>
 <nav-menu title="审批流程" url="/sp/<%= ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/flow" ml="3" active="<%= (ctx.url.indexOf('flow') >= 0 ? 1 : -1) %>"></nav-menu>
 <% } %>
 <% } %>

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

@@ -13,7 +13,7 @@
 <% } else if ([-700].includes(stg_id)) { %>
 <% } else if ([-700].includes(stg_id)) { %>
     <% include ../phase_pay/sub_menu.ejs %>
     <% include ../phase_pay/sub_menu.ejs %>
 <% } else if ([-800, -801, -802, -803].includes(stg_id)) { %>
 <% } else if ([-800, -801, -802, -803].includes(stg_id)) { %>
-    <% include ../cost/list_menu_list.ejs %>
+    <% include ../cost/list_menu.ejs %>
 <% } else { %>
 <% } else { %>
     <% include ../stage/stage_sub_menu.ejs %>
     <% include ../stage/stage_sub_menu.ejs %>
 <% } %>
 <% } %>
@@ -22,7 +22,7 @@
         <div class="title-main d-flex">
         <div class="title-main d-flex">
             <% if(stg_id === -1) { %>
             <% if(stg_id === -1) { %>
                 <% include ../tender/tender_sub_mini_menu.ejs %>
                 <% include ../tender/tender_sub_mini_menu.ejs %>
-            <% } else if ([-100, -150, -200, -300, -301, -302, -303, -600, -700].includes(stg_id)) { %>
+            <% } else if ([-100, -150, -200, -300, -301, -302, -303, -600, -700, -800, -801, -802, -803].includes(stg_id)) { %>
             <% } else { %>
             <% } else { %>
                 <% include ../stage/stage_sub_mini_menu.ejs %>
                 <% include ../stage/stage_sub_mini_menu.ejs %>
             <% } %>
             <% } %>
@@ -54,7 +54,7 @@
                     </div>
                     </div>
                 </div>
                 </div>
                 <% } %>
                 <% } %>
-                <% if (false || ![-100, -150, -200, -300, -301, -302, -303, -600, -700].includes(stg_id)) { %>
+                <% if (false || ![-100, -150, -200, -300, -301, -302, -303, -600, -700, -800, -801, -802, -803].includes(stg_id)) { %>
                 <div class="d-inline-block" id="divSelectableBizs_up">
                 <div class="d-inline-block" id="divSelectableBizs_up">
                     <div class="dropdown" id="divSelectableStages">
                     <div class="dropdown" id="divSelectableStages">
                         <button class="btn btn-sm btn-light dropdown-toggle text-primary" type="button" id="btnCurrentStage" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
                         <button class="btn btn-sm btn-light dropdown-toggle text-primary" type="button" id="btnCurrentStage" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
@@ -70,7 +70,7 @@
                     </div>
                     </div>
                 </div>
                 </div>
                 <% } %>
                 <% } %>
-                <% if (stg_id === -200 || ![-100, -150, -300, -301, -302, -303, -600, -700].includes(stg_id)) { %>
+                <% if (stg_id === -200 || ![-100, -150, -300, -301, -302, -303, -600, -700, -800, -801, -802, -803].includes(stg_id)) { %>
                 <div class="d-inline-block" id="report_selects_div">
                 <div class="d-inline-block" id="report_selects_div">
                     <ul class="nav nav-pills m-0" id="report_selects_ul">
                     <ul class="nav nav-pills m-0" id="report_selects_ul">
                         <% if (ctx.session.sessionUser.is_admin || ctx.session.sessionProject.page_show.isCommonSetup) { %>
                         <% if (ctx.session.sessionUser.is_admin || ctx.session.sessionProject.page_show.isCommonSetup) { %>
@@ -112,7 +112,7 @@
                     <% } %>
                     <% } %>
                 </div>
                 </div>
                 <% } %>
                 <% } %>
-                <% if (false || ![-100, -150, -200, -300, -301, -302, -303].includes(stg_id)) { %>
+                <% if (false || ![-100, -150, -200, -300, -301, -302, -303, -800, -801, -802, -803].includes(stg_id)) { %>
                 <% if (ctx.session.sessionProject.page_show.isPreset) { %>
                 <% if (ctx.session.sessionProject.page_show.isPreset) { %>
                 <div class="d-inline-block">
                 <div class="d-inline-block">
                     <div class="dropdown" id="divPresets">
                     <div class="dropdown" id="divPresets">
@@ -142,7 +142,7 @@
                 </div>
                 </div>
                 <% } %>
                 <% } %>
                 <% } %>
                 <% } %>
-                <% if (isAdmin && ![-150, -600, -700].includes(stg_id)) { %>
+                <% if (isAdmin && ![-150, -600, -700, -800, -801, -802, -803].includes(stg_id)) { %>
                 <div class="d-inline-block">
                 <div class="d-inline-block">
                     <a href="/tender/<%- tender_id %>/report/format/setup" class=" btn btn-light btn-sm  text-primary">设置</a>
                     <a href="/tender/<%- tender_id %>/report/format/setup" class=" btn btn-light btn-sm  text-primary">设置</a>
                 </div>
                 </div>
@@ -675,7 +675,7 @@
         CUST_CFG.continuousOutput = false;
         CUST_CFG.continuousOutput = false;
     }
     }
     //
     //
-    <% if (stg_id === -600) {%>
+    <% if ([-600, -800, -801, -802, -803].includes(stg_id)) { %>
         const PROJECT_ID = '<%- project_id %>';
         const PROJECT_ID = '<%- project_id %>';
     <% } else { %>
     <% } else { %>
         const PROJECT_ID = <%- project_id %>;
         const PROJECT_ID = <%- project_id %>;
@@ -735,7 +735,7 @@
         current_stage_status = STAGE_LIST[STAGE_LIST.length - 1].status;
         current_stage_status = STAGE_LIST[STAGE_LIST.length - 1].status;
     }
     }
 
 
-    <% if (false || ![-100, -150, -200, -300, -301, -302, -303, -600, -700].includes(stg_id)) { %>
+    <% if (false || ![-100, -150, -200, -300, -301, -302, -303, -600, -700, -800, -801, -802, -803].includes(stg_id)) { %>
     buildStageSelection();
     buildStageSelection();
     <% } %>
     <% } %>
     setupSignature();
     setupSignature();

+ 4 - 2
app/view/report/rpt_all_popup.ejs

@@ -876,7 +876,7 @@
     </div>
     </div>
 </div>
 </div>
 
 
-<% if (![-100, -150, -200, -300, -301, -302, -303, -600, -700].includes(stg_id)) { %>
+<% if (![-100, -150, -200, -300, -301, -302, -303, -600, -700, -800, -801, -802, -803].includes(stg_id)) { %>
     <% include ../stage/audit_modal.ejs %>
     <% include ../stage/audit_modal.ejs %>
 <% } %>
 <% } %>
 <% if (stg_id === -150) { %>
 <% if (stg_id === -150) { %>
@@ -885,12 +885,14 @@
 <% if (stg_id === -700) { %>
 <% if (stg_id === -700) { %>
     <% include ../phase_pay/audit_modal.ejs %>
     <% include ../phase_pay/audit_modal.ejs %>
 <% } %>
 <% } %>
+<% if ([-800, -801, -802, -803].includes(stg_id)) { %>
+<% } %>
 
 
 <script>
 <script>
     zTreeOprObj.getCustomerCfg();
     zTreeOprObj.getCustomerCfg();
     zTreeOprObj.iniFontCfgDom(CUST_CFG);
     zTreeOprObj.iniFontCfgDom(CUST_CFG);
     
     
-    <% if (![-100, -150, -300, -301, -302, -303, -600, -700].includes(stg_id)) { %>
+    <% if (![-100, -150, -200, -300, -301, -302, -303, -600, -700, -800, -801, -802, -803].includes(stg_id)) { %>
     buildCustRptCommon('report_cust_group_common', ORG_TOP_TREE_NODES[1], CUST_TREE_NODES.common, 'true');
     buildCustRptCommon('report_cust_group_common', ORG_TOP_TREE_NODES[1], CUST_TREE_NODES.common, 'true');
     buildCustRptCommon('report_cust_group_individual', ORG_TOP_TREE_NODES[0], CUST_TREE_NODES.customize, 'false');
     buildCustRptCommon('report_cust_group_individual', ORG_TOP_TREE_NODES[0], CUST_TREE_NODES.customize, 'false');
     <% } %>
     <% } %>