Commit 971b923c authored by 高滢's avatar 高滢

feat(导入模板): 加载

parent 1b8d6523
......@@ -43,3 +43,14 @@ export const exportTender = (params?: any) =>
{ url: Api.Export, data: params, responseType: 'blob' },
{ errorMessageMode: 'none', isTransformResponse: false },
);
export const downImport = (url: string) =>
defHttp.get<any>(
{
url: url,
headers: {
'Content-Type': 'application/form-data;charset=UTF-8',
},
responseType: 'blob',
},
{ errorMessageMode: 'none', isTransformResponse: false },
);
......@@ -67,6 +67,7 @@
<BasicTable @register="registerTable" :title="'招标管理填报'">
<template #toolbar>
<a-button type="primary" preIcon="mdi:plus" @click="handleCreate"> 新增招标管理 </a-button>
<a-button type="primary" @click="downloadTemplate" ghost style="margin-left: 10px"> 下载导入模板 </a-button>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.key === 'serialNumber'">
......@@ -146,6 +147,8 @@
import CycleModel from '@/views/biddingManagement/cycleModel/cycleModel.vue';
import FillDetailsModel from "@/views/biddingManagement/fillDetailsModel/fillDetailsModel.vue";
import {Divider,Row, Col} from 'ant-design-vue'
import {downImport} from "@/api/project/yearTenderMan";
import {downloadByData} from "@/utils/file/download";
const { push } = useRouter();
const { createMessage } = useMessage();
......@@ -269,7 +272,11 @@
data: ['year', 'quarter'],
});
}
function downloadTemplate(){
downImport("/pro/tenderYearManage/downImport").then((data) => {
downloadByData(data, '季度招标管理导入模板.xls');
});
}
function handleEdit(record: Recordable, disabled: number) {
push({
path: '/biddingPlan/situationEdit',
......
......@@ -171,7 +171,7 @@ const params = ref({ tenderYear: '', biddingQuarter: '', companyName: '' });
loadingRef.value = true;
let data = await getListAll(params.value);
// dataSource.value = data;
let propsList = ['companyName', 'projectName'];
let propsList = ['companyName'];
propsList.map((item) => {
changeData(data, item);
});
......
......@@ -157,7 +157,7 @@
loadingRef.value = true;
let data = await getListAll(params.value);
// dataSource.value = data;
let propsList = ['companyName', 'projectName'];
let propsList = ['companyName'];
propsList.map((item) => {
changeData(data, item);
});
......
......@@ -67,6 +67,7 @@
<BasicTable @register="registerTable" :title="'招标计划填报'">
<template #toolbar>
<a-button type="primary" preIcon="mdi:plus" @click="handleCreate"> 新增招标计划 </a-button>
<a-button type="primary" @click="downloadTemplate" ghost style="margin-left: 10px"> 下载导入模板 </a-button>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.key === 'reviewStatus'">
......@@ -154,6 +155,8 @@
import FillDetailsModel from "@/views/biddingPlan/fillDetailsModel/fillDetailsModel.vue";
import {Divider,Row, Col} from 'ant-design-vue'
import { getDepartmentList } from '@/api/project/settlementManage';
import {downImport} from "@/api/project/yearTenderMan";
import {downloadByData} from "@/utils/file/download";
const { createMessage } = useMessage();
const { error } = createMessage;
......@@ -273,7 +276,11 @@
data: ['year', 'quarter'],
});
}
function downloadTemplate(){
downImport("/pro/tenderYearPlan/import").then((data) => {
downloadByData(data, '季度招标计划导入模板.xls');
});
}
function handleEdit(record: Recordable, disabled: number) {
push({
path: '/biddingPlan/edit',
......
......@@ -82,6 +82,7 @@
<a-button type="primary" @click="addSettlement" preIcon="mdi:plus">
新建变更签证管理
</a-button>
<a-button type="primary" @click="downloadTemplate" ghost style="margin-left: 10px"> 下载导入模板 </a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
......@@ -196,6 +197,8 @@
import CycleModel from '@/views/changeSignature/cycleModel/cycleModel.vue';
import FillDetailsModel from '@/views/changeSignature/fillDetailsModel/fillDetailsModel.vue';
import yearModal from '@/components/yearModal/yearModal.vue';
import {downImport} from "@/api/project/yearTenderMan";
import {downloadByData} from "@/utils/file/download";
const { createMessage } = useMessage();
const { push } = useRouter();
......@@ -257,7 +260,11 @@
data: ['year', 'quarter'],
});
};
function downloadTemplate(){
downImport("/pro/change-visa/downImport").then((data) => {
downloadByData(data, '变更签证管理导入模板.xls');
});
}
//修改
function handleEdit(record: Recordable, disabled: number) {
push({
......
......@@ -64,7 +64,7 @@
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" preIcon="mdi:plus" @click="handleCreate"> 新增项目 </a-button>
<a-button type="primary" @click="downloadTemplate" ghost> 下载模板 </a-button>
<a-button type="primary" @click="downloadTemplate" ghost style="margin-left: 10px;margin-right: 10px"> 下载模板 </a-button>
<Upload
:action="uploadAction"
v-model:file-list="fileList"
......
......@@ -68,6 +68,7 @@
<template #toolbar>
<a-button type="primary" @click="addSettlement" preIcon="mdi:plus"> 新建结算管理</a-button>
<a-button type="primary" @click="downloadTemplate" ghost style="margin-left: 10px"> 下载导入模板 </a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'statusResult'">
......@@ -185,6 +186,8 @@ import {Tag} from "ant-design-vue";
import {useMessage} from "@/hooks/web/useMessage";
import {useUserStore} from "@/store/modules/user";
import {getMonthlyPlanList, getMothCycel, SetEditStatus} from "@/api/project/monthlyPlan";
import {downImport} from "@/api/project/yearTenderMan";
import {downloadByData} from "@/utils/file/download";
defineOptions({name: 'SettlementManagement'});
const [registerFillDetail, { openModal: openFillDetailModel }] = useModal();
......@@ -319,7 +322,11 @@ const addSettlement = () => {
data: ['year', 'quarter'],
});
};
function downloadTemplate(){
downImport("/pro/settlement/downImport").then((data) => {
downloadByData(data, '结算管理导入模板.xls');
});
}
//删除操作
async function handleDelete(record: Recordable) {
console.log(record, '数据查看');
......
......@@ -78,7 +78,7 @@
<BasicTable @register="registerTable" :title="'年度招标管理填报'">
<template #toolbar>
<a-button type="primary" preIcon="mdi:plus" @click="handleCreate"> 新增年度招标管理 </a-button>
<a-button type="default" @click="handleCreate"> 下载导入模板 </a-button>
<a-button type="primary" @click="downloadTemplate" ghost style="margin-left: 10px"> 下载导入模板 </a-button>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.key === 'serialNumber'">
......@@ -145,7 +145,7 @@
selectPageList,
deleteProject,
handelExamine,
getCount,
getCount, downImport,
} from '@/api/project/yearTenderMan';
import { columns, searchFormSchema } from './data';
import { useModal } from '@/components/Modal';
......@@ -160,6 +160,7 @@
import FillDetailsModel from '@/views/monthlyPlan/fillDetailsModel/fillDetailsModel.vue';
import { Divider, Row, Col } from 'ant-design-vue';
import {getMothCycel, SetEditStatus} from "@/api/project/monthlyPlan";
import {downloadByData} from "@/utils/file/download";
const { push } = useRouter();
const { createMessage } = useMessage();
......@@ -259,7 +260,11 @@
data: ['year'],
});
}
function downloadTemplate(){
downImport("/pro/tenderYearManage/downImport").then((data) => {
downloadByData(data, '年度招标管理导入模板.xls');
});
}
function handleEdit(record: Recordable, disabled: number) {
push({
path: '/biddingPlan/tendeYearManageEdit',
......
......@@ -67,6 +67,7 @@
<BasicTable @register="registerTable" :title="'招标计划填报'">
<template #toolbar>
<a-button type="primary" preIcon="mdi:plus" @click="handleCreate"> 新增招标计划 </a-button>
<a-button type="primary" @click="downloadTemplate" ghost style="margin-left: 10px"> 下载导入模板 </a-button>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.key === 'reviewStatus'">
......@@ -153,6 +154,8 @@ import FillDetailsModel from '@/views/monthlyPlan/fillDetailsModel/fillDetailsMo
import {Divider,Row, Col} from 'ant-design-vue'
import { getDepartmentList } from '@/api/project/settlementManage';
import {getMothCycel, SetEditStatus} from "@/api/project/monthlyPlan";
import {downImport} from "@/api/project/yearTenderMan";
import {downloadByData} from "@/utils/file/download";
const { createMessage } = useMessage();
const { error } = createMessage;
......@@ -250,7 +253,11 @@ function handleCreate() {
data: ['year'],
});
}
function downloadTemplate(){
downImport("/pro/tenderYearPlan/import").then((data) => {
downloadByData(data, '年度招标计划导入模板.xls');
});
}
function handleEdit(record: Recordable, disabled: number) {
push({
path: '/biddingPlan/tendeYearPlanEdit',
......
......@@ -28,6 +28,7 @@
import { downloadByData } from '@/utils/file/download';
import moment from 'moment';
import { getDepartmentList } from '@/api/project/settlementManage';
const seach = ref([
{
field: 'tenderYear',
......
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