[bug] - 解决下部footer显示1的bug

This commit is contained in:
fengchenchen
2022-07-08 14:54:50 +08:00
parent 66307087bd
commit ed409511a8
9 changed files with 172 additions and 105 deletions
@@ -220,16 +220,6 @@ import StatusSlot from '../../components/tools/StatusSlot'
import {formatMoney} from '@/utils/formatMoney' import {formatMoney} from '@/utils/formatMoney'
const defaultTableColumns = [ const defaultTableColumns = [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ {
title: '来款项目', title: '来款项目',
align: 'center', align: 'center',
@@ -305,6 +295,23 @@ const defaultTableColumns = [
width: 150 width: 150
} }
] ]
const firstColumnTop = {
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}
const firstColumnFooter = {
title: '序号',
dataIndex: 'title',
align: 'center',
width: 60
}
export default { export default {
name: 'WholeInstituteStatisticsList', name: 'WholeInstituteStatisticsList',
@@ -325,8 +332,8 @@ export default {
replaceFields: { replaceFields: {
value: 'orgCode' value: 'orgCode'
}, },
columns: defaultTableColumns, columns: [firstColumnTop, ...defaultTableColumns],
columnsFooter: defaultTableColumns, columnsFooter: [firstColumnFooter, ...defaultTableColumns],
footerDataSource: [], footerDataSource: [],
// 给定当年作为来款年份默认查询条件 // 给定当年作为来款年份默认查询条件
queryParam: { queryParam: {
@@ -106,15 +106,6 @@ import {formatMoney} from '@/utils/formatMoney'
const defaultTableColumns = [ const defaultTableColumns = [
{ {
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 100,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}, {
title: '部门', title: '部门',
align: 'center', align: 'center',
width: 300, width: 300,
@@ -163,6 +154,22 @@ const defaultTableColumns = [
} }
] ]
const firstColumnTop = {
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}
const firstColumnFooter = {
title: '序号',
dataIndex: 'title',
align: 'center',
width: 60
}
export default { export default {
name: 'DepartmentAllStatistics', name: 'DepartmentAllStatistics',
@@ -183,9 +190,9 @@ export default {
list: '/statistics/allProjectStatistics/listDepartment', list: '/statistics/allProjectStatistics/listDepartment',
exportXlsUrl: '/statistics/allProjectStatistics/department/excelProject' exportXlsUrl: '/statistics/allProjectStatistics/department/excelProject'
}, },
columns: defaultTableColumns, columns: [firstColumnTop, ...defaultTableColumns],
// 总计表头,与主表表头一致 // 总计表头,与主表表头一致
columnsFooter: defaultTableColumns, columnsFooter: [firstColumnFooter, ...defaultTableColumns],
// 总计数据 // 总计数据
footerDataSource: [], footerDataSource: [],
// 给定当年作为来款年份默认查询条件 // 给定当年作为来款年份默认查询条件
@@ -153,16 +153,6 @@ import StatusSlot from '../../../components/tools/StatusSlot'
import {formatMoney} from '@/utils/formatMoney' import {formatMoney} from '@/utils/formatMoney'
const defaultTableColumns = [ const defaultTableColumns = [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 100,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ {
title: '来款项目', title: '来款项目',
align: 'center', align: 'center',
@@ -225,6 +215,22 @@ const defaultTableColumns = [
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
} }
] ]
const firstColumnTop = {
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}
const firstColumnFooter = {
title: '序号',
dataIndex: 'title',
align: 'center',
width: 60
}
export default { export default {
name: 'IndividualPaymentStatisticsDetail', name: 'IndividualPaymentStatisticsDetail',
@@ -254,9 +260,9 @@ export default {
filters: { filters: {
principalNameId: this.$route.query.principalId principalNameId: this.$route.query.principalId
}, },
columns: defaultTableColumns, columns: [firstColumnTop, ...defaultTableColumns],
// 总计表头,与主表表头一致 // 总计表头,与主表表头一致
columnsFooter: defaultTableColumns, columnsFooter: [firstColumnFooter, ...defaultTableColumns],
// 总计数据 // 总计数据
footerDataSource: [] footerDataSource: []
} }
@@ -147,16 +147,6 @@ import { getAllDepartTreeList } from '../../../api/incomePaymentsApi'
import { getAction } from '@api/manage' import { getAction } from '@api/manage'
import {formatMoney} from '@/utils/formatMoney' import {formatMoney} from '@/utils/formatMoney'
const defaultTableColumns = [ const defaultTableColumns = [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ {
title: '项目负责人', title: '项目负责人',
align: 'center', align: 'center',
@@ -202,10 +192,26 @@ const defaultTableColumns = [
align: 'center', align: 'center',
dataIndex: 'finishRate', dataIndex: 'finishRate',
width: 140 width: 140
}, }
] ]
const firstColumnTop = {
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}
const firstColumnFooter = {
title: '序号',
dataIndex: 'title',
align: 'center',
width: 60
}
export default { export default {
name: 'IndividualPaymentStatisticsList', name: 'IndividualPaymentStatisticsList',
@@ -226,8 +232,8 @@ export default {
replaceFields: { replaceFields: {
value: 'orgCode' value: 'orgCode'
}, },
columns: defaultTableColumns, columns: [firstColumnTop, ...defaultTableColumns],
columnsFooter: defaultTableColumns, columnsFooter: [firstColumnFooter, ...defaultTableColumns],
footerDataSource: [], footerDataSource: [],
// 给定当年作为来款年份默认查询条件 // 给定当年作为来款年份默认查询条件
queryParam: { queryParam: {
@@ -174,16 +174,6 @@ import ProjectDetailModal from '../../../components/ProjectDetailModal'
import StatusSlot from '../../../components/tools/StatusSlot' import StatusSlot from '../../../components/tools/StatusSlot'
import {formatMoney} from '@/utils/formatMoney' import {formatMoney} from '@/utils/formatMoney'
const defaultTableColumns = [ const defaultTableColumns = [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 100,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ {
title: '项目负责人', title: '项目负责人',
align: 'center', align: 'center',
@@ -253,6 +243,24 @@ const defaultTableColumns = [
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
} }
] ]
const firstColumnTop = {
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}
const firstColumnFooter = {
title: '序号',
dataIndex: 'title',
align: 'center',
width: 60
}
export default { export default {
name: 'ProjectPaymentStatisticsList', name: 'ProjectPaymentStatisticsList',
@@ -273,9 +281,9 @@ export default {
list: '/statistics/allProjectStatistics/listProject', list: '/statistics/allProjectStatistics/listProject',
exportXlsUrl: '/statistics/allProjectStatistics/statistics/excelProject' exportXlsUrl: '/statistics/allProjectStatistics/statistics/excelProject'
}, },
columns: defaultTableColumns, columns: [firstColumnTop, ...defaultTableColumns],
// 总计表头,与主表表头一致 // 总计表头,与主表表头一致
columnsFooter: defaultTableColumns, columnsFooter: [firstColumnFooter, ...defaultTableColumns],
// 总计数据 // 总计数据
footerDataSource: [], footerDataSource: [],
// 给定当年作为来款年份默认查询条件 // 给定当年作为来款年份默认查询条件
@@ -155,16 +155,6 @@ import ProjectDetailModal from '../../../components/ProjectDetailModal'
import StatusSlot from '../../../components/tools/StatusSlot' import StatusSlot from '../../../components/tools/StatusSlot'
import {formatMoney} from '@/utils/formatMoney' import {formatMoney} from '@/utils/formatMoney'
const defaultTableColumns = [ const defaultTableColumns = [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 100,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ {
title: '来款项目', title: '来款项目',
align: 'center', align: 'center',
@@ -228,6 +218,23 @@ const defaultTableColumns = [
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
} }
] ]
const firstColumnTop = {
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}
const firstColumnFooter = {
title: '序号',
dataIndex: 'title',
align: 'center',
width: 60
}
export default { export default {
name: 'EnterprisePaymentStatisticsDetail', name: 'EnterprisePaymentStatisticsDetail',
@@ -247,9 +254,9 @@ export default {
list: '/statistics/companyComeMoney/listForDetail', list: '/statistics/companyComeMoney/listForDetail',
exportXlsUrl: '/statistics/companyComeMoney/excelDetail' exportXlsUrl: '/statistics/companyComeMoney/excelDetail'
}, },
columns: defaultTableColumns, columns: [firstColumnTop, ...defaultTableColumns],
// 总计表头,与主表表头一致 // 总计表头,与主表表头一致
columnsFooter: defaultTableColumns, // 总计数据 columnsFooter: [firstColumnFooter, ...defaultTableColumns], // 总计数据
footerDataSource: [], footerDataSource: [],
// 给定当年作为来款年份默认查询条件 // 给定当年作为来款年份默认查询条件
queryParam: { queryParam: {
@@ -149,16 +149,6 @@ import CompanySelect from '@comp/company/CompanySelect'
import { filterObj } from '../../../utils/util' import { filterObj } from '../../../utils/util'
import {formatMoney} from '@/utils/formatMoney' import {formatMoney} from '@/utils/formatMoney'
const defaultTableColumns = [ const defaultTableColumns = [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 100,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ {
title: '来款企业', title: '来款企业',
align: 'center', align: 'center',
@@ -214,6 +204,23 @@ const defaultTableColumns = [
scopedSlots: { customRender: 'action' } scopedSlots: { customRender: 'action' }
} }
] ]
const firstColumnTop = {
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}
const firstColumnFooter = {
title: '序号',
dataIndex: 'title',
align: 'center',
width: 60
}
export default { export default {
name: 'EnterprisePaymentStatisticsList', name: 'EnterprisePaymentStatisticsList',
@@ -234,9 +241,9 @@ export default {
list: '/statistics/companyComeMoney/list', list: '/statistics/companyComeMoney/list',
exportXlsUrl: '/statistics/companyComeMoney/excel' exportXlsUrl: '/statistics/companyComeMoney/excel'
}, },
columns: defaultTableColumns, columns: [firstColumnTop, ...defaultTableColumns],
// 总计表头,与主表表头一致 // 总计表头,与主表表头一致
columnsFooter: defaultTableColumns, columnsFooter: [firstColumnFooter, ...defaultTableColumns],
// 总计数据 // 总计数据
footerDataSource: [], footerDataSource: [],
// 给定当年作为来款年份默认查询条件 // 给定当年作为来款年份默认查询条件
@@ -171,12 +171,6 @@ import { getAction } from '../../../api/manage'
import StatusSlot from '../../../components/tools/StatusSlot' import StatusSlot from '../../../components/tools/StatusSlot'
import {formatMoney} from '@/utils/formatMoney' import {formatMoney} from '@/utils/formatMoney'
const defaultTableColumns = [ const defaultTableColumns = [
{
title: '序号',
dataIndex: 'title',
width: 60,
align: 'center'
},
{ {
title: '来款单位', title: '来款单位',
align: 'center', align: 'center',
@@ -239,6 +233,23 @@ const defaultTableColumns = [
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
} }
] ]
const firstColumnTop = {
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}
const firstColumnFooter = {
title: '序号',
dataIndex: 'title',
align: 'center',
width: 60
}
export default { export default {
name: 'WorkingGroupPaymentStatisticsDetail', name: 'WorkingGroupPaymentStatisticsDetail',
@@ -259,7 +270,7 @@ export default {
list: '/project/payWorkingGroupStatistics/listSub', list: '/project/payWorkingGroupStatistics/listSub',
exportXlsUrl: '/project/payWorkingGroupStatistics/excelSub' exportXlsUrl: '/project/payWorkingGroupStatistics/excelSub'
}, },
columns: defaultTableColumns, columns: [firstColumnTop, ...defaultTableColumns],
dataSource: [ dataSource: [
{ {
id: 1, id: 1,
@@ -269,7 +280,7 @@ export default {
} }
], ],
// 总计表头,与主表表头一致 // 总计表头,与主表表头一致
columnsFooter: defaultTableColumns, columnsFooter: [firstColumnFooter, ...defaultTableColumns],
// 总计数据 // 总计数据
footerDataSource: [], footerDataSource: [],
filters: { filters: {
@@ -156,16 +156,6 @@ import JYearDate from '../../../components/jero/JYearDate'
import { getAction } from '../../../api/manage' import { getAction } from '../../../api/manage'
import {formatMoney} from '@/utils/formatMoney' import {formatMoney} from '@/utils/formatMoney'
const defaultTableColumns = [ const defaultTableColumns = [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 100,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ {
title: '工作组', title: '工作组',
align: 'center', align: 'center',
@@ -223,6 +213,24 @@ const defaultTableColumns = [
} }
] ]
const firstColumnTop = {
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}
const firstColumnFooter = {
title: '序号',
dataIndex: 'title',
align: 'center',
width: 60
}
export default { export default {
name: 'WorkingGroupPaymentStatisticsList', name: 'WorkingGroupPaymentStatisticsList',
components: { PageHeaderTitle, JYearDate }, components: { PageHeaderTitle, JYearDate },
@@ -242,10 +250,10 @@ export default {
list: '/project/payWorkingGroupStatistics/list', list: '/project/payWorkingGroupStatistics/list',
exportXlsUrl: '/project/payWorkingGroupStatistics/exportXls2' exportXlsUrl: '/project/payWorkingGroupStatistics/exportXls2'
}, },
columns: defaultTableColumns, columns: [firstColumnTop, ...defaultTableColumns],
dataSource: [], dataSource: [],
// 总计表头,与主表表头一致 // 总计表头,与主表表头一致
columnsFooter: defaultTableColumns, columnsFooter: [firstColumnFooter, ...defaultTableColumns],
// 给定当年作为来款年份默认查询条件 // 给定当年作为来款年份默认查询条件
queryParam: { queryParam: {
year: new Date().getFullYear().toString() year: new Date().getFullYear().toString()