|
@@ -55,11 +55,18 @@ module.exports = options => {
|
|
|
const auditors = yield this.service.ledgerAudit.getAuditors(tender.id, times);
|
|
|
const auditorsId = this.helper._.map(auditors, 'audit_id');
|
|
|
const stageAuditors = yield this.service.stageAudit.getAllAuditors(tender.id);
|
|
|
- const stageAUditorsId = this.helper._.map(stageAuditors, 'aid');
|
|
|
+ const stageAuditorsId = this.helper._.map(stageAuditors, 'aid');
|
|
|
+ const changeAuditors = yield this.service.changeAudit.getAllAuditors(tender.id);
|
|
|
+ const changeAuditorsId = this.helper._.map(changeAuditors, 'uid');
|
|
|
+ const reviseAuditors = yield this.service.reviseAudit.getAllAuditors(tender.id);
|
|
|
+ const reviseAuditorsId = this.helper._.map(reviseAuditors, 'audit_id');
|
|
|
+ const materialAuditors = yield this.service.materialAudit.getAllAuditors(tender.id);
|
|
|
+ const materialAuditorsId = this.helper._.map(materialAuditors, 'aid');
|
|
|
const tenderPermission = this.session.sessionUser.permission ? this.session.sessionUser.permission.tender : null;
|
|
|
if (auditorsId.indexOf(accountId) === -1 && tender.data.user_id !== accountId &&
|
|
|
(tenderPermission === null || tenderPermission === undefined || tenderPermission.indexOf('2') === -1) &&
|
|
|
- stageAUditorsId.indexOf(accountId) === -1) {
|
|
|
+ stageAuditorsId.indexOf(accountId) === -1 && changeAuditorsId.indexOf(accountId) === -1 &&
|
|
|
+ reviseAuditorsId.indexOf(accountId) === -1 && materialAuditorsId.indexOf(accountId) === -1) {
|
|
|
throw '您无权查看该项目';
|
|
|
}
|
|
|
}
|