瀏覽代碼

报表,添加公式字段

MaiXinRong 5 年之前
父節點
當前提交
7100cc36d0
共有 3 個文件被更改,包括 15 次插入8 次删除
  1. 3 3
      app/controller/report_controller.js
  2. 6 5
      app/service/report_memory.js
  3. 6 0
      builder_report_index_define.js

+ 3 - 3
app/controller/report_controller.js

@@ -55,9 +55,9 @@ module.exports = app => {
                 for (const t of tenderList) {
                     if (t.ledger_status === auditConst.ledger.status.checked) {
                         t.lastStage = await this.ctx.service.stage.getLastestStage(t.id, true);
-                        if (t.lastStage) {
-                            await this.ctx.service.stage.checkStageGatherData(t.lastStage);
-                        }
+                        // if (t.lastStage) {
+                        //     await this.ctx.service.stage.checkStageGatherData(t.lastStage);
+                        // }
                     }
                 }
 

+ 6 - 5
app/service/report_memory.js

@@ -26,7 +26,7 @@ const stageImVersion = '1.3';
 const Ledger = require('../lib/ledger');
 
 const billsFields = (function () {
-    const cur = ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp', 'gather_qty', 'gather_tp', 'postil'];
+    const cur = ['contract_qty', 'contract_tp', 'contract_expr', 'qc_qty', 'qc_tp', 'gather_qty', 'gather_tp', 'postil'];
     const pre = ['pre_contract_qty', 'pre_contract_tp', 'pre_qc_qty', 'pre_qc_tp', 'pre_gather_qty', 'pre_gather_tp'];
     const end = ['end_contract_qty', 'end_contract_tp', 'end_qc_qty', 'end_qc_tp', 'end_gather_qty', 'end_gather_tp'];
     const final = ['final_tp', 'final_ratio'];
@@ -355,12 +355,12 @@ module.exports = app => {
                     const curStage = await this.ctx.service.stageBills.getAuditorStageData(this.ctx.tender.id,
                         this.ctx.stage.id, this.ctx.stage.curTimes, this.ctx.stage.curOrder);
                     this.ctx.helper.assignRelaData(billsData, [
-                        {data: curStage, fields: ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp'], prefix: '', relaId: 'lid'}
+                        {data: curStage, fields: ['contract_qty', 'contract_tp', 'contract_expr', 'qc_qty', 'qc_tp'], prefix: '', relaId: 'lid'}
                     ]);
                 } else {
                     const curStage = await this.ctx.service.stageBills.getLastestStageData(this.ctx.tender.id, this.ctx.stage.id);
                     this.ctx.helper.assignRelaData(billsData, [
-                        {data: curStage, fields: ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp'], prefix: '', relaId: 'lid'}
+                        {data: curStage, fields: ['contract_qty', 'contract_tp', 'contract_expr', 'qc_qty', 'qc_tp'], prefix: '', relaId: 'lid'}
                     ]);
                 }
             }
@@ -395,6 +395,7 @@ module.exports = app => {
                 'qc_bgl_code',
                 'chapter',
                 'leaf_xmj_id',
+                'sgfh_expr', 'sjcl_expr', 'qtcl_expr', 'contract_expr',
             ]);
         }
 
@@ -431,12 +432,12 @@ module.exports = app => {
                     const curPosStage = await this.ctx.service.stagePos.getAuditorStageData2(this.ctx.tender.id,
                         this.ctx.stage.id, this.ctx.stage.curTimes, this.ctx.stage.curOrder);
                     this.ctx.helper.assignRelaData(posData, [
-                        {data: curPosStage, fields: ['contract_qty', 'qc_qty'], prefix: '', relaId: 'pid'}
+                        {data: curPosStage, fields: ['contract_qty', 'qc_qty', 'contract_expr'], prefix: '', relaId: 'pid'}
                     ]);
                 } else {
                     const curPosStage = await this.ctx.service.stagePos.getLastestStageData2(this.ctx.tender.id, this.ctx.stage.id);
                     this.ctx.helper.assignRelaData(posData, [
-                        {data: curPosStage, fields: ['contract_qty', 'qc_qty'], prefix: '', relaId: 'pid'}
+                        {data: curPosStage, fields: ['contract_qty', 'qc_qty', 'contract_expr'], prefix: '', relaId: 'pid'}
                     ]);
                 }
             }

+ 6 - 0
builder_report_index_define.js

@@ -265,6 +265,12 @@ const stage_bills = {
         { name: '预留扩展字段_1', field: 'ex_value1', type: dataType.currency },
         { name: '预留扩展字段_2', field: 'ex_value2', type: dataType.currency },
 
+        { name: '施工复核-公式', field: 'sgfh_expr', type: dataType.currency },
+        { name: '设计错漏-公式', field: 'sjcl_expr', type: dataType.currency },
+        { name: '其他错漏-公式', field: 'qtcl_expr', type: dataType.currency },
+        { name: '本期-合同-公式', field: 'contract_expr', type: dataType.currency },
+
+
         { name: '最底层项目节id', field: 'leaf_xmj_id', type: dataType.str },
     ],
 };