Browse Source

动态投资,菜单显示问题

MaiXinRong 1 năm trước cách đây
mục cha
commit
e0b64085e8
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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 {