Procházet zdrojové kódy

期数据,提供期设计数量

MaiXinRong před 5 roky
rodič
revize
0b31c7673d
2 změnil soubory, kde provedl 14 přidání a 1 odebrání
  1. 9 1
      app/service/report_memory.js
  2. 5 0
      builder_report_index_define.js

+ 9 - 1
app/service/report_memory.js

@@ -30,13 +30,14 @@ const billsFields = (function () {
     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'];
+    const stageDgn = ['deal_dgn_qty1', 'deal_dgn_qty2', 'c_dgn_qty1', 'c_dgn_qty2'];
 
     const stage = cur.concat(pre, end, final);
     const stageEnd = pre.concat(end, final);
     const bgl = ['qc_bgl_code'];
     const leafXmj = ['leaf_xmj_id'];
 
-    return {cur, pre, end, final, stage, stageEnd, bgl, leafXmj};
+    return {cur, pre, end, final, stageDgn, stage, stageEnd, bgl, leafXmj};
 })();
 const posFields = (function () {
     const cur = ['contract_qty', 'qc_qty', 'gather_qty', 'postil'];
@@ -348,6 +349,13 @@ module.exports = app => {
             }
 
             const billsData = await this.ctx.service.ledger.getData(this.ctx.tender.id);
+            if (this._checkFieldsExist(fields, billsFields.stageDgn)) {
+                const dgnData = await this.ctx.service.stageBillsDgn.getDgnData(this.ctx.tender.id);
+                for (const d of dgnData) {
+                    const l = this.ctx.helper._.find(billsData, {id: d.id});
+                    this.ctx.helper._.assignIn(l, d);
+                }
+            }
             if (this._checkFieldsExist(fields, billsFields.stage)) {
                 if (this.ctx.stage.readOnly) {
                     const curStage = await this.ctx.service.stageBills.getAuditorStageData(this.ctx.tender.id,

+ 5 - 0
builder_report_index_define.js

@@ -271,6 +271,11 @@ const stage_bills = {
         { name: '设计错漏-公式', field: 'sjcl_expr', type: dataType.currency },
         { name: '其他错漏-公式', field: 'qtcl_expr', type: dataType.currency },
         { name: '本期-合同-公式', field: 'contract_expr', type: dataType.currency },
+
+        { name: '合同-设计数量1', field: 'deal_dgn_qty1', type: dataType.currency },
+        { name: '合同-设计数量2', field: 'deal_dgn_qty2', type: dataType.currency },
+        { name: '变更-设计数量1', field: 'c_dgn_qty1', type: dataType.currency },
+        { name: '变更-设计数量2', field: 'c_dgn_qty2', type: dataType.currency },
     ],
 };
 const stage_bills_compare = {