Browse Source

动态投资,菜单显示问题

MaiXinRong 1 year ago
parent
commit
e0b64085e8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/middleware/budget_check.js

+ 2 - 0
app/middleware/budget_check.js

@@ -27,6 +27,8 @@ module.exports = options => {
             if (!id) throw '参数错误';
             this.budget = yield this.service.budget.getCurBudget(id);
             if (!this.budget) throw '项目不存在';
+            const subProj = yield this.service.subProject.getDataByCondition({ budget_id: this.budget.id });
+            if (subProj) this.budget.name = subProj.name || '';
             if (this.session.sessionUser.is_admin) {
                 this.budget.readOnly = false;
             } else {