feat : 台账导出
This commit is contained in:
@@ -1,160 +1,174 @@
|
||||
import request from '@/utils/request.js'
|
||||
import axios from "axios";
|
||||
import {getToken} from "@/utils/auth";
|
||||
//项目立项
|
||||
export const getApplyProcess = (projectId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/project/approval/initiation/process/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
return request({
|
||||
url: `/workflow/mosr/project/approval/initiation/process/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const projectApply = (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/approval/initiation/apply',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
return request({
|
||||
url: '/workflow/mosr/project/approval/initiation/apply',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const getApplyDetail = (ProjectId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/project/approval/info/${ProjectId}`,
|
||||
method: "get"
|
||||
});
|
||||
return request({
|
||||
url: `/workflow/mosr/project/approval/info/${ProjectId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
export const resubmitApply = (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/approval/initiation/resubmit',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
return request({
|
||||
url: '/workflow/mosr/project/approval/initiation/resubmit',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const getInitiationAttachment = (params) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/approval/attachments',
|
||||
method: "get",
|
||||
params:params
|
||||
});
|
||||
return request({
|
||||
url: '/workflow/mosr/project/approval/attachments',
|
||||
method: "get",
|
||||
params: params
|
||||
});
|
||||
};
|
||||
//项目实施
|
||||
export const getCheckDetail = (projectId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/project/implementation/info/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
return request({
|
||||
url: `/workflow/mosr/project/implementation/info/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const resubmitCheck = (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/implementation/resubmit',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
return request({
|
||||
url: '/workflow/mosr/project/implementation/resubmit',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
export const projectCheck = (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/implementation/initiation/check',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
return request({
|
||||
url: '/workflow/mosr/project/implementation/initiation/check',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const getProjectCheckProcess = (projectId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/project/implementation/process/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
return request({
|
||||
url: `/workflow/mosr/project/implementation/process/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
export const addLedger = (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/expense/ledger',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
return request({
|
||||
url: '/workflow/mosr/expense/ledger',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
export const getTags = (projectId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/attachment/option/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
return request({
|
||||
url: `/workflow/mosr/attachment/option/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const getPhaseProcess = () => {
|
||||
return request({
|
||||
url: '/workflow/phase/change/process',
|
||||
method: "get"
|
||||
});
|
||||
return request({
|
||||
url: '/workflow/phase/change/process',
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const submitPhaseChange = (data) => {
|
||||
return request({
|
||||
url: '/workflow/phase/change',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
return request({
|
||||
url: '/workflow/phase/change',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const getPhaseDetail = (projectId) => {
|
||||
return request({
|
||||
url: `/workflow/phase/change/info/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
return request({
|
||||
url: `/workflow/phase/change/info/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const getPhaseForm = (projectId) => {
|
||||
return request({
|
||||
url: `/workflow/phase/change/from/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
return request({
|
||||
url: `/workflow/phase/change/from/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const resubmitPhaseForm = (data) => {
|
||||
return request({
|
||||
url: '/workflow/phase/change/resubmit',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
return request({
|
||||
url: '/workflow/phase/change/resubmit',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
//项目归档
|
||||
export const getConclusionDetail = (ProjectId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/project/filing/info/${ProjectId}`,
|
||||
method: "get"
|
||||
});
|
||||
return request({
|
||||
url: `/workflow/mosr/project/filing/info/${ProjectId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const resubmitConclusion = (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/filing/resubmit',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
return request({
|
||||
url: '/workflow/mosr/project/filing/resubmit',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
export const projectConclusion = (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/filing/project/entry',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
return request({
|
||||
url: '/workflow/mosr/project/filing/project/entry',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const getProjectConclusionProcess = () => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/filing/process',
|
||||
method: "get"
|
||||
});
|
||||
return request({
|
||||
url: '/workflow/mosr/project/filing/process',
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
//获取前置流程
|
||||
export const getPreProcess= () => {
|
||||
return request({
|
||||
url: '/workflow/details/pre/process',
|
||||
method: "get"
|
||||
});
|
||||
export const getPreProcess = () => {
|
||||
return request({
|
||||
url: '/workflow/details/pre/process',
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
export const updateLedger = (data) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/expense/ledger/replenishment',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
return request({
|
||||
url: '/workflow/mosr/expense/ledger/replenishment',
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const searchUpdateLedgerData = (projectId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/expense/ledger/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
return request({
|
||||
url: `/workflow/mosr/expense/ledger/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
export const exportExcel = (data) => {
|
||||
return axios.post(
|
||||
`${import.meta.env.VITE_BASE_URL}/workflow/mosr/project/implementation/export`,
|
||||
data, {
|
||||
responseType: 'blob',
|
||||
headers: {
|
||||
Authorization: getToken()
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<baseTitle title="基础信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<el-button @click="exportExcelHandler">导出</el-button>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
@@ -13,8 +14,7 @@
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {searchUpdateLedgerData} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {searchUpdateLedgerData,exportExcel} from "@/api/project-manage";
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
@@ -270,6 +270,25 @@ const handleUploadFee = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const exportExcelHandler = () => {
|
||||
let data = {
|
||||
projectId: 113
|
||||
}
|
||||
exportExcel(data).then(res => {
|
||||
console.log(res)
|
||||
let reg = /filename=([^&]+)/;
|
||||
let contentDisposition = decodeURI(res.headers['content-disposition'])
|
||||
let result = reg.exec(contentDisposition)
|
||||
let fileName = result[1]
|
||||
fileName = fileName.replace(/\"/g, '')
|
||||
const blob = new Blob([res.data])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = fileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val, projectId: route.query.id}
|
||||
tableIns.value.refresh()
|
||||
|
||||
Reference in New Issue
Block a user