|
@@ -38,7 +38,6 @@ module.exports = options => {
|
|
|
detail.auditors = yield this.service.paymentDetailAudit.getAuditors(detail.id, detail.times);
|
|
|
detail.curAuditor = yield this.service.paymentDetailAudit.getCurAuditor(detail.id, detail.times);
|
|
|
detail.rptAudits = yield this.service.paymentRptAudit.getListByDetail(detail.id);
|
|
|
-
|
|
|
const accountId = this.session.sessionUser.accountId,
|
|
|
auditorIds = _.map(detail.auditors, 'aid'),
|
|
|
rptAuditIds = _.map(detail.rptAudits, 'uid');
|
|
@@ -60,7 +59,7 @@ module.exports = options => {
|
|
|
} else {
|
|
|
detail.curOrder = detail.curAuditor.order;
|
|
|
}
|
|
|
- } else if (auditorIds.indexOf(accountId) !== -1) { // 审批人
|
|
|
+ } else if (auditorIds.indexOf(accountId) !== -1 || rptAuditIds.indexOf(accountId) !== -1 || this.payment.auditPermission.view_all) { // 审批人及签署人及查看所有权人
|
|
|
if (detail.status === status.uncheck) {
|
|
|
throw '您无权查看该数据';
|
|
|
}
|
|
@@ -76,10 +75,6 @@ module.exports = options => {
|
|
|
} else {
|
|
|
detail.curOrder = accountId === detail.curAuditor.aid ? detail.curAuditor.order : detail.curAuditor.order - 1;
|
|
|
}
|
|
|
- } else if (rptAuditIds.indexOf(accountId) !== -1 || this.payment.auditPermission.view_all) {
|
|
|
- if (detail.status === status.uncheck || detail.status === status.checkNo) {
|
|
|
- throw '您无权查看该数据';
|
|
|
- }
|
|
|
} else { // 其他不可见
|
|
|
throw '您无权查看该数据';
|
|
|
}
|