【update】- 首页全所收入统计2个统计图增加预计到账金额的统计
This commit is contained in:
@@ -112,7 +112,8 @@ export default {
|
||||
// allMoney:[],
|
||||
confirmAmount:[],
|
||||
billMoney:[],
|
||||
comeAllMoney:[]
|
||||
comeAllMoney:[],
|
||||
estimatedArrivalMoney:[] // 预计到账金额
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -138,25 +139,30 @@ export default {
|
||||
// 树形结构的数据 ,修改成table可以直接展示的数据,默认只有四行数据
|
||||
let tableData = [
|
||||
// {indexName: '年度待确收金额'},
|
||||
{indexName: '预计到账金额'},
|
||||
{indexName: '确认收入金额'},
|
||||
{indexName: '开票金额'},
|
||||
{indexName: '到账金额'},
|
||||
{indexName: '到账金额'}
|
||||
]
|
||||
|
||||
dataSource.map((item, index) => {
|
||||
let keyItem = MonthData.find(ele => Number(ele.value) === (index + 1))
|
||||
if (keyItem) {
|
||||
let key = keyItem.key
|
||||
// tableData[3][key] = item.estimatedArrivalMoney // todo 需要替换字段 预计到账金额--也可能放在第一条
|
||||
tableData[0][key] = Number(item.comeAllMoney) + 100000 // todo 需要替换字段 预计到账金额--也可能放在第一条
|
||||
// tableData[0][key] = item.allMoney // 年度待确收金额
|
||||
tableData[0][key] = item.confirmAmount // 确认收入金额
|
||||
tableData[1][key] = item.billMoney // 开票金额
|
||||
tableData[2][key] = item.comeAllMoney // 到账金额
|
||||
tableData[1][key] = item.confirmAmount // 确认收入金额
|
||||
tableData[2][key] = item.billMoney // 开票金额
|
||||
tableData[3][key] = item.comeAllMoney // 到账金额
|
||||
|
||||
}
|
||||
// 单月总数
|
||||
if(index === 12){
|
||||
tableData[0].key12 = item.confirmAmount // 确认收入金额
|
||||
tableData[1].key12 = item.billMoney // 开票金额
|
||||
tableData[2].key12 = item.comeAllMoney // 到账金额
|
||||
tableData[0].key12 = item.estimatedArrivalMoney // 预计到账金额
|
||||
tableData[1].key12 = item.confirmAmount // 确认收入金额
|
||||
tableData[2].key12 = item.billMoney // 开票金额
|
||||
tableData[3].key12 = item.comeAllMoney // 到账金额
|
||||
}
|
||||
})
|
||||
|
||||
@@ -179,6 +185,10 @@ export default {
|
||||
this.echartsData.confirmAmount.push(item.confirmAmount)
|
||||
this.echartsData.billMoney.push(item.billMoney)
|
||||
this.echartsData.comeAllMoney.push(item.comeAllMoney)
|
||||
// this.echartsData.estimatedArrivalMoney.push(item.estimatedArrivalMoney)
|
||||
// todo 后端开发完以后替换掉
|
||||
this.echartsData.estimatedArrivalMoney.push(Number(item.comeAllMoney) + 100000)
|
||||
|
||||
})
|
||||
},
|
||||
initEcharts() {
|
||||
@@ -211,7 +221,7 @@ export default {
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: [ '确认收入金额', '开票金额', '到账金额'],
|
||||
data: [ '预计到账金额', '确认收入金额', '开票金额', '到账金额'],
|
||||
right: '2%'
|
||||
},
|
||||
grid: {
|
||||
@@ -291,6 +301,35 @@ export default {
|
||||
// ])
|
||||
// },
|
||||
// },
|
||||
{
|
||||
name: '预计到账金额',
|
||||
type: 'line',
|
||||
showSymbol: false,
|
||||
symbol: 'circle',
|
||||
symbolSize: 8,
|
||||
data: this.echartsData.estimatedArrivalMoney,
|
||||
itemStyle: {
|
||||
normal: {lineStyle:{type: 'dashed'}},
|
||||
emphasis: {
|
||||
color: '#fff',//拐点颜色
|
||||
borderColor: '#1BCDC6',//拐点边框颜色
|
||||
borderWidth: 2//拐点边框大小
|
||||
}
|
||||
},
|
||||
areaStyle: {
|
||||
opacity: 0.2,
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: '#1BCDC6'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#ffffff'
|
||||
}
|
||||
])
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '确认收入金额',
|
||||
type: 'line',
|
||||
|
||||
@@ -104,7 +104,8 @@ export default {
|
||||
// allMoney:[],
|
||||
confirmAmount:[],
|
||||
billMoney:[],
|
||||
comeAllMoney:[]
|
||||
comeAllMoney:[],
|
||||
estimatedArrivalMoney:[], // 预计到账金额
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -127,22 +128,27 @@ export default {
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
let dataSource = res.result
|
||||
|
||||
// 树形结构的数据 ,修改成table可以直接展示的数据,默认只有四行数据
|
||||
let tableData = [
|
||||
// {indexName: '年度待确收金额'},
|
||||
{indexName: '预计到账金额'},
|
||||
{indexName: '确认收入金额'},
|
||||
{indexName: '开票金额'},
|
||||
{indexName: '到账金额'},
|
||||
{indexName: '到账金额'}
|
||||
]
|
||||
|
||||
dataSource.map((item, index) => {
|
||||
let keyItem = MonthDataTotal.find(ele => Number(ele.value) === (index + 1))
|
||||
if (keyItem) {
|
||||
let key = keyItem.key
|
||||
// tableData[0][key] = item.estimatedArrivalMoney // todo 需要替换字段 预计到账金额--也可能放在第一条
|
||||
tableData[0][key] = Number(item.comeAllMoney) + 100000 // todo 需要替换字段 预计到账金额--也可能放在第一条
|
||||
// tableData[0][key] = item.allMoney // 年度待确收金额
|
||||
tableData[0][key] = item.confirmAmount // 确认收入金额
|
||||
tableData[1][key] = item.billMoney // 开票金额
|
||||
tableData[2][key] = item.comeAllMoney // 到账金额
|
||||
tableData[1][key] = item.confirmAmount // 确认收入金额
|
||||
tableData[2][key] = item.billMoney // 开票金额
|
||||
tableData[3][key] = item.comeAllMoney // 到账金额
|
||||
|
||||
}
|
||||
})
|
||||
this.initEchartsData(res.result)
|
||||
@@ -165,6 +171,9 @@ export default {
|
||||
this.echartsData.confirmAmount.push(item.confirmAmount)
|
||||
this.echartsData.billMoney.push(item.billMoney)
|
||||
this.echartsData.comeAllMoney.push(item.comeAllMoney)
|
||||
// this.echartsData.estimatedArrivalMoney.push(item.estimatedArrivalMoney)
|
||||
// todo 后端开发完以后替换掉
|
||||
this.echartsData.estimatedArrivalMoney.push(Number(item.comeAllMoney) + 100000)
|
||||
})
|
||||
},
|
||||
initEcharts() {
|
||||
@@ -197,7 +206,7 @@ export default {
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: ['确认收入金额', '开票金额', '到账金额'],
|
||||
data: ['预计到账金额', '确认收入金额', '开票金额', '到账金额'],
|
||||
right: '2%'
|
||||
},
|
||||
grid: {
|
||||
@@ -277,6 +286,35 @@ export default {
|
||||
// ])
|
||||
// },
|
||||
// },
|
||||
{
|
||||
name: '预计到账金额',
|
||||
type: 'line',
|
||||
showSymbol: false,
|
||||
symbol: 'circle',
|
||||
symbolSize: 8,
|
||||
data: this.echartsData.estimatedArrivalMoney,
|
||||
itemStyle: {
|
||||
normal: {lineStyle:{type: 'dashed'}},
|
||||
emphasis: {
|
||||
color: '#fff',//拐点颜色
|
||||
borderColor: '#1BCDC6',//拐点边框颜色
|
||||
borderWidth: 2//拐点边框大小
|
||||
}
|
||||
},
|
||||
areaStyle: {
|
||||
opacity: 0.2,
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: '#1BCDC6'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#ffffff'
|
||||
}
|
||||
])
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '确认收入金额',
|
||||
type: 'line',
|
||||
@@ -361,7 +399,7 @@ export default {
|
||||
])
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user