【update】-企业来款分类统计
This commit is contained in:
+20
-25
@@ -200,8 +200,8 @@ export default {
|
|||||||
sm: { span: 10 }
|
sm: { span: 10 }
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
list: '/statistics/companyComeMoney/list',
|
list: '/statistics/companyComeMoney/classification',
|
||||||
exportXlsUrl: '/statistics/companyComeMoney/excel'
|
exportXlsUrl: '/statistics/companyComeMoney/classificationExcel'
|
||||||
},
|
},
|
||||||
columns: [firstColumnTop, ...defaultTableColumns],
|
columns: [firstColumnTop, ...defaultTableColumns],
|
||||||
// 总计表头,与主表表头一致
|
// 总计表头,与主表表头一致
|
||||||
@@ -268,35 +268,30 @@ export default {
|
|||||||
// 将企业信息对象从查询参数中去掉
|
// 将企业信息对象从查询参数中去掉
|
||||||
delete param.chargeCompany
|
delete param.chargeCompany
|
||||||
}
|
}
|
||||||
|
// param.year = param.year_begin + ',' + param.year_end
|
||||||
|
|
||||||
return filterObj(param)
|
return filterObj(param)
|
||||||
},
|
},
|
||||||
// 获取查询的列数
|
// 获取查询的列数
|
||||||
getColumnsData() {
|
/*
|
||||||
let keys = [], columnsObj = []
|
* {
|
||||||
for(let i = this.lastQueryParam.year_begin; i <= this.lastQueryParam.year_end; i++) {
|
"name": "企业名称",
|
||||||
keys.push(i)
|
"key": "name"
|
||||||
|
},
|
||||||
|
* */
|
||||||
|
getColumnsData(titleList) {
|
||||||
|
let columnsObj = []
|
||||||
|
titleList.map(title => {
|
||||||
let item = {
|
let item = {
|
||||||
title: i + '年度待确收金额',
|
title: title.name,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 160,
|
width: 160,
|
||||||
// sorter: true,
|
// sorter: true,
|
||||||
dataIndex: i + '_' + 'allMoney',
|
dataIndex: title.key,
|
||||||
scopedSlots: { customRender: 'allMoney' }
|
scopedSlots: { customRender: 'allMoney' }
|
||||||
}
|
}
|
||||||
columnsObj.push(item)
|
columnsObj.push(item)
|
||||||
}
|
|
||||||
keys.map(year => {
|
|
||||||
projectCategory.map(cate => {
|
|
||||||
let item = {
|
|
||||||
title: `${year}年度-${cate.name}-待确收金额`,
|
|
||||||
align: 'center',
|
|
||||||
width: 160,
|
|
||||||
// sorter: true,
|
|
||||||
dataIndex: year + '_' + cate.key + '_' + 'allMoney',
|
|
||||||
scopedSlots: { customRender: 'allMoney' }
|
|
||||||
}
|
|
||||||
columnsObj.push(item)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
return columnsObj
|
return columnsObj
|
||||||
},
|
},
|
||||||
@@ -316,19 +311,19 @@ export default {
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
// todo 处理TableColumns 的数据 先本地生成
|
// todo 处理TableColumns 的数据 先本地生成
|
||||||
// let columnsKeys = res.result.columns || []
|
// let columnsKeys = res.result.columns || []
|
||||||
let syncColumns = this.getColumnsData()
|
let syncColumns = this.getColumnsData(res.result.titleList || [])
|
||||||
this.columns = [firstColumnTop, ...defaultTableColumns, ...syncColumns]
|
this.columns = [firstColumnTop, ...defaultTableColumns, ...syncColumns]
|
||||||
this.columnsFooter = [firstColumnFooter, ...defaultTableColumns, ...syncColumns]
|
this.columnsFooter = [firstColumnFooter, ...defaultTableColumns, ...syncColumns]
|
||||||
// this.dataSource = res.result.pageList.records
|
// this.dataSource = res.result.pageList.records
|
||||||
// 表格数据
|
// 表格数据
|
||||||
this.dataSource = res.result.pageList.records || []
|
this.dataSource = res.result.valList || []
|
||||||
this.dataSource.map(data => {
|
this.dataSource.map(data => {
|
||||||
syncColumns.map(col => {
|
syncColumns.map(col => {
|
||||||
data[col.dataIndex] = data.allMoney || '0.00' + ''
|
data[col.dataIndex] = data.allMoney || '0.00' + ''
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// todo 操作汇总表格的数据
|
// 操作汇总表格的数据
|
||||||
let footerData = res.result.footerData || res.result || {}
|
let footerData = res.result.allMap || {}
|
||||||
let obj = {
|
let obj = {
|
||||||
id: '1',
|
id: '1',
|
||||||
title: '总计'
|
title: '总计'
|
||||||
|
|||||||
Reference in New Issue
Block a user