添加:客户信息 - 支持查看直推客户订单&团队客户订单
This commit is contained in:
parent
b1889ce744
commit
d2ae467f3c
|
|
@ -408,6 +408,7 @@ const MyRelationship = r => require(["../views/member/tool/my_relationship_v2"],
|
||||||
const MyRelationshipAmount = r => require(["../views/member/tool/my_relationship_amount"], r);
|
const MyRelationshipAmount = r => require(["../views/member/tool/my_relationship_amount"], r);
|
||||||
const MyRelationshipDetail = r => require(["../views/member/tool/my_relationship_detail"], r);
|
const MyRelationshipDetail = r => require(["../views/member/tool/my_relationship_detail"], r);
|
||||||
const MyRelationshipDetailV2 = r => require(["../views/member/tool/my_relationship_detail_v2"], r);
|
const MyRelationshipDetailV2 = r => require(["../views/member/tool/my_relationship_detail_v2"], r);
|
||||||
|
const MyRelationshipOrder = r => require(["../views/member/tool/my_relationship_order"], r);
|
||||||
const OfflineSearch = r => require(["../views/member/tool/search"], r);
|
const OfflineSearch = r => require(["../views/member/tool/search"], r);
|
||||||
const MyEvaluation = r => require(["../views/comment/myEvaluation"], r);
|
const MyEvaluation = r => require(["../views/comment/myEvaluation"], r);
|
||||||
const Comment = r => require(["../views/member/tool/comment"], r);
|
const Comment = r => require(["../views/member/tool/comment"], r);
|
||||||
|
|
@ -2595,6 +2596,15 @@ const routes = [
|
||||||
foot: true
|
foot: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/member/myrelationship_v2/order",
|
||||||
|
component: MyRelationshipOrder,
|
||||||
|
name: "MyRelationshipOrder",
|
||||||
|
meta: {
|
||||||
|
title: "会员概况",
|
||||||
|
foot: true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/member/offlineSearch",
|
path: "/member/offlineSearch",
|
||||||
component: OfflineSearch,
|
component: OfflineSearch,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,196 @@
|
||||||
|
<template>
|
||||||
|
<div class="main-content">
|
||||||
|
<!--顶部标题-->
|
||||||
|
<c-title :hide="false" :text="pageTitle"></c-title>
|
||||||
|
<!--客户直推下级信息-->
|
||||||
|
<div class="list-content">
|
||||||
|
<div class="list" v-if="Object.values(list).length > 0">
|
||||||
|
<div class="order-box" v-for="(item, index) in list" :key="index">
|
||||||
|
<!--订单号-->
|
||||||
|
<div class="order-sn">
|
||||||
|
<div class="left">订单号:{{ item.order_sn || ''}}</div>
|
||||||
|
<div class="right">{{ item.status_name || ''}}</div>
|
||||||
|
</div>
|
||||||
|
<!--商品信息-->
|
||||||
|
<div class="goods-list" v-for="(goodItem,goodIndex) in item.has_many_order_goods" :key="goodIndex">
|
||||||
|
<img class="logo" :src="goodItem.thumb" />
|
||||||
|
<div class="info">
|
||||||
|
<div class="title">{{ goodItem.title || '' }}</div>
|
||||||
|
<div class="buy-num">×{{ goodItem.total }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<van-empty v-else description="暂无订单~" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { scrollMixin } from "@/utils/mixin";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [scrollMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageTitle: '会员订单',
|
||||||
|
orderType: 'agent_order',
|
||||||
|
// 分页信息
|
||||||
|
list: [],
|
||||||
|
isLoadMore: true,
|
||||||
|
page: 1,
|
||||||
|
total_page: 0,
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created(){},
|
||||||
|
activated() {
|
||||||
|
// 获取信息
|
||||||
|
this.orderType = this.$route.query.order_type;
|
||||||
|
this.getOrderList();
|
||||||
|
// 设置页面标题
|
||||||
|
this.setPageTitle();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 设置页面标题
|
||||||
|
setPageTitle() {
|
||||||
|
let lang = window.localStorage.getItem("mailLanguage");
|
||||||
|
let agent = JSON.parse(lang).agent ? JSON.parse(lang).agent : {};
|
||||||
|
if(this.orderType === 'agent_order') this.pageTitle = agent.agent_order ? agent.agent_order : "客户订单";
|
||||||
|
else this.pageTitle = agent.agent_order_count ? agent.agent_order_count : "客户总订单";
|
||||||
|
|
||||||
|
this.fun.setWXTitle(this.pageTitle);
|
||||||
|
},
|
||||||
|
// 我的推荐
|
||||||
|
getOrderList() {
|
||||||
|
let _this = this;
|
||||||
|
let params = {
|
||||||
|
page: _this.page,
|
||||||
|
order_type: _this.orderType
|
||||||
|
};
|
||||||
|
$http.get('member.member.getOrderList', params, "加载中...").then(function (response) {
|
||||||
|
if (response.result == 1) {
|
||||||
|
_this.isLoadMore = true;
|
||||||
|
let data = response.data;
|
||||||
|
if (parseInt(data.current_page) === 1) {
|
||||||
|
_this.total_page = data.last_page;
|
||||||
|
_this.list = data.data;
|
||||||
|
} else {
|
||||||
|
if (Object.values(data.data).length > 0) _this.list = Object.values(_this.list).concat(Object.values(data.data));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_this.isLoadMore = false; // 防止多次请求分页数据
|
||||||
|
_this.list = [];
|
||||||
|
console.log('错误:', error);
|
||||||
|
}
|
||||||
|
}, function (error) {
|
||||||
|
console.log('失败:', error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分页获取数据
|
||||||
|
getMoreData() {
|
||||||
|
let _this = this;
|
||||||
|
if (!_this.isLoadMore) return;
|
||||||
|
_this.isLoadMore = false; // 防止多次请求分页数据
|
||||||
|
if (_this.page >= _this.total_page) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
_this.page += 1;
|
||||||
|
_this.getOrderList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
components: {}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.main-content {
|
||||||
|
width: 100vw !important;
|
||||||
|
min-height: calc(100vh - 40px);
|
||||||
|
background: #f6f6f6;
|
||||||
|
padding: 15px;
|
||||||
|
|
||||||
|
.list-content {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.list {
|
||||||
|
padding: 0 10px;
|
||||||
|
|
||||||
|
.order-box {
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px 0;
|
||||||
|
border-top: 1px solid #f6f6f6;
|
||||||
|
|
||||||
|
.order-sn {
|
||||||
|
width: 100%;
|
||||||
|
height: 45px;
|
||||||
|
line-height: 45px;
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
height: 45px;
|
||||||
|
line-height: 45px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
height: 45px;
|
||||||
|
line-height: 45px;
|
||||||
|
color: #f15353;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-list {
|
||||||
|
width: 100%;
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
width: 90px !important;
|
||||||
|
height: 90px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
width: calc(100% - 90px) !important;
|
||||||
|
height: 90px !important;
|
||||||
|
padding-left: 10px;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: left;
|
||||||
|
color: #333;
|
||||||
|
height: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buy-num {
|
||||||
|
text-align: left;
|
||||||
|
color: #888;
|
||||||
|
font-size: 12px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -94,11 +94,11 @@
|
||||||
<p>{{agent.agent_count?agent.agent_count:"总客户数"}}(人)</p>
|
<p>{{agent.agent_count?agent.agent_count:"总客户数"}}(人)</p>
|
||||||
<p style="font-weight: 700; font-size: 15px; line-height: 1.35rem;">{{ myReferral.team_total }}</p>
|
<p style="font-weight: 700; font-size: 15px; line-height: 1.35rem;">{{ myReferral.team_total }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="innerbox-li">
|
<div class="innerbox-li" @click.stop="$router.push(fun.getUrl('MyRelationshipOrder',{ order_type: 'agent_order'},{ order_type: 'agent_order'}))">
|
||||||
<p>{{agent.agent_order?agent.agent_order:"客户订单"}}({{ $i18n.t("元") }})</p>
|
<p>{{agent.agent_order?agent.agent_order:"客户订单"}}({{ $i18n.t("元") }})</p>
|
||||||
<p style="font-weight: 700; font-size: 15px; line-height: 1.35rem;">{{ myReferral.child_order_money }}</p>
|
<p style="font-weight: 700; font-size: 15px; line-height: 1.35rem;">{{ myReferral.child_order_money }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="innerbox-li">
|
<div class="innerbox-li" @click.stop="$router.push(fun.getUrl('MyRelationshipOrder',{ order_type: 'agent_order_count'},{ order_type: 'agent_order_count'}))">
|
||||||
<p>{{agent.agent_order_count?agent.agent_order_count:"客户总订单"}}({{ $i18n.t("元") }})</p>
|
<p>{{agent.agent_order_count?agent.agent_order_count:"客户总订单"}}({{ $i18n.t("元") }})</p>
|
||||||
<p style="font-weight: 700; font-size: 15px; line-height: 1.35rem;">{{ myReferral.team_order_money }}</p>
|
<p style="font-weight: 700; font-size: 15px; line-height: 1.35rem;">{{ myReferral.team_order_money }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -115,10 +115,10 @@
|
||||||
|
|
||||||
<div class="info_list">
|
<div class="info_list">
|
||||||
<van-tabs v-model="activeName" @click="handleClick">
|
<van-tabs v-model="activeName" @click="handleClick">
|
||||||
|
<van-tab name="all" :title="labelValue0" v-if="level0 && level0.is_show"></van-tab>
|
||||||
<van-tab name="first" :title="labelValue1" v-if="level1 && level1.is_show"></van-tab>
|
<van-tab name="first" :title="labelValue1" v-if="level1 && level1.is_show"></van-tab>
|
||||||
<van-tab name="second" :title="labelValue2" v-if="level2 && level2.is_show"></van-tab>
|
<van-tab name="second" :title="labelValue2" v-if="level2 && level2.is_show"></van-tab>
|
||||||
<van-tab name="third" :title="labelValue3" v-if="level3 && level3.is_show"></van-tab>
|
<van-tab name="third" :title="labelValue3" v-if="level3 && level3.is_show"></van-tab>
|
||||||
<van-tab name="all" :title="labelValue0" v-if="level0 && level0.is_show"></van-tab>
|
|
||||||
</van-tabs>
|
</van-tabs>
|
||||||
<!-- <mt-tab-container v-model="activeName"> -->
|
<!-- <mt-tab-container v-model="activeName"> -->
|
||||||
<!--<el-tabs v-model="activeName" @tab-click="handleClick">-->
|
<!--<el-tabs v-model="activeName" @tab-click="handleClick">-->
|
||||||
|
|
@ -212,7 +212,7 @@
|
||||||
<i class="iconfont icon-sousuo1" style="color: #ccc;" @click="search"></i>
|
<i class="iconfont icon-sousuo1" style="color: #ccc;" @click="search"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list" v-for="(item, index) in new_content" :key="index">
|
<div class="list" v-for="(item, index) in new_content" :key="index" @click.stop="$router.push(fun.getUrl('MyRelationshipDetailV2',{uid:item.id}))">
|
||||||
<div class="list_top" @click="gotoMemberDetail(item.id)">
|
<div class="list_top" @click="gotoMemberDetail(item.id)">
|
||||||
<div class="header_left">
|
<div class="header_left">
|
||||||
<div class="img">
|
<div class="img">
|
||||||
|
|
|
||||||
|
|
@ -246,6 +246,14 @@ export default {
|
||||||
that.level2 = data.level2;
|
that.level2 = data.level2;
|
||||||
that.level3 = data.level3;
|
that.level3 = data.level3;
|
||||||
|
|
||||||
|
|
||||||
|
if (!that.fun.isTextEmpty(that.level0) && that.level0.is_show) {
|
||||||
|
that.activeName = "all";
|
||||||
|
currentTabIndex = "-1";
|
||||||
|
that.setDataByTabIndex();//获取数据
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!that.fun.isTextEmpty(that.level1) && that.level1.is_show) {
|
if (!that.fun.isTextEmpty(that.level1) && that.level1.is_show) {
|
||||||
that.activeName = "first";
|
that.activeName = "first";
|
||||||
currentTabIndex = "0";
|
currentTabIndex = "0";
|
||||||
|
|
@ -267,12 +275,6 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!that.fun.isTextEmpty(that.level0) && that.level0.is_show) {
|
|
||||||
that.activeName = "all";
|
|
||||||
currentTabIndex = "-1";
|
|
||||||
that.setDataByTabIndex();//获取数据
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
openPop() {
|
openPop() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue