浏览代码

动态投资,菜单显示问题

MaiXinRong 1 年之前
父节点
当前提交
e0b64085e8
共有 1 个文件被更改,包括 2 次插入0 次删除
  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 {