Commit f6064030 authored by 张伯涛's avatar 张伯涛

招标管理导出

parent 691abb8b
......@@ -8,6 +8,7 @@ import { defHttp } from '@/utils/http/axios';
enum Api {
GetList = '/pro/tenderManager/page',
tendermanageGetList = '/pro/reportCenter/tendermanage',
AddProject = '/pro/tenderManager/add',
UpdateProject = '/pro/tenderManager/update',
DeleteProject = '/pro/tenderManager/del',
......@@ -19,6 +20,9 @@ enum Api {
export const getListByPage = (params?: ProjectPageParams) =>
defHttp.post<ListGetResultModel>({ url: Api.GetList, data: params });
export const tendermanageGetListByPage = (params?: ProjectPageParams) =>
defHttp.post<ListGetResultModel>({ url: Api.tendermanageGetList, data: params });
export const addItem = (params?: any) =>
defHttp.post<ProjectModel>({
url: Api.AddProject,
......
......@@ -2,6 +2,7 @@ import { defHttp } from '@/utils/http/axios';
enum Api {
tenderPlan = '/pro/export/tenderPlan',
tenderManage = '/pro/export/tenderManage',
}
export const tenderPlanExport = (params?: any) =>
......@@ -17,6 +18,19 @@ export const tenderPlanExport = (params?: any) =>
{ errorMessageMode: 'none', isTransformResponse: false },
);
export const tenderManageExport = (params?: any) =>
defHttp.post<any>(
{
url: Api.tenderManage,
data: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
responseType: 'blob',
},
{ errorMessageMode: 'none', isTransformResponse: false },
);
//结算管理 变更签证管理 报表中心导出专用
export const exportData = (url: string,params?: any) =>
defHttp.post<any>(
......
<template>
<div>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" preIcon="mdi:plus" @click="handleExport"> 导出筛选结果 </a-button>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.key === 'serialNumber'">
{{ index + 1 }}
</template>
<template v-if="column.key === 'tenderYear'">
<template v-if="column.key === 'fillingPeriod'">
{{ record.tenderYear + '年' + record.biddingQuarter + '季度' }}
</template>
<template v-if="column.key === 'action'">
......@@ -22,19 +26,24 @@
</template>
</template>
</BasicTable>
<bidding-management-export-modal @register="registerModal"/>
</div>
</template>
<script lang="ts" setup>
import { biddingManagementColumns, searchFormSchema } from './data';
import {biddingManagementColumns, exportBiddingManagementColumns, searchFormSchema} from './data';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { getListByPage } from '@/api/project/biddingManagement';
import { tendermanageGetListByPage } from '@/api/project/biddingManagement';
import { inject } from 'vue';
import { router } from '@/router';
import { Tag } from 'ant-design-vue';
import BiddingManagementExportModal from "@/views/statement/tabs/components/biddingManagementExportModal.vue";
import { useModal } from '@/components/Modal';
const [registerModal, { openModal: openModal }] = useModal();
let detailId = inject('detailId');
console.log('detailId', detailId);
const [registerTable, { reload }] = useTable({
api: getListByPage,
api: tendermanageGetListByPage,
columns: biddingManagementColumns,
formConfig: {
labelWidth: 120,
......@@ -64,4 +73,20 @@
},
});
}
function getExportData() {
let exportData = [];
exportBiddingManagementColumns.map((i) => {
exportData.push({
label: i.title,
value: i.dataIndex,
});
});
return exportData;
}
function handleExport() {
openModal(true, {
projectId: detailId,
exportData: getExportData(),
});
}
</script>
......@@ -31,7 +31,7 @@
</template>
<script lang="ts" setup>
import exportModal from './components/exportModal.vue';
import { biddingPlanColumns, searchFormSchema } from './data';
import { biddingPlanColumns,exportBiddingPlanColumns, searchFormSchema } from './data';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { getListTenderPlanGetList } from '@/api/project/biddingPlan';
import { inject } from 'vue';
......@@ -75,7 +75,7 @@ import exportModal from './components/exportModal.vue';
}
function getExportData() {
let exportData = [];
biddingPlanColumns.map((i) => {
exportBiddingPlanColumns.map((i) => {
exportData.push({
label: i.title,
value: i.dataIndex,
......
<template>
<BasicModal
v-bind="$attrs"
@register="register"
title="导出筛选结果"
:minHeight="30"
okText="导出"
@ok="handleSubmit"
@visible-change="handleVisibleChange"
>
<BasicForm @register="registerForm" :model="modelRef" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineProps, defineEmits, unref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, FormSchema, useForm } from '@/components/Form';
import { uploadApi } from '@/api/sys/upload';
import { AnnexAdd } from '@/api/project/project';
import {tenderManageExport} from '@/api/project/export';
import { reject } from 'lodash-es';
import { downloadByData } from '@/utils/file/download';
const projectId = ref(0);
const schemas: FormSchema[] = [
{
field: 'colums',
component: 'CheckboxGroup',
label: '',
required: true,
componentProps: {
options: [],
},
colProps: {
span: 24,
},
},
];
const props = defineProps({
userData: { type: Object },
});
function handleVisibleChange(v) {
v && props.userData && nextTick(() => onDataReceive(props.userData));
}
const emit = defineEmits(['close', 'register']);
const modelRef = ref({});
const [
registerForm,
{
getFieldsValue,
validate,
updateSchema,
// // setFieldsValue,
// setProps,
},
] = useForm({
labelWidth: 120,
schemas,
showActionButtonGroup: false,
actionColOptions: {
span: 24,
},
});
const [register, { closeModal }] = useModalInner((data) => {
console.log(111);
data && onDataReceive(data);
});
// function handleVisibleChange(v) {
// v && props.userData && nextTick(() => onDataReceive(props.userData));
// }
function onDataReceive(data) {
console.log('Data Received', data.exportData);
updateSchema({
field: 'colums',
componentProps: {
options: data.exportData,
},
});
// console.log(props.userData);
// projectId.value = data.projectId;
// console.log(projectId.value);
}
function handleSubmit() {
validate().then(async () => {
const value = getFieldsValue();
console.log(value);
const data = await tenderManageExport({
colums: value.colums,
searchField: { biddingType: '施工' },
});
downloadByData(data, 'export.xlsx');
emit('close');
closeModal();
});
}
</script>
......@@ -835,6 +835,73 @@ export const biddingPlanColumns = [
width: 180,
},
];
export const exportBiddingPlanColumns = [
{
title: '填报周期',
dataIndex: 'fillingPeriod',
width: 200,
},
{
title: '项目名称',
sort: true,
dataIndex: 'projectName',
width: 180,
},
{
title: '立项主体',
sort: true,
dataIndex: 'projectInitiator',
width: 180,
},
{
title: '资金来源',
sort: true,
dataIndex: 'fundingSource',
width: 180,
},
{
title: '立项投资额(万元) ',
sort: true,
dataIndex: 'investmentAmount',
width: 180,
},
{
title: '招标类型',
dataIndex: 'biddingType',
width: 180,
},
{
title: '招标内容',
sort: true,
dataIndex: 'tenderContent',
width: 180,
},
{
title: '预计控制价(万元)',
dataIndex: 'controlPrice',
width: 180,
},
{
title: '计划工期',
dataIndex: 'plannedPeriod',
width: 180,
},
{
title: '招标方式',
dataIndex: 'biddingMethod',
width: 180,
},
{
title: '计划招标周期',
dataIndex: 'biddingPeriod',
width: 180,
},
{
title: '备注',
dataIndex: 'remark',
width: 180,
},
];
export const biddingManagementColumns = [
{
......@@ -844,68 +911,176 @@ export const biddingManagementColumns = [
},
{
title: '填报周期',
dataIndex: 'tenderYear',
dataIndex: 'fillingPeriod',
width: 200,
},
{
title: '项目名称 ',
sort: true,
dataIndex: 'proNumber',
dataIndex: 'projectName',
width: 180,
},
{
title: '立项投资额(万元)',
dataIndex: 'companyName',
dataIndex: 'investmentAmount',
width: 180,
},
{
title: '资金来源',
dataIndex: 'updateBy',
dataIndex: 'fundingSource',
width: 180,
},
{
title: '招标类型',
dataIndex: 'revieweUser',
dataIndex: 'biddingType',
width: 180,
},
{
title: '招标内容',
dataIndex: 'reviewTime',
dataIndex: 'tenderContent',
width: 180,
},
{
title: '招标控制(元)',
dataIndex: 'reviewTime',
dataIndex: 'controlPrice',
width: 180,
},
{
title: '建设模式',
dataIndex: 'reviewTime',
dataIndex: 'constructionMode',
width: 180,
},
{
title: '招标采购方式',
dataIndex: 'reviewTime',
dataIndex: 'procurementMethod',
width: 180,
},
{
title: '招标完成情况',
dataIndex: 'reviewTime',
dataIndex: 'completionStatus',
width: 180,
},
{
title: '开标时间',
dataIndex: 'reviewTime',
dataIndex: 'openingTime',
width: 180,
},
{
title: '中标单位',
dataIndex: 'reviewTime',
dataIndex: 'winningBidder',
width: 180,
},
{
title: '中标金额(元)',
dataIndex: 'winningAmount',
width: 150,
},
{
title: '中标工期',
dataIndex: 'winningPeriod',
width: 150,
},
{
title: '合同签订日期',
dataIndex: 'signingDate',
width: 180,
},
{
title: '会议纪要',
dataIndex: 'meetingMinute',
width: 150,
},
{
title: '招标信息发布渠道',
dataIndex: 'releaseChannels',
width: 180,
},
{
title: '招标公告发布网址(仅限公开招标项目)',
dataIndex: 'publishWebsite',
width: 180,
},
{
title: '中标结果公示网址(仅限公开招标项目)',
dataIndex: 'publicityWebsite',
width: 180,
},
{
title: '是否存在投诉举报情况',
dataIndex: 'isReportingSituation',
width: 180,
},
{
title: '投诉举报解决处理情况',
dataIndex: 'handSituation',
width: 180,
},
{
title: '备注',
dataIndex: 'remark',
width: 180,
}
];
export const exportBiddingManagementColumns = [
{
title: '填报周期',
dataIndex: 'fillingPeriod',
width: 200,
},
{
title: '项目名称 ',
sort: true,
dataIndex: 'projectName',
width: 180,
},
{
title: '立项投资额(万元)',
dataIndex: 'investmentAmount',
width: 180,
},
{
title: '资金来源',
dataIndex: 'fundingSource',
width: 180,
},
{
title: '招标类型',
dataIndex: 'biddingType',
width: 180,
},
{
title: '招标内容',
dataIndex: 'tenderContent',
width: 180,
},
{
title: '招标控制(元)',
dataIndex: 'controlPrice',
width: 180,
},
{
title: '建设模式',
dataIndex: 'constructionMode',
width: 180,
},
{
title: '招标采购方式',
dataIndex: 'procurementMethod',
width: 180,
},
{
title: '招标完成情况',
dataIndex: 'completionStatus',
width: 180,
},
{
title: '开标时间',
dataIndex: 'openingTime',
width: 180,
},
{
title: '中标单位',
dataIndex: 'reviewTime',
dataIndex: 'winningBidder',
width: 180,
},
{
......@@ -915,44 +1090,49 @@ export const biddingManagementColumns = [
},
{
title: '中标工期',
dataIndex: 'winningDuration',
dataIndex: 'winningPeriod',
width: 150,
},
{
title: '合同签订日期',
dataIndex: 'reviewTime',
dataIndex: 'signingDate',
width: 180,
},
{
title: '会议纪要',
dataIndex: 'meetingMinute',
width: 150,
},
{
title: '招标信息发布渠道',
dataIndex: 'reviewTime',
dataIndex: 'releaseChannels',
width: 180,
},
{
title: '招标公告发布网址',
dataIndex: 'reviewTime',
title: '招标公告发布网址(仅限公开招标项目)',
dataIndex: 'publishWebsite',
width: 180,
},
{
title: '中标结果公示网址',
dataIndex: 'reviewTime',
title: '中标结果公示网址(仅限公开招标项目)',
dataIndex: 'publicityWebsite',
width: 180,
},
{
title: '是否存在投诉举报情况',
dataIndex: 'reviewTime',
dataIndex: 'isReportingSituation',
width: 180,
},
{
title: '投诉举报解决处理情况',
dataIndex: 'reviewTime',
dataIndex: 'handSituation',
width: 180,
},
{
title: '备注',
dataIndex: 'reviewTime',
dataIndex: 'remark',
width: 180,
},
}
];
export const settlementManagementColumns = [
{
......
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