Commit e1278107 authored by Mac's avatar Mac

1

parent fba3ab26
......@@ -559,5 +559,9 @@
.dianshangannualRatio tr td{
cursor: pointer;
}
.dianshangannualRatio span{
font-size: 13px;
font-weight: normal;
}
</style>
\ No newline at end of file
......@@ -38,7 +38,8 @@
</div>
<div style="padding: 15px ;background: #FFF;margin-bottom: 50px;">
<el-table :data="DataList" v-loading="loading" header-cell-class-name="headClass" header-row-class-name='angclass' style="width: 100%;" border :row-class-name="tableRowClassName" :cell-style="columnStyle">
<el-table :data="DataList" v-loading="loading" header-cell-class-name="headClass" header-row-class-name='angclass'
style="width: 100%;" border :row-class-name="tableRowClassName" :cell-style="columnStyle" @row-click="clickTr">
<el-table-column label="月份" prop="Date" width='80' fixed>
<template slot-scope="scope">
<span v-if="scope.row.Date == '平均/总计'" >平均</span>
......@@ -136,7 +137,8 @@
</template>
</el-table-column>
</el-table>
<el-table :data="DataList" v-loading="loading" header-cell-class-name="headClass" header-row-class-name='angclass' style="width: 100%;margin-top: 20px;" border :row-class-name="tableRowClassName2" :cell-style="columnStyle">
<el-table :data="DataList" v-loading="loading" header-cell-class-name="headClass" header-row-class-name='angclass' style="width: 100%;margin-top: 20px;" border
:row-class-name="tableRowClassName2" :cell-style="columnStyle" @row-click="clickTr">
<el-table-column label="月份" prop="Date" width='80' fixed>
<template slot-scope="scope">
<span v-if="scope.row.Date == '平均/总计'" >总计</span>
......@@ -219,7 +221,7 @@
<table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: tablewidth+'px'}">
<tr > <td class="qthuanbicheng" style="width:90px;font-size: 12px;" v-for='(x,y) in RateList' :key = 'y'>{{x.Date}}</td></tr>
<tr v-for='(item,index) in leftData' :key = 'index'>
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;" v-for='(x,y) in RateList' :key = 'y' >
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;" v-for='(x,y) in RateList' :key = 'y' @click='goMonthurl(x)'>
<span :style="{color: getisred(x[item.DataObj]) == true?'#FD0F05':'#111111'}">{{x[item.DataObj]}}%</span>
</td>
</tr>
......@@ -275,12 +277,14 @@
},
created() {
let nowtime = new Date()
this.msg.StartTime = (nowtime.getFullYear()-1) + '-' +((nowtime.getMonth()+1)<10 ?'0'+(nowtime.getMonth()+1):nowtime.getMonth()+1)
this.msg.EndTime = nowtime.getFullYear() + '-' +((nowtime.getMonth()+1)<10 ?'0'+(nowtime.getMonth()+1):nowtime.getMonth()+1)
let startT = nowtime.setMonth(nowtime.getMonth()-12)
let startdate = new Date(startT)
this.msg.StartTime = (startdate.getFullYear()) + '-' +((startdate.getMonth()+2)<10 ?'0'+(startdate.getMonth()+2):startdate.getMonth()+2)//此次加2月是根据后台数据不是会查出13个月的数据
let enddate = new Date();
this.msg.EndTime = enddate.getFullYear() + '-' +((enddate.getMonth()+1)<10 ?'0'+(enddate.getMonth()+1):enddate.getMonth()+1)
if (this.$route.query.timedata) {
this.msg.StartTime=this.$route.query.timedata+'-01';
this.msg.EndTime=this.$route.query.timedata+'-12';
console.log(this.msg,'msg')
}
this.getDateList()
},
......@@ -375,6 +379,29 @@
if(row.hasOwnProperty('DateStr') && (columnIndex==1|| columnIndex==2||columnIndex==3||columnIndex==4)){
return 'background:#FFF;'
}
},
clickTr(row, event, column){
if(row.Date.indexOf('平均/总计')==-1){
this.$router.push({
name: 'onlineRetailersdata',
query: {
timedata: row.Date,
blank:'y'
}
});
}
},
goMonthurl(row){
console.log(row)
if(row.Date.indexOf('平均')==-1){
this.$router.push({
name: 'onlineRetailersdata',
query: {
timedata: row.Date,
blank:'y'
}
});
}
}
}
......@@ -546,6 +573,13 @@
.dianshangyeardata tr{
height: 30px !important;
}
.dianshangyeardata tr td{
cursor: pointer;
}
.dianshangyeardata span{
font-size: 13px;
font-weight: normal;
}
</style>
\ No newline at end of file
......@@ -148,6 +148,12 @@
<span v-else>{{scope.row.JXNum}}</span>
</template>
</el-table-column>
<el-table-column label="毛利率" prop="ProfitRate" width='90'>
<template slot-scope="scope">
<span v-if="getisred(scope.row.ProfitRate) == true" style="color: #FD0F05;">{{scope.row.ProfitRate}}</span>
<span v-else>{{scope.row.ProfitRate}}</span>
</template>
</el-table-column>
</el-table>
<el-table :data="averageData" v-loading="loading" header-cell-class-name="headClass" style="width: 1300px;margin-top: 20px;" border header-row-class-name='angclass' row-class-name="angclass">
......@@ -190,7 +196,11 @@
<span>毛利率</span>
</template>
</el-table-column>
<el-table-column label="" prop='MonthProfitRate' width=''></el-table-column>
<el-table-column label="" prop='MonthProfitRate' width=''>
<template slot-scope="scope">
<span>{{scope.row.MonthProfitRate}}%</span>
</template>
</el-table-column>
</el-table>
......@@ -224,6 +234,10 @@
created() {
let nowtime = new Date()
this.msg.Month = nowtime.getFullYear() + '-' +((nowtime.getMonth()+1)<10 ?'0'+(nowtime.getMonth()+1):nowtime.getMonth()+1)
if (this.$route.query.timedata) {
this.msg.Month=this.$route.query.timedata;
}
this.getDateList()
},
methods: {
......@@ -260,6 +274,7 @@
VipNum:'VIP',
YXNum:'银象',
JXNum:'金象',
ProfitRate:'毛利率',
}
let obj2 = {
Date:'隐藏',
......@@ -281,6 +296,7 @@
VipNum:'',
YXNum:'',
JXNum:'',
ProfitRate:'',
}
data.forEach((x,i)=>{
......@@ -304,6 +320,7 @@
x.VipNum=x.VipNum+'%';
x.YXNum=x.YXNum+'%';
x.JXNum=x.JXNum+'%';
x.ProfitRate=x.ProfitRate+'%';
this.RList.push(x)
this.RList.push(obj2)
this.RList.push(obj)
......@@ -314,6 +331,7 @@
}else{
x.MOrderRate = x.MOrderRate+'%';
x.ReBuyRate = x.ReBuyRate+'%';
x.ProfitRate = x.ProfitRate+'%';
this.RList.push(x)
}
})
......@@ -528,7 +546,10 @@
.onlineRetailersdata .el-table .whitestyle{
background: #FFF;
}
.onlineRetailersdata span{
font-size: 13px;
font-weight: normal;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment