uniapp 销售业绩联调
|
@ -62,3 +62,17 @@ export function memberTopUp(data) {
|
|||
export function memberApplyRefund(data) {
|
||||
return request.post('api/order/member/memberApplyRefund',data);
|
||||
}
|
||||
|
||||
/**
|
||||
* "获取当前登录账号为推广员的推广会员记录
|
||||
*/
|
||||
export function promoterOrderInfo(data) {
|
||||
return request.post('api/order/member/promoterOrderInfo',data);
|
||||
}
|
||||
|
||||
/**
|
||||
* "获取当前登录发展会员数量统计
|
||||
*/
|
||||
export function promoterOrderCount(type) {
|
||||
return request.get(`api/order/member/promoterOrderCount?type=${type}`);
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<view class="box">
|
||||
<u-navbar autoBack title="发展会员业绩" bgColor="rgba(255,255,255,0)" :placeholder="true" leftIconSize="40"
|
||||
leftIconColor="#fff" titleStyle="font-size:35rpx;color:#fff">
|
||||
<view slot="right">
|
||||
<!-- <view slot="right">
|
||||
<u-icon name="more-dot-fill" color="#fff"></u-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
</u-navbar>
|
||||
<u-sticky bgColor="#fff">
|
||||
<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>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<image src="../../static/images/money1.png" ></image>
|
||||
<text>总计金额</text>
|
||||
</view>
|
||||
<view class="money_right"><text>¥</text>2400</view>
|
||||
<view class="money_right"><text>¥</text>{{orderDetail.totalAmount}}</view>
|
||||
</view>
|
||||
<view class="money_statistics">
|
||||
<view class="money_left">
|
||||
|
@ -24,7 +24,7 @@
|
|||
<view class="segmentation" style="background: linear-gradient(0deg, #FFFFFF 0%, #FFE0C5 47%, #FFFFFF 100%);"></view>
|
||||
<text>已发展会员个数</text>
|
||||
</view>
|
||||
<view class="money_right" style="color: #FF4800;">10个</view>
|
||||
<view class="money_right" style="color: #FF4800;">{{orderDetail.memberCount}}个</view>
|
||||
<image class="fillet" src="../../static/images/fillet1.png" ></image>
|
||||
</view>
|
||||
<view class="money_statistics">
|
||||
|
@ -33,7 +33,7 @@
|
|||
<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;">5%</view>
|
||||
<view class="money_right" style="color: #1082FF;">{{orderDetail.memberCommission}}%</view>
|
||||
<image class="fillet" src="../../static/images/fillet2.png" ></image>
|
||||
</view>
|
||||
<view class="money_statistics">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<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;">120</view>
|
||||
<view class="money_right" style="color: #32A84F;">{{parseFloat(orderDetail.totalAmount*(parseFloat(orderDetail.memberCommission) / 100))}}</view>
|
||||
<image class="fillet" src="../../static/images/fillet3.png" ></image>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -51,27 +51,23 @@
|
|||
流水明细
|
||||
</view>
|
||||
<view class="turnover_list">
|
||||
<u-list
|
||||
height="500"
|
||||
@scrolltolower="scrolltolower"
|
||||
>
|
||||
<u-list-item
|
||||
v-for="(item, index) in orderData"
|
||||
:key="index"
|
||||
>
|
||||
<view class="list_item">
|
||||
<view>
|
||||
<view class="item_radius"></view>
|
||||
<text>客户1</text>
|
||||
<text>{{item.nickname}}</text>
|
||||
</view>
|
||||
<text>¥640.00</text>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
<view>
|
||||
<view class="item_radius"></view>
|
||||
<text>客户1</text>
|
||||
</view>
|
||||
<text>¥640.00</text>
|
||||
</view>
|
||||
<view class="list_item">
|
||||
<view>
|
||||
<view class="item_radius"></view>
|
||||
<text>客户1</text>
|
||||
</view>
|
||||
<text>¥640.00</text>
|
||||
<text>¥{{item.payPrice}}</text>
|
||||
</view>
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -80,11 +76,12 @@
|
|||
|
||||
<script>
|
||||
import {
|
||||
memberGradeInfo
|
||||
promoterOrderInfo,
|
||||
promoterOrderCount
|
||||
} from '@/api/member.js';
|
||||
|
||||
export default {
|
||||
name: "member_loding",
|
||||
name: "sale_performance",
|
||||
data() {
|
||||
return {
|
||||
activeStyle:{
|
||||
|
@ -107,7 +104,14 @@
|
|||
name: '上月'
|
||||
}, {
|
||||
name: '累计'
|
||||
}]
|
||||
}],
|
||||
pageData:{
|
||||
pageNo:1,
|
||||
pageSize:10
|
||||
},
|
||||
orderDetail:{},
|
||||
orderData:[],
|
||||
total:0
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -116,14 +120,32 @@
|
|||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
|
||||
await this.orderCount(0)
|
||||
await this.orderInfo(false)
|
||||
} finally {
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange(index){
|
||||
|
||||
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
|
||||
this.total = res.data.total
|
||||
},
|
||||
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)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |