Commit edbd08b7 authored by mengzixuan's avatar mengzixuan

feat: 工程项目投资计划(新建):页面完善

parent 178a7dfe
...@@ -13,6 +13,7 @@ enum Api { ...@@ -13,6 +13,7 @@ enum Api {
AddEngineeringProject = '/pro/investmentPlan/add', AddEngineeringProject = '/pro/investmentPlan/add',
UpdateProject = '/pro/investmentPlan/edit', UpdateProject = '/pro/investmentPlan/edit',
ProjectDetail = '/pro/investmentPlan/getById', ProjectDetail = '/pro/investmentPlan/getById',
audit = '/pro/investmentPlan/audit',
} }
export const getEngineeringList = (params?: ProjectParams) => export const getEngineeringList = (params?: ProjectParams) =>
defHttp.post<ProjectModel>({ url: Api.GetList, data: params }); defHttp.post<ProjectModel>({ url: Api.GetList, data: params });
...@@ -43,3 +44,6 @@ export const updateItem = (params?: any) => ...@@ -43,3 +44,6 @@ export const updateItem = (params?: any) =>
export const getItem = (params?: any) => export const getItem = (params?: any) =>
defHttp.get<ListItem[]>({ url: Api.ProjectDetail, params }); defHttp.get<ListItem[]>({ url: Api.ProjectDetail, params });
export const auditItem = (params?: any) =>
defHttp.post<ListItem[]>({ url: Api.audit, params });
...@@ -2,7 +2,7 @@ import type { AppRouteModule } from '@/router/types'; ...@@ -2,7 +2,7 @@ import type { AppRouteModule } from '@/router/types';
import { LAYOUT } from '@/router/constant'; import { LAYOUT } from '@/router/constant';
const engineeringProject: AppRouteModule = { const engineeringProject: { redirect: string; path: string; component: () => Promise<{}>; children: ({ path: string; component: () => Promise<{}>; meta: { orderNo: number; title: string }; name: string } | { path: string; component: () => Promise<{}>; meta: { orderNo: number; title: string }; name: string } | { path: string; component: () => Promise<{}>; meta: { orderNo: number; title: string }; name: string })[]; meta: { orderNo: number; icon: string; hideChildrenInMenu: boolean; title: string }; name: string } = {
path: '/engineeringProject', path: '/engineeringProject',
name: 'engineeringProject', name: 'engineeringProject',
component: LAYOUT, component: LAYOUT,
...@@ -25,15 +25,35 @@ const engineeringProject: AppRouteModule = { ...@@ -25,15 +25,35 @@ const engineeringProject: AppRouteModule = {
}, },
}, },
{ {
path: 'edit', path: 'engineeringEdit',
name: 'engineeringEdit', name: 'engineeringEdit',
component: () => import('@/views/engineeringProject/engineeringEdit.vue'), component: () => import('@/views/engineeringProject/engineeringEdit/engineeringEdit.vue'),
meta: { meta: {
// affix: true, // affix: true,
title: '新建计划(工程)', title: '新建计划(工程)',
orderNo: 8, orderNo: 8,
}, },
}, },
{
path: 'constructionEdit',
name: 'constructionEdit',
component: () => import('@/views/engineeringProject/constructionEdit/constructionEdit.vue'),
meta: {
// affix: true,
title: '新建计划(承建)',
orderNo: 8,
},
},
{
path: 'reserveEdit',
name: 'reserveEdit',
component: () => import('@/views/engineeringProject/reserveEdit/reserveEdit.vue'),
meta: {
// affix: true,
title: '新建计划(储备)',
orderNo: 8,
},
},
], ],
}; };
......
import { optionsListApi } from '@/api/demo/select';
import { FormProps, FormSchema, BasicColumn } from '@/components/Table';
import { VxeFormItemProps, VxeGridPropTypes } from '@/components/VxeTable';
import { ref } from 'vue';
import { Input } from 'ant-design-vue';
export function getBasicColumns(): BasicColumn[] {
return [
{
title: '年份',
dataIndex: 'year',
width: 80,
},
{
title: '金额(万元)',
dataIndex: 'amount',
width: 150,
// sorter: true,
// defaultHidden: true,
edit: true,
},
];
}
export const formSchema: ({ colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { valueFormat: string; format: string; style: { width: string }; placeholder: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { options: ({ label: string; value: string } | { label: string; value: string } | { label: string; value: string })[] }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; icon: string; componentProps: { style: { width: string }; placeholder: string[] }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { options: ({ label: string; value: string } | { label: string; value: string } | { label: string; value: string })[] }; label: string; required: boolean })[] = [
{
field: 'projectName',
label: '项目名称',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'constructionSite',
label: '建设地点',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'constructionMode',
label: '建设模式',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'projectType',
label: '项目类型',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'constructionScale',
label: '建设规模',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'projectOverview',
label: '项目概况:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'fundingSource',
label: '资金来源:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'implementingEntity',
label: '实施主体:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'projectOverview',
label: '项目概况:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'filingCycle',
label: '填报年度:',
required: true,
component: 'DatePicker',
componentProps: {
placeholder: '选择填报周期',
picker: 'year',
style: { width: '100%' },
valueFormat: 'YYYY',
format: 'YYYY',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'totalInvestment',
label: '合同金额',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'contract',
label: '合同方式',
required: true,
component: 'Select',
componentProps: {
options: [
{ label: '总包', value: '0' },
{ label: '分包', value: '1' },
],
},
colProps: { span: 7, offset: 1 },
},
{
field: 'matchingFunds',
label: '2024年财政预算匹配资金',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'specialBondFunds',
label: '其中专项债项目2024年预计使用专项债资金',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'planFunds',
label: '2024年计划资金',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'attribute',
label: '建设性质',
required: true,
component: 'Select',
componentProps: {
options: [
{ label: '新建', value: '0' },
{ label: '结转', value: '1' },
{ label: '缓建', value: '2' },
],
},
colProps: { span: 7, offset: 1 },
},
{
field: 'time',
component: 'RangePicker',
label: '开竣工时间',
required: true,
icon: 'healthicons:i-schedule-school-date-time-outline',
colProps: { span: 7, offset: 1 },
componentProps: {
placeholder: ['开始日期', '结束日期'],
style: { width: '100%' },
valueFormat: 'YYYY-MM-DD',
format: 'YYYY-MM-DD',
},
},
{
field: 'schedule',
label: '2024年底预计形象进度',
required: true,
component: 'Select',
componentProps: {
options: [
{ label: 'A(已经立项实施的跨年工程)', value: '0' },
{ label: 'B(该年度必须建设的项目)', value: '1' },
{ label: 'C(该年度必须建设的项目)', value: '2' },
],
},
colProps: { span: 7, offset: 1 },
},
{
label: '备注',
field: 'remarks',
required: true,
component: 'InputTextArea',
componentProps: {
maxlength: 100,
showCount: true,
},
colProps: { span: 7, offset: 1 },
},
// {
// field: 'isReserveProject',
// label: '是否为储备项目',
// component: 'RadioButtonGroup',
// defaultValue: '0',
// componentProps: {
// options: [
// { label: '是', value: '1' },
// { label: '否', value: '0' },
// ],
// },
// },
// {
// field: 'status',
// label: '状态',
// component: 'RadioButtonGroup',
// defaultValue: '0',
// componentProps: {
// options: [
// { label: '启用', value: '1' },
// { label: '停用', value: '0' },
// ],
// },
// },
];
...@@ -125,243 +125,4 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -125,243 +125,4 @@ export const searchFormSchema: FormSchema[] = [
}, },
]; ];
export const formSchema: ({ colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { valueFormat: string; format: string; style: { width: string }; placeholder: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { options: ({ label: string; value: string } | { label: string; value: string } | { label: string; value: string })[] }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; icon: string; componentProps: { style: { width: string }; placeholder: string[] }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { options: ({ label: string; value: string } | { label: string; value: string } | { label: string; value: string })[] }; label: string; required: boolean })[] = [
{
field: 'projectName',
label: '项目名称',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'constructionSite',
label: '建设地点',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'constructionMode',
label: '建设模式',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'projectType',
label: '项目类型',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'constructionScale',
label: '建设规模',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'projectOverview',
label: '项目概况:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'fundingSource',
label: '资金来源:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'implementingEntity',
label: '实施主体:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'projectOverview',
label: '项目概况:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'filingCycle',
label: '填报年度:',
required: true,
component: 'DatePicker',
componentProps: {
placeholder: '选择填报周期',
picker: 'year',
style: { width: '100%' },
valueFormat: 'YYYY',
format: 'YYYY',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'totalInvestment',
label: '总投资',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'competentDepartment',
label: '项目主管部门',
required: true,
component: 'Input',
colProps: { span: 7, offset: 1 },
},
{
field: 'matchingFunds',
label: '2024年财政预算匹配资金',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'specialBondFunds',
label: '其中专项债项目2024年预计使用专项债资金',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'planFunds',
label: '2024年计划资金',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'attribute',
label: '建设性质',
required: true,
component: 'Select',
componentProps: {
options: [
{ label: '新建', value: '0' },
{ label: '结转', value: '1' },
{ label: '缓建', value: '2' },
],
},
colProps: { span: 7, offset: 1 },
},
{
field: 'time',
component: 'RangePicker',
label: '开竣工时间',
required: true,
icon: 'healthicons:i-schedule-school-date-time-outline',
colProps: { span: 7, offset: 1 },
componentProps: {
placeholder: ['开始日期', '结束日期'],
style: { width: '100%' },
valueFormat: 'YYYY-MM-DD',
format: 'YYYY-MM-DD',
},
},
{
field: 'schedule',
label: '2024年底预计形象进度',
required: true,
component: 'Select',
componentProps: {
options: [
{ label: 'A(已经立项实施的跨年工程)', value: '0' },
{ label: 'B(该年度必须建设的项目)', value: '1' },
{ label: 'C(该年度必须建设的项目)', value: '2' },
],
},
colProps: { span: 7, offset: 1 },
},
{
label: '备注',
field: 'remarks',
required: true,
component: 'InputTextArea',
componentProps: {
maxlength: 100,
showCount: true,
},
colProps: { span: 7, offset: 1 },
},
// {
// field: 'isReserveProject',
// label: '是否为储备项目',
// component: 'RadioButtonGroup',
// defaultValue: '0',
// componentProps: {
// options: [
// { label: '是', value: '1' },
// { label: '否', value: '0' },
// ],
// },
// },
// {
// field: 'status',
// label: '状态',
// component: 'RadioButtonGroup',
// defaultValue: '0',
// componentProps: {
// options: [
// { label: '启用', value: '1' },
// { label: '停用', value: '0' },
// ],
// },
// },
];
...@@ -40,13 +40,13 @@ ...@@ -40,13 +40,13 @@
import { ref, nextTick, onMounted, unref, computed, reactive } from 'vue'; import { ref, nextTick, onMounted, unref, computed, reactive } from 'vue';
import { demoListApi } from '@/api/demo/table'; import { demoListApi } from '@/api/demo/table';
import engineeringprojectModel from './engineeringProjectModel/engineeringprojectModel.vue'; import engineeringprojectModel from '../engineeringProjectModel/engineeringprojectModel.vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { PageWrapper } from '@/components/Page'; import { PageWrapper } from '@/components/Page';
import PageCard from '@/components/Page/src/PageCard.vue'; import PageCard from '@/components/Page/src/PageCard.vue';
import projectDrawer from '@/views/project/projectDrawer.vue'; import projectDrawer from '@/views/project/projectDrawer.vue';
import { BasicForm, useForm, FormProps, UseFormReturnType } from '@/components/Form'; import { BasicForm, useForm, FormProps, UseFormReturnType } from '@/components/Form';
import { formSchema } from './data'; import { formSchema } from '../engineeringEdit/tableData';
import { deepMerge } from '@/utils'; import { deepMerge } from '@/utils';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import { useDrawer } from '@/components/Drawer'; import { useDrawer } from '@/components/Drawer';
......
import { optionsListApi } from '@/api/demo/select';
import { FormProps, FormSchema, BasicColumn } from '@/components/Table';
import { VxeFormItemProps, VxeGridPropTypes } from '@/components/VxeTable';
import { ref } from 'vue';
import { Input } from 'ant-design-vue';
export function getBasicColumns(): BasicColumn[] {
return [
{
title: '年份',
dataIndex: 'year',
width: 80,
},
{
title: '金额(万元)',
dataIndex: 'amount',
width: 150,
// sorter: true,
// defaultHidden: true,
edit: true,
},
];
}
export const formSchema: ({ colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { valueFormat: string; format: string; style: { width: string }; placeholder: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { options: ({ label: string; value: string } | { label: string; value: string } | { label: string; value: string })[] }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; icon: string; componentProps: { style: { width: string }; placeholder: string[] }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { options: ({ label: string; value: string } | { label: string; value: string } | { label: string; value: string })[] }; label: string; required: boolean })[] = [
{
field: 'projectName',
label: '项目名称',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'constructionSite',
label: '建设地点',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'constructionMode',
label: '建设模式',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'projectType',
label: '项目类型',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'constructionScale',
label: '建设规模',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'projectOverview',
label: '项目概况:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'fundingSource',
label: '资金来源:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'implementingEntity',
label: '实施主体:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'projectOverview',
label: '项目概况:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'filingCycle',
label: '填报年度:',
required: true,
component: 'DatePicker',
componentProps: {
placeholder: '选择填报周期',
picker: 'year',
style: { width: '100%' },
valueFormat: 'YYYY',
format: 'YYYY',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'totalInvestment',
label: '总投资',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'competentDepartment',
label: '项目主管部门',
required: true,
component: 'Input',
colProps: { span: 7, offset: 1 },
},
{
field: 'matchingFunds',
label: '2024年财政预算匹配资金',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'specialBondFunds',
label: '其中专项债项目2024年预计使用专项债资金',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'planFunds',
label: '2024年计划资金',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'attribute',
label: '建设性质',
required: true,
component: 'Select',
componentProps: {
options: [
{ label: '新建', value: '0' },
{ label: '结转', value: '1' },
{ label: '缓建', value: '2' },
],
},
colProps: { span: 7, offset: 1 },
},
{
field: 'time',
component: 'RangePicker',
label: '开竣工时间',
required: true,
icon: 'healthicons:i-schedule-school-date-time-outline',
colProps: { span: 7, offset: 1 },
componentProps: {
placeholder: ['开始日期', '结束日期'],
style: { width: '100%' },
valueFormat: 'YYYY-MM-DD',
format: 'YYYY-MM-DD',
},
},
{
field: 'schedule',
label: '2024年底预计形象进度',
required: true,
component: 'Select',
componentProps: {
options: [
{ label: 'A(已经立项实施的跨年工程)', value: '0' },
{ label: 'B(该年度必须建设的项目)', value: '1' },
{ label: 'C(该年度必须建设的项目)', value: '2' },
],
},
colProps: { span: 7, offset: 1 },
},
{
label: '备注',
field: 'remarks',
required: true,
component: 'InputTextArea',
componentProps: {
maxlength: 100,
showCount: true,
},
colProps: { span: 7, offset: 1 },
},
// {
// field: 'isReserveProject',
// label: '是否为储备项目',
// component: 'RadioButtonGroup',
// defaultValue: '0',
// componentProps: {
// options: [
// { label: '是', value: '1' },
// { label: '否', value: '0' },
// ],
// },
// },
// {
// field: 'status',
// label: '状态',
// component: 'RadioButtonGroup',
// defaultValue: '0',
// componentProps: {
// options: [
// { label: '启用', value: '1' },
// { label: '停用', value: '0' },
// ],
// },
// },
];
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<div> <div>
<BasicTable @register="registerTable" :title="'工程项目投资计划'"> <BasicTable @register="registerTable" :title="'工程项目投资计划'">
<template #toolbar> <template #toolbar>
<a-button class="btn" type="primary" @click="addEngineering"> 新建计划(工程) </a-button> <a-button class="btn" type="primary" @click="addEngineering('engineering')"> 新建计划(工程) </a-button>
<a-button class="btn" type="primary" @click="Import"> 新建计划(承建) </a-button> <a-button class="btn" type="primary" @click="addEngineering('construction')"> 新建计划(承建) </a-button>
<a-button type="primary" @click="Import"> 新建计划(储备) </a-button> <a-button type="primary" @click="addEngineering('reserve')"> 新建计划(储备) </a-button>
</template> </template>
<template #bodyCell="{ column, text, record, index }"> <template #bodyCell="{ column, text, record, index }">
<!-- 当前列是序号列时,显示序号 --> <!-- 当前列是序号列时,显示序号 -->
...@@ -26,13 +26,15 @@ ...@@ -26,13 +26,15 @@
onClick: handleEdit.bind(null, record, 0), onClick: handleEdit.bind(null, record, 0),
}, },
{ {
label: '删除', label: '审核',
// icon: 'ant-design:delete-outlined', color: 'success',
color: 'error',
popConfirm: { popConfirm: {
title: '是否确认删除', title: '是否确认审核',
placement: 'left', placement: 'left',
confirm: handleDelete.bind(null, record), confirm: examine.bind(null, record, true),
},
ifShow: (_action) => {
return record.reviewStatus == null;
}, },
}, },
]" ]"
...@@ -47,7 +49,7 @@ ...@@ -47,7 +49,7 @@
import { BasicTable, useTable, TableAction } from '@/components/Table'; import { BasicTable, useTable, TableAction } from '@/components/Table';
import yearModal from '@/components/yearModal.vue'; import yearModal from '@/components/yearModal.vue';
import { useModal } from '@/components/Modal'; import { useModal } from '@/components/Modal';
import { getEngineeringList } from '@/api/project/engineeringProject'; import { getEngineeringList, auditItem } from '@/api/project/engineeringProject';
import { getListByPage } from '@/api/project/biddingPlan'; import { getListByPage } from '@/api/project/biddingPlan';
...@@ -55,8 +57,10 @@ ...@@ -55,8 +57,10 @@
import { columns, searchFormSchema } from './data'; import { columns, searchFormSchema } from './data';
import { router } from '@/router'; import { router } from '@/router';
import {ref} from "vue";
defineOptions({ name: 'EngineeringProject' }); defineOptions({ name: 'EngineeringProject' });
const types = ref('');
const [registerDrawer, { openDrawer }] = useDrawer(); const [registerDrawer, { openDrawer }] = useDrawer();
...@@ -88,13 +92,32 @@ ...@@ -88,13 +92,32 @@
// record, // record,
// isUpdate: true, // isUpdate: true,
// }); // });
console.log('record.planType', record.planType)
if (record.planType === '工程') {
router.push({
path: '/engineeringProject/engineeringEdit',
query: {
id: record.id,
disabled: String(disabled),
},
});
} else if (record.planType === '承建') {
router.push({ router.push({
path: '/engineeringProject/edit', path: '/engineeringProject/constructionEdit',
query: { query: {
id: record.id, id: record.id,
disabled: String(disabled), disabled: String(disabled),
}, },
}); });
} else if (record.planType === '储备') {
router.push({
path: '/engineeringProject/reserveEdit',
query: {
id: record.id,
disabled: String(disabled),
},
});
}
} }
function handleDelete(record: Recordable) { function handleDelete(record: Recordable) {
...@@ -109,27 +132,47 @@ ...@@ -109,27 +132,47 @@
console.log('导入数据'); console.log('导入数据');
}; };
const addEngineering = () => { const addEngineering = (type) => {
// openModal(true, { // openModal(true, {
// data: 'content', // data: 'content',
// info: 'Info', // info: 'Info',
// }); // });
types.value = type
openModal(true, { openModal(true, {
data: ['year'], data: ['year'],
}); });
}; };
const handleNew = (e) => { const handleNew = (e) => {
console.log(e); console.log('eeee', e);
console.log('types.value', types.value)
if (types.value == 'engineering') {
router.push({
path: '/engineeringProject/engineeringEdit',
query: e,
});
} else if (types.value == 'construction') {
router.push({ router.push({
path: '/engineeringProject/edit', path: '/engineeringProject/constructionEdit',
query: e, query: e,
}); });
} else if (types.value == 'reserve') {
router.push({
path: '/engineeringProject/reserveEdit',
query: e,
});
}
}; };
const change = (key: string) => { const change = (key: string) => {
reload(); reload();
}; };
async function examine(record: Recordable, disabled: boolean) {
const id = record.id;
const res = await auditItem({ id });
console.log(res);
reload();
}
</script> </script>
<style scoped> <style scoped>
.btn { .btn {
......
This diff is collapsed.
import { optionsListApi } from '@/api/demo/select';
import { FormProps, FormSchema, BasicColumn } from '@/components/Table';
import { VxeFormItemProps, VxeGridPropTypes } from '@/components/VxeTable';
import { ref } from 'vue';
import { Input } from 'ant-design-vue';
export function getBasicColumns(): BasicColumn[] {
return [
{
title: '年份',
dataIndex: 'year',
width: 80,
},
{
title: '金额(万元)',
dataIndex: 'amount',
width: 150,
// sorter: true,
// defaultHidden: true,
edit: true,
},
];
}
export const formSchema: ({ colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { readonly: boolean; style: { border: string } }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { valueFormat: string; format: string; style: { width: string }; placeholder: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { addonAfter: string }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { options: ({ label: string; value: string } | { label: string; value: string } | { label: string; value: string })[] }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; icon: string; componentProps: { style: { width: string }; placeholder: string[] }; label: string; required: boolean } | { colProps: { offset: number; span: number }; component: string; field: string; componentProps: { options: ({ label: string; value: string } | { label: string; value: string } | { label: string; value: string })[] }; label: string; required: boolean })[] = [
{
field: 'projectName',
label: '项目名称',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'constructionSite',
label: '建设地点',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'constructionMode',
label: '建设模式',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'projectType',
label: '项目类型',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'constructionScale',
label: '建设规模',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'projectOverview',
label: '项目概况:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'fundingSource',
label: '资金来源:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'implementingEntity',
label: '实施主体:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'projectOverview',
label: '项目概况:',
required: true,
component: 'Input',
componentProps: {
readonly: true,
style: { border: 'none' },
},
colProps: { span: 7, offset: 1 },
},
{
field: 'filingCycle',
label: '填报年度:',
required: true,
component: 'DatePicker',
componentProps: {
placeholder: '选择填报周期',
picker: 'year',
style: { width: '100%' },
valueFormat: 'YYYY',
format: 'YYYY',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'totalInvestment',
label: '总投资',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'competentDepartment',
label: '项目主管部门',
required: true,
component: 'Input',
colProps: { span: 7, offset: 1 },
},
{
field: 'planFunds',
label: '2024年计划资金',
required: true,
component: 'Input',
componentProps: {
addonAfter: '万元',
},
colProps: { span: 7, offset: 1 },
},
{
field: 'attribute',
label: '建设性质',
required: true,
component: 'Select',
componentProps: {
options: [
{ label: '新建', value: '0' },
{ label: '结转', value: '1' },
{ label: '缓建', value: '2' },
],
},
colProps: { span: 7, offset: 1 },
},
{
field: 'time',
component: 'RangePicker',
label: '开竣工时间',
required: true,
icon: 'healthicons:i-schedule-school-date-time-outline',
colProps: { span: 7, offset: 1 },
componentProps: {
placeholder: ['开始日期', '结束日期'],
style: { width: '100%' },
valueFormat: 'YYYY-MM-DD',
format: 'YYYY-MM-DD',
},
},
{
field: 'schedule',
label: '2024年底预计形象进度',
required: true,
component: 'Select',
componentProps: {
options: [
{ label: 'A(已经立项实施的跨年工程)', value: '0' },
{ label: 'B(该年度必须建设的项目)', value: '1' },
{ label: 'C(该年度必须建设的项目)', value: '2' },
],
},
colProps: { span: 7, offset: 1 },
},
{
label: '备注',
field: 'remarks',
required: true,
component: 'InputTextArea',
componentProps: {
maxlength: 300,
showCount: true,
},
colProps: { span: 7, offset: 1 },
},
// {
// field: 'isReserveProject',
// label: '是否为储备项目',
// component: 'RadioButtonGroup',
// defaultValue: '0',
// componentProps: {
// options: [
// { label: '是', value: '1' },
// { label: '否', value: '0' },
// ],
// },
// },
// {
// field: 'status',
// label: '状态',
// component: 'RadioButtonGroup',
// defaultValue: '0',
// componentProps: {
// options: [
// { label: '启用', value: '1' },
// { label: '停用', value: '0' },
// ],
// },
// },
];
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