MaiXinRong 5 éve
szülő
commit
8c0e7ad23a
2 módosított fájl, 5 hozzáadás és 8 törlés
  1. 4 7
      app/controller/report_controller.js
  2. 1 1
      app/service/tender.js

+ 4 - 7
app/controller/report_controller.js

@@ -190,11 +190,11 @@ 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);
-            const gather_select = customSelect.gather_select;
-            if (!params.gather_select && customSelect) {
-                delete customSelect.gather_select;
+            const copyCustomSelect = this.ctx.helper.clone(customSelect);
+            if (!params.gather_select && copyCustomSelect) {
+                delete copyCustomSelect.gather_select;
             }
-            const pageRst = await getAllPagesCommon(ctx, rptTpl, params, JV.PAGING_OPTION_NORMAL, JV.OUTPUT_TYPE_NORMAL, this.app.baseDir, customSelect);
+            const pageRst = await getAllPagesCommon(ctx, rptTpl, params, JV.PAGING_OPTION_NORMAL, JV.OUTPUT_TYPE_NORMAL, this.app.baseDir, copyCustomSelect);
             // console.log(pageRst);
             // const roleRel = (params.stage_status === 3) ? (await ctx.service.roleRptRel.getRoleRptRelByDetailIds(params.tender_id, params.rpt_tpl_id)) : [];
             const roleRel = await ctx.service.roleRptRel.getRoleRptRelByDetailIds(params.tender_id, params.rpt_tpl_id, params.stage_id); // 新需求中,允许在非审核状态下设置签名
@@ -205,9 +205,6 @@ 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/service/tender.js

@@ -356,7 +356,7 @@ module.exports = app => {
 
         async checkTender(tid) {
             if (this.ctx.tender) return;
-            this.ctx.tender = this.getCheckTender(tid);
+            this.ctx.tender = await this.getCheckTender(tid);
         }
 
         async setTenderType(tender, type) {