ellisran 2 mēneši atpakaļ
vecāks
revīzija
396b4ecf9e
1 mainītis faili ar 4 papildinājumiem un 3 dzēšanām
  1. 4 3
      app/controller/wap_controller.js

+ 4 - 3
app/controller/wap_controller.js

@@ -479,7 +479,7 @@ module.exports = app => {
                         c.showApprovalBtn = false;
                         c.curAuditors = await ctx.service.changeProjectAudit.getAuditorsByStatus(c.id, c.status, c.times);
                         const curAudit = c.curAuditors.find(function(x) {
-                            return x.uid === ctx.session.sessionUser.accountId;
+                            return x.aid === ctx.session.sessionUser.accountId;
                         });
                         if (curAudit && curAudit.status === auditConst.changeProject.status.checking) {
                             c.showApprovalBtn = true;
@@ -495,7 +495,7 @@ module.exports = app => {
                         c.showApprovalBtn = false;
                         c.curAuditors = await ctx.service.changeApplyAudit.getAuditorsByStatus(c.id, c.status, c.times);
                         const curAudit = c.curAuditors.find(function(x) {
-                            return x.uid === ctx.session.sessionUser.accountId;
+                            return x.aid === ctx.session.sessionUser.accountId;
                         });
                         if (curAudit && curAudit.status === auditConst.changeApply.status.checking) {
                             c.showApprovalBtn = true;
@@ -511,13 +511,14 @@ module.exports = app => {
                         c.showApprovalBtn = false;
                         c.curAuditors = await ctx.service.changePlanAudit.getAuditorsByStatus(c.id, c.status, c.times);
                         const curAudit = c.curAuditors.find(function(x) {
-                            return x.uid === ctx.session.sessionUser.accountId;
+                            return x.aid === ctx.session.sessionUser.accountId;
                         });
                         if (curAudit && curAudit.status === auditConst.changePlan.status.checking) {
                             c.showApprovalBtn = true;
                         }
                     }
                 }
+                console.log(changePlans);
 
                 const renderData = {
                     tender: ctx.tender,