|
|
@@ -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;
|
|
|
}
|
|
|
|