|
@@ -196,7 +196,7 @@ module.exports = app => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- _getSpreadSetting(type) {
|
|
|
+ _getSpreadSetting(needGcl) {
|
|
|
const spreadSetting = {
|
|
|
cols: [
|
|
|
{title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 180, formatter: '@', cellType: 'tree'},
|
|
@@ -220,7 +220,7 @@ module.exports = app => {
|
|
|
font: '12px 微软雅黑',
|
|
|
};
|
|
|
// todo 根据设置判断预算是否需要清单
|
|
|
- if (type !== 'yu') {
|
|
|
+ if (!needGcl) {
|
|
|
spreadSetting.cols = spreadSetting.cols.filter(x => {
|
|
|
return ['b_code', 'quantity', 'unit_price'].indexOf(x.field) < 0;
|
|
|
});
|
|
@@ -243,10 +243,11 @@ module.exports = app => {
|
|
|
|
|
|
async detail(ctx) {
|
|
|
try {
|
|
|
+ const needGcl = await this._getNeedGcl();
|
|
|
const renderData = {
|
|
|
- spreadSetting: this._getSpreadSetting(ctx.params.btype),
|
|
|
+ spreadSetting: this._getSpreadSetting(needGcl),
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.budget.detail),
|
|
|
- needGcl: await this._getNeedGcl(),
|
|
|
+ needGcl,
|
|
|
};
|
|
|
[renderData.stdBills, renderData.stdChapters] = await ctx.service.budgetStd.getStdList(ctx.budget.std_id, ctx.params.btype);
|
|
|
await this.layout('budget/detail.ejs', renderData, 'budget/detail_modal.ejs');
|