Przeglądaj źródła

会签,奖罚金数据读取调整

MaiXinRong 1 miesiąc temu
rodzic
commit
789bea8e70
1 zmienionych plików z 10 dodań i 9 usunięć
  1. 10 9
      app/service/stage_bonus.js

+ 10 - 9
app/service/stage_bonus.js

@@ -42,16 +42,17 @@ module.exports = app => {
 
         async getStageData(sid, cancel = false) {
             const data = await this.getAllDataByCondition({where: { sid: sid }});
-            if (!cancel && this.ctx.stage && this.ctx.stage.readOnly && !this.ctx.tender.isTourist && this.ctx.stage.status !== auditConst.status.checked) {
-                for (const d of data) {
-                    const his = d.shistory ? JSON.parse(d.shistory) : [];
-                    const h = this.ctx.helper._.find(his, {
-                        stimes: this.ctx.stage.curTimes, sorder: this.ctx.stage.curOrder
-                    });
-                    d.tp = h ? h.tp : null;
-                }
-            }
             this._parseData(data);
+            if (!stage || cancel || !stage.readOnly || this.ctx.tender.isTourist || stage.status === auditConst.status.checked
+                || (stage.flowAuditorIds && stage.flowAuditorIds.indexOf(this.ctx.session.sessionUser.accountId) > 0)) return data;
+
+            for (const d of data) {
+                const his = d.shistory ? JSON.parse(d.shistory) : [];
+                const h = this.ctx.helper._.find(his, {
+                    stimes: this.ctx.stage.curTimes, sorder: this.ctx.stage.curOrder
+                });
+                d.tp = h ? h.tp : null;
+            }
             return data;
         }