Browse Source

安全计量报表,多审表数据问题

MaiXinRong 2 days ago
parent
commit
a7aea9ed8f
1 changed files with 5 additions and 5 deletions
  1. 5 5
      app/lib/rm/safe_stage.js

+ 5 - 5
app/lib/rm/safe_stage.js

@@ -73,15 +73,15 @@ class rptMemChange extends RptMemBase {
             d.cur_his.sort((x, y) => { return x.audit_times === y.audit_times ? x.active_order - y.active_order : x.audit_times - y.audit_times; });
             for (const r of roles) {
                 if (r.latest) {
-                    d[`r_qty_${r.order}`] = d.cur_qty;
-                    d[`r_tp_${r.order}`] = d.cur_tp;
+                    d[`r_qty_${r.audit_order}`] = d.cur_qty;
+                    d[`r_tp_${r.audit_order}`] = d.cur_tp;
                     d.his_qty.push(d.cur_qty);
                     d.his_tp.push(d.cur_tp);
                 } else {
                     const rHis = findHis(r, d.cur_his);
                     if (rHis) {
-                        d[`r_qty_${r.order}`] = rHis.qty;
-                        d[`r_tp_${r.order}`] = rHis.tp;
+                        d[`r_qty_${r.audit_order}`] = rHis.qty;
+                        d[`r_tp_${r.audit_order}`] = rHis.tp;
                     }
                     d.his_qty.push(rHis ? rHis.qty : 0);
                     d.his_tp.push(rHis ? rHis.tp : 0);
@@ -102,7 +102,7 @@ class rptMemChange extends RptMemBase {
             fullPath: 'tree_full_path',
             rootId: -1,
         };
-        setting.calcFields = roles.map(x => { return `r_tp_${x.order}`; });
+        setting.calcFields = roles.map(x => { return `r_tp_${x.audit_order}`; });
         setting.calcFields.push('pre_tp');
         const compareTree = new Ledger.billsTree(this.ctx, setting);
         compareTree.loadDatas(bills);