Commit 442b90ab authored by 高滢's avatar 高滢

feat(年度): 表格渲染

parent 564896fc
......@@ -30,7 +30,7 @@
import { BasicForm, FormActionType, useForm } from '@/components/Form';
import { useModal } from '@/components/Modal';
import {searchFormSchema, searchSchema} from './data';
import { searchSchema } from './data';
import PageCard from '@/components/Page/src/PageCard.vue';
import { useRouter } from 'vue-router';
import {
......@@ -41,7 +41,6 @@
} from '@/api/project/completed';
import CompletedStatisticWindow from '@/views/completed/completedStatisticWindow.vue';
import { BasicColumn } from '@/components/Table';
import { exportStatisticEngine } from '@/api/project/engineeringProject';
import { downloadByData } from '@/utils/file/download';
const { push } = useRouter();
......@@ -71,27 +70,8 @@
function handleSubmit() {
let data = getFieldsValue();
params.value = data;
// if (params.value.filingCycle !== undefined && params.value.filingCycle !== null) {
// columns[0].title =
// params.value.filingCycle + params.value.company + '工程资金计划(已竣工验收项目)';
// } else {
// columns[0].title = '工程资金计划(已竣工验收项目)';
// }
getStatisticList();
}
// async function exportCount() {
// const data = await exportTenderCount(params.value);
// downloadByData(data, '招标计划统计报表' + '.xlsx');
// }
// function setRowClassName(record) {
// if (record.projectName === '总计(万元)') {
// return 'rowcolor';
// } else if (record.companyName === '合计(万元)') {
// return 'rowcolor';
// } else {
// return;
// }
// }
function showDetails(record, planType, filingCycle) {
planType = params.value.planType;
......@@ -144,94 +124,164 @@
}
}
function getBasicColumns(year: string, planType: string): BasicColumn[] {
return [
{
title: year + '工程项目资金计划(' + planType + ')',
dataIndex: '',
fixed: 'left',
children: [
{
title: '公司名称',
dataIndex: 'company',
fixed: 'left',
width: 180,
customCell: (_, any) => ({
rowSpan: _.companyrowSpan,
}),
},
{
title: '项目类型',
dataIndex: 'projectType',
fixed: 'left',
width: 180,
slots: { customRender: 'projectType' },
customCell: (_, any) => ({
rowSpan: _.projectTyperowSpan,
}),
},
{
title: '立项总投资',
dataIndex: 'projectInvestment',
width: 180,
},
{
title: '竣工结算额',
dataIndex: 'completionSettlement',
width: 180,
className: planType === '已竣工验收项目' ? 'tableShow' : 'tableHiddle',
},
{
title: parseInt(year) - 1 + '年底前累计实付额',
dataIndex: 'totalActualPay',
width: 180,
className: planType === '已竣工验收项目' ? 'tableShow' : 'tableHiddle',
},
{
title: year + '年计划投资',
dataIndex: 'totalValue',
width: 180,
className: planType === '计划投资项目' ? 'tableShow' : 'tableHiddle',
},
{
title: year + '年资金计划额',
dataIndex: 'annualFund',
width: 180,
},
{
title: year + '年资金来源',
dataIndex: '',
width: 180,
children: [
{
title: '政府拨款',
dataIndex: 'governmentGrantTotal',
width: 180,
},
{
title: '专项债拨款',
dataIndex: 'totalSpecialBond',
width: 180,
},
{
title: '银行融资',
dataIndex: 'totalBankFinancing',
width: 180,
},
{
title: '自有资金',
dataIndex: 'totalOwnFunds',
width: 180,
},
],
},
{
title: '资金缺口',
dataIndex: 'fundingGap',
width: 180,
},
],
},
];
if (planType === '已竣工验收项目') {
return [
{
title: year + '工程项目资金计划(' + planType + ')',
dataIndex: '',
fixed: 'left',
children: [
{
title: '公司名称',
dataIndex: 'company',
fixed: 'left',
width: 180,
customCell: (_, any) => ({
rowSpan: _.companyrowSpan,
}),
},
{
title: '项目类型',
dataIndex: 'projectType',
fixed: 'left',
width: 180,
slots: { customRender: 'projectType' },
customCell: (_, any) => ({
rowSpan: _.projectTyperowSpan,
}),
},
{
title: '立项总投资',
dataIndex: 'projectInvestment',
width: 180,
},
{
title: '竣工结算额',
dataIndex: 'completionSettlement',
width: 180,
},
{
title: parseInt(year) - 1 + '年底前累计实付额',
dataIndex: 'totalActualPay',
width: 180,
},
{
title: year + '年资金计划额',
dataIndex: 'annualFund',
width: 180,
},
{
title: year + '年资金来源',
dataIndex: '',
width: 180,
children: [
{
title: '政府拨款',
dataIndex: 'governmentGrantTotal',
width: 180,
},
{
title: '专项债拨款',
dataIndex: 'totalSpecialBond',
width: 180,
},
{
title: '银行融资',
dataIndex: 'totalBankFinancing',
width: 180,
},
{
title: '自有资金',
dataIndex: 'totalOwnFunds',
width: 180,
},
],
},
{
title: '资金缺口',
dataIndex: 'fundingGap',
width: 180,
},
],
},
];
} else {
return [
{
title: year + '工程项目资金计划(' + planType + ')',
dataIndex: '',
fixed: 'left',
children: [
{
title: '公司名称',
dataIndex: 'company',
fixed: 'left',
width: 180,
customCell: (_, any) => ({
rowSpan: _.companyrowSpan,
}),
},
{
title: '项目类型',
dataIndex: 'projectType',
fixed: 'left',
width: 180,
slots: { customRender: 'projectType' },
customCell: (_, any) => ({
rowSpan: _.projectTyperowSpan,
}),
},
{
title: '立项总投资',
dataIndex: 'projectInvestment',
width: 180,
},
{
title: year + '年计划投资',
dataIndex: 'totalValue',
width: 180,
},
{
title: year + '年资金计划额',
dataIndex: 'annualFund',
width: 180,
},
{
title: year + '年资金来源',
dataIndex: '',
width: 180,
children: [
{
title: '政府拨款',
dataIndex: 'governmentGrantTotal',
width: 180,
},
{
title: '专项债拨款',
dataIndex: 'totalSpecialBond',
width: 180,
},
{
title: '银行融资',
dataIndex: 'totalBankFinancing',
width: 180,
},
{
title: '自有资金',
dataIndex: 'totalOwnFunds',
width: 180,
},
],
},
{
title: '资金缺口',
dataIndex: 'fundingGap',
width: 180,
},
],
},
];
}
}
// 列表
const dataSource = ref([]);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment