【update】-企业来款分类统计-联调2
This commit is contained in:
+30
-26
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
<!-- 操作按钮区域-end-->
|
||||
|
||||
<!-- table表格区域-->
|
||||
<!-- table表格区域 :pagination="ipagination" -->
|
||||
<div>
|
||||
<a-table
|
||||
size="middle"
|
||||
@@ -50,7 +50,7 @@
|
||||
rowKey="chargeCompanyId"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:pagination="false"
|
||||
:loading="loading"
|
||||
:scroll="{x: 1000}"
|
||||
@change="handleTableChange"
|
||||
@@ -138,7 +138,7 @@ const defaultTableColumns = [
|
||||
title: '来款企业',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'chargeCompanyName',
|
||||
dataIndex: 'name',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
// {
|
||||
@@ -175,13 +175,13 @@ const firstColumnFooter = {
|
||||
align: 'center',
|
||||
width: 60
|
||||
}
|
||||
// 统计的项目分类
|
||||
const projectCategory = [
|
||||
{ name: '工作组', key: 'workGroup' },
|
||||
{ name: '项目合作', key: 'generalProject' },
|
||||
{ name: '会议费', key: 'meeting' },
|
||||
{ name: '会员费', key: 'member' }
|
||||
]
|
||||
// // 统计的项目分类
|
||||
// const projectCategory = [
|
||||
// { name: '工作组', key: 'workGroup' },
|
||||
// { name: '项目合作', key: 'generalProject' },
|
||||
// { name: '会议费', key: 'meeting' },
|
||||
// { name: '会员费', key: 'member' }
|
||||
// ]
|
||||
|
||||
export default {
|
||||
name: 'EnterprisePaymentStatisticsList',
|
||||
@@ -225,7 +225,8 @@ export default {
|
||||
rangeDateFormat: {
|
||||
begin: 'YYYY',
|
||||
end: 'YYYY'
|
||||
}
|
||||
},
|
||||
disableMixinCreated: true // 不调用混用的created方法
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -268,16 +269,15 @@ export default {
|
||||
// 将企业信息对象从查询参数中去掉
|
||||
delete param.chargeCompany
|
||||
}
|
||||
// param.year = param.year_begin + ',' + param.year_end
|
||||
|
||||
return filterObj(param)
|
||||
},
|
||||
// 获取查询的列数
|
||||
/*
|
||||
* {
|
||||
"name": "企业名称",
|
||||
"key": "name"
|
||||
},
|
||||
* 获取查询的列数
|
||||
* titleList: item数组
|
||||
* item 信息
|
||||
* item."name": "企业名称",
|
||||
* item."key": "name"
|
||||
* */
|
||||
getColumnsData(titleList) {
|
||||
let columnsObj = []
|
||||
@@ -291,7 +291,6 @@ export default {
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}
|
||||
columnsObj.push(item)
|
||||
|
||||
})
|
||||
return columnsObj
|
||||
},
|
||||
@@ -309,9 +308,10 @@ export default {
|
||||
this.loading = true
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
// todo 处理TableColumns 的数据 先本地生成
|
||||
// 处理TableColumns 的数据
|
||||
// let columnsKeys = res.result.columns || []
|
||||
let syncColumns = this.getColumnsData(res.result.titleList || [])
|
||||
console.log("-------syncColumns----", syncColumns)
|
||||
this.columns = [firstColumnTop, ...defaultTableColumns, ...syncColumns]
|
||||
this.columnsFooter = [firstColumnFooter, ...defaultTableColumns, ...syncColumns]
|
||||
// this.dataSource = res.result.pageList.records
|
||||
@@ -319,7 +319,7 @@ export default {
|
||||
this.dataSource = res.result.valList || []
|
||||
this.dataSource.map(data => {
|
||||
syncColumns.map(col => {
|
||||
data[col.dataIndex] = data.allMoney || '0.00' + ''
|
||||
data[col.dataIndex] = data[col.dataIndex] || '0.00' + ''
|
||||
})
|
||||
})
|
||||
// 操作汇总表格的数据
|
||||
@@ -336,11 +336,11 @@ export default {
|
||||
obj[col.dataIndex] = footerData[col.dataIndex] || '0.00' + ''
|
||||
})
|
||||
this.footerDataSource = [obj]
|
||||
if (res.result.pageList.total) {
|
||||
this.ipagination.total = res.result.pageList.total
|
||||
} else {
|
||||
this.ipagination.total = 0
|
||||
}
|
||||
// if (res.result.pageList.total) {
|
||||
// this.ipagination.total = res.result.pageList.total
|
||||
// } else {
|
||||
// this.ipagination.total = 0
|
||||
// }
|
||||
}
|
||||
if (this.dataSource.length > 0) {
|
||||
this.$nextTick(() => {
|
||||
@@ -360,6 +360,10 @@ export default {
|
||||
this.$message.warning('请选择项目年份时间段')
|
||||
return
|
||||
}
|
||||
if(!this.queryParam.chargeCompany) {
|
||||
this.$message.warning('请选择来款企业进行查询')
|
||||
return
|
||||
}
|
||||
this.lastQueryParam = {...this.queryParam}
|
||||
this.loadData(1)
|
||||
},
|
||||
@@ -372,7 +376,7 @@ export default {
|
||||
year_begin: new Date().getFullYear().toString(),
|
||||
year_end: new Date().getFullYear().toString()
|
||||
}
|
||||
this.loadData(1)
|
||||
// this.loadData(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user