3
0
Fork 0

feat(directPushList): 直推列表入口变更 添加新字段-团队人数 注册业绩

This commit is contained in:
woody 2025-09-02 14:37:13 +08:00
parent 07e5b98d3c
commit e5c7253123
6 changed files with 711 additions and 963 deletions

View File

@ -1,295 +1,127 @@
<template> <template>
<view class="main"> <view class="container">
<view class="search-content"> <view class="list">
<view class="search-list"> <view class="list-item" v-for="item in list" :key="item.memberCode">
<view v-for="item in dataList" class="search-view"> <view class="item-row">
<view class="flex_s"> <text class="label">会员编号</text>
<view class="data-left"> <text class="value">{{ item.memberCode }}</text>
{{'会员编号'}} </view>
</view> <view class="item-row">
<view class="data-right"> <text class="label">会员昵称</text>
{{item.memberCode}} <text class="value">{{ item.nickName }}</text>
</view> </view>
</view> <!-- <view class="item-row">
<view class="flex_s"> <text class="label">会员手机号</text>
<view class="data-left"> <text class="value">{{ item.phone }}</text>
{{'会员姓名'}} </view> -->
</view> <view class="item-row">
<view class="data-right"> <text class="label">会员等级</text>
{{item.memberName}} <text class="value">{{ item.settleGradeVal }}</text>
</view> </view>
</view> <view class="item-row">
<view class="flex_s"> <text class="label">注册时间</text>
<view class="data-left"> <text class="value">{{ item.creationTime }}</text>
{{'注册等级'}} </view>
</view> <view class="item-row">
<view class="data-right"> <text class="label">注册业绩</text>
{{item.pkRegisterGradeStr}} <text class="value">{{ item.consumeAchieve }}</text>
</view> </view>
</view> <view class="item-row">
<view class="flex_s"> <text class="label">团队人数</text>
<view class="data-left"> <text class="value">{{ item.teamCount }}</text>
{{'注册日期'}} </view>
</view> </view>
<view class="data-right"> </view>
{{item.creationTime}} <view class="load-more">
</view> <text v-if="status === 'loading'">加载中...</text>
</view> <text v-if="status === 'nomore'">没有更多数据了</text>
<view class="flex_s"> </view>
<view class="data-left">
{{'累计业绩'}}
</view>
<view class="data-right">
{{item.consumeMoney | numberToCurrency}}
</view>
</view>
<view style="clear: both;"></view>
<view style="height: 20rpx;background-color: #fff;"></view>
</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import * as api from '@/config/distribute.js' import { getDirectPushList } from '@/config/mine'
import { setToken } from '@/config/auth.js'
import store from '@/store'
export default { export default {
name: 'DirectPush',
data() { data() {
return { return {
getBonusTypeList:[], list: [],
index:null, pageNum: 1,
dataList:[], pageSize: 10,
userInfo:[], total: 0,
query:{ status: 'loading', // loading, loadmore, nomore
startDate:'',
endDate:'',
sourceMemberCode:'',
sourceMemberName:'',
pkBonusItems: ''
},
page:{
pageNum:1,
pageSize:50
}
} }
},
props:["num","checkRule"],
onLoad() {
}, },
created() { created() {
// this.getType() this.getDirectPushList()
// this.getInfo()
this.getDataList()
this.userInfo = uni.getStorageSync('User')
}, },
methods: { methods: {
urlTap() { nextPageQuery() {
uni.navigateTo({ url: '/pages/bonusSource/index' }) if (this.status === 'nomore' || this.status === 'loading') {
}, return
getInfo(){ }
api.getInfo().then(res => { this.pageNum++
if (res) { this.getDirectPushList()
this.userInfo = res.data },
} prevPageQuery() {
}).catch(error => { this.pageNum--
reject(error) this.getDirectPushList()
}) },
}, getDirectPushList() {
submit() { this.status = 'loading'
this.getDataList() getDirectPushList({
}, pageNum: this.pageNum,
bindPickerChange(e) { pageSize: this.pageSize,
this.index = e.detail.value })
}, .then(res => {
bindDateChange(e) { this.list = this.list.concat(res.rows)
this.query.startDate = e.detail.value this.total = res.total
}, if (this.list.length >= this.total) {
bindDateChange1(e) { this.status = 'nomore'
this.query.endDate = e.detail.value } else {
}, this.status = 'loadmore'
getDataList(num) { }
this.page.pageNum = num ||1 })
api.parentList(this.page).then(res => { .catch(() => {
if (res) { if (this.pageNum > 1) {
this.dataList.push(...res.rows) this.pageNum--
} }
}).catch(error => { this.status = 'loadmore'
reject(error) })
}) },
},
submit() {
},
}, },
} }
</script> </script>
<style>
.border_s{ <style lang="scss" scoped>
border-bottom: 1rpx solid #eee; .container {
height: 10rpx; background-color: #f0f2f5;
} min-height: 100vh;
.button{ padding-top: 1rpx;
padding: 0 30rpx; }
/* width: 150rpx; */ .list-item {
height: 52rpx; background-color: #ffffff;
line-height: 52rpx; margin: 16rpx 24rpx;
color: #fff; padding: 16rpx 24rpx;
font-size: 28rpx; border-radius: 8rpx;
text-align: center; }
background: #005BAC; .item-row {
margin: 30rpx 0 0 0; display: flex;
float: right; justify-content: space-between;
border-radius: 24rpx; align-items: center;
} padding: 12rpx 0;
.type{ font-size: 28rpx;
color: #005BAC !important; .label {
} color: #8c8c8c;
.flex_s{ }
width: 100%; .value {
display: flex; color: #303133;
justify-content: space-between; }
padding-bottom: 15rpx; }
} .load-more {
.data-left{ text-align: center;
color: #999; color: #999;
font-size: 26rpx; padding: 20rpx 0;
} font-size: 24rpx;
.data-right{ }
color: #333; </style>
font-size: 26rpx;
}
.search-view{
/* display: flex; */
/* justify-content: space-between; */
padding: 30rpx 20rpx 0 20rpx;
border-bottom: 20rpx solid #eee;
/* border-bottom: 1px solid #eee; */
margin:0 ;
}
.search-list{
margin-bottom: 25rpx;
background-color: #fff;
}
.search-content{
margin-top: 25rpx;
}
.text_s{
color: #333;
font-size: 26rpx;
}
.search-icon-s{
width: 22rpx;
height: 22rpx;
}
.search-icons{
width: 47rpx;
height: 47rpx;
background: #005BAC;
border-radius: 50%;
margin-left: 20rpx;
display: flex;
justify-content: center;
align-items: center;
margin: 30rpx 20rpx 0 0;
}
.time1{
width: 158rpx;
height: 75rpx;
border-bottom: 1rpx solid #eee;
margin: 0 50rpx 30rpx 50rpx;
color: #999;
text-align: center;
font-size: 24rpx;
/* margin-bottom: 30rpx; */
}
.time-text{
color: #999;
font-size: 26rpx;
}
.search-bottom{
height: 100rpx;
line-height: 100rpx;
display: flex;
margin-left: 20rpx;
}
.texts{
color: #333;
font-size: 26rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
/* width:200rpx; */
text-align: right;
}
.select-text{
display: flex;
margin-right: 20rpx;
font-size: 26rpx;
color: #333;
position: relative;
}
.selIcon{
width: 20rpx;
height: 20rpx;
margin-top: 10rpx;
margin-left: 5rpx;
}
.text-s{
font-size: 26rpx;
color: #999;
margin-right: 10rpx;
}
.place{
font-size: 26rpx;
color: #999;
}
.border-colors{
border: none;
font-size: 26rpx;
color: #333;
margin-left:30rpx;
}
page{
background-color: #f2f2f2;
}
.search-icon{
width: 25rpx;
height: 25rpx;
position: absolute;
left: 30rpx;
top: 12rpx;
image{
}
}
.search-bg{
}
.top{
/* height: 200rpx; */
background-color: #fff;
padding: 20rpx 0 20rpx 0;
}
.search-tops{
display: flex;
justify-content: space-between;
height: 65rpx;
line-height: 65rpx;
padding-bottom: 40rpx;
border-bottom: 1px solid #eee;
}
.search-bg{
width: 432rpx;
height:35rpx;
background: #F5F6F8;
border-radius: 33rpx;
display: flex;
position: relative;
padding: 20rpx 50rpx;
margin-left: 20rpx;
}
</style>

