Browse Source

报表导出,相关调整

MaiXinRong 4 years ago
parent
commit
d0cc2913d2

+ 6 - 3
app/controller/report_controller.js

@@ -20,7 +20,11 @@ const RPT_DEF_PROPERTIES = require('../const/report_defined_properties');
 const reportConst = require('../const/report');
 // const stringUtil = require('../public/js/string_util_light');
 const scheduleJob = require('node-schedule');
-const needCustomTables = ['mem_gather_stage_bills', 'mem_gather_deal_bills', 'mem_gather_stage_pay', 'mem_gather_tender_info', 'mem_stage_sum_bills', 'mem_stage_sum_pay'];
+const needCustomTables = [
+    'mem_gather_stage_bills', 'mem_gather_deal_bills', 'mem_gather_stage_pay', 'mem_gather_tender_info',
+    'mem_stage_sum_bills', 'mem_stage_sum_pay',
+    'mem_jh_gather_im_change', 'mem_jh_im_change',
+];
 
 module.exports = app => {
     class ReportController extends app.BaseController {
@@ -735,7 +739,6 @@ async function getAllPagesCommon(ctx, rptTpl, params, option, outputType, baseDi
     const rptDataUtil = new rptDataExtractor();
     rptDataUtil.initialize(rptTpl);
     const filter = rptDataUtil.getDataRequestFilter();
-    // console.log(filter.tables);
     const rawDataObj = await ctx.service.report.getReportData(params, filter.tables, filter.memFieldKeys,
         rptTpl[JV.NODE_CUSTOM_DEFINE], customSelect);
     // console.log(rawDataObj);
@@ -852,7 +855,7 @@ async function getMultiRptsCommon(ctx, params, outputType, baseDir) {
                 curRawDataObj[table] = ctx.helper.clone(rawDataObj[table]);
             }
             // 如果是用户交互类型的表,则应该单独获取数据
-            if (params.customSelect && params.customSelect[tplIdx]) {
+            if ((params.customSelect && params.customSelect[tplIdx]) || rptTpl[JV.NODE_CUSTOM_DEFINE][JV.NODE_CUS_OPTION]) {
                 const cfTables = [],
                     cmFieldKeys = [];
                 const curFilter = rptDataUtil.getDataRequestFilter();

+ 1 - 0
app/reports/rpt_component/jpc_value_define.js

@@ -50,6 +50,7 @@ module.exports = {
     NODE_BIZ_TYPE_DETAIL: '明细类型',
 
     NODE_CUSTOM_DEFINE: '用户交互',
+    NODE_CUS_OPTION: 'option',
     NODE_CUS_AUDIT_SELECT: 'audit_select',
     NODE_CUS_GATHER_SELECT: 'gather_select',
     NODE_CUS_COMPARE_SELECT: 'compare_select',