Commit e9434b39 authored by 高滢's avatar 高滢

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

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