fix: 分摊明细导出调整参数

This commit is contained in:
dj
2025-04-08 00:30:32 +08:00
parent a9a2be2c74
commit 7b619a9bef

View File

@@ -1,5 +1,5 @@
<template> <template>
<!-- <fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px"></fvSearchForm>--> <fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px"></fvSearchForm>
<!-- <el-button color="#DED0B2" style="float: left;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>--> <!-- <el-button color="#DED0B2" style="float: left;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>-->
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick" style="margin-top: 15px" @selectionChange="selectionChange"> <fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick" style="margin-top: 15px" @selectionChange="selectionChange">
@@ -10,6 +10,8 @@
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import { getSubCompOpt } from '@/api/user/user.js'; import { getSubCompOpt } from '@/api/user/user.js';
import {reactive, ref} from "vue"; import {reactive, ref} from "vue";
import {shareDetailExport, shareExportExcel} from "@/api/expense-manage"; import {shareDetailExport, shareExportExcel} from "@/api/expense-manage";
@@ -17,38 +19,39 @@ import {ElMessage} from "element-plus";
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const searchConfig = reactive([ const searchConfig = reactive([
// {
// label: '分摊名称',
// prop: 'shareName',
// component: 'el-input',
// props: {
// placeholder: '请输入分摊名称查询',
// clearable: true,
// filterable: true,
// checkStrictly: true
// }
// },
{ {
label: '支付月份', label: '子项目',
prop: 'apportionmentMonth', prop: 'subProjectName',
component: 'el-date-picker', component: 'el-input',
props: { props: {
placeholder: '请选择支付月份', placeholder: '请输入子项目查询',
clearable: true, clearable: true,
type:'month', filterable: true,
format: 'YYYY-MM', checkStrictly: true
valueFormat:"YYYY-MM" }
},
colProps: {}
}, },
// { // {
// label: '状态', // label: '支付月份',
// prop: 'state', // prop: 'apportionmentMonth',
// component: 'el-date-picker',
// props: {
// placeholder: '请选择支付月份',
// clearable: true,
// type:'month',
// format: 'YYYY-MM',
// valueFormat:"YYYY-MM"
// },
// colProps: {}
// },
// {
// label: '人员性质',
// prop: 'personnelNature',
// component: shallowRef(fvSelect), // component: shallowRef(fvSelect),
// props: { // props: {
// placeholder: '请选择状态', // placeholder: '请选择人员性质',
// clearable: true, // clearable: true,
// cacheKey: 'special_fund' // filterable: true,
// cacheKey: 'nature_of_personnel'
// } // }
// }, // },
]) ])
@@ -165,7 +168,7 @@ const headBtnClick = (key) => {
const selectionChange = (data) => { const selectionChange = (data) => {
console.log('data', data) console.log('data', data)
selectData.value=data selectData.value=data.map(item=>item.allocationId)
} }
const exportTable = () => { const exportTable = () => {
console.log('selectData',selectData.value) console.log('selectData',selectData.value)
@@ -173,7 +176,7 @@ const exportTable = () => {
ElMessage.warning('请选择要导出的费用分摊') ElMessage.warning('请选择要导出的费用分摊')
return return
} }
shareDetailExport(selectData.value[0]).then(res => { shareDetailExport(selectData.value).then(res => {
console.log(res) console.log(res)
let fileName = `科技研发项目工时及成本分摊汇总表.xlsx` let fileName = `科技研发项目工时及成本分摊汇总表.xlsx`
const blob = new Blob([res.data]) const blob = new Blob([res.data])