Jelajahi Sumber

选择汇总标段,调整

MaiXinRong 5 tahun lalu
induk
melakukan
963e9e5aac

+ 5 - 1
app/controller/report_controller.js

@@ -190,7 +190,8 @@ module.exports = app => {
             const customSelect = rptTpl[JV.NODE_CUSTOM_DEFINE] && rptTpl[JV.NODE_CUSTOM_DEFINE][JV.NODE_CUS_AUDIT_SELECT].enable
                 ? await ctx.service.rptCustomDefine.getCustomDefine(params.tender_id, params.stage_id, params.rpt_tpl_id)
                 : await ctx.service.rptCustomDefine.getCustomDefine(params.tender_id, -1, params.rpt_tpl_id);
-            if (!params.gather_select) {
+            const gather_select = customSelect.gather_select;
+            if (!params.gather_select && customSelect) {
                 delete customSelect.gather_select;
             }
             const pageRst = await getAllPagesCommon(ctx, rptTpl, params, JV.PAGING_OPTION_NORMAL, JV.OUTPUT_TYPE_NORMAL, this.app.baseDir, customSelect);
@@ -204,6 +205,9 @@ module.exports = app => {
             await encodeSignatureDataUri(roleRel, this.app.baseDir);
             await encodeDummySignatureDataUri(pageRst, this.app.baseDir);
             const stageFlow = await ctx.service.stageAudit.getAuditGroupByListWithOwner(params.stage_id, params.stage_times);
+            if (!params.gather_select && customSelect) {
+                customSelect.gather_select = gather_select;
+            }
 
             // console.log('encodeSignatureDataUri!');
             return {

+ 1 - 1
app/lib/rpt_data_analysis.js

@@ -1005,7 +1005,7 @@ const datetimeFormat = {
     }
 };
 const gatherSelectConverse = {
-    name: '汇总标段选择',
+    name: '交叉汇总数据',
     hint: '需搭配 用户交互--汇总标段选择 一起使用',
     defaultSetting: {
         table: ['mem_gather_stage_bills'],

+ 1 - 1
app/public/js/shares/tenders2tree.js

@@ -85,7 +85,7 @@ const Tender2Tree = (function () {
                 tid: t.id,
                 name: t.name,
                 phase: t.lastStage ? '第' + t.lastStage.order + '期' : '台账',
-                //status: node.lastStage ? auditConst.stage.statusString[node.lastStage.status] : auditConst.ledger.statusString[node.ledger_status]
+                status: t.lastStage ? auditConst.stage.statusString[t.lastStage.status] : auditConst.ledger.statusString[t.ledger_status]
             }, parent);
         }
         tenderTree.sortTreeNode(false);

+ 4 - 3
app/public/report/js/rpt_custom.js

@@ -206,9 +206,9 @@ const rptCustomObj = (function () {
 
     const initGatherSelect = function (gsSetting, gsSelect) {
         gsObj.setting = JSON.parse(gsSetting);
-        gsObj.setting.type = 'zone';
         gsObj.orgSelect = gsSelect;
-        $('#audit-select-title').html(gsObj.setting.title);
+        $('#gather-select-count').html(gsSelect ? gsSelect.tenders.length : 0);
+        $('#gather-select-title').html(gsObj.setting.title);
         initGrSpreadSetting(gsObj.setting);
         SpreadJsObj.initSheet(gsObj.grSheet, grSpreadSetting);
         if (gsObj.setting.type === 'month') {
@@ -241,7 +241,7 @@ const rptCustomObj = (function () {
         }
         if (cDefine && cDefine[sGatherSelect] && cDefine[sGatherSelect].enable && cDefine[sGatherSelect].setting) {
             $('#pnl_gather_select').show();
-            initGatherSelect(cDefine[sGatherSelect].setting, cSelect ? cSelect[sGatherSelect] : []);
+            initGatherSelect(cDefine[sGatherSelect].setting, cSelect ? cSelect[sGatherSelect] : null);
         } else {
             $('#pnl_gather_select').hide();
         }
@@ -384,6 +384,7 @@ const rptCustomObj = (function () {
         hintObj.hide();
         postData('/report/cDefine', data, function (result) {
             reloadReportData(result);
+            $('#gather-select-count').html(data[sGatherSelect].tenders.length);
             $('#gather-select').modal('hide');
         });