feat : 年度计划生成功能及分摊汇总导出功能

This commit is contained in:
2024-07-06 02:21:26 +08:00
parent fce1708f5c
commit 8180c248ac
11 changed files with 471 additions and 38 deletions

View File

@@ -62,8 +62,10 @@ const getInfo = async (state) => {
processStore.passList.value = data.passList;
nextTick(() => {
summaryProcessViewer.value = true
if (data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
if(data.formPermMap!=null){
if (data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
}
}
})
loading.close()

View File

@@ -1,13 +1,16 @@
<template>
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"
@selectionChange="selectionChange"></fvTable>
</template>
<script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {addPlan} from "@/api/project-demand/summary";
const tableIns = ref()
const router = useRouter()
const projectSelectList = ref([])
const shortcuts = [
{
text: '上周',
@@ -104,7 +107,7 @@ const searchConfig = reactive([
props: {
placeholder: '请选择状态',
clearable: true,
cacheKey: 'project_initiation'
cacheKey: 'demand_summary'
}
},
// {
@@ -146,10 +149,10 @@ const auths = {
}
const tableConfig = reactive({
columns: [
// {
// type: 'selection',
// prop: 'selection'
// },
{
type: 'selection',
prop: 'selection'
},
{
prop: 'requirementName',
label: '征集名称',
@@ -229,7 +232,7 @@ const tableConfig = reactive({
prop: 'oper',
label: '操作',
align: 'center',
fixed:'right',
fixed: 'right',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = []
@@ -254,12 +257,6 @@ const tableConfig = reactive({
</el-button>
))
}
{
buttons.has("delete") ?
<popover-delete name={row.requirementName} type={'需求'} btnType={'danger'}
perm={['mosr:collect:del']} onDelete={() => handleDelete(row)}/>
: ''
}
</div>
)
}
@@ -268,19 +265,48 @@ const tableConfig = reactive({
api: '/workflow/mosr/requirement/collect',
params: {},
btns: [
{name: '新增上报', key: 'add', color: '#DED0B2', auth:auths.report},
// {name: '年度计划导出', key: '_export', auth: ''},
{name: '新增上报', key: 'add', color: '#DED0B2', auth: auths.report},
{name: '创建年度计划', key: 'export', color: '#DED0B2', auth: ''},
// {name: '经费预算生成', key: 'preMonty', auth: ''},
]
})
// {
// buttons.has("delete") ?
// <popover-delete name={row.requirementName} type={'需求'} btnType={'danger'}
// perm={['mosr:collect:del']} onDelete={() => handleDelete(row)}/>
// : ''
// }
const headBtnClick = (key) => {
switch (key) {
case 'add':
handleAdd()
break;
case 'export':
handleExport()
break;
}
}
const selectionChange = (data) => {
console.log('data', data)
projectSelectList.value = data
}
const handleExport = () => {
console.log('projectSelectList.value', projectSelectList.value)
let projectIds=[]
projectSelectList.value.map(item=>{
projectIds.push(item.projectId)
})
if (projectSelectList.value.length > 0) {
let params = {
projectIds: projectIds
}
addPlan(params).then(res => {
if (res.code === 1000) {
}
})
}
}
const search = (val) => {
let obj = {...val}
if (obj.dateValue) {
@@ -313,7 +339,7 @@ const handleDetail = (row) => {
router.push({
name: 'Summary/detail',
query: {
id: row.requirementId==null?'-1':row.requirementId,
id: row.requirementId == null ? '-1' : row.requirementId,
projectId: row.projectId,
state: row.state
}