分销团队统计数据查询
This commit is contained in:
parent
00bb44f449
commit
48516938b1
|
|
@ -339,6 +339,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadData() {
|
async loadData() {
|
||||||
|
await this.$request.refreshCurUserCache();
|
||||||
this.curUserInfo = this.$request.getCurUserInfo();
|
this.curUserInfo = this.$request.getCurUserInfo();
|
||||||
this.myInfo = await this.$api.data('myInfo');
|
this.myInfo = await this.$api.data('myInfo');
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,19 @@
|
||||||
<block slot="content">查看团队({{totalMembers}})</block>
|
<block slot="content">查看团队({{totalMembers}})</block>
|
||||||
</cu-custom>
|
</cu-custom>
|
||||||
<!-- 团队成员信息 -->
|
<!-- 团队成员信息 -->
|
||||||
<view class="margin-top-sm margin-lr-sm padding bg-white name-card shadow-warp" v-for="(member, index) in members">
|
<view class="margin-top-sm margin-lr-sm padding bg-white name-card shadow-warp"
|
||||||
<!-- 个人名片 -->
|
v-for="(member, index) in members">
|
||||||
<view class="flex justify-start">
|
<!-- 个人名片 -->
|
||||||
<view class="cu-avatar round" :style="'background-image:url(' + member.customerLogoUrl + '); width: 130rpx; height: 130rpx;'"></view>
|
<view class="flex justify-start">
|
||||||
<view class="margin-left-sm flex-column-around">
|
<view class="cu-avatar round"
|
||||||
<view class="text-black text-xl">{{member.name}}</view>
|
:style="'background-image:url(' + member.customerLogoUrl + '); width: 130rpx; height: 130rpx;'">
|
||||||
<view class="">
|
</view>
|
||||||
<text class="margin-right-xs">角色:合伙人</text>
|
<view class="margin-left-sm flex-column-around">
|
||||||
</view>
|
<view class="text-black text-xl">{{member.name}}</view>
|
||||||
</view>
|
<view class="">
|
||||||
|
<text class="margin-right-xs">角色:合伙人</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 实名及公告图标 -->
|
<!-- 实名及公告图标 -->
|
||||||
<view class="flex justify-end oper-bar">
|
<view class="flex justify-end oper-bar">
|
||||||
|
|
@ -24,53 +27,48 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 人员下辖团队统计 -->
|
<!-- 人员下辖团队统计 -->
|
||||||
<view class="cu-list grid no-border col-4 solid-top margin-top-sm">
|
<view class="cu-list grid no-border col-2 solid-top margin-top-sm">
|
||||||
<view class="cu-item">
|
<view class="cu-item" v-for="(item, index) in member.analyseItems" v-if="index < 2">
|
||||||
<view class="margin-bottom-xs">客户数</view>
|
<view class="margin-bottom-xs">{{item.title}}</view>
|
||||||
<view class="text-red">{{member.customerNums}}</view>
|
<view class="text-red" v-if="item.unit === 'yuan'">
|
||||||
</view>
|
¥{{item.value}}
|
||||||
<view class="cu-item">
|
</view>
|
||||||
<view class="margin-bottom-xs">本月绑定</view>
|
<view v-else class="text-red">
|
||||||
<view class="text-red">{{member.customerBindCurMonth}}</view>
|
{{item.value}}{{item.unit}}
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-item solid-left">
|
|
||||||
<view class="margin-bottom-xs">团队</view>
|
|
||||||
<view class="text-red">{{member.teamNums}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="cu-item">
|
|
||||||
<view class="margin-bottom-xs">本月绑定</view>
|
|
||||||
<view class="text-red">{{member.teamBindCurMonth}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="cu-item" v-for="(item, index) in member.orderAnalyse">
|
|
||||||
<view class="margin-bottom-xs">{{item.title}}</view>
|
|
||||||
<view class="text-red" v-if="item.unit === 'yuan'">
|
|
||||||
¥{{item.num}}
|
|
||||||
</view>
|
|
||||||
<view v-else class="text-red">
|
|
||||||
{{item.num}}{{item.unit}}
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="cu-list grid no-border col-4 solid-top">
|
||||||
|
<view class="cu-item" v-for="(item, index) in member.analyseItems" v-if="index >= 2">
|
||||||
|
<view class="margin-bottom-xs">{{item.title}}</view>
|
||||||
|
<view class="text-red" v-if="item.unit === 'yuan'">
|
||||||
|
¥{{item.value}}
|
||||||
|
</view>
|
||||||
|
<view v-else class="text-red">
|
||||||
|
{{item.value}}{{item.unit}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<load-status-bar class="margin-tb-xl" ref="loadStatusBar" @loadMore="loadMyOperaMembers"></load-status-bar>
|
<load-status-bar class="margin-tb-xl" ref="loadStatusBar" @loadMore="loadMyOperaMembers"></load-status-bar>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import horizontalNameCard from '@/components/common-card/horizontal-name-card.vue';
|
import horizontalNameCard from '@/components/common-card/horizontal-name-card.vue';
|
||||||
import loadStatusBar from '@/components/custom-bar/load-status-bar.vue';
|
import loadStatusBar from '@/components/custom-bar/load-status-bar.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
horizontalNameCard,
|
horizontalNameCard,
|
||||||
loadStatusBar
|
loadStatusBar
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
totalMembers: 0,
|
totalMembers: 0,
|
||||||
members: [],
|
members: [],
|
||||||
curUserInfo: {},
|
curUserInfo: {},
|
||||||
pageNum: 0,
|
pageNum: 0,
|
||||||
pageSize: 0
|
pageSize: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -78,43 +76,43 @@
|
||||||
this.loadData();
|
this.loadData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadData() {
|
async loadData() {
|
||||||
this.curUserInfo = this.$request.getCurUserInfo();
|
this.curUserInfo = this.$request.getCurUserInfo();
|
||||||
this.resetData();
|
this.resetData();
|
||||||
// this.myOperaMembers = await this.$api.data('myOperaMembers');
|
// this.myOperaMembers = await this.$api.data('myOperaMembers');
|
||||||
this.loadMyOperaMembers();
|
this.loadMyOperaMembers();
|
||||||
},
|
},
|
||||||
resetData() {
|
resetData() {
|
||||||
this.pageNum = this.$globalData.initPageNum;
|
this.pageNum = this.$globalData.initPageNum;
|
||||||
this.pageSize = this.$globalData.initPageSize;
|
this.pageSize = this.$globalData.initPageSize;
|
||||||
},
|
},
|
||||||
makePhoneCall(phoneNum) {
|
makePhoneCall(phoneNum) {
|
||||||
uni.makePhoneCall({
|
uni.makePhoneCall({
|
||||||
phoneNumber: phoneNum
|
phoneNumber: phoneNum
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async loadMyOperaMembers(params = {}) {
|
async loadMyOperaMembers(params = {}) {
|
||||||
params.pageNum = this.pageNum;
|
params.pageNum = this.pageNum;
|
||||||
params.pageSize = this.pageSize;
|
params.pageSize = this.pageSize;
|
||||||
params.customerPlace = this.curUserInfo.customerId;
|
params.customerPlace = this.curUserInfo.customerId;
|
||||||
this.$refs.loadStatusBar.showLoading();
|
this.$refs.loadStatusBar.showLoading();
|
||||||
try {
|
try {
|
||||||
let res = await this.$request.qryCustomerList(params);
|
let res = await this.$request.qryCustomerList(params);
|
||||||
let rowsLength = res.rows.length;
|
let rowsLength = res.rows.length;
|
||||||
if (rowsLength > 0) {
|
if (rowsLength > 0) {
|
||||||
this.members = this.members.concat(res.rows);
|
this.members = this.members.concat(res.rows);
|
||||||
this.totalMembers = res.total;
|
this.totalMembers = res.total;
|
||||||
this.pageNum++;
|
this.pageNum++;
|
||||||
if (rowsLength === this.pageSize) {
|
if (rowsLength === this.pageSize) {
|
||||||
this.$refs.loadStatusBar.showLoadMore();
|
this.$refs.loadStatusBar.showLoadMore();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$refs.loadStatusBar.showLoadOver();
|
this.$refs.loadStatusBar.showLoadOver();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
this.$refs.loadStatusBar.showLoadErr();
|
this.$refs.loadStatusBar.showLoadErr();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -131,4 +129,8 @@
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
font-size: 50rpx;
|
font-size: 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cu-list+.cu-list {
|
||||||
|
margin-top: unset;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue