Browse Source

修复协同审批待办页bug

ellisran 11 months ago
parent
commit
53b9d3d4dd
1 changed files with 3 additions and 2 deletions
  1. 3 2
      app/service/stage_audit_ass.js

+ 3 - 2
app/service/stage_audit_ass.js

@@ -66,12 +66,13 @@ module.exports = app => {
             if (result.length > 0) {
                 for (const r of result) {
                     const t = await this.ctx.service.tender.getDataById(r.tid);
-                    const s = r.sid ? await this.ctx.service.stage.getDataById(r.sid) : await this.ctx.service.stage.getLastestStage(r.tid);
+                    const s = await this.ctx.service.stage.getLastestStage(r.tid);
+                    // const s = r.sid && r.sid === lasts.id ? lasts : await this.ctx.service.stage.getDataById(r.sid);
                     if (s) {
                         r.tender_name = t.name;
                         r.sstatus = s.status;
                         r.sorder = s.order;
-                        if (r.times && r.times === s.times && r.confirm === 1) continue;
+                        if (r.sid && r.sid === s.id && r.times && r.times === s.times && r.confirm === 1) continue;
                         if (s && s.status === auditConst.stage.status.checkNo && s.user_id === r.user_id) {
                             const lastAudit = await this.ctx.service.stageAudit.getLastestAuditor(s.id, s.times - 1, auditConst.stage.status.checkNo);
                             r.begin_time = lastAudit ? lastAudit.end_time : s.in_time;