Commit b2185df5 authored by agping's avatar agping

实收

parent 702f372b
......@@ -228,4 +228,26 @@ export default {
obj.fn();
};
},
//获取每个月第一天的时间
getMonthDate(n){
var d = new Date();
var year = d.getFullYear();
var mon=d.getMonth()+1;
var day=d.getDate();
if(day <= n){
if(mon>1) {
mon=mon-1;
}
else {
year = year-1;
mon = 12;
}
}
d.setDate(d.getDate()-n);
year = d.getFullYear();
mon=d.getMonth()+1;
day=d.getDate();
var s = year+"-"+(mon<10?('0'+mon):mon)+"-"+"01"
return s;
},
};
\ No newline at end of file
......@@ -71,11 +71,14 @@
<p class="time-title tc" v-show="false">统计时间:{{statisticsStartTime+'-'+statisticsEndTime}}</p>
<div class="btn-area" v-show="index<2">
<div class="oh">
<a class="fl" href="javascript:;" @click="goPageAgent">本人业绩</a>
<a class="fl" href="javascript:;" @click="goPageAgent">本人<br />业绩</a>
</div>
<div class="oh" v-if="userLevel!=10">
<a v-if="userLevel==20" href="javascript:;" @click="goPageRegion">门店业绩</a>
<a v-else href="javascript:;" @click="goPageRegion">分部业绩</a>
<a v-if="userLevel==20" href="javascript:;" @click="goPageRegion">门店<br />业绩</a>
<a v-else href="javascript:;" @click="goPageRegion">分部<br />业绩</a>
</div>
<div class="oh">
<a class="fl" href="javascript:;" @click="goPageduibi">业绩<br />对比</a>
</div>
</div>
</footer>
......@@ -365,6 +368,15 @@
}
});
},
goPageduibi() {//跳转业绩对比页面
let _this = this;
_this.$router.push({
path: '/performanceContrast',
query: {
// 'ywyId': localStorage.getItem('tlYjAgentId')
}
});
},
goPageRegion() {
let _this = this;
_this.$router.push({
......@@ -595,13 +607,15 @@
footer>.btn-area>div>a {
display: block;
width: 2.05rem;
height: .68rem;
border-radius: .34rem;
line-height: .68rem;
width: 1.2rem;
height: 1.2rem;
border-radius: .6rem;
/*line-height: .68rem;*/
text-align: center;
background-color: #FFA132;
color: white;
box-shadow: 0 0.3rem 0.5rem rgba(255,161,50,.5);
/*box-shadow: 0 0.3rem 0.5rem rgba(255,161,50,.5);*/
box-sizing: border-box;
padding: .15rem;
}
</style>
\ No newline at end of file
......@@ -22,65 +22,31 @@
<span @click="openPicker5">{{birthday5}}</span>
</div>
<div style="display: flex;justify-content: center;width: 100%;">
<div class="choose-btn">筛选</div>
<div class="choose-btn" @click="ajaxUl">筛选</div>
</div>
</div>
<!--table-->
<div class="yeji">
<div class="yeji" style="padding-bottom:.6rem ;">
<table>
<tr class="city-con">
<td colspan="5">上海</td>
</tr>
<tr class="title-con">
<td>实收时间</td>
<td>实收</td>
<td>业绩时间</td>
<td>业绩</td>
<td>人数</td>
</tr>
<tr class="main-con">
<td>2019.9.09-2019.9.10</td>
<td>666666</td>
<td>2019.9.09-2019.9.10</td>
<td>666666</td>
<td>666</td>
</tr>
<tr class="city-con">
<td colspan="5">杭州</td>
</tr>
<tr class="title-con">
<td>实收时间</td>
<td>实收</td>
<td>业绩时间</td>
<td>业绩</td>
<td>人数</td>
</tr>
<tr class="main-con">
<td>2019.9.09-2019.9.10</td>
<td>666666</td>
<td>2019.9.09-2019.9.10</td>
<td>666666</td>
<td>666</td>
</tr>
<tr class="city-con">
<td colspan="5">深圳</td>
</tr>
<tr class="title-con">
<td>实收时间</td>
<td>实收</td>
<td>业绩时间</td>
<td>业绩</td>
<td>人数</td>
</tr>
<tr class="main-con">
<td>2019.9.09-2019.9.10</td>
<td>666666</td>
<td>2019.9.09-2019.9.10</td>
<td>666666</td>
<td>666</td>
</tr>
<div v-for="(item,index) in dataList">
<tr class="city-con">
<td colspan="5" style="width: 7.5rem;">{{item.city}}</td>
</tr>
<tr class="title-con">
<td>实收时间</td>
<td>实收</td>
<td>业绩时间</td>
<td>业绩</td>
<td>人数</td>
</tr>
<tr class="main-con" v-for="(item2,index) in item.value">
<td>{{(item2.time).replace(/-/g, '.').replace(/ . /g, '-')}}</td>
<td>{{item2.real_performanceSum}}</td>
<td>{{(item2.time).replace(/-/g, '.').replace(/ . /g, '-')}}</td>
<td>{{item2.performanceSum}}</td>
<td>{{item2.people_num}}</td>
</tr>
</div>
</table>
</div>
<div class="">
......@@ -113,18 +79,22 @@
'noborder': true,
'isBack': true
},
birthday0:"2019-01", //出生日期
birthday1:"2019-01", //出生日期
birthday2:"2019-01", //出生日期
birthday3:"2019-01", //出生日期
birthday4:"2019-01", //出生日期
birthday5:"2019-01", //出生日期
birthday0:"", //出生日期
birthday1:"", //出生日期
birthday2:"01", //出生日期
birthday3:"01", //出生日期
birthday4:"01", //出生日期
birthday5:"01", //出生日期
type:1,
startDate: new Date('2018-01'),
startDate: new Date('2019-01'),
dataList:[],
}
},
created() {
let _this = this;
_this.birthday0 = _this.common.getMonthDate(1).substr(0,_this.common.getMonthDate(1).length-3);
_this.birthday1 = _this.common.getMonthDate(1).substr(0,_this.common.getMonthDate(1).length-3);
_this.ajaxUl();
},
mounted () {
......@@ -136,12 +106,16 @@
let _this = this;
_this.$refs.picker.open();
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[2].style.display='none';
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[1].style.display='inline-block';
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[0].style.display='inline-block';
_this.type = 0*1;
},
openPicker1 () {
let _this = this;
_this.$refs.picker.open();
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[2].style.display='none';
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[1].style.display='inline-block';
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[0].style.display='inline-block';
_this.type = 1*1;
},
......@@ -150,6 +124,8 @@
let _this = this;
_this.$refs.picker.open();
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[2].style.display='inline-block';
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[1].style.display='none';
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[0].style.display='none';
_this.type = 2*1;
},
......@@ -157,6 +133,8 @@
let _this = this;
_this.$refs.picker.open();
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[2].style.display='inline-block';
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[1].style.display='none';
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[0].style.display='none';
_this.type = 3*1;
},
......@@ -165,6 +143,8 @@
let _this = this;
_this.$refs.picker.open();
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[2].style.display='inline-block';
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[1].style.display='none';
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[0].style.display='none';
_this.type = 4*1;
},
......@@ -172,6 +152,8 @@
let _this = this;
_this.$refs.picker.open();
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[2].style.display='inline-block';
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[1].style.display='none';
_this.$refs.picker.$el.getElementsByClassName('picker-slot')[0].style.display='none';
_this.type = 5*1;
},
......@@ -197,7 +179,29 @@
}
},
ajaxUl() {//获取业绩
let _this = this;
_this.axios({
method: 'get',
url: '/index/performanceStatistics',
responseType: 'json',
data: {
// 'id': _this.feed_id,
// 'type': 1
}
})
.then(function(response) {
if(response.data.code == 200) {
_this.dataList = response.data.data;
// console.log(_this.birthday5);
// console.log(_this.birthday4);
// console.log(_this.birthday3);
// console.log(_this.birthday2);
// console.log(_this.birthday1);
// console.log(_this.birthday0);
} else {}
})
},
formatDate(date) {
const y = date.getFullYear()
let m = date.getMonth() + 1
......@@ -212,7 +216,7 @@
m = m < 10 ? '0' + m : m
let d = date.getDate()
d = d < 10 ? ('0' + d) : d
return y + '-' + m + '-' + d
return d
},
},
computed: {
......@@ -250,13 +254,13 @@
font-size: .2rem;
}
.main-con td:nth-of-type(1),.main-con td:nth-of-type(3){
width: 2.08rem;
width: 2.6rem;
}
.main-con td:nth-of-type(2),.main-con td:nth-of-type(4){
width: 1.16rem;
/*width: 1.16rem;*/
}
.main-con td:nth-of-type(5){
width: 1.1rem;
/*width: 1.1rem;*/
}
.search_area{
height: 3.4rem;
......
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