|
@@ -30,8 +30,15 @@ module.exports = app => {
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.budget.list),
|
|
|
auditConst,
|
|
|
};
|
|
|
- renderData.budgetList = await ctx.service.budget.getBudget(ctx.session.sessionUser.is_admin)
|
|
|
+ renderData.budgetList = await ctx.service.budget.getBudget(ctx.session.sessionUser.is_admin);
|
|
|
renderData.budgetStd = await ctx.service.budgetStd.getDataByProjectId(ctx.session.sessionProject.id);
|
|
|
+ for (const bl of renderData.budgetList) {
|
|
|
+ const std = renderData.budgetStd.find(x => { return x.id === bl.std_id; });
|
|
|
+ bl.std_name = std ? std.name : '';
|
|
|
+ bl.gu_tp = await ctx.service.budgetGu.getSumTp(bl.id);
|
|
|
+ bl.gai_tp = await ctx.service.budgetGai.getSumTp(bl.id);
|
|
|
+ bl.yu_tp = await ctx.service.budgetYu.getSumTp(bl.id);
|
|
|
+ }
|
|
|
renderData.tenderList = await ctx.service.tender.getList4Select('stage');
|
|
|
const accountList = await ctx.service.projectAccount.getAllDataByCondition({
|
|
|
where: { project_id: ctx.session.sessionProject.id, enable: 1 },
|
|
@@ -219,7 +226,6 @@ module.exports = app => {
|
|
|
headerFont: '12px 微软雅黑',
|
|
|
font: '12px 微软雅黑',
|
|
|
};
|
|
|
- // todo 根据设置判断预算是否需要清单
|
|
|
if (!needGcl) {
|
|
|
spreadSetting.cols = spreadSetting.cols.filter(x => {
|
|
|
return ['b_code', 'quantity', 'unit_price'].indexOf(x.field) < 0;
|