Commit ecd63478 authored by mengzixuan's avatar mengzixuan

feat: 年度工程资金计划列表接口对接

parent edbd08b7
......@@ -2,7 +2,7 @@ import { ProjectParams, ProjectListGetResultModel, ProjectModel } from './model/
import { defHttp } from '@/utils/http/axios';
enum Api {
GetList = '/statement/list/page',
GetList = '/pro/monthEngineer/page',
}
export const getMonthlyPlanList = (params?: ProjectParams) =>
defHttp.post<ProjectModel>({ url: Api.GetList, data: params });
defHttp.post<ProjectModel>({ url: Api.GetList, data: params });
......@@ -2,7 +2,19 @@ import type { AppRouteModule } from '@/router/types';
import { LAYOUT } from '@/router/constant';
const monthlyPlan: AppRouteModule = {
const monthlyPlan: {
redirect: string;
path: string;
component: () => Promise<{}>;
children: {
path: string;
component: () => Promise<{}>;
meta: { orderNo: number; title: string };
name: string;
}[];
meta: { orderNo: number; icon: string; hideChildrenInMenu: boolean; title: string };
name: string;
} = {
path: '/monthlyPlan',
name: 'monthlyPlan',
component: LAYOUT,
......@@ -24,6 +36,16 @@ const monthlyPlan: AppRouteModule = {
orderNo: 11,
},
},
{
path: 'monthlyPlanEdit',
name: 'monthlyPlanEdit',
component: () => import('@/views/monthlyPlan/monthlyPlanEdit/monthlyPlanEdit.vue'),
meta: {
// affix: true,
title: '新建计划(工程)',
orderNo: 8,
},
},
],
};
......
......@@ -19,11 +19,17 @@
label: '详情',
// icon: 'clarity:note-edit-line',
onClick: handleEdit.bind(null, record, 1),
ifShow: (_action) => {
return record.reviewStatus == '1';
},
},
{
label: '修改',
// icon: 'clarity:note-edit-line',
onClick: handleEdit.bind(null, record, 0),
ifShow: (_action) => {
return record.reviewStatus == null;
},
},
{
label: '审核',
......
......@@ -23,57 +23,57 @@ export const columns: (
},
{
title: '月份',
dataIndex: 'projectName',
dataIndex: 'monthYear',
width: 200,
},
{
title: '类型',
dataIndex: 'implementingEntity',
width: 180,
},
// {
// title: '类型',
// dataIndex: 'implementingEntity',
// width: 180,
// },
{
title: '合同额总计',
dataIndex: 'constructionMode',
dataIndex: 'totalcontractamount',
width: 180,
},
{
title: '资金缺口总计',
dataIndex: 'projectType',
dataIndex: 'totalfundgap',
width: 180,
},
{
title: '年资金缺口',
dataIndex: 'fundingSource',
dataIndex: 'totalfundgapyear',
width: 180,
},
{
title: '公司名称',
dataIndex: 'constructionPurpose',
dataIndex: 'companyName',
width: 180,
},
{
title: '最新更新人',
dataIndex: '国constructionScale',
dataIndex: 'createBy',
width: 180,
},
{
title: '最新更新时间',
dataIndex: '国constructionScale',
dataIndex: 'createTime',
width: 180,
},
{
title: '审核状态',
dataIndex: '国constructionScale',
dataIndex: 'revieweStatus',
width: 180,
},
{
title: '审核人',
dataIndex: '国constructionScale',
dataIndex: 'revieweUser',
width: 180,
},
{
title: '审核时间',
dataIndex: '国constructionScale',
dataIndex: 'reviewTime',
width: 180,
},
];
......
......@@ -2,7 +2,7 @@
<div>
<BasicTable @register="registerTable" :title="'月度工程资金计划'">
<template #toolbar>
<a-button class="btn" type="primary" @click="Import"> 新建月度工程资金计划 </a-button>
<a-button class="btn" type="primary" @click="addMonthlyPlan"> 新建月度工程资金计划 </a-button>
</template>
<template #bodyCell="{ column, text, record, index }">
......@@ -33,6 +33,7 @@
</template>
</template>
</BasicTable>
<yearModal @register="register" @close="handleNew" />
</div>
</template>
<script lang="ts" setup>
......@@ -47,9 +48,16 @@ import { columns, searchFormSchema } from './data';
defineOptions({ name: 'MonthlyPlan' });
const [registerDrawer, { openDrawer }] = useDrawer();
import yearModal from '@/components/yearModal.vue';
import { useModal } from '@/components/Modal';
import {router} from "@/router";
const [register, { openModal: openModal }] = useModal();
const [registerTable, { reload }] = useTable({
api: getListByPage,
api: getMonthlyPlanList,
title: '123',
columns,
formConfig: {
......@@ -85,13 +93,23 @@ function handleSuccess() {
reload();
}
const Import = () => {
console.log('导入数据');
};
const change = (key: string) => {
reload();
};
const addMonthlyPlan = () => {
openModal(true, {
data: ['year'],
});
};
const handleNew = (e) => {
console.log('eeee', e);
router.push({
path: '/monthlyPlan/monthlyPlanEdit',
query: e,
});
};
</script>
<style scoped>
.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: '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' },
// ],
// },
// },
];
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