Commit 4ef853eb authored by 高滢's avatar 高滢

feat(资金计划): 资金来源表格六列

parent b3dd25b9
...@@ -59,3 +59,6 @@ ul { ...@@ -59,3 +59,6 @@ ul {
.tableshow { .tableshow {
display: revert; display: revert;
} }
.vben-editable-cell__action{
display: none;
}
...@@ -219,13 +219,13 @@ import {onMounted, ref, unref} from 'vue'; ...@@ -219,13 +219,13 @@ import {onMounted, ref, unref} from 'vue';
dataIndex: 'totalOwnFunds', dataIndex: 'totalOwnFunds',
width: 180, width: 180,
}, },
{
title: '资金缺口',
dataIndex: 'fundingGap',
width: 180,
},
], ],
}, },
{
title: '资金缺口',
dataIndex: 'fundingGap',
width: 180,
},
], ],
}, },
]; ];
...@@ -295,13 +295,13 @@ import {onMounted, ref, unref} from 'vue'; ...@@ -295,13 +295,13 @@ import {onMounted, ref, unref} from 'vue';
dataIndex: 'totalOwnFunds', dataIndex: 'totalOwnFunds',
width: 180, width: 180,
}, },
{
title: '资金缺口',
dataIndex: 'fundingGap',
width: 180,
},
], ],
}, },
{
title: '资金缺口',
dataIndex: 'fundingGap',
width: 180,
},
], ],
}, },
]; ];
......
import { FormProps, FormSchema, BasicColumn } from '@/components/Table'; import { FormSchema, BasicColumn } from '@/components/Table';
export function getBasicColumns(): BasicColumn[] { export function getBasicColumns(): BasicColumn[] {
return [ return [
...@@ -10,9 +10,7 @@ export function getBasicColumns(): BasicColumn[] { ...@@ -10,9 +10,7 @@ export function getBasicColumns(): BasicColumn[] {
{ {
title: '数值(万元)', title: '数值(万元)',
dataIndex: 'value', dataIndex: 'value',
width: 150, width: 80,
// sorter: true,
// defaultHidden: true,
edit: true, edit: true,
editable: true, editable: true,
editRule: true, editRule: true,
...@@ -31,9 +29,7 @@ export function basicColumnsDisabled(): BasicColumn[] { ...@@ -31,9 +29,7 @@ export function basicColumnsDisabled(): BasicColumn[] {
{ {
title: '数值(万元)', title: '数值(万元)',
dataIndex: 'value', dataIndex: 'value',
width: 150, width: 80,
// sorter: true,
// defaultHidden: true,
editComponent: 'InputNumber', editComponent: 'InputNumber',
}, },
]; ];
...@@ -44,52 +40,69 @@ export function getBasicColumnsTwo(): BasicColumn[] { ...@@ -44,52 +40,69 @@ export function getBasicColumnsTwo(): BasicColumn[] {
{ {
title: '季度', title: '季度',
dataIndex: 'quarter', dataIndex: 'quarter',
width: 80, width: 50,
fixed: 'left',
}, },
{ {
title: '政府拨款', title: '政府拨款(万元)',
dataIndex: 'governmentGrant', dataIndex: 'governmentGrant',
width: 150, width: 50,
// sorter: true,
// defaultHidden: true,
edit: true, edit: true,
editable: true, editable: true,
editRule: true, editRule: true,
editComponent: 'InputNumber', editComponent: 'InputNumber',
}, },
{ {
title: '专项债拨款', title: '专项债拨款(万元)',
dataIndex: 'specialBond', dataIndex: 'specialBond',
width: 150, width: 50,
// sorter: true,
// defaultHidden: true,
edit: true, edit: true,
editable: true, editable: true,
editRule: true, editRule: true,
editComponent: 'InputNumber', editComponent: 'InputNumber',
}, },
{ {
title: '银行融资', title: '银行融资(万元)',
dataIndex: 'bankFinancing', dataIndex: 'bankFinancing',
width: 150, width: 50,
// sorter: true,
// defaultHidden: true,
edit: true, edit: true,
editable: true, editable: true,
editRule: true, editRule: true,
editComponent: 'InputNumber', editComponent: 'InputNumber',
}, },
{ {
title: '自有资金', title: '自有资金(万元)',
dataIndex: 'ownFunds', dataIndex: 'ownFunds',
width: 150, width: 50,
// sorter: true,
// defaultHidden: true,
edit: true, edit: true,
editable: true, editable: true,
editRule: true, editRule: true,
editComponent: 'InputNumber', editComponent: 'InputNumber',
}, },
{
title: '资金缺口(万元)',
dataIndex: 'fundingGap',
width: 50,
edit: true,
editable: true,
editRule: true,
editComponent: 'InputNumber',
},
{
title: '资金计划额(万元)',
dataIndex: 'totalValue',
width: 50,
customRender: ({ record }) => {
// 这里可以根据record的其他字段计算值
record.totalValue =
record.ownFunds +
record.specialBond +
record.bankFinancing +
record.governmentGrant +
record.fundingGap; // 计算新值
return record.totalValue; // 返回计算后的值
},
},
]; ];
} }
...@@ -104,32 +117,36 @@ export function basicColumnsTwoDisabled(): BasicColumn[] { ...@@ -104,32 +117,36 @@ export function basicColumnsTwoDisabled(): BasicColumn[] {
title: '政府拨款', title: '政府拨款',
dataIndex: 'governmentGrant', dataIndex: 'governmentGrant',
width: 150, width: 150,
// sorter: true,
// defaultHidden: true,
editComponent: 'InputNumber', editComponent: 'InputNumber',
}, },
{ {
title: '专项债拨款', title: '专项债拨款',
dataIndex: 'specialBond', dataIndex: 'specialBond',
width: 150, width: 150,
// sorter: true,
// defaultHidden: true,
editComponent: 'InputNumber', editComponent: 'InputNumber',
}, },
{ {
title: '银行融资', title: '银行融资',
dataIndex: 'bankFinancing', dataIndex: 'bankFinancing',
width: 150, width: 150,
// sorter: true,
// defaultHidden: true,
editComponent: 'InputNumber', editComponent: 'InputNumber',
}, },
{ {
title: '自有资金', title: '自有资金',
dataIndex: 'ownFunds', dataIndex: 'ownFunds',
width: 150, width: 150,
// sorter: true, editComponent: 'InputNumber',
// defaultHidden: true, },
{
title: '资金缺口(万元)',
dataIndex: 'fundingGap',
width: 50,
editComponent: 'InputNumber',
},
{
title: '资金计划额(万元)',
dataIndex: 'totalValue',
width: 50,
editComponent: 'InputNumber', editComponent: 'InputNumber',
}, },
]; ];
...@@ -262,6 +279,21 @@ export function formSchema(year, planType): FormSchema[] { ...@@ -262,6 +279,21 @@ export function formSchema(year, planType): FormSchema[] {
}, },
colProps: { span: 7, offset: 1 }, colProps: { span: 7, offset: 1 },
}, },
{
field: 'fundSource',
label: '资金来源',
required: true,
component: 'Select',
componentProps: {
options: [
{ label: '政府投资项目', value: '政府投资项目' },
{ label: '公司投资项目', value: '公司投资项目' },
{ label: '专项债项目', value: '专项债项目' },
{ label: '承建项目', value: '承建项目' },
],
},
colProps: { span: 7, offset: 1 },
},
{ {
field: 'time', field: 'time',
component: 'RangePicker', component: 'RangePicker',
...@@ -303,17 +335,17 @@ export function formSchema(year, planType): FormSchema[] { ...@@ -303,17 +335,17 @@ export function formSchema(year, planType): FormSchema[] {
component: 'Input', component: 'Input',
colProps: { span: 7, offset: 1 }, colProps: { span: 7, offset: 1 },
}, },
{ // {
field: 'fundingGap', // field: 'fundingGap',
label: '2024资金缺口:', // label: '2024资金缺口:',
labelWidth: 200, // labelWidth: 200,
required: true, // required: true,
component: 'InputNumber', // component: 'InputNumber',
componentProps: { // componentProps: {
addonAfter: '万元', // addonAfter: '万元',
}, // },
colProps: { span: 7, offset: 1 }, // colProps: { span: 7, offset: 1 },
}, // },
{ {
label: '备注', label: '备注',
field: 'remarks', field: 'remarks',
......
...@@ -49,6 +49,16 @@ export let formSchema: FormSchema[] = [ ...@@ -49,6 +49,16 @@ export let formSchema: FormSchema[] = [
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
{
field: 'projectInvestment',
label: '立项总投资',
required: true,
component: 'InputNumber',
componentProps: {
addonAfter: '万元',
},
labelWidth: '140px',
},
{ {
field: 'isReserveProject', field: 'isReserveProject',
label: '储备项目', label: '储备项目',
......
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