【修改】增加百分比 总数
This commit is contained in:
@@ -128,7 +128,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// 未收入账款统计
|
// 未收入账款统计
|
||||||
.not-receiced {
|
.not-receiced {
|
||||||
width: 49%;
|
width: 49.6%;
|
||||||
min-width: 480px;
|
min-width: 480px;
|
||||||
height: auto;
|
height: auto;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
@@ -137,7 +137,7 @@ export default {
|
|||||||
// 分类统计
|
// 分类统计
|
||||||
.income-sort {
|
.income-sort {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
width: 49%;
|
width: 49.6%;
|
||||||
min-width: 480px;
|
min-width: 480px;
|
||||||
height: auto;
|
height: auto;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- 未收账款统计-->
|
<!-- 未收账款统计-->
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="title">营收账款
|
<div class="title">应收账款
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
show-search
|
show-search
|
||||||
@@ -162,12 +162,12 @@ export default {
|
|||||||
// 将接口数据 转化成表格数据形式
|
// 将接口数据 转化成表格数据形式
|
||||||
let tableData = [
|
let tableData = [
|
||||||
{indexName: '金额'},
|
{indexName: '金额'},
|
||||||
// {indexName: '百分比'}
|
{indexName: '百分比'}
|
||||||
]
|
]
|
||||||
dataSource.map((item, index) => {
|
dataSource.map((item, index) => {
|
||||||
let dataIndex = 'key' + index
|
let dataIndex = 'key' + index
|
||||||
tableData[0][dataIndex] = item.money
|
tableData[0][dataIndex] = item.money
|
||||||
// tableData[1][dataIndex] = item.value + '%'
|
tableData[1][dataIndex] = item.value ? item.value + '%' :''
|
||||||
})
|
})
|
||||||
this.dataSource = tableData
|
this.dataSource = tableData
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ const columns = [
|
|||||||
{
|
{
|
||||||
title: '',
|
title: '',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 90,
|
width: 110,
|
||||||
dataIndex: 'indexName',
|
dataIndex: 'indexName',
|
||||||
scopedSlots: {customRender: 'text'}
|
scopedSlots: {customRender: 'text'}
|
||||||
},
|
},
|
||||||
@@ -83,12 +83,20 @@ MonthData.map(tt => {
|
|||||||
columns.push({
|
columns.push({
|
||||||
title: tt.name,
|
title: tt.name,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100,
|
width: 115,
|
||||||
dataIndex: tt.key,
|
dataIndex: tt.key,
|
||||||
scopedSlots: {customRender: 'allMoney'}
|
scopedSlots: {customRender: 'allMoney'}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
columns.push({
|
||||||
|
title: '总数',
|
||||||
|
align: 'center',
|
||||||
|
width: 100,
|
||||||
|
dataIndex: 'key12',
|
||||||
|
scopedSlots: {customRender: 'allMoney'}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SingleMonthEcharts',
|
name: 'SingleMonthEcharts',
|
||||||
@@ -144,7 +152,14 @@ export default {
|
|||||||
tableData[1][key] = item.billMoney // 开票金额
|
tableData[1][key] = item.billMoney // 开票金额
|
||||||
tableData[2][key] = item.comeAllMoney // 到账金额
|
tableData[2][key] = item.comeAllMoney // 到账金额
|
||||||
}
|
}
|
||||||
|
// 单月总数
|
||||||
|
if(index === 12){
|
||||||
|
tableData[0].key12 = item.confirmAmount // 确认收入金额
|
||||||
|
tableData[1].key12 = item.billMoney // 开票金额
|
||||||
|
tableData[2].key12 = item.comeAllMoney // 到账金额
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
this.initEchartsData(res.result)
|
this.initEchartsData(res.result)
|
||||||
// 初始化 echarts
|
// 初始化 echarts
|
||||||
this.initEcharts()
|
this.initEcharts()
|
||||||
@@ -159,7 +174,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 将后端返回的数据 处理成 echarts需要的数据 格式
|
// 将后端返回的数据 处理成 echarts需要的数据 格式
|
||||||
initEchartsData(data) {
|
initEchartsData(data) {
|
||||||
data.map(item =>{
|
data.slice(0,12).map(item =>{
|
||||||
// this.echartsData.allMoney.push(item.allMoney)
|
// this.echartsData.allMoney.push(item.allMoney)
|
||||||
this.echartsData.confirmAmount.push(item.confirmAmount)
|
this.echartsData.confirmAmount.push(item.confirmAmount)
|
||||||
this.echartsData.billMoney.push(item.billMoney)
|
this.echartsData.billMoney.push(item.billMoney)
|
||||||
@@ -201,7 +216,7 @@ export default {
|
|||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: '2.4%',
|
left: '2.4%',
|
||||||
right: '0%',
|
right: '5%',
|
||||||
bottom: '3%',
|
bottom: '3%',
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user