Forráskód Böngészése

报表,变更清单,提供新指标

MaiXinRong 3 éve
szülő
commit
c5e6f6e01b
2 módosított fájl, 5 hozzáadás és 1 törlés
  1. 3 1
      app/service/report_memory.js
  2. 2 0
      builder_report_index_define.js

+ 3 - 1
app/service/report_memory.js

@@ -759,13 +759,15 @@ module.exports = app => {
                     d.c_tp = this.ctx.helper.mul(d.c_qty, d.unit_price, decimal.tp);
                     d.s_qty = d.samount ? parseFloat(d.samount) : 0;
                     d.s_tp = this.ctx.helper.mul(d.s_qty, d.unit_price, decimal.tp);
+                    d.sp_qty = d.spamount;
+                    d.sp_tp = this.ctx.helper.mul(d.sp_qty, d.unit_price, decimal.tp);
 
                     const auditAmount = d.audit_amount ? d.audit_amount.split(',') : [];
                     const relaChange = ctx.helper._.find(change, {cid: d.cid});
                     for (const [i, aa] of auditAmount.entries()) {
                         const amountField = 'qty_' + (i+1), tpField = 'tp_' + (i+1);
                         d[amountField] = aa ? parseFloat(aa) : 0;
-                        d[tpField] = ctx.helper.mul(d[amountField], d.unit_price, decimal.tp);
+                        d[tpField] = ctx.helper.mul(d[amountField], d.unit_price, c.tp_decimal || decimal.tp);
                         if (relaChange) {
                             relaChange[tpField] = ctx.helper.add(relaChange[tpField], d[tpField]);
                         }

+ 2 - 0
builder_report_index_define.js

@@ -305,6 +305,8 @@ const change_bills = {
         { name: '(空) 截止本期-已变更', field: 'used_qty', type: dataType.currency },
         { name: '(空) 变更令-本期使用', field: 'is_used_bgl', type: dataType.int },
         { name: '(空) 变更清单-本期使用', field: 'is_used', type: dataType.int },
+        { name: '审批流程中读取数量', field: 'sp_qty', type: dataType.currency },
+        { name: '审批流程中金额', field: 'sp_tp', type: dataType.currency },
     ],
 };
 const change_audit = {