Browse Source

报表预处理,审批人选择,期合同支付数据

MaiXinRong 5 years ago
parent
commit
dc984678ce
1 changed files with 14 additions and 1 deletions
  1. 14 1
      app/lib/rpt_data_analysis.js

+ 14 - 1
app/lib/rpt_data_analysis.js

@@ -858,7 +858,7 @@ const auditSelect = {
     name: '审批人选择',
     hint: '需搭配用户交互--审批人选择一起使用',
     defaultSetting: {
-        table: ['mem_stage_bills_compare', 'mem_stage_pos_compare'],
+        table: ['mem_stage_bills_compare', 'mem_stage_pos_compare', 'mem_stage_pay'],
     },
     _stageBillsCompare(data, order) {
         const fields = [];
@@ -893,6 +893,19 @@ const auditSelect = {
             }
         }
     },
+    _stagePay(data, order) {
+        const fields = [];
+        for (const [i, o] of order.entries()) {
+            const sPrefix = 'r' + o + '_';
+            const tPrefix = 'as' + i + '_';
+            fields.push({source: sPrefix + 'tp', target: tPrefix + 'tp'});
+        }
+        for (const d of data) {
+            for (const f of fields) {
+                d[f.target] = d[f.source];
+            }
+        }
+    },
     fun: function (ctx, data, fieldsKey, options, csRela) {
         if (!ctx.tender || !ctx.stage) return;
         if (!csRela.tplDefine) return;