فهرست منبع

重新审批,通知协审相关

MaiXinRong 2 سال پیش
والد
کامیت
f411b2cf05
2فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 5 5
      app/middleware/stage_check.js
  2. 1 1
      app/service/stage_audit.js

+ 5 - 5
app/middleware/stage_check.js

@@ -65,17 +65,17 @@ module.exports = options => {
             });
             // 权限相关
             // todo 校验权限 (标段参与人、分享、游客)
-            const accountId = this.session.sessionUser.accountId,
-                auditorIds = _.map(stage.auditors, 'aid'),
-                userAssistIds = _.map(stage.userAssists, 'ass_user_id'),
-                auditAssistIds = _.map(stage.auditAssists, 'ass_user_id'),
-                shareIds = [];
             let auditAssists = yield this.service.stageAuditAss.getData(stage);
             auditAssists = auditAssists.filter(x => {
                 return x.user_id === stage.user_id || auditorIds.indexOf(x.user_id) >= 0;
             });
             stage.userAssists = auditAssists.filter(x => { return x.user_id === stage.user_id; }); // 原报协同人
             stage.auditAssists = auditAssists.filter(x => { return x.user_id !== stage.user_id; }); // 审批协同人
+            const accountId = this.session.sessionUser.accountId,
+                auditorIds = _.map(stage.auditors, 'aid'),
+                userAssistIds = _.map(stage.userAssists, 'ass_user_id'),
+                auditAssistIds = _.map(stage.auditAssists, 'ass_user_id'),
+                shareIds = [];
             stage.users = stage.status === status.uncheck ? [stage.user_id, ...userAssistIds] : [stage.user_id, ...userAssistIds, ...auditorIds, ...auditAssistIds];
             stage.relaAssists = auditAssists.filter(x => { return x.user_id === accountId });
             if (stage.status === status.uncheck || stage.status === status.checkNo) {

+ 1 - 1
app/service/stage_audit.js

@@ -939,7 +939,7 @@ module.exports = app => {
                 // }
                 const stageInfo = await this.ctx.service.stage.getDataById(audit.sid);
                 const shenpiUrl = await this.ctx.helper.urlToShort(this.ctx.protocol + '://' + this.ctx.host + '/wap/tender/' + this.ctx.tender.id + '/stage/' + stageInfo.order);
-                const users = this._.map(this.ctx.stage.auditAssist.filter(x => { return x.user_id == audit.aid; }), 'ass_user_id');
+                const users = this._.map(this.ctx.stage.auditAssists.filter(x => { return x.user_id == audit.aid; }), 'ass_user_id');
                 users.push(audit.aid);
                 await this.ctx.helper.sendAliSms(users, smsTypeConst.const.JL, smsTypeConst.judge.approval.toString(), SmsAliConst.template.stage_check, {
                     qi: stageInfo.order,