|
|
@@ -91,7 +91,7 @@
|
|
|
<div v-if="siteid == 'HY' || siteid == 'YOSTEST1'">
|
|
|
<p class="title">{{$t(`项目预计成交分析`)}}</p>
|
|
|
<previousTwelveMonths :data="previousData"></previousTwelveMonths>
|
|
|
- <futureTwelveMonths ref="futureTwelveMonthsRef" style="margin-top: 15px" @selectStage="selectStage" :dataBoxData="dataBoxData"></futureTwelveMonths>
|
|
|
+ <futureTwelveMonths ref="futureTwelveMonthsRef" style="margin-top: 15px" @selectStage="selectStage" :dataBoxData="dataBoxData" @clickChart="clickChart"></futureTwelveMonths>
|
|
|
</div>
|
|
|
<div style="margin-top: 40px">
|
|
|
<p class="title">{{projectTile}}</p>
|
|
|
@@ -258,6 +258,7 @@ export default {
|
|
|
"type": "0",
|
|
|
"dataid": "0",
|
|
|
"stagename":[],
|
|
|
+ "signdate_due":'',
|
|
|
"where": {
|
|
|
"tradefield": "",
|
|
|
"isleave":""
|
|
|
@@ -514,19 +515,21 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
this.chartPie.render();
|
|
|
- document.addEventListener('click',(evt) => {
|
|
|
- const states = this.chartPie.getStates();
|
|
|
- let dataList = []
|
|
|
- dataList = states
|
|
|
- if (dataList.length > 0){
|
|
|
- this.projectTile = dataList[0].data.stagename
|
|
|
- this.sa_projstagemagid = dataList[0].data.sa_projstagemagid
|
|
|
- this.projectParam.content.pageNumber = 1
|
|
|
- this.projectParam.content.pageSize = 20
|
|
|
- this.getProjectList()
|
|
|
- }
|
|
|
+ if (this.siteid != 'HY' && this.siteid != 'YOSTEST1'){
|
|
|
+ document.addEventListener('click',(evt) => {
|
|
|
+ const states = this.chartPie.getStates();
|
|
|
+ let dataList = []
|
|
|
+ dataList = states
|
|
|
+ if (dataList.length > 0){
|
|
|
+ this.projectTile = dataList[0].data.stagename
|
|
|
+ this.sa_projstagemagid = dataList[0].data.sa_projstagemagid
|
|
|
+ this.projectParam.content.pageNumber = 1
|
|
|
+ this.projectParam.content.pageSize = 20
|
|
|
+ this.getProjectList()
|
|
|
+ }
|
|
|
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
this.getProportionOfFileModel()
|
|
|
}else if(JSON.parse(sessionStorage.getItem('flagIndex')) === 8){
|
|
|
const colorArray = ['#6395fa','#63daab','#657798','#f7c122','#7666fa','#75cbed','#6FD26C'];
|
|
|
@@ -604,19 +607,21 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
this.chartPie.render();
|
|
|
- document.addEventListener('click',(evt) => {
|
|
|
- const states = this.chartPie.getStates();
|
|
|
- let dataList = []
|
|
|
- dataList = states
|
|
|
- if (dataList.length > 0){
|
|
|
- this.projectTile = dataList[0].data.stagename
|
|
|
- this.sa_projstagemagid = dataList[0].data.sa_projstagemagid
|
|
|
- this.projectParam.content.pageNumber = 1
|
|
|
- this.projectParam.content.pageSize = 20
|
|
|
- this.getProjectList()
|
|
|
- }
|
|
|
+ if (this.siteid != 'HY' && this.siteid != 'YOSTEST1'){
|
|
|
+ document.addEventListener('click',(evt) => {
|
|
|
+ const states = this.chartPie.getStates();
|
|
|
+ let dataList = []
|
|
|
+ dataList = states
|
|
|
+ if (dataList.length > 0){
|
|
|
+ this.projectTile = dataList[0].data.stagename
|
|
|
+ this.sa_projstagemagid = dataList[0].data.sa_projstagemagid
|
|
|
+ this.projectParam.content.pageNumber = 1
|
|
|
+ this.projectParam.content.pageSize = 20
|
|
|
+ this.getProjectList()
|
|
|
+ }
|
|
|
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
this.getProportionOfFileModel()
|
|
|
}else if(JSON.parse(sessionStorage.getItem('flagIndex')) === 6){
|
|
|
const colorArray = ['#6395fa','#63daab','#657798','#f7c122','#7666fa'];
|
|
|
@@ -694,19 +699,22 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
this.chartPie.render();
|
|
|
- document.addEventListener('click',(evt) => {
|
|
|
- const states = this.chartPie.getStates();
|
|
|
- let dataList = []
|
|
|
- dataList = states
|
|
|
- if (dataList.length > 0){
|
|
|
- this.projectTile = dataList[0].data.stagename
|
|
|
- this.sa_projstagemagid = dataList[0].data.sa_projstagemagid
|
|
|
- this.projectParam.content.pageNumber = 1
|
|
|
- this.projectParam.content.pageSize = 20
|
|
|
- this.getProjectList()
|
|
|
- }
|
|
|
+ if (this.siteid != 'HY' && this.siteid != 'YOSTEST1'){
|
|
|
+ document.addEventListener('click',(evt) => {
|
|
|
+ const states = this.chartPie.getStates();
|
|
|
+ let dataList = []
|
|
|
+ dataList = states
|
|
|
+ if (dataList.length > 0){
|
|
|
+ this.projectTile = dataList[0].data.stagename
|
|
|
+ this.sa_projstagemagid = dataList[0].data.sa_projstagemagid
|
|
|
+ this.projectParam.content.pageNumber = 1
|
|
|
+ this.projectParam.content.pageSize = 20
|
|
|
+ this.getProjectList()
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
- })
|
|
|
this.getProportionOfFileModel()
|
|
|
} else {
|
|
|
/*const colorArray = ['#6395fa','#63daab','#657798','#f7c122','#7666fa','#75cbed','#6FD26C','#DFC064'];*/
|
|
|
@@ -785,19 +793,22 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
this.chartPie.render();
|
|
|
- document.addEventListener('click',(evt) => {
|
|
|
- const states = this.chartPie.getStates();
|
|
|
- let dataList = []
|
|
|
- dataList = states
|
|
|
- if (dataList.length > 0 && dataList[0].data.stagename !== ''){
|
|
|
- this.projectTile = dataList[0].data.stagename
|
|
|
- this.sa_projstagemagid = dataList[0].data.sa_projstagemagid
|
|
|
- this.projectParam.content.pageNumber = 1
|
|
|
- this.projectParam.content.pageSize = 20
|
|
|
- this.getProjectList()
|
|
|
- }
|
|
|
+ if (this.siteid != 'HY' && this.siteid != 'YOSTEST1'){
|
|
|
+ document.addEventListener('click',(evt) => {
|
|
|
+ const states = this.chartPie.getStates();
|
|
|
+ let dataList = []
|
|
|
+ dataList = states
|
|
|
+ if (dataList.length > 0 && dataList[0].data.stagename !== ''){
|
|
|
+ this.projectTile = dataList[0].data.stagename
|
|
|
+ this.sa_projstagemagid = dataList[0].data.sa_projstagemagid
|
|
|
+ this.projectParam.content.pageNumber = 1
|
|
|
+ this.projectParam.content.pageSize = 20
|
|
|
+ this.getProjectList()
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
- })
|
|
|
this.getProportionOfFileModel()
|
|
|
}
|
|
|
|
|
|
@@ -859,7 +870,7 @@ export default {
|
|
|
this.previousData = [
|
|
|
{
|
|
|
title:'成交项目数',
|
|
|
- value:res.data.dealTotalCount,
|
|
|
+ value:res.data[0].extradata.dealTotalCount,
|
|
|
unit:'个',
|
|
|
description:'当前状态为已成交,并且项目成交时间在前12个月(不含当前月)的项目数量',
|
|
|
color:'#3874F6'
|
|
|
@@ -867,24 +878,24 @@ export default {
|
|
|
{
|
|
|
title:'预计成交正偏差',
|
|
|
title1:'项目',
|
|
|
- value1:res.data.positiveCount,
|
|
|
+ value1:res.data[0].extradata.positiveCount,
|
|
|
unit1:'个',
|
|
|
title2:'金额',
|
|
|
- value2:this.tool.formatAmount(this.tool.unitConversion(res.data.positiveOffsetAmount,10000),2),
|
|
|
+ value2:this.tool.formatAmount(this.tool.unitConversion(res.data[0].extradata.positiveOffsetAmount,10000),2),
|
|
|
unit2:'万元',
|
|
|
description:this.$t('依据:每个项目的偏差金额 = 项目成交金额 - 预计签约金额') + '\n ①' + this.$t('项目:合计偏差金额为正数的项目数量') + '\n ②' + this.$t('金额:合计每个项目的正数偏差金额'),
|
|
|
color:'#E6A23C'
|
|
|
},
|
|
|
{
|
|
|
title:'项目成交金额合计',
|
|
|
- value:this.tool.formatAmount(this.tool.unitConversion(res.data.dealAmount,10000),2),
|
|
|
+ value:this.tool.formatAmount(this.tool.unitConversion(res.data[0].extradata.dealAmount,10000),2),
|
|
|
unit:'万元',
|
|
|
description:'合计当前状态为已成交,并且项目成交时间在前12个月(不含当前月)的项目订单金额',
|
|
|
color: '#009966'
|
|
|
},
|
|
|
{
|
|
|
title:'失败项目数',
|
|
|
- value:res.data.failTotalCount,
|
|
|
+ value:res.data[0].extradata.failTotalCount,
|
|
|
unit:'个',
|
|
|
description:'当前状态为已失败,并且失败操作时间在前12个月(不含当前月)的项目数量',
|
|
|
color:'#3874F6'
|
|
|
@@ -892,31 +903,31 @@ export default {
|
|
|
{
|
|
|
title:'预计成交负偏差',
|
|
|
title1:'项目',
|
|
|
- value1:res.data.negativeCount,
|
|
|
+ value1:res.data[0].extradata.negativeCount,
|
|
|
unit1:'个',
|
|
|
title2:'金额',
|
|
|
- value2:this.tool.formatAmount(this.tool.unitConversion(res.data.negativeOffsetAmount,10000),2),
|
|
|
+ value2:this.tool.formatAmount(this.tool.unitConversion(res.data[0].extradata.negativeOffsetAmount,10000),2),
|
|
|
unit2:'万元',
|
|
|
description:this.$t('依据:每个项目的偏差金额 = 项目成交金额 - 预计签约金额') + '\n ①' + this.$t('项目:合计偏差金额为负数的项目数量') + '\n ②' + this.$t('金额:合计每个项目的负数偏差金额'),
|
|
|
color:'#E6A23C'
|
|
|
},
|
|
|
{
|
|
|
title:'预计签约金额合计',
|
|
|
- value:this.tool.formatAmount(this.tool.unitConversion(res.data.signAmount,10000),2),
|
|
|
+ value:this.tool.formatAmount(this.tool.unitConversion(res.data[0].extradata.signAmount,10000),2),
|
|
|
unit:'万元',
|
|
|
description:'合计当前状态为已成交,并且项目成交时间在前12个月(不含当前月)的项目预计签约金额',
|
|
|
color: '#009966'
|
|
|
},
|
|
|
{
|
|
|
title:'项目成交率',
|
|
|
- value:Math.round((res.data.dealRate * 100)*100)/100,
|
|
|
+ value:Math.round((res.data[0].extradata.dealRate * 100)*100)/100,
|
|
|
unit:'%',
|
|
|
description:'项目成交率 = 成交项目数 ÷ (成交项目数 + 失败项目数)×100%',
|
|
|
color:'#3874F6'
|
|
|
},
|
|
|
{
|
|
|
title:'预计成交准确率',
|
|
|
- value:Math.round((res.data.rightRate * 100)*100)/100,
|
|
|
+ value:Math.round((res.data[0].extradata.rightRate * 100)*100)/100,
|
|
|
unit:'%',
|
|
|
description:this.$t('依据:偏差率 = |(项目成交金额 - 预计签约金额)| ÷ 预计签约金额 × 100%') + '\n ' + this.$t('预计成交准确率 = 偏差率≤15%的项目数 ÷ 成交项目数 × 100%'),
|
|
|
color:'#E6A23C'
|
|
|
@@ -925,26 +936,43 @@ export default {
|
|
|
this.dataBoxData = [
|
|
|
{
|
|
|
title:'预计签约金额合计',
|
|
|
- value:this.tool.formatAmount(this.tool.unitConversion(res.data.sumsignamount_due,10000),2),
|
|
|
+ value:this.tool.formatAmount(this.tool.unitConversion(res.data[0].extradata.sumsignamount_due,10000),2),
|
|
|
unit:'万元',
|
|
|
description:'合计未来12个月的项目预计签约金额',
|
|
|
color: '#3874F6'
|
|
|
},
|
|
|
{
|
|
|
title:'预计成交金额合计',
|
|
|
- value:this.tool.formatAmount(this.tool.unitConversion(res.data.sumdealamount_due,10000),2),
|
|
|
+ value:this.tool.formatAmount(this.tool.unitConversion(res.data[0].extradata.sumdealamount_due,10000),2),
|
|
|
unit:'万元',
|
|
|
description:'合计未来12个月的项目预计成交金额',
|
|
|
color: '#E6A23C'
|
|
|
},
|
|
|
]
|
|
|
- this.futreData = res.data.array
|
|
|
+ this.futreData = res.data[0].extradata.array
|
|
|
this.$refs.futureTwelveMonthsRef.chartData(init,this.futreData)
|
|
|
+ this.projectList = res.data
|
|
|
+ this.total = res.total
|
|
|
+ this.projectTile = this.$t('全部') + this.$t('_预计成交项目') + '(' + res.total + ')'
|
|
|
}
|
|
|
},
|
|
|
selectStage(val){
|
|
|
this.transactionParam.content.stagename = val
|
|
|
this.expectedTransaction(false)
|
|
|
+ },
|
|
|
+ clickChart(date){
|
|
|
+ this.transactionParam.content.signdate_due = date
|
|
|
+ this.queryProject(date)
|
|
|
+ },
|
|
|
+ async queryProject(date){
|
|
|
+ this.transactionParam.content.type = this.dataParam.content.type
|
|
|
+ this.transactionParam.content.dataid = this.dataParam.content.dataid
|
|
|
+ this.transactionParam.content.where.tradefield = this.dataParam.content.where.tradefield
|
|
|
+ this.transactionParam.content.where.isleave = this.dataParam.content.where.isleave
|
|
|
+ const res = await this.$api.requested(this.transactionParam)
|
|
|
+ this.projectList = res.data
|
|
|
+ this.total = res.total
|
|
|
+ this.projectTile = date + this.$t('_预计成交项目') + '(' + res.total + ')'
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|