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