|
|
@@ -7,7 +7,7 @@
|
|
|
<header-decoration />
|
|
|
<div class="pickDate">
|
|
|
<div style="width:100%;text-align:left;">
|
|
|
- <span>月份:</span>
|
|
|
+ <span>年份:</span>
|
|
|
<el-date-picker
|
|
|
v-model="allDate"
|
|
|
style="color: #000 !important;
|
|
|
@@ -15,10 +15,10 @@
|
|
|
height:2.825rem;
|
|
|
line-height: 2.825rem;
|
|
|
text-align:center;"
|
|
|
- type="month"
|
|
|
- value-format="yyyy-MM"
|
|
|
+ type="year"
|
|
|
+ value-format="yyyy"
|
|
|
@change="refreshAll(allDate)"
|
|
|
- placeholder="选择月">
|
|
|
+ placeholder="选择年份">
|
|
|
</el-date-picker>
|
|
|
</div>
|
|
|
<div
|
|
|
@@ -32,19 +32,19 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="customerC" v-if="authority">
|
|
|
- <dv-border-box-7 backgroundColor="rgba(6, 30, 93, 0.5)" >
|
|
|
+ <!-- <dv-border-box-7 backgroundColor="rgba(6, 30, 93, 0.5)" >
|
|
|
<div class="ttitle">
|
|
|
<div v-if="csArr.length>0" class="middleFont">各渠道客户数量</div>
|
|
|
<customer-statistics v-if="csArr.length>0" :data = 'csArr'></customer-statistics>
|
|
|
<div class="nullDate" v-else>暂无数据</div>
|
|
|
</div>
|
|
|
- </dv-border-box-7>
|
|
|
+ </dv-border-box-7> -->
|
|
|
|
|
|
- <dv-border-box-7 style="width:49.5%;" backgroundColor="rgba(6, 30, 93, 0.5)">
|
|
|
+ <dv-border-box-7 style="width:100%;" backgroundColor="rgba(6, 30, 93, 0.5)">
|
|
|
<div class="ttitle">
|
|
|
<div class="middleFont" v-if="tableData.data && tableData.data.length">月度客户送检量</div>
|
|
|
<dv-scroll-board style="height: 87%;"
|
|
|
- v-if="tableData.data && tableData.data.length"
|
|
|
+ v-if="tableData.data.length>0"
|
|
|
:config="tableData"
|
|
|
/>
|
|
|
<div class="nullDate" v-else>暂无数据</div>
|
|
|
@@ -144,10 +144,10 @@
|
|
|
pmArr:[],
|
|
|
peArr:[],
|
|
|
tableData:{
|
|
|
- header: ['<span style="font-size:12px">送检公司</span>', '<span style="font-size:12px">付款方式</span>', '<span style="font-size:12px">价格</span>(元)</span>'],
|
|
|
+ header: ['<span style="font-size:12px">送检公司</span>', '<span style="font-size:12px">委托数量</span>','<span style="font-size:12px">样品数量</span>', '<span style="font-size:12px">价格</span>(元)</span>'],
|
|
|
rowNum: 15,
|
|
|
- columnWidth: [400, 150,400],
|
|
|
- align: ['left','left','right'],
|
|
|
+ columnWidth: [500, 450, 450,500],
|
|
|
+ align: ['left','left','left','right'],
|
|
|
data: [
|
|
|
['行1列1', '行1列2', '行1列3'],
|
|
|
['行2列1', '行2列2', '行2列3'],
|
|
|
@@ -220,10 +220,10 @@
|
|
|
|
|
|
let dateNum = new Date(date.year, date.month, 0).getDate();
|
|
|
|
|
|
- this.getCustomerStatisticsYear(this.allDate)
|
|
|
+ // this.getCustomerStatisticsYear(this.allDate)
|
|
|
// this.getCustomerStatisticsMonth(this.allDate)
|
|
|
// this.getIndividualPerformanceMonth(this.allDate)
|
|
|
- this.getIndividualPerformanceCustomerMonth(this.allDate)
|
|
|
+ this.getIndividualPerformanceCustomerMonth(date.year)
|
|
|
// this.getTeamPerformance(this.allDate)
|
|
|
// this.getTeamPerformanceMonth(this.allDate)
|
|
|
// this.getpersonPerformanceAll(this.allDate)
|
|
|
@@ -234,7 +234,7 @@
|
|
|
},
|
|
|
refreshAll(date){
|
|
|
let dateNum = new Date(this.allDate.split('-')[0], Number(this.allDate.split('-')[1])+'', 0).getDate();
|
|
|
- this.getCustomerStatisticsYear(date)
|
|
|
+ // this.getCustomerStatisticsYear(date)
|
|
|
// this.getCustomerStatisticsMonth(date)
|
|
|
// this.getIndividualPerformanceMonth(date)
|
|
|
this.getIndividualPerformanceCustomerMonth(date)
|
|
|
@@ -282,16 +282,17 @@
|
|
|
})
|
|
|
},
|
|
|
getIndividualPerformanceCustomerMonth(date){
|
|
|
- this.tableData.data.length = 0
|
|
|
- let sql = "select d.*,SUM(t_lhwtsqb.zong_jia_) as jiage from (select * from t_bjd LEFT JOIN (select a.id_ as leibieid,a.lai_yuan_qu_dao_ as laiyuan,b.id_ as qudaoid, b.lei_bie_ from ((select id_, lai_yuan_qu_dao_ from t_qzkhb GROUP BY id_) UNION (select id_, lai_yuan_qu_dao_ from t_yxkh GROUP BY id_) UNION (select ke_hu_ming_cheng_, ke_hu_lai_yuan_ as khnum from t_khxx GROUP BY ke_hu_ming_cheng_)) as a LEFT JOIN (select t_qdgl.id_,t_qdlbb.lei_bie_ from t_qdgl LEFT JOIN t_qdlbb on t_qdgl.qu_dao_lei_bie_ = t_qdlbb.id_) as b on a.lai_yuan_qu_dao_ = b.id_) as c on t_bjd.ke_hu_ming_cheng_ = c.leibieid where t_bjd.shi_xiao_shi_jian = '"+date+"%' or t_bjd.zhuang_tai_ ='生效中') as d left join t_lhwtsqb on t_lhwtsqb.he_tong_id_ = d.id_ WHERE t_lhwtsqb.shi_fou_guo_shen_ = '1' and t_lhwtsqb.create_time_ like '"+date+"%' GROUP BY d.zhuan_huan_ke_hu_"
|
|
|
+ this.tableData.data.splice(0)
|
|
|
+ let aa=[]
|
|
|
+ let sql = "select d.*,COUNT(e.yps) as yps,COUNT(e.wts) as wts,SUM(e.zong_jia_) as jiage from(select * from t_bjd LEFT JOIN (select a.id_ as leibieid,a.lai_yuan_qu_dao_ as laiyuan from ((select id_, lai_yuan_qu_dao_ from t_qzkhb GROUP BY id_) UNION (select id_, lai_yuan_qu_dao_ from t_yxkh GROUP BY id_) UNION (select ke_hu_ming_cheng_, ke_hu_lai_yuan_ as khnum from t_khxx GROUP BY ke_hu_ming_cheng_)) as a ) as c on t_bjd.ke_hu_ming_cheng_ = c.leibieid where t_bjd.shi_xiao_shi_jian like '"+date+"%' or t_bjd.zhuang_tai_ ='生效中') as d LEFT JOIN (select t_lhwtzsb.zhuang_tai_,t_lhwtsqb.create_time_,t_lhwtsqb.he_tong_id_,t_lhwtsqb.id_ as wts,t_lhwtsqb.zong_jia_,t_lhwtzsb.yang_pin_bian_hao as yps from t_lhwtsqb LEFT JOIN t_lhwtzsb on t_lhwtzsb.shen_qing_id_ = t_lhwtsqb.zhan_shi_biao_id_ where t_lhwtzsb.zhuang_tai_ = '已完成' or t_lhwtsqb.create_time_ like '"+date+"%') as e on e.he_tong_id_ = d.id_ GROUP BY d.he_tong_bian_hao_"
|
|
|
curdPost('sql',sql).then(res=>{
|
|
|
let arr = res.variables.data
|
|
|
for (var i = 0; i < arr.length; i++) {
|
|
|
- let changeArr = ['<span style="font-size:12px">' + arr[i].zhuan_huan_ke_hu_ + '</span>','<span style="font-size:12px">' + arr[i].fu_kuan_fang_shi_ + '</span>','<span style="font-size:12px">' + this.moneyFormat(arr[i].jiage) + '</span>']
|
|
|
- this.tableData.data.push(changeArr)
|
|
|
+ let changeArr = ['<span style="font-size:12px">' + arr[i].zhuan_huan_ke_hu_ + '</span>','<span style="font-size:12px">' + arr[i].wts + '</span>','<span style="font-size:12px">' + arr[i].yps + '</span>','<span style="font-size:12px">' + this.moneyFormat(arr[i].jiage) + '</span>']
|
|
|
+ aa.push(changeArr)
|
|
|
}
|
|
|
- // }
|
|
|
- // console.log(this.orArr,'oraaaaaaa')
|
|
|
+ this.$set(this.tableData, 'data', aa)
|
|
|
+ console.log(sql,arr,this.tableData.data)
|
|
|
})
|
|
|
},
|
|
|
getTeamPerformance(date){
|
|
|
@@ -460,7 +461,7 @@
|
|
|
div{height:100%;}
|
|
|
.middleFont{
|
|
|
text-align: center;
|
|
|
- height: 13%;
|
|
|
+ height: 9%;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|