2023-05-26 18:23:34 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="box">
|
2023-05-31 11:06:26 +08:00
|
|
|
|
<u-navbar autoBack :title="performance[active].name" bgColor="rgba(255,255,255,0)" :placeholder="true"
|
|
|
|
|
leftIconSize="40" leftIconColor="#fff" titleStyle="font-size:35rpx;color:#fff">
|
|
|
|
|
<!-- <view slot="right">
|
2023-05-30 19:03:08 +08:00
|
|
|
|
<u-icon name="more-dot-fill" color="#fff" @click="show = true"></u-icon>
|
2023-05-30 17:15:26 +08:00
|
|
|
|
</view> -->
|
2023-05-26 18:23:34 +08:00
|
|
|
|
</u-navbar>
|
|
|
|
|
<u-sticky bgColor="#fff">
|
2023-05-31 11:06:26 +08:00
|
|
|
|
<u-tabs @change="handleChange" :list="list" itemStyle=" padding-left: 46rpx; padding-right: 46rpx; height: 46px;"
|
|
|
|
|
lineColor="#DA2E55" lineWidth="48rpx" lineHeight="10rpx" :activeStyle="activeStyle"
|
|
|
|
|
:inactiveStyle="inactiveStyle"></u-tabs>
|
2023-05-26 18:23:34 +08:00
|
|
|
|
</u-sticky>
|
|
|
|
|
<view class="sale_content">
|
|
|
|
|
<view class="sale_money">
|
|
|
|
|
<view class="money_total">
|
|
|
|
|
<view class="money_left">
|
2023-05-31 11:06:26 +08:00
|
|
|
|
<image src="../../static/images/money1.png"></image>
|
2023-05-26 18:23:34 +08:00
|
|
|
|
<text>总计金额</text>
|
|
|
|
|
</view>
|
2023-05-31 11:06:26 +08:00
|
|
|
|
<view class="money_right"><text>¥</text>{{orderDetail.totalAmount | currency}}</view>
|
2023-05-26 18:23:34 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="money_statistics">
|
|
|
|
|
<view class="money_left">
|
2023-05-31 11:06:26 +08:00
|
|
|
|
<image class="logo" src="../../static/images/money2.png"></image>
|
|
|
|
|
<view class="segmentation"
|
|
|
|
|
style="background: linear-gradient(0deg, #FFFFFF 0%, #FFE0C5 47%, #FFFFFF 100%);"></view>
|
2023-05-26 18:23:34 +08:00
|
|
|
|
<text>已发展会员个数</text>
|
|
|
|
|
</view>
|
2023-05-31 11:06:26 +08:00
|
|
|
|
<view class="money_right" style="color: #FF4800;">{{orderDetail.memberCount}}个</view>
|
|
|
|
|
<image class="fillet" src="../../static/images/fillet1.png"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="money_statistics">
|
|
|
|
|
<view class="money_left">
|
|
|
|
|
<image class="logo" src="../../static/images/money3.png"></image>
|
|
|
|
|
<view class="segmentation"
|
|
|
|
|
style="background: linear-gradient(0deg, #FFFFFF 0%, #C8EFFF 47%, #FFFFFF 100%);"></view>
|
|
|
|
|
<text>提成比例</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="money_right" style="color: #1082FF;">{{orderDetail.memberCommission | currency}}%</view>
|
|
|
|
|
<image class="fillet" src="../../static/images/fillet2.png"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="money_statistics">
|
|
|
|
|
<view class="money_left">
|
|
|
|
|
<image class="logo" src="../../static/images/money4.png"></image>
|
|
|
|
|
<view class="segmentation"
|
|
|
|
|
style="background: linear-gradient(0deg, #FFFFFF 0%, #CEF0DA 47%, #FFFFFF 100%);"></view>
|
|
|
|
|
<text>预计提成金额</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="money_right" style="color: #32A84F;">
|
|
|
|
|
¥{{parseFloat(orderDetail.totalAmount*(parseFloat(orderDetail.memberCommission) / 100)) | currency}}
|
|
|
|
|
</view>
|
|
|
|
|
<image class="fillet" src="../../static/images/fillet3.png"></image>
|
2023-05-26 18:23:34 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="sale_turnover">
|
|
|
|
|
<view class="turnover_title">
|
2023-05-30 19:03:08 +08:00
|
|
|
|
{{performance[active].fund}}
|
2023-05-26 18:23:34 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="turnover_list">
|
2023-05-31 11:06:26 +08:00
|
|
|
|
<u-list height="500" @scrolltolower="scrolltolower">
|
|
|
|
|
<u-list-item v-for="(item, index) in orderData" :key="index">
|
|
|
|
|
<view class="list_item">
|
|
|
|
|
<view class="info-wrap">
|
|
|
|
|
<view class="name">
|
|
|
|
|
<view class="item_radius"></view>
|
|
|
|
|
<text>{{item.nickname}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<text class="extra">
|
2023-06-01 11:24:27 +08:00
|
|
|
|
{{ $util.timestampToTime(item.payTime) }}
|
2023-05-31 11:06:26 +08:00
|
|
|
|
<view>{{ item.grade }}</view>
|
|
|
|
|
</text>
|
|
|
|
|
</view>
|
2023-06-02 15:27:23 +08:00
|
|
|
|
<view class="price-wrap">
|
|
|
|
|
<text style="display:block; margin-bottom: 6rpx;">¥{{item.payPrice | currency}}</text>
|
|
|
|
|
<u-tag v-if="item.refundStatus === 2" plain text="已退款" type="error"></u-tag>
|
|
|
|
|
</view>
|
2023-05-26 18:23:34 +08:00
|
|
|
|
</view>
|
2023-05-30 17:15:26 +08:00
|
|
|
|
</u-list-item>
|
2023-05-31 11:06:26 +08:00
|
|
|
|
</u-list>
|
2023-05-26 18:23:34 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-05-31 11:06:26 +08:00
|
|
|
|
<u-action-sheet :actions="performance" @close="show = false" :closeOnClickOverlay="true" :closeOnClickAction="true"
|
|
|
|
|
@select="selectClick" :title="title" :show="show"></u-action-sheet>
|
2023-05-26 18:23:34 +08:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
2023-05-30 17:15:26 +08:00
|
|
|
|
promoterOrderInfo,
|
|
|
|
|
promoterOrderCount
|
2023-05-26 18:23:34 +08:00
|
|
|
|
} from '@/api/member.js';
|
|
|
|
|
|
|
|
|
|
export default {
|
2023-05-30 17:15:26 +08:00
|
|
|
|
name: "sale_performance",
|
2023-05-26 18:23:34 +08:00
|
|
|
|
data() {
|
|
|
|
|
return {
|
2023-05-31 11:06:26 +08:00
|
|
|
|
activeStyle: {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
fontSize: '34rpx',
|
|
|
|
|
fontFamily: 'PingFang SC',
|
|
|
|
|
fontWeight: '400',
|
|
|
|
|
color: '#DA2E55'
|
|
|
|
|
},
|
2023-05-31 11:06:26 +08:00
|
|
|
|
inactiveStyle: {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
fontSize: '30rpx',
|
|
|
|
|
fontFamily: 'PingFang SC',
|
|
|
|
|
fontWeight: '400',
|
|
|
|
|
color: '#fff'
|
|
|
|
|
},
|
2023-05-31 11:06:26 +08:00
|
|
|
|
show: false,
|
|
|
|
|
title: '业绩',
|
|
|
|
|
active: 0,
|
|
|
|
|
performance: [{
|
|
|
|
|
fund: '流水明细',
|
|
|
|
|
name: '发展会员业绩',
|
|
|
|
|
fontSize: '30',
|
|
|
|
|
id: 0
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
fund: '订单流水',
|
|
|
|
|
name: '商品订单业绩',
|
|
|
|
|
fontSize: '30',
|
|
|
|
|
id: 1
|
|
|
|
|
},
|
|
|
|
|
],
|
2023-05-26 18:23:34 +08:00
|
|
|
|
list: [{
|
|
|
|
|
name: '今日',
|
|
|
|
|
}, {
|
|
|
|
|
name: '上周',
|
|
|
|
|
}, {
|
|
|
|
|
name: '上月'
|
|
|
|
|
}, {
|
|
|
|
|
name: '累计'
|
2023-05-30 17:15:26 +08:00
|
|
|
|
}],
|
2023-05-31 11:06:26 +08:00
|
|
|
|
pageData: {
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
pageSize: 10
|
2023-05-30 17:15:26 +08:00
|
|
|
|
},
|
2023-05-31 11:06:26 +08:00
|
|
|
|
orderDetail: {},
|
|
|
|
|
orderData: [],
|
|
|
|
|
total: 0
|
2023-05-26 18:23:34 +08:00
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async onLoad() {
|
|
|
|
|
try {
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: '加载中'
|
|
|
|
|
});
|
2023-05-30 17:15:26 +08:00
|
|
|
|
await this.orderCount(0)
|
|
|
|
|
await this.orderInfo(false)
|
2023-05-26 18:23:34 +08:00
|
|
|
|
} finally {
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2023-06-01 11:24:27 +08:00
|
|
|
|
// timestampToTime(timestamp) {
|
|
|
|
|
// // 时间戳为10位需*1000,时间戳为13位不需乘1000
|
|
|
|
|
// var date = new Date(timestamp);
|
|
|
|
|
// var Y = date.getFullYear() + "-";
|
|
|
|
|
// var M =
|
|
|
|
|
// (date.getMonth() + 1 < 10
|
|
|
|
|
// ? "0" + (date.getMonth() + 1)
|
|
|
|
|
// : date.getMonth() + 1) + "-";
|
|
|
|
|
// var D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
|
|
|
|
|
// var h = (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
|
|
|
|
|
// var m = (date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()) + ":";
|
|
|
|
|
// var s = (date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds());
|
|
|
|
|
// return Y + M + D + h + m + s;
|
|
|
|
|
// },
|
2023-05-31 11:06:26 +08:00
|
|
|
|
selectClick(value) {
|
2023-05-30 19:03:08 +08:00
|
|
|
|
console.log(value)
|
|
|
|
|
this.active = value.id
|
2023-05-31 11:06:26 +08:00
|
|
|
|
},
|
|
|
|
|
async scrolltolower() {
|
|
|
|
|
if (this.total > this.orderData.length) {
|
|
|
|
|
this.pageData.pageNo++
|
|
|
|
|
await this.orderInfo(true)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async orderInfo(bool = true) {
|
|
|
|
|
const res = await promoterOrderInfo(this.pageData)
|
|
|
|
|
this.orderData = bool ? this.orderData.concat(res.data.list) : this.orderData = res.data.list
|
2023-05-30 17:15:26 +08:00
|
|
|
|
this.total = res.data.total
|
|
|
|
|
},
|
2023-05-31 11:06:26 +08:00
|
|
|
|
async orderCount(index) {
|
|
|
|
|
const res = await promoterOrderCount(index + 1)
|
|
|
|
|
this.orderDetail = res.data
|
|
|
|
|
},
|
|
|
|
|
async handleChange(value) {
|
|
|
|
|
this.pageData.pageNo = 1
|
|
|
|
|
await this.orderCount(value.index)
|
|
|
|
|
await this.orderInfo(false)
|
|
|
|
|
}
|
2023-05-26 18:23:34 +08:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.box {
|
|
|
|
|
position: relative;
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
background: url(../../static/images/sale_bg.png);
|
|
|
|
|
background-size: 100%;
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
background-attachment: fixed;
|
|
|
|
|
padding: 0 40rpx;
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
::v-deep .u-sticky {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
background: rgba(255, 255, 255, 0) !important;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.sale_content {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.sale_money {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.money_total {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
margin-bottom: 14rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
min-height: 160rpx;
|
|
|
|
|
background: url(../../static/images/money_total.png);
|
|
|
|
|
background-size: 100%;
|
|
|
|
|
background-repeat: no-repeat;
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.money_left {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
2023-05-31 11:06:26 +08:00
|
|
|
|
text {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
font-family: PingFang SC;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #000000;
|
|
|
|
|
margin-left: 37rpx;
|
|
|
|
|
}
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
image {
|
|
|
|
|
margin: 10rpx 0 0 10rpx;
|
2023-05-26 18:23:34 +08:00
|
|
|
|
width: 100rpx;
|
|
|
|
|
height: 111rpx;
|
|
|
|
|
align-self: flex-start;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.money_right {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-right: 48rpx;
|
|
|
|
|
font-size: 45rpx;
|
|
|
|
|
font-family: PingFang SC;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #DA2E55;
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
text {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
font-family: PingFang SC;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #DA2E55;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.money_statistics {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
margin-bottom: 14rpx;
|
|
|
|
|
padding: 19rpx 36rpx 15rpx 19rpx;
|
|
|
|
|
background: #FFFFFF;
|
2023-05-31 11:06:26 +08:00
|
|
|
|
box-shadow: 0px 0px 18rpx 0px rgba(127, 127, 127, 0.08);
|
2023-05-26 18:23:34 +08:00
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
position: relative;
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.fillet {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
width: 23rpx;
|
|
|
|
|
height: 20rpx;
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 10rpx;
|
|
|
|
|
right: 10rpx;
|
|
|
|
|
}
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.money_left {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
font-family: PingFang SC;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #000000;
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.logo {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
width: 80rpx;
|
|
|
|
|
height: 80rpx;
|
|
|
|
|
}
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.segmentation {
|
|
|
|
|
margin: 0 24rpx 0 18rpx;
|
|
|
|
|
width: 6rpx;
|
|
|
|
|
height: 43rpx;
|
2023-05-26 18:23:34 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.money_right {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
font-family: PingFang SC;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.sale_turnover {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
margin-top: 22rpx;
|
|
|
|
|
padding: 30rpx 32rpx;
|
|
|
|
|
background: #FFFFFF;
|
2023-05-31 11:06:26 +08:00
|
|
|
|
box-shadow: 0px 0px 18rpx 0px rgba(127, 127, 127, 0.08);
|
2023-05-26 18:23:34 +08:00
|
|
|
|
border-radius: 20rpx;
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.turnover_title {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
font-family: PingFang SC;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #000000;
|
|
|
|
|
}
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.turnover_list {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
.list_item {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
2023-05-31 11:06:26 +08:00
|
|
|
|
align-items: center;
|
2023-05-26 18:23:34 +08:00
|
|
|
|
padding: 29rpx 0;
|
|
|
|
|
border-bottom: 1px solid #D8D8D8;
|
2023-05-31 11:06:26 +08:00
|
|
|
|
|
|
|
|
|
text {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
font-family: PingFang SC;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #000000;
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-31 11:06:26 +08:00
|
|
|
|
.info-wrap {
|
|
|
|
|
.extra {
|
|
|
|
|
display: flex;
|
|
|
|
|
margin-top: 10rpx;
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
color: #909399;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.name {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.item_radius {
|
2023-05-26 18:23:34 +08:00
|
|
|
|
margin-right: 19rpx;
|
|
|
|
|
width: 10rpx;
|
|
|
|
|
height: 10rpx;
|
|
|
|
|
background: #FF4106;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|