Commit e9434b39 authored by 高滢's avatar 高滢

feat(月度详情): 本月计划数量回显

parent 7083a9d2
import { ProjectParams } from '@/api/project/model/projectModel';
import { defHttp } from '@/utils/http/axios'; import { defHttp } from '@/utils/http/axios';
enum Api { enum Api {
LIST = '/pro/reportCenter/mothFund', LIST = '/pro/reportCenter/mothFund',
DETAIL = '/pro/reportCenter/details/details', DETAIL = '/pro/reportCenter/details/details',
EXPORT = '/pro/export/monthlyEngineer', EXPORT = '/pro/export/monthlyEngineer',
YEARLIST = '/pro/monthEngineer/mothFundByMonthYear',
} }
// 按年查询所有月度
export const monthListByMonthYear = (params) =>
defHttp.post({
url: Api.YEARLIST,
params,
});
//月季度列表接口 //月季度列表接口
export const monthList = (params) => export const monthList = (params) =>
defHttp.post({ defHttp.post({
......
...@@ -14,6 +14,7 @@ enum Api { ...@@ -14,6 +14,7 @@ enum Api {
GetMonthlyPlanDetail = '/pro/reportCenter/details/details', GetMonthlyPlanDetail = '/pro/reportCenter/details/details',
GetStatisticMonthEngineer = '/pro/monthEngineer/statistic/monthEngineer', GetStatisticMonthEngineer = '/pro/monthEngineer/statistic/monthEngineer',
GetStatisticDetails = '/pro/import/lunch', GetStatisticDetails = '/pro/import/lunch',
ExportCount = '/pro/export/monthlyStatisticExport',
} }
export const getMonthlyPlanList = (params?: ProjectParams) => export const getMonthlyPlanList = (params?: ProjectParams) =>
defHttp.post<ProjectModel>({ url: Api.GetList, data: params }); defHttp.post<ProjectModel>({ url: Api.GetList, data: params });
...@@ -72,3 +73,12 @@ export const getStatisticDetails = (params?: any) => ...@@ -72,3 +73,12 @@ export const getStatisticDetails = (params?: any) =>
params, params,
}); });
export const exportMonthCount = (params?: any) =>
defHttp.post<any>(
{
url: Api.ExportCount,
data: params,
responseType: 'blob',
},
{ errorMessageMode: 'none', isTransformResponse: false },
);
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
<BasicForm ref="formElRef" @register="registerForm"> <BasicForm ref="formElRef" @register="registerForm">
<template #formFooter> <template #formFooter>
<a-button type="primary" @click="handleSubmit"> 查询</a-button> <a-button type="primary" @click="handleSubmit"> 查询</a-button>
<a-button type="primary" @click="exportCount"> 导出</a-button>
</template> </template>
</BasicForm> </BasicForm>
...@@ -32,7 +34,7 @@ ...@@ -32,7 +34,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import { Table } from 'ant-design-vue'; import { Table } from 'ant-design-vue';
import { getStatistic } from '@/api/project/monthlyPlan.js'; import { exportMonthCount, getStatistic } from '@/api/project/monthlyPlan.js';
import { BasicForm, FormActionType, useForm } from '@/components/Form'; import { BasicForm, FormActionType, useForm } from '@/components/Form';
import StatisticWindow from '@/views/monthlyPlan/statisticWindow/statisticWindow.vue'; import StatisticWindow from '@/views/monthlyPlan/statisticWindow/statisticWindow.vue';
import { useModal } from '@/components/Modal'; import { useModal } from '@/components/Modal';
...@@ -41,6 +43,8 @@ ...@@ -41,6 +43,8 @@
import { error } from '@/utils/log'; import { error } from '@/utils/log';
import yearModal from '@/components/yearModal.vue'; import yearModal from '@/components/yearModal.vue';
import PageCard from '@/components/Page/src/PageCard.vue'; import PageCard from '@/components/Page/src/PageCard.vue';
import { exportData } from '@/api/project/export';
import { downloadByData } from '@/utils/file/download';
defineOptions({ name: 'MonthlyPlan' }); defineOptions({ name: 'MonthlyPlan' });
...@@ -71,6 +75,10 @@ ...@@ -71,6 +75,10 @@
showActionButtonGroup: false, showActionButtonGroup: false,
}); });
const params = ref({ monthYear: '' }); const params = ref({ monthYear: '' });
async function exportCount() {
const data = await exportMonthCount(params.value);
downloadByData(data, '月度统计报表' + '.xlsx');
}
const loadingRef = ref(false); const loadingRef = ref(false);
function showDetails(record) { function showDetails(record) {
openModal(true, { openModal(true, {
......
...@@ -216,9 +216,20 @@ export const subFormSchema: FormSchema[] = [ ...@@ -216,9 +216,20 @@ export const subFormSchema: FormSchema[] = [
label: '专项债拨款', label: '专项债拨款',
required: true, required: true,
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: ({ formModel }) => {
return {
addonAfter: '万元', addonAfter: '万元',
onChange(e) {
formModel.thisPlanNumber =
e +
(formModel.governmentFund || 0) +
(formModel.banFinancing || 0) +
(formModel.ownFund || 0) +
(formModel.fundGap || 0);
},
};
}, },
colProps: { span: 7, offset: 1 }, colProps: { span: 7, offset: 1 },
}, },
{ {
...@@ -226,8 +237,18 @@ export const subFormSchema: FormSchema[] = [ ...@@ -226,8 +237,18 @@ export const subFormSchema: FormSchema[] = [
label: '政府拨款', label: '政府拨款',
required: true, required: true,
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: ({ formModel }) => {
return {
addonAfter: '万元', addonAfter: '万元',
onChange(e) {
formModel.thisPlanNumber =
e +
(formModel.specialFund || 0) +
(formModel.banFinancing || 0) +
(formModel.ownFund || 0) +
(formModel.fundGap || 0);
},
};
}, },
colProps: { span: 7, offset: 1 }, colProps: { span: 7, offset: 1 },
}, },
...@@ -236,8 +257,18 @@ export const subFormSchema: FormSchema[] = [ ...@@ -236,8 +257,18 @@ export const subFormSchema: FormSchema[] = [
label: '银行融资', label: '银行融资',
required: true, required: true,
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: ({ formModel }) => {
return {
addonAfter: '万元', addonAfter: '万元',
onChange(e) {
formModel.thisPlanNumber =
e +
(formModel.specialFund || 0) +
(formModel.governmentFund || 0) +
(formModel.ownFund || 0) +
(formModel.fundGap || 0);
},
};
}, },
colProps: { span: 7, offset: 1 }, colProps: { span: 7, offset: 1 },
}, },
...@@ -246,8 +277,18 @@ export const subFormSchema: FormSchema[] = [ ...@@ -246,8 +277,18 @@ export const subFormSchema: FormSchema[] = [
label: '自有资金', label: '自有资金',
required: true, required: true,
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: ({ formModel }) => {
return {
addonAfter: '万元', addonAfter: '万元',
onChange(e) {
formModel.thisPlanNumber =
e +
(formModel.specialFund || 0) +
(formModel.governmentFund || 0) +
(formModel.banFinancing || 0) +
(formModel.fundGap || 0);
},
};
}, },
colProps: { span: 7, offset: 1 }, colProps: { span: 7, offset: 1 },
}, },
...@@ -257,8 +298,18 @@ export const subFormSchema: FormSchema[] = [ ...@@ -257,8 +298,18 @@ export const subFormSchema: FormSchema[] = [
// required: true, // required: true,
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: ({ formModel }) => {
return {
addonAfter: '万元', addonAfter: '万元',
onChange(e) {
formModel.thisPlanNumber =
e +
(formModel.specialFund || 0) +
(formModel.governmentFund || 0) +
(formModel.banFinancing || 0) +
(formModel.ownFund || 0);
},
};
}, },
colProps: { span: 7, offset: 1 }, colProps: { span: 7, offset: 1 },
......
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