Browse Source

变更令报表404错误紧急修复

Tony Kang 1 year ago
parent
commit
2d57732017
1 changed files with 9 additions and 0 deletions
  1. 9 0
      app/controller/report_controller.js

+ 9 - 0
app/controller/report_controller.js

@@ -363,6 +363,7 @@ module.exports = app => {
                 // const paymentAuditorList = await ctx.service.paymentDetailAudit.getAuditors(paymentDetail_id);
                 const tender = ctx.paymentTender;
                 const { treeNodes, commonArrs, custCfg } = await this._createNodes(ctx, sourceTypeConst.sourceType.payment_safe, tender.pid);
+                // const { treeNodes, custCfg, allTreeItems, allIndivTreeItems } = await this._createNodes(ctx, sourceTypeConst.sourceType.tender, tender.data.project_id);
                 const stageList = [];
                 const unitList = await ctx.service.constructionUnit.getAllDataByCondition({ where: { pid: tender.pid } }); // 找公司章用的
                 const isAdmin = ctx.session.sessionUser.is_admin;
@@ -435,6 +436,8 @@ module.exports = app => {
                     tenderInfo: null,
                     rpt_tpl_data: JSON.stringify(treeNodes),
                     cust_tpl_data: JSON.stringify(rpt_tpl_items),
+                    all_common_tpl_data: JSON.stringify([]),
+                    all_indivi_tpl_data: JSON.stringify([]),
                     cust_select_keys,
                     cust_cfg: JSON.stringify(custCfg),
                     project_id: tender.pid,
@@ -504,6 +507,7 @@ module.exports = app => {
                 const subProj = await ctx.service.subProject.getDataByCondition({ budget_id });
                 const sp_id = subProj.id;
                 const { treeNodes, commonArrs, custCfg } = await this._createNodes(ctx, sourceTypeConst.sourceType.budget, pid);
+                // const { treeNodes, custCfg, allTreeItems, allIndivTreeItems } = await this._createNodes(ctx, sourceTypeConst.sourceType.tender, tender.data.project_id);
                 const stageList = [];
                 const unitList = await ctx.service.constructionUnit.getAllDataByCondition({ where: { pid } }); // 找公司章用的
                 const isAdmin = ctx.session.sessionUser.is_admin;
@@ -578,6 +582,8 @@ module.exports = app => {
                     tenderInfo: null,
                     rpt_tpl_data: JSON.stringify(treeNodes),
                     cust_tpl_data: JSON.stringify(rpt_tpl_items),
+                    all_common_tpl_data: JSON.stringify([]),
+                    all_indivi_tpl_data: JSON.stringify([]),
                     cust_select_keys,
                     cust_cfg: JSON.stringify(custCfg),
                     project_id: pid,
@@ -670,6 +676,7 @@ module.exports = app => {
                 const budget_id = -1;
                 const sp_id = -1;
                 const { treeNodes, custCfg } = await this._createNodes(ctx, source_type, pid);
+                // const { treeNodes, custCfg, allTreeItems, allIndivTreeItems } = await this._createNodes(ctx, sourceTypeConst.sourceType.tender, tender.data.project_id);
                 const state = ctx.session.sessionProject.page_show.openChangeState && ctx.query.state ? parseInt(ctx.query.state) : 0;
                 const changes = await ctx.service.change.getListByStatus(tenderId, 0, 0, 0, 0, state);
                 let change_times = 1;
@@ -761,6 +768,8 @@ module.exports = app => {
                     tenderInfo: null,
                     rpt_tpl_data: JSON.stringify(treeNodes),
                     cust_tpl_data: JSON.stringify(rpt_tpl_items),
+                    all_common_tpl_data: JSON.stringify([]),
+                    all_indivi_tpl_data: JSON.stringify([]),
                     cust_select_keys,
                     cust_cfg: JSON.stringify(custCfg),
                     project_id: pid,