添加:客户信息 - 增加全部客户信息列表

This commit is contained in:
wuhui_zzw 2024-04-22 16:40:09 +08:00
parent 437f1ae000
commit b1889ce744
2 changed files with 137 additions and 17 deletions

View File

@ -19,7 +19,7 @@
我的市场
</div>
</div>
<!-- <div class="header_box">
<div class="header_box">
<div v-if="isShowClient && show_parents == 0">
<h1>推荐人</h1>
<div class="header">
@ -30,7 +30,7 @@
<div class="row">
<div>昵称:{{ myReferral.nickname }}</div>
<div class="member-id">
&lt;!&ndash; 会员ID: &ndash;&gt;
<!-- 会员ID: -->
{{ myReferral.uid }}
</div>
</div>
@ -59,7 +59,7 @@
<div class="row">
<div>昵称:{{ my_referral_parents.nickname }}</div>
<div class="member-id">
&lt;!&ndash; 会员ID: &ndash;&gt;
<!-- 会员ID: -->
{{ my_referral_parents.uid }}
</div>
</div>
@ -102,22 +102,23 @@
<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>
</div>
<div class="innerbox-li">
<!--<div class="innerbox-li">
<p>{{agent.agent_goods_num?agent.agent_goods_num:"客户总支付商品数量"}}</p>
<p style="font-weight: 700; font-size: 15px; line-height: 1.35rem;">{{ myReferral.team_goods_total }}</p>
</div>
</div>-->
</div>
<div style="padding: 0.626rem 0.8125rem; color: #8c8c8c; text-align: left; font-size: 0.8125rem;">
<div class="note">所有数据为截至到昨天汇总数据</div>
<div class="note">订单数订单总额统计{{member_order_status*1 ? '已支付' : '已完成'}}的订单数据</div>
</div>
</div>-->
</div>
<div class="info_list">
<van-tabs v-model="activeName" @click="handleClick">
<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="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>
<!-- <mt-tab-container v-model="activeName"> -->
<!--<el-tabs v-model="activeName" @tab-click="handleClick">-->
@ -335,6 +336,78 @@
<!--</el-tab-pane>-->
<!-- </mt-tab-container-item> -->
</div>
<div v-show="activeName=='all'" v-if="level0 && level0.is_show">
<!-- <mt-tab-container-item id="first" v-if="level1 && level1.is_show"> -->
<!--<el-tab-pane name="first" :label="labelValue1" v-if="level1&&level1.is_show">-->
<div class="list_box">
<div class="search">
<div class="search-box">
<form @submit.prevent action="#">
<input
type="search"
placeholder="搜索会员信息/昵称/手机号"
@keypress="enterSearch"
v-model="keyword0"
style="width: 150%;"
/>
</form>
<i class="iconfont icon-sousuo1" style="color: #ccc;" @click="search"></i>
</div>
</div>
<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">
<div class="header_left">
<div class="img">
<img :src="item.avatar" @click.stop="goMarket(item.id)"/>
<div v-if="item.inviter == 1" style="position: absolute; right: 1px; bottom: -1px;">
<img src="../../../assets/images/temporary@2x.png" style="width: 1rem; height: 1rem;"/>
</div>
</div>
<ul class="name">
<li style="">
<div style="float: left; max-width: 7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
{{ item.nickname }}
</div>
<div class="member-id" style="float: left;">
{{ item.id }}
</div>
</li>
<li style="color: #333; font-size: 0.75rem; line-height: 1.2rem;"
v-if="item.realname !== 0 && realname">
{{item.realname}}
</li>
<li>
{{ item.createtime }}
</li>
</ul>
</div>
<div class="header_right">
<div class="Wechat" @click.stop="handleToggle(item)" v-if="item.wechat !== 0 && WeChat">
<img src="../../../assets/images/relation_Wechat.png"/>
</div>
<div class="phone" v-if="item.mobile !== 0 && phone" @click.stop>
<a :href="'tel:' + item.mobile"><img src="../../../assets/images/relation_phone.png"/></a>
</div>
</div>
</div>
<div class="order_info">
<ul class="order_number">
<li>订单数{{ item.child_order_total }}</li>
<li>{{name}}数量{{ item.team_total }}</li>
<!-- <li>总客户数233</li> -->
</ul>
<ul class="order_sum">
<li>订单总额{{ item.child_order_money }}{{ $i18n.t("元") }}</li>
<li>{{name}}订单{{ item.team_order_money }}{{ $i18n.t("元") }}</li>
<!-- <li>客户总订单2330{{$i18n.t('元')}}</li> -->
</ul>
</div>
</div>
</div>
<!-- </mt-tab-container-item> -->
</div>
<!--</el-tabs>-->
<!-- </mt-tab-container> -->
</div>

View File

