|
@@ -28,13 +28,7 @@ module.exports = options => {
|
|
|
if (!this.budget) throw '未设置概预算标准';
|
|
|
if (this.budget.pid !== this.session.sessionProject.id) throw '您无权查看该项目';
|
|
|
|
|
|
- if (this.session.sessionUser.is_admin) {
|
|
|
- this.budget.readOnly = false;
|
|
|
- } else {
|
|
|
- const bp = yield this.service.subProjPermission.getBudgetUserPermission(id);
|
|
|
- if (!bp) throw '您无权查看该项目动态投资数据';
|
|
|
- this.budget.readOnly = bp.budget_permission.indexOf(this.service.subProjPermission.PermissionConst.budget.edit.value) < 0;
|
|
|
- }
|
|
|
+ this.budget.readOnly = this.subProject.permission.budget_permission.indexOf(this.service.subProjPermission.PermissionConst.budget.edit.value) < 0;
|
|
|
yield next;
|
|
|
} catch (err) {
|
|
|
this.log(err);
|