View File

@ -1,300 +1,339 @@
<template> <template>
<view class="width-auto"> <view>
<view class="flexs"> <view class="date-selector-container">
<view class="select-flexs"> <view class="date-selector-wrapper">
<picker :range="selYearList" :value="index" range-key="label" @change="changeYear"> <view class="date-selector-header">
<view style="display: flex; align-items: center;justify-content: space-between;"> <text class="date-selector-title">选择查询时间</text>
<view style="margin-right:40rpx;">{{whatYear}}</view> </view>
<u-icon name="arrow-down" color="#999"></u-icon> <view class="date-selector-content">
</view> <view class="date-picker-item">
<picker
</picker> :range="selYearList"
:value="index"
</view> range-key="label"
<view class="select-flexs"> @change="changeYear"
<picker :range="selMounthList" :value="index" range-key="label" @change="bindPickerChange"> >
<view style="display: flex; align-items: center;justify-content: space-between;"> <view class="date-picker-display">
<view style="margin-right:40rpx;">{{whatMounth}}</view> <view class="date-picker-label">年份</view>
<u-icon name="arrow-down" color="#999"></u-icon> <view class="date-picker-value">
</view> <text class="date-text">{{ whatYear }}</text>
<text class="date-unit"></text>
</picker> <u-icon name="arrow-down" color="#005BAC" size="24"></u-icon>
</view>
</view> </view>
<view class="select-flexs" style="margin-left: 20rpx;" @click="showType=true"> </picker>
<view style="display: flex; align-items: center;justify-content: space-between;"> </view>
<view style="margin-right:40rpx;">{{yjName}}</view> <view class="date-picker-separator"></view>
<u-icon name="arrow-down" color="#999"></u-icon> <view class="date-picker-item">
</view> <picker
<!-- <picker :range="yjTypeList" :value="index2" range-key="label" @confirm="bindType"></picker> --> :range="selMounthList"
<u-picker @cancel='showType=false' :show="showType" ref="uPicker" :columns="yjTypeList" :value="index"
@confirm="bindType" keyName='label'></u-picker> range-key="label"
</view> @change="bindPickerChange"
<!-- <view class="title"> >
导出明细 <view class="date-picker-display">
</view> --> <view class="date-picker-label">月份</view>
</view> <view class="date-picker-value">
<view class="listrefor bg2"> <text class="date-text">{{ whatMounth }}</text>
<text class="date-unit"></text>
<view class="flex_item"> <u-icon name="arrow-down" color="#005BAC" size="24"></u-icon>
<view class="text1">左区业绩</view> </view>
<view class="text2">{{ achieveData.leftAchieve || 0 }}</view> </view>
</view> </picker>
<view class="flex_item" style="cursor: pointer;" @click="goDetail(1)"> </view>
<view class="text1">左区血缘业绩</view> </view>
<view class="text2">{{ achieveData.leftDirectAchieve || 0 }}</view> </view>
</view> </view>
<view class="flex_item"> <view class="width-auto"> </view>
<view class="text1">左区人数</view> </view>
<view class="text2">{{ achieveData.leftCoun || 0 }}</view>
</view>
</view>
<view class="listrefor bg3">
<view>
<view class="text1">血缘业绩</view>
<view class="text2">{{ achieveData.directAchieve || 0 }}</view>
</view>
</view>
<view class="listrefor bg2">
<view class="flex_item">
<view class="text1">右区业绩</view>
<view class="text2">{{ achieveData.rightAchieve || 0 }}</view>
</view>
<view class="flex_item" style="cursor: pointer;" @click="goDetail(2)">
<view class="text1">右区血缘业绩</view>
<view class="text2">{{ achieveData.rightDirectAchieve || 0 }}</view>
</view>
<view class="flex_item">
<view class="text1">右区人数</view>
<view class="text2">{{ achieveData.rightCount || 0 }}</view>
</view>
</view>
</view>
</template> </template>
<script> <script>
import { import { getPlaceNewAddAchieve } from '@/config/distribute.js'
getPlaceNewAddAchieve, export default {
getYjList data() {
} from "@/config/distribute.js"; return {
export default { index: 0,
show: false,
data() { achieveData: {},
return {
index: 0,
show: false,
achieveData: {},
whatMounth: '', whatMounth: '',
yjType: 1, yjType: 1,
yjName: "全部", showType: false,
showType: false, selMounthList: [],
selMounthList: [], yjTypeList: [],
yjTypeList: [], yearShow: false,
yearShow:false, whatYear: '',
whatYear:"", selYearList: [
selYearList:[{ {
value: 0, value: 0,
label: new Date().getFullYear()-1, label: new Date().getFullYear() - 1,
},{ },
value: 1, {
label: new Date().getFullYear(), value: 1,
}], label: new Date().getFullYear(),
mounthList: [{ },
value: 1, ],
label: 1 + '月', mounthList: [
}, {
{ value: 1,
value: 2, label: 1 + '月',
label: 2 + '月', },
}, {
{ value: 2,
value: 3, label: 2 + '月',
label: 3 + '月', },
}, {
{ value: 3,
value: 4, label: 3 + '月',
label: 4 + '月', },
}, {
{ value: 4,
value: 5, label: 4 + '月',
label: 5 + '月', },
}, {
{ value: 5,
value: 6, label: 5 + '月',
label: 6 + '月', },
}, {
{ value: 6,
value: 7, label: 6 + '月',
label: 7 + '月', },
}, {
{ value: 7,
value: 8, label: 7 + '月',
label: 8 + '月', },
}, {
{ value: 8,
value: 9, label: 8 + '月',
label: 9 + '月', },
}, {
{ value: 9,
value: 10, label: 9 + '月',
label: 10 + '月', },
}, {
{ value: 10,
value: 11, label: 10 + '月',
label: 11 + '月', },
}, {
{ value: 11,
value: 12, label: 11 + '月',
label: 12 + '月' },
}, {
], value: 12,
} label: 12 + '月',
}, },
created() { ],
}
this.getMounth() },
this.getYjList() created() {
setTimeout(() => { this.getMounth()
this.getPlaceNewAddAchieve() },
}, 50) methods: {
}, goDetail(index) {
methods: { uni.navigateTo({
url: '/pages/performanceEchart/index?ifDetail=' + index,
goDetail(index) { })
uni.navigateTo({ },
url:'/pages/performanceEchart/index?ifDetail='+index
})
},
getYjList() {
getYjList().then(res => {
this.yjTypeList = [res.data]
})
},
changeYear(e){
this.whatYear = this.selYearList[e.detail.value].label
this.getPlaceNewAddAchieve()
},
bindPickerChange(e) {
this.whatMounth = e.detail.value + 1
this.getPlaceNewAddAchieve()
},
bindType(e) {
this.yjType = e.value[0].value
this.yjName = e.value[0].label
this.showType = false
this.getPlaceNewAddAchieve()
},
// /
getMounth() {
this.whatMounth = new Date().getMonth() + 1
let selMounth = []
this.mounthList.forEach((item) => {
// if (item.value <= this.whatMounth) {
// selMounth.push(item)
// }
selMounth.push(item)
})
this.selMounthList = selMounth
this.whatYear = new Date().getFullYear()
},
getPlaceNewAddAchieve() {
getPlaceNewAddAchieve({
monthType: this.whatMounth,
achievementType: this.yjType,
year:this.whatYear
}).then((res) => {
this.achieveData = res.data;
});
}
}, changeYear(e) {
} this.whatYear = this.selYearList[e.detail.value].label
this.getPlaceNewAddAchieve()
},
bindPickerChange(e) {
this.whatMounth = e.detail.value + 1
this.getPlaceNewAddAchieve()
},
// /
getMounth() {
this.whatMounth = new Date().getMonth() + 1
let selMounth = []
this.mounthList.forEach(item => {
// if (item.value <= this.whatMounth) {
// selMounth.push(item)
// }
selMounth.push(item)
})
this.selMounthList = selMounth
this.whatYear = new Date().getFullYear()
},
getPlaceNewAddAchieve() {
getPlaceNewAddAchieve({
monthType: this.whatMounth,
achievementType: this.yjType,
year: this.whatYear,
}).then(res => {
this.achieveData = res.data
})
},
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .uni-picker { ::v-deep .uni-picker {
width: 100%; width: 100%;
} }
.select-flexs { //
.date-selector-container {
// width: 100%;
// margin-bottom: 20rpx;
padding: 10rpx;
}
border: 1rpx solid #EEEEEE; .date-selector-wrapper {
border-radius: 15rpx; background: linear-gradient(135deg, #005bac 0%, #0074d9 100%);
// width: 232rpx; border-radius: 20rpx;
padding: 20rpx 19rpx; padding: 20rpx 20rpx;
display: flex; box-shadow: 0 6rpx 24rpx rgba(0, 91, 172, 0.12);
align-items: center; position: relative;
justify-content: space-between; overflow: hidden;
} }
.flexs { .date-selector-wrapper::before {
display: flex; content: '';
// justify-content: space-between; position: absolute;
border-radius: 30rpx 30rpx 0 0; top: 0;
background-color: #fff; left: 0;
} right: 0;
bottom: 0;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="30" r="1.5" fill="rgba(255,255,255,0.08)"/><circle cx="60" cy="80" r="2.5" fill="rgba(255,255,255,0.06)"/></svg>')
no-repeat;
background-size: cover;
pointer-events: none;
}
.title { .date-selector-header {
padding: 10rpx 0; margin-bottom: 16rpx;
margin-top: 10rpx; }
}
.width-auto { .date-selector-title {
background-color: #fff; color: #ffffff;
padding: 0 22rpx; font-size: 24rpx;
width: 690rpx; font-weight: 600;
margin: 0 auto; opacity: 0.9;
padding-bottom: 20rpx; }
}
.listrefor { .date-selector-content {
color: #FFFFFF; display: flex;
border-radius: 10rpx; align-items: center;
padding: 32rpx 21rpx; justify-content: space-between;
margin-top: 25rpx; position: relative;
display: flex; z-index: 1;
justify-content: space-between; }
.flex_item:nth-child(1) { .date-picker-item {
width: 40%; flex: 1;
} background: rgba(255, 255, 255, 0.95);
border-radius: 12rpx;
padding: 16rpx 16rpx;
backdrop-filter: blur(10rpx);
transition: all 0.3s ease;
}
.flex_item:nth-child(2) { .date-picker-item:active {
width: 35%; transform: scale(0.98);
} background: rgba(255, 255, 255, 0.9);
}
.flex_item:nth-child(3) { .date-picker-separator {
width: 25%; width: 20rpx;
} height: 2rpx;
background: rgba(255, 255, 255, 0.6);
margin: 0 12rpx;
border-radius: 1rpx;
}
.text1 { .date-picker-display {
font-size: 28rpx; display: flex;
} flex-direction: column;
align-items: center;
gap: 6rpx;
}
.text2 { .date-picker-label {
font-size: 30rpx; font-size: 22rpx;
font-weight: bold; color: #666666;
margin-top: 30rpx; font-weight: 500;
} margin-bottom: 2rpx;
} }
.bg1 { .date-picker-value {
background: linear-gradient(180deg, #FC7C7C 0%, #F65757 100%); display: flex;
} align-items: center;
justify-content: center;
gap: 4rpx;
}
.bg2 { .date-text {
background: linear-gradient(180deg, #FF9354 0%, #FF7F36 100%); font-size: 32rpx;
} font-weight: 700;
color: #005bac;
line-height: 1;
}
.bg3 { .date-unit {
background: linear-gradient(180deg, #677AF9 0%, #697BF2 100%); font-size: 22rpx;
} color: #005bac;
</style> font-weight: 500;
margin-right: 6rpx;
}
.title {
padding: 10rpx 0;
margin-top: 10rpx;
}
.width-auto {
background-color: #fff;
padding: 0 22rpx;
width: 690rpx;
margin: 0 auto;
padding-bottom: 20rpx;
}
.listrefor {
color: #ffffff;
border-radius: 10rpx;
padding: 32rpx 21rpx;
margin-top: 25rpx;
display: flex;
justify-content: space-between;
.flex_item:nth-child(1) {
width: 40%;
}
.flex_item:nth-child(2) {
width: 35%;
}
.flex_item:nth-child(3) {
width: 25%;
}
.text1 {
font-size: 28rpx;
}
.text2 {
font-size: 30rpx;
font-weight: bold;
margin-top: 30rpx;
}
}
.bg1 {
background: linear-gradient(180deg, #fc7c7c 0%, #f65757 100%);
}
.bg2 {
background: linear-gradient(180deg, #ff9354 0%, #ff7f36 100%);
}
.bg3 {
background: linear-gradient(180deg, #677af9 0%, #697bf2 100%);
}
</style>

View File

@ -19,7 +19,7 @@ module.exports = vm => {
//#ifdef DEV_SERVER //#ifdef DEV_SERVER
console.log('DEV_SERVER') console.log('DEV_SERVER')
config.baseURL = 'http://192.168.0.86:8080' config.baseURL = 'https://t-bl.beida777.com/prod-api'
//#endif //#endif
//#ifdef QA_SERVER //#ifdef QA_SERVER

View File

@ -161,14 +161,6 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path": "pages/mine/directPush/index",
"style": {
"navigationBarTitleText": "直推列表",
"navigationBarBackgroundColor": "#fff",
"enablePullDownRefresh": true
}
},
{ {
"path": "pages/performanceEchart/index", "path": "pages/performanceEchart/index",
"style": { "style": {

View File

@ -300,6 +300,13 @@ export default {
payNum: '', payNum: '',
awards: {}, awards: {},
otherMenuList: [ otherMenuList: [
{
url: '/pages/performanceEchart/index',
name: '数据查询',
imgurl: '../../static/images/mark1.png',
menuKey: 'marketDynamics',
ifshow: true,
},
{ {
url: '1', url: '1',
name: '我的钱包', name: '我的钱包',
@ -350,13 +357,13 @@ export default {
menuKey: 'addressList', menuKey: 'addressList',
ifshow: true, ifshow: true,
}, },
{ // {
url: '/pages/mine/directPush/index', // url: '/pages/mine/directPush/index',
name: '直推列表', // name: '',
imgurl: '../../static/images/mark5.png', // imgurl: '../../static/images/mark5.png',
menuKey: 'directPush', // menuKey: 'directPush',
ifshow: false, // ifshow: false,
}, // },
{ {
url: '/pages/pickupArea/pickupArea', url: '/pages/pickupArea/pickupArea',
name: '提货专区', name: '提货专区',

View File

@ -1,415 +1,293 @@
<template> <template>
<view class="main"> <view class="main">
<view class="top-lists">
<view
v-for="(item, index) in navList"
v-show="item.menuKey != ''"
:key="index"
:class="navIndex == index ? 'styles' : ''"
class="nav-view"
@click="clickHref(index)"
>
{{ item.name }}
</view>
</view>
<!-- 业绩分布 !-->
<template>
<view v-if="navIndex == 0 && navList[0].menuKey != ''">
<performanceDistribution />
</view>
</template>
<view class="top-lists"> <!-- 推荐列表 !-->
<view v-for="(item, index) in navList" v-show="item.menuKey!=''" :key="index" <template v-if="navIndex == 1">
:class="navIndex == index ? 'styles' : ''" class="nav-view" @click="clickHref(index)"> <view>
{{ item.name }} <directList ref="sgsyData" />
</view> </view>
</view> </template>
<view> </view>
</view>
<!-- 业绩分布 !-->
<template>
<view v-if="navIndex==0 && navList[0].menuKey!=''">
<view v-if='ifDetail==0'>
<view>
<performanceDistribution />
</view>
<!-- 安置图 -->
<view>
<placement />
</view>
</view>
<view v-else>
<!-- 月度业绩详情 -->
<view>
<monthPvDetail :placeDept='ifDetail' />
</view>
</view>
</view>
</template>
<!-- 安置图 !-->
<!-- <template>
<view v-if="navIndex==1">
</view>
</template> -->
<!-- 月度新增统计 !-->
<template>
<!-- <view v-if="navIndex==1">
</view> -->
</template>
<!-- 月度新增业绩 / 数据查询 !-->
<template>
<view v-if="navIndex==1" style="padding-bottom: 20rpx;">
<!-- 首购新增业绩 !-->
<view>
<fistAddPv />
</view>
<!-- 首购业绩分布 !-->
<view>
<firstPv></firstPv>
</view>
<!-- 复购新增业绩 !-->
<!-- <view>
<repAddPv />
</view> -->
<!-- 复购业绩分布 !-->
<!-- <view>
<secondPv></secondPv>
</view> -->
<!-- 奖衔业绩分布 !-->
<!-- <view>
<placementPerformance />
</view> -->
<!-- 真实业绩分布 !-->
<!-- <view>
<realPerformances />
</view> -->
<!-- 首购新增业绩对比 !-->
<view>
<mounthPvCompare />
</view>
<!-- 活跃会员对比 !-->
<view>
<activeMembers></activeMembers>
</view>
<!-- 推荐小区分布 !-->
<!-- <view>
<recommendedCommunity />
</view> -->
<!-- 推荐平均用时 -->
<!-- <view>
<recommendTime />
</view> -->
</view>
</template>
<!-- 直推业绩 !-->
<template>
<view v-if="navIndex==2">
<view class="height-auto-s">
<view style="font-size: 28rpx;">{{'直推业绩'}}</view>
<view class="flex-ss">
<view class="time1">
<picker :value="query.startDate" fields='month' mode="date" @change="bindDateChange">
<view v-if="query.startDate!=''" class="uni-inputs">{{query.startDate}}</view>
<view v-else class="uni-input">{{'开始日期'}}</view>
</picker>
</view>
<!-- <view class="text_s">{{'至'}}</view>
<view class="time1" style="margin-right: 0;">
<picker :value="query.endDate" mode="date" @change="bindDateChange1">
<view v-if="query.endDate!=''" class="uni-inputs">{{query.endDate}}</view>
<view v-else class="uni-input">{{'结束日期'}}</view>
</picker>
</view> -->
</view>
</view>
<!-- 推荐业绩分布 !-->
<view>
<recommendPerformance ref="recommends" />
</view>
<!-- 等级业绩 !-->
<view>
<gradePerformance ref="recommends1" />
</view>
</view>
</template>
<!-- 推荐列表 !-->
<template>
<view v-if="navIndex==3">
<directList ref="sgsyData" />
</view>
</template>
</view>
</template> </template>
<script> <script>
import * as api from '@/config/login.js' import * as api from '@/config/login.js'
import * as apis from '@/config/market.js' import * as apis from '@/config/market.js'
import { import { setToken } from '@/config/auth.js'
setToken import store from '@/store'
} from '@/config/auth.js' import placement from '@/components/distribution/placement.vue'
import store from '@/store' import placementPerformance from '@/components/distribution/placementPerformance.vue'
import placement from '@/components/distribution/placement.vue' import mounthPvCompare from '@/components/distribution/mounthPvCompare.vue'
import placementPerformance from '@/components/distribution/placementPerformance.vue' import activeMembers from '@/components/distribution/activeMembers.vue'
import fistAddPv from '@/components/distribution/fistAddPv.vue' import repAddPv from '@/components/distribution/repAddPv.vue'
import mounthPvCompare from '@/components/distribution/mounthPvCompare.vue' import recommendedCommunity from '@/components/distribution/recommendedCommunity.vue'
import activeMembers from '@/components/distribution/activeMembers.vue' import firstPv from '@/components/distribution/firstPv.vue'
import repAddPv from '@/components/distribution/repAddPv.vue' import secondPv from '@/components/distribution/secondPv.vue'
import recommendedCommunity from '@/components/distribution/recommendedCommunity.vue' import realPerformances from '@/components/distribution/realPerformances.vue'
import firstPv from '@/components/distribution/firstPv.vue' import realPerformance from '@/components/distribution/realPerformance.vue'
import secondPv from '@/components/distribution/secondPv.vue' import directList from '@/components/distribution/directList.vue'
import realPerformances from '@/components/distribution/realPerformances.vue' import recommendTime from '@/components/distribution/recommendTime.vue'
import realPerformance from '@/components/distribution/realPerformance.vue' import gradePerformance from '@/components/distribution/gradePerformance.vue'
import directList from '@/components/distribution/directList.vue' import recommendPerformance from '@/components/distribution/recommendPerformance.vue'
import recommendTime from '@/components/distribution/recommendTime.vue' import performanceDistribution from '@/components/distribution/performanceDistribution.vue'
import gradePerformance from '@/components/distribution/gradePerformance.vue' import monthPvDetail from '@/components/distribution/monthPvDetail.vue'
import recommendPerformance from '@/components/distribution/recommendPerformance.vue' export default {
import performanceDistribution from '@/components/distribution/performanceDistribution.vue' components: {
import monthPvDetail from '@/components/distribution/monthPvDetail.vue' placement,
export default { realPerformances,
placementPerformance,
realPerformance,
directList,
recommendTime,
gradePerformance,
recommendPerformance,
performanceDistribution,
recommendedCommunity,
mounthPvCompare,
activeMembers,
monthPvDetail,
},
data() {
return {
index: null,
userInfo: [],
query: {
startDate: '',
},
marketList: [
{
text: '奖金来源',
id: 3,
path: '/marketDynamics',
name: 'bonusSource',
isShow: false,
},
],
navList: [
{
name: '月度业绩',
menuKey: '',
value: 'ConsanguinityCheck',
},
{
name: '推荐列表',
menuKey: '',
value: 'recommendList',
},
components: { // {
placement, // name: "",
realPerformances, // menuKey: "",
placementPerformance, // value: "placementChart"
realPerformance, // },
directList, // {
recommendTime, // name: "",
gradePerformance, // menuKey: "",
recommendPerformance, // value: "monthlyChart"
performanceDistribution, // },
fistAddPv,
repAddPv,
recommendedCommunity,
firstPv,
secondPv,
mounthPvCompare,
activeMembers,
monthPvDetail
},
data() {
return {
index: null,
userInfo: [],
query: {
startDate: '',
},
marketList: [{
text: '奖金来源',
id: 3,
path: "/marketDynamics",
name: 'bonusSource',
isShow: false,
}, ],
navList: [{
name: '月度业绩',
menuKey: "",
value: "ConsanguinityCheck"
},
{
name: '数据查询',
menuKey: "",
value: "monthlyPerformance"
},
{
name: '直推业绩',
menuKey: "",
value: "recommendPerformance"
},
{
name: '推荐列表',
menuKey: "",
value: "recommendList"
},
// { // {
// name: "", // name: '',
// menuKey: "", // menuKey: "",
// value: "placementChart" // value: "recommendTime"
// }, // },
// { ],
// name: "", navIndex: 0,
// menuKey: "", page: {
// value: "monthlyChart" pageSize: 50,
// }, pageNum: 1,
},
ifDetail: '0',
}
},
onLoad(val) {
this.query.startDate = this.getStartTime()
this.ifDetail = val.ifDetail || '0'
// this.query.endDate = this.getEndTime()
this.getMenuLists()
},
methods: {
getStartTime() {
let date = new Date()
date.setDate(1) //
let year = date.getFullYear() //
let month = date.getMonth() + 1 // 0-11+1
month = month > 9 ? month : '0' + month //
// return year + '-' + month + '-' + day
return year + '-' + month
},
// getEndTime() {
// var date = new Date();
// var year = date.getFullYear() //
// var month = date.getMonth() + 1; //
// var day = date.getDate() > 1 ? date.getDate() - 1 : date.getDate(); //
// var hour = date.getHours(); //
// var minutes = date.getMinutes(); //
// var seconds = date.getSeconds() //
// // 0
// if (month >= 1 && month <= 9) {
// month = "0" + month;
// }
// if (day >= 0 && day <= 9) {
// day = "0" + day;
// }
// if (hour >= 0 && hour <= 9) {
// hour = "0" + hour;
// }
// if (minutes >= 0 && minutes <= 9) {
// minutes = "0" + minutes;
// }
// if (seconds >= 0 && seconds <= 9) {
// seconds = "0" + seconds;
// }
// // return year + "-" + month + "-" + day + " "
// return year + "-" + month
// },
bindDateChange(e) {
this.query.startDate = e.detail.value
this.$refs.recommends.upDateCover2(this.query)
this.$refs.recommends1.upDateCover2(this.query)
},
// { async onReachBottom() {
// name: '', if (this.navIndex == 1) {
// menuKey: "", this.$refs.sgsyData.nextPageQuery()
// value: "recommendTime" }
// }, },
bindPickerChange(e) {
], this.index = e.detail.value
navIndex: 0, },
page: { clickHref(index) {
pageSize: 50, // let that= this;
pageNum: 1, this.navIndex = index
}, this.ifDetail = '0'
ifDetail: "0" },
} getMenuLists() {
}, api.menuList().then(res => {
onLoad(val) { res.data.forEach(item => {
this.navList.forEach(items => {
this.query.startDate = this.getStartTime() if (item.menuKey == items.value) {
this.ifDetail = val.ifDetail || "0" items.menuKey = item.menuKey
// this.query.endDate = this.getEndTime() }
this.getMenuLists() })
}, if (this.marketList[0].name == item.menuKey) {
methods: { this.marketList[0].isShow = true
getStartTime() { }
let date = new Date() })
date.setDate(1) // })
let year = date.getFullYear() // },
let month = date.getMonth() + 1 // 0-11+1 },
month = month > 9 ? month : '0' + month // }
// return year + '-' + month + '-' + day
return year + "-" + month
},
// getEndTime() {
// var date = new Date();
// var year = date.getFullYear() //
// var month = date.getMonth() + 1; //
// var day = date.getDate() > 1 ? date.getDate() - 1 : date.getDate(); //
// var hour = date.getHours(); //
// var minutes = date.getMinutes(); //
// var seconds = date.getSeconds() //
// // 0
// if (month >= 1 && month <= 9) {
// month = "0" + month;
// }
// if (day >= 0 && day <= 9) {
// day = "0" + day;
// }
// if (hour >= 0 && hour <= 9) {
// hour = "0" + hour;
// }
// if (minutes >= 0 && minutes <= 9) {
// minutes = "0" + minutes;
// }
// if (seconds >= 0 && seconds <= 9) {
// seconds = "0" + seconds;
// }
// // return year + "-" + month + "-" + day + " "
// return year + "-" + month
// },
bindDateChange(e) {
this.query.startDate = e.detail.value
this.$refs.recommends.upDateCover2(this.query)
this.$refs.recommends1.upDateCover2(this.query)
},
async onReachBottom() {
if (this.navIndex == 6) {
this.page.pageNum + 1
this.$refs.sgsyData.getDataList(this.page.pageNum += 1);
}
},
bindPickerChange(e) {
this.index = e.detail.value
},
clickHref(index) {
// let that= this;
this.navIndex = index
this.ifDetail = "0"
},
getMenuLists() {
api.menuList().then((res) => {
res.data.forEach((item) => {
this.navList.forEach((items) => {
if (item.menuKey == items.value) {
items.menuKey = item.menuKey
}
})
if (this.marketList[0].name == item.menuKey) {
this.marketList[0].isShow = true
}
})
})
},
},
}
</script> </script>
<style lang="scss"> <style lang="scss">
.uni-inputs { .uni-inputs {
color: #333; color: #333;
} }
.text_s { .text_s {
font-size: 24rpx; font-size: 24rpx;
color: #333; color: #333;
} }
.height-auto-s { .height-auto-s {
background-color: #fff; background-color: #fff;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 20rpx; margin-top: 20rpx;
padding: 25rpx 60rpx 0 60rpx; padding: 25rpx 60rpx 0 60rpx;
// line-height: 75rpx; // line-height: 75rpx;
} }
.flex-ss { .flex-ss {
display: flex; display: flex;
} }
.time1 { .time1 {
width: 158rpx; width: 158rpx;
// height: 75rpx; // height: 75rpx;
// border-bottom: 1rpx solid #eee; // border-bottom: 1rpx solid #eee;
margin: 0 20rpx 30rpx 20rpx; margin: 0 20rpx 30rpx 20rpx;
color: #999; color: #999;
text-align: center; text-align: center;
font-size: 24rpx; font-size: 24rpx;
/* margin-bottom: 30rpx; */ /* margin-bottom: 30rpx; */
} }
.texts {
color: #333;
font-size: 26rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
/* width:200rpx; */
text-align: right;
}
.select-text {
display: flex;
margin-right: 20rpx;
font-size: 26rpx;
color: #333;
position: relative;
}
.texts { .selIcon {
color: #333; width: 30rpx;
font-size: 26rpx; height: 30rpx;
overflow: hidden; margin: 5rpx 0 0 20rpx;
white-space: nowrap; }
text-overflow: ellipsis;
/* width:200rpx; */
text-align: right;
}
.select-text { page {
display: flex; background-color: #f2f2f2;
margin-right: 20rpx; }
font-size: 26rpx;
color: #333;
position: relative;
}
.selIcon { .styles {
width: 30rpx; color: #005bac !important;
height: 30rpx; background: #fff !important;
margin: 5rpx 0 0 20rpx; border-bottom: 4rpx solid #005bac !important;
} }
page { .top-lists {
background-color: #f2f2f2; display: flex;
} background-color: #fff;
border-bottom: 2rpx solid #f0f0f0;
margin-bottom: 10rpx;
.styles { .nav-view {
border: none !important; flex: 1;
color: #fff !important; padding: 30rpx 20rpx;
background: #d61820; font-size: 28rpx;
} text-align: center;
color: #666;
position: relative;
border-bottom: 4rpx solid transparent;
transition: all 0.3s ease;
.top-lists { &:not(:last-child) {
display: flex; border-right: 1rpx solid #f0f0f0;
flex-wrap: nowrap; }
overflow-x: auto;
background-color: #fff;
padding: 20rpx 0;
margin-bottom: 20rpx;
.nav-view { &:active {
min-width: 110rpx; background-color: #f8f8f8;
padding: 5rpx 26rpx; }
border-radius: 10rpx; }
border: 2rpx solid #999999; }
font-size: 28rpx;
text-align: center;
margin: 0 10rpx;
color: #999;
}
}
</style> </style>