@ -7,6 +7,7 @@ import Modal from "components/modal";
var currentTabIndex = "0";
//标记 防止重复加载
var is_all_content = false;
var is_first_content = false;
var is_second_content = false;
var is_third_content = false;
@ -40,11 +41,13 @@ export default {
self_info:'',
total: 0,
level0: '',
level1: '',
level2: '',
level3: '',
activeName: "first",
all_content: [],
first_content: [],
second_content: [],
third_content: [],
@ -64,13 +67,15 @@ export default {
filterSort: -1,
filterLevelData: [],
filterLeveSort: -1,
level0_page: 0,
level1_page: 0,
level2_page: 0,
level3_page: 0,
btnShow0: true,
btnShow1: true,
btnShow2: true,
btnShow3: true,
keyword0:'',
keyword1:'',
keyword2:'',
keyword3:'',
@ -120,6 +125,7 @@ export default {
initData() {
currentTabIndex = "0";
is_all_content = false;
is_first_content = false;
is_second_content = false;
is_third_content = false;
@ -129,11 +135,13 @@ export default {
this.my_referral_parents = {};
this.self_info = '';
this.total = 0;
this.level0 = { level: "全部", total: 0 };
this.level1 ={ level: "一级", total: 0 };
this.level2 = { level: "二级", total: 0 };
this.level3 = { level: "三级", total: 0 };
this.activeName = "first";
this.all_content = [];
this.first_content = [];
this.second_content = [];
this.third_content = [];
@ -154,24 +162,23 @@ export default {
this.isShowClient=false;
this.show_parents = 0;
// this.level1_page=0;
// this.level2_page=0;
// this.level3_page=0;
},
pageInit() {
this.level0_page = 0;
this.level1_page = 0;
this.level2_page = 0;
this.level3_page = 0;
this.all_content = [];
this.first_content = [];
this.second_content = [];
this.third_content = [];
this.btnShow0 = true;
this.btnShow1 = true;
this.btnShow2 = true;
this.btnShow3 = true;
this.keyword0 = '';
this.keyword1 = '';
this.keyword2 = '';
this.keyword3 = '';
@ -203,7 +210,7 @@ export default {
that.new_content = [];
that.is_link = response.data.is_link || false;
that.getData(response.data.agent_data);
that.getData();// response.data.agent_data
that.member_order_status = response.data.set.member_order_status;
} else {
Toast(response.msg);
@ -234,9 +241,11 @@ export default {
// console.log(response,'打印response')
// if (response.result == 1) {
that.total = data.total;
that.level0 = data.level0 || {};
that.level1 = data.level1;
that.level2 = data.level2;
that.level3 = data.level3;
if (!that.fun.isTextEmpty(that.level1) && that.level1.is_show) {
that.activeName = "first";
currentTabIndex = "0";
@ -258,10 +267,12 @@ export default {
return;
}
// }
// }, function (response) {
//
// });
if (!that.fun.isTextEmpty(that.level0) && that.level0.is_show) {
that.activeName = "all";
currentTabIndex = "-1";
that.setDataByTabIndex();//获取数据
return;
}
},
openPop() {
@ -298,6 +309,13 @@ export default {
this.page = 1;
this.total_page = 0;
switch (currentTabIndex) {
case "-1":
that.relationLevel = "0";
page = 1;
that.level0_page = page;
that.btnShow0 = true;
keyword = that.keyword0;
break;
case "0":
that.relationLevel = "1";
page = 1;
@ -341,6 +359,9 @@ export default {
that.total_page = response.data.last_page;
that.page = response.data.current_page;
switch (currentTabIndex) {
case "-1":
that.level0.total = response.data.total;
break;
case "0":
that.level1.total = response.data.total;
break;
@ -391,6 +412,11 @@ export default {
if (flag) {
this.getData();
}
}else if (currentTabIndex == "-1" && !is_all_content) {
is_all_content = true;
this.relationLevel = "0";
if (flag) this.getData();
}
},
@ -410,6 +436,9 @@ export default {
case "third":
index = "2";
break;
case "all":
index = "-1";
break;
default:
break;
@ -571,6 +600,11 @@ export default {
// var level_content = [];
//var appendto
switch (currentTabIndex) {
case "-1":
that.relationLevel = "0";
page = that.level0_page + 1;
that.level0_page = page;
break;
case "0":
that.relationLevel = "1";
page = that.level1_page + 1;
@ -638,6 +672,9 @@ export default {
},
hidebutton() {
switch (currentTabIndex) {
case "-1":
this.btnShow0 = false;
break;
case "0":
this.btnShow1 = false;
break;
@ -658,6 +695,13 @@ export default {
var page = 1;
let keyword = '';
switch (currentTabIndex) {
case "-1":
that.relationLevel = "0";
page = 1;
that.level0_page = page;
that.btnShow0 = true;
keyword = that.keyword0;
break;
case "0":
that.relationLevel = "1";
page = 1;
@ -722,6 +766,9 @@ export default {
},
},
computed:{
labelValue0(){
return `${this.title0 || this.level0.level}(${this.level0.total}人)`;
},
labelValue1(){
return `${this.title1 || this.level1.level}(${this.level1.total}人)`;
},