feat(expense-management): 为成本明细页面添加年份和月份筛选功能

- 在成本明细、支出明细和分摊明细页面的搜索表单中添加了年份和月份选择器
- 优化了搜索表单的样式和布局- 注释掉了部分未使用的代码
This commit is contained in:
dj
2025-08-19 16:14:23 +08:00
parent 7735d20021
commit d20b968307
3 changed files with 126 additions and 59 deletions

View File

@@ -3,7 +3,8 @@
<div style="float: left"> <div style="float: left">
<import-cost-excel @success="importTheExpenseLedger"/> <import-cost-excel @success="importTheExpenseLedger"/>
</div> </div>
<fvTable ref="tableIns" class="tablte" :tableConfig="tableConfig" @headBtnClick="headBtnClick" :changeExportPosition="true"> <fvTable ref="tableIns" class="tablte" :tableConfig="tableConfig" @headBtnClick="headBtnClick"
:changeExportPosition="true">
<template #empty> <template #empty>
<el-empty description="暂无数据"/> <el-empty description="暂无数据"/>
</template> </template>
@@ -21,10 +22,36 @@ import {
getMasterProjectNameOption, getMasterProjectNameOption,
getSubprojectNameOption getSubprojectNameOption
} from "@/api/project-demand/summary/index.js"; } from "@/api/project-demand/summary/index.js";
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const searchConfig = ref([ const searchConfig = ref([
// {
// label: '年份',
// prop: 'rdYear',
// component: 'el-date-picker',
// props: {
// placeholder: '请选择年份',
// clearable: true,
// type: 'year',
// format: 'YYYY',
// valueFormat: 'YYYY',
// },
// colProps: {}
// },
// {
// label: '月份',
// prop: 'rdMonth',
// component: 'el-date-picker',
// props: {
// placeholder: '请选择月份',
// clearable: true,
// type: 'month',
// format: 'MM',
// valueFormat: 'MM',
// },
// colProps: {}
// },
{ {
label: '主项目', label: '主项目',
prop: 'masterProjectName', prop: 'masterProjectName',
@@ -100,19 +127,7 @@ const searchConfig = ref([
// }, // },
// colProps: {} // colProps: {}
// }, // },
// {
// label: '归档时间',
// prop: 'filingTime',
// component: 'el-date-picker',
// props: {
// placeholder: '请选择归档时间',
// clearable: true,
// type:'date',
// format: 'YYYY-MM-DD HH:mm',
// valueFormat:'YYYY-MM-DD HH:mm',
// },
// colProps: {}
// },
]) ])
const tableIns = ref() const tableIns = ref()
const tableConfig = reactive({ const tableConfig = reactive({
@@ -320,6 +335,7 @@ const importTheExpenseLedger = () => {
:deep(.el-form-item__label-wrap) { :deep(.el-form-item__label-wrap) {
margin-left: 0 !important; margin-left: 0 !important;
} }
:deep(.el-table__header) { :deep(.el-table__header) {
.is-leaf:first-child { .is-leaf:first-child {
.cell { .cell {
@@ -335,6 +351,7 @@ const importTheExpenseLedger = () => {
} }
} }
} }
:deep(.el-date-editor--month) { :deep(.el-date-editor--month) {
width: 100%; width: 100%;
} }

View File

@@ -20,7 +20,32 @@ const router = useRouter()
const route = useRoute() const route = useRoute()
const searchConfig = ref( const searchConfig = ref(
[ [
// {
// label: '年份',
// prop: 'paymentYear',
// component: 'el-date-picker',
// props: {
// placeholder: '请选择年份',
// clearable: true,
// type: 'year',
// format: 'YYYY',
// valueFormat: 'YYYY',
// },
// colProps: {}
// },
// {
// label: '月份',
// prop: 'paymentMonth',
// component: 'el-date-picker',
// props: {
// placeholder: '请选择月份',
// clearable: true,
// type: 'month',
// format: 'MM',
// valueFormat: 'MM',
// },
// colProps: {}
// },
{ {
label: '主项目', label: '主项目',
prop: 'masterProjectName', prop: 'masterProjectName',

View File

@@ -2,7 +2,7 @@
<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" @selectionChange="selectionChange">
<template #empty> <template #empty>
<el-empty description="暂无数据"/> <el-empty description="暂无数据"/>
</template> </template>
@@ -24,7 +24,32 @@ import {
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const searchConfig = ref([ const searchConfig = ref([
// {
// label: '年份',
// prop: 'paymentYear',
// component: 'el-date-picker',
// props: {
// placeholder: '请选择年份',
// clearable: true,
// type: 'year',
// format: 'YYYY',
// valueFormat: 'YYYY',
// },
// colProps: {}
// },
// {
// label: '月份',
// prop: 'paymentMonth',
// component: 'el-date-picker',
// props: {
// placeholder: '请选择月份',
// clearable: true,
// type: 'month',
// format: 'MM',
// valueFormat: 'MM',
// },
// colProps: {}
// },
{ {
label: '主项目', label: '主项目',
prop: 'masterProjectName', prop: 'masterProjectName',