修改:个人中心 - 运营中心内容修改,省公司相关和区县相关角色根据公司名称显示,同一个公司存在多个角色时仅显示一个
添加:运营中心部分数据对接、角色切换功能、推广二维码选择及生成 修改:商户管理和酒道馆管理移动至区县运营中心,不在单独显示
This commit is contained in:
parent
954be94aa2
commit
d9fd5e833b
|
|
@ -36,5 +36,8 @@ export function commissionList(data) {
|
|||
export function identityList() {
|
||||
return request.get(`agent/identity_list`);
|
||||
}
|
||||
|
||||
// 获取代理角色及相关角色
|
||||
export function roleAndCorrelationRole(data) {
|
||||
return request.get(`agent/role_and_correlation_role`, data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1340,7 +1340,7 @@
|
|||
"path": "centerV2",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "代理中心",
|
||||
"navigationBarTitleText": "运营中心",
|
||||
"navigationBarBackgroundColor": "#82201d",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
<view class="main-content">
|
||||
<!--顶部信息-->
|
||||
<view class="top">
|
||||
<view class="title">四川金牛区代理-万马奔鸿实业D</view>
|
||||
<view class="title">{{ corporate_name || '' }}</view>
|
||||
<view class="identity-info">
|
||||
<view class="identity">省公司发起人</view>
|
||||
<view class="change-btn">切换</view>
|
||||
<view class="identity">{{ agent_info.agent_type_text || '' }}</view>
|
||||
<view class="change-btn" @click="identityChangeShow" v-if="Object.values(children).length > 1">切换</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--下级订单中心-->
|
||||
<view class="block-content order">
|
||||
<!--<view class="block-content order">
|
||||
<view class="title">
|
||||
<view class="left">下级订单中心</view>
|
||||
<view class="right">
|
||||
|
|
@ -24,9 +24,9 @@
|
|||
<view class="item-title">{{ item.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>-->
|
||||
<!--数据统计-->
|
||||
<view class="block-content statistics">
|
||||
<!--<view class="block-content statistics">
|
||||
<view class="title">
|
||||
<view class="left">数据统计</view>
|
||||
<view class="right"></view>
|
||||
|
|
@ -37,34 +37,77 @@
|
|||
<view class="item-title">{{ item.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>-->
|
||||
<!--工作台-->
|
||||
<view class="block-content staging">
|
||||
<view class="title">
|
||||
<view class="left">工作台</view>
|
||||
<view class="right">
|
||||
<view class="see-btn">查看补货申请</view>
|
||||
<!--<view class="see-btn">查看补货申请</view>-->
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-list">
|
||||
<view v-for="(item,index) in staging_list" :key="index" class="info-list-item">
|
||||
<view class="item-icon">
|
||||
<text :class="['iconfont', item.icon ]"></text>
|
||||
<template v-if="Object.keys(staging_list).length > 0">
|
||||
<view v-for="(item,index) in staging_list" :key="index" class="info-list-item" @click="clickStaging(item)" >
|
||||
<view class="item-icon">
|
||||
<text :class="['iconfont', item.icon ]"></text>
|
||||
</view>
|
||||
<view class="item-title">{{ item.title }}</view>
|
||||
</view>
|
||||
<view class="item-title">{{ item.title }}</view>
|
||||
</view>
|
||||
</template>
|
||||
<view v-else class="empty-tips">暂无任何操作权限~</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!--授权登录-->
|
||||
<!-- 授权登录 -->
|
||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authClose"></authorize>
|
||||
</view>
|
||||
<!-- 身份切换 -->
|
||||
<uni-popup ref="identityChange" type="bottom" :is-mask-click="false">
|
||||
<view class="identity-change-content">
|
||||
<view class="_list">
|
||||
<view class="_list-item" v-for="(item,index) in children" :key="index" @click="identityChangeSelected(item)">
|
||||
<view class="top">
|
||||
{{ item.agent_type_text || '' }}
|
||||
<view class="top-tag" v-if="item.id == agent_info.id">使用中</view>
|
||||
</view>
|
||||
<view class="tag-list">
|
||||
<view class="tag-list-item tag-list-id">ID:{{ item.id }}</view>
|
||||
<view class="tag-list-item">{{ item.contact_name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='close-btn' @click="identityChangeClose">取消</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<!-- 推广二维码类型选择 -->
|
||||
<uni-popup ref="promotionQrCode" type="bottom" :is-mask-click="false">
|
||||
<view class="identity-change-content promotion-qr-code">
|
||||
<view class="_list">
|
||||
<view class="_list-item" v-for="(item,index) in qrcode_list" :key="index" @click="qrCodeTypeSelected(item)">
|
||||
<view class="top">{{ item.title || '' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='close-btn' @click="qrCodeTypeClose">取消</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<!-- 二维码弹框 -->
|
||||
<uni-popup ref="qrCodePopup" type="center">
|
||||
<view class="qr-code-content">
|
||||
<image class="image" :src="promotion_qr_code"></image>
|
||||
<view class="close-qr-code" @click="qrCodeClose()">关闭</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from "vuex";
|
||||
import authorize from '@/components/Authorize';
|
||||
import {roleAndCorrelationRole,inviteSupplierJoinQrCode} from "@/api/agent";
|
||||
|
||||
export default {
|
||||
name: 'business',
|
||||
|
|
@ -72,10 +115,176 @@ export default {
|
|||
authorize,
|
||||
},
|
||||
computed: {
|
||||
staging_list() {
|
||||
// 类型:1=总部发起人,2=省公司发起人,3=省合伙人(外勤),4=省合伙人(内勤),5=区县运营商,6=区县合伙人,7=餐厅,8=配送商,9=总部外勤,10=总部内勤
|
||||
let menuList = [];
|
||||
let agentType = this.agent_info.agent_type || 0;
|
||||
// 推广二维码
|
||||
if(['1','2','3','5','6','9'].includes(String(agentType))){
|
||||
menuList.push({
|
||||
title: '推广二维码',
|
||||
type: 'invite_qr_code',
|
||||
url: '',
|
||||
icon: 'icon-erweima1',
|
||||
});
|
||||
}
|
||||
// 除内勤、餐厅、配送商外都有下级管理
|
||||
if(!['4','7','8','10'].includes(String(agentType))){
|
||||
menuList.push({
|
||||
title: '下级管理',
|
||||
type: 'link',
|
||||
url: '/pages/agent/user/list',
|
||||
icon: 'icon-yonghu1',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 工作台
|
||||
// staging_list:[
|
||||
// {title: '库存管理', icon: 'icon-dingdan1'},
|
||||
// {title: '立即进货', icon: 'icon-daifahuo1'},
|
||||
// {title: '收入管理', icon: 'icon-jinbi_o'},
|
||||
// {title: '管辖门店', icon: 'icon-dianpu1'},
|
||||
// {title: '代理资料', icon: 'icon-jiaoyidingdan'},
|
||||
// {title: '推广二维码', icon: 'icon-hexiaoma'},
|
||||
// {title: '我的进货', icon: 'icon-fenxiaodingdan'},
|
||||
// {title: '省分公司', icon: 'icon-gerentouxiang_o'},
|
||||
// {title: '下载物料', icon: 'icon-baoguo_shouna_o'},
|
||||
// {title: '扫码核销', icon: 'icon-saoma'},
|
||||
// {title: '我的申报', icon: 'icon-quanbudingdan-3'},
|
||||
// {title: '业务员管理', icon: 'icon-wodetuandui'},
|
||||
// ],
|
||||
//
|
||||
|
||||
|
||||
return menuList;
|
||||
},
|
||||
qrcode_list(){
|
||||
let menuList = [];
|
||||
let agentType = this.agent_info.agent_type || 0;
|
||||
// 类型:1=总部发起人,2=省公司发起人,3=省合伙人(外勤),4=省合伙人(内勤),5=区县运营商,6=区县合伙人,7=餐厅,8=配送商,9=总部外勤,10=总部内勤
|
||||
if(Number(agentType) <= 5){
|
||||
menuList.push({
|
||||
title: '供应商邀请码',
|
||||
type: 'invite_qr_code',
|
||||
url: '',
|
||||
icon: 'icon-erweima1',
|
||||
params: {
|
||||
type: 'supplier'
|
||||
}
|
||||
});
|
||||
}
|
||||
if(Number(agentType) === 1){
|
||||
menuList.push({
|
||||
title: '总部外勤邀请码',
|
||||
type: 'invite_qr_code',
|
||||
url: '',
|
||||
icon: 'icon-erweima1',
|
||||
params: {
|
||||
type: 'subordinate',
|
||||
level: 9,
|
||||
}
|
||||
});
|
||||
menuList.push({
|
||||
title: '总部内勤邀请码',
|
||||
type: 'invite_qr_code',
|
||||
url: '',
|
||||
icon: 'icon-erweima1',
|
||||
params: {
|
||||
type: 'subordinate',
|
||||
level: 10,
|
||||
}
|
||||
});
|
||||
}
|
||||
if(Number(agentType) === 9){
|
||||
menuList.push({
|
||||
title: '省公司邀请码',
|
||||
type: 'invite_qr_code',
|
||||
url: '',
|
||||
icon: 'icon-erweima1',
|
||||
params: {
|
||||
type: 'subordinate',
|
||||
level: 2,
|
||||
}
|
||||
});
|
||||
}
|
||||
if(Number(agentType) === 2){
|
||||
menuList.push({
|
||||
title: '外勤合伙人邀请码',
|
||||
type: 'invite_qr_code',
|
||||
url: '',
|
||||
icon: 'icon-erweima1',
|
||||
params: {
|
||||
type: 'subordinate',
|
||||
level: 3,
|
||||
}
|
||||
});
|
||||
menuList.push({
|
||||
title: '内勤合伙人邀请码',
|
||||
type: 'invite_qr_code',
|
||||
url: '',
|
||||
icon: 'icon-erweima1',
|
||||
params: {
|
||||
type: 'subordinate',
|
||||
level: 4,
|
||||
}
|
||||
});
|
||||
}
|
||||
if(Number(agentType) === 3){
|
||||
menuList.push({
|
||||
title: '运营商邀请码',
|
||||
type: 'invite_qr_code',
|
||||
url: '',
|
||||
icon: 'icon-erweima1',
|
||||
params: {
|
||||
type: 'subordinate',
|
||||
level: 5,
|
||||
}
|
||||
});
|
||||
}
|
||||
if(Number(agentType) === 5){
|
||||
menuList.push({
|
||||
title: '合伙人邀请码',
|
||||
type: 'invite_qr_code',
|
||||
url: '',
|
||||
icon: 'icon-erweima1',
|
||||
params: {
|
||||
type: 'subordinate',
|
||||
level: 6,
|
||||
}
|
||||
});
|
||||
}
|
||||
if(Number(agentType) === 6){
|
||||
menuList.push({
|
||||
title: '餐厅邀请码',
|
||||
type: 'invite_qr_code',
|
||||
url: '',
|
||||
icon: 'icon-erweima1',
|
||||
params: {
|
||||
type: 'subordinate',
|
||||
level: 7,
|
||||
}
|
||||
});
|
||||
menuList.push({
|
||||
title: '配送商邀请码',
|
||||
type: 'invite_qr_code',
|
||||
url: '',
|
||||
icon: 'icon-erweima1',
|
||||
params: {
|
||||
type: 'subordinate',
|
||||
level: 8,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return menuList;
|
||||
},
|
||||
...mapGetters(['isLogin', 'uid', 'userInfo', 'viewColor'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 页面参数信息
|
||||
agent_id: 0,
|
||||
// 登录相关
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false,//是否隐藏授权
|
||||
|
|
@ -95,28 +304,26 @@ export default {
|
|||
'orderCountYesterday': {title: '昨日订单数', num: 0},
|
||||
'orderCountThisMonth': {title: '本月订单数', num: 0},
|
||||
},
|
||||
// 工作台
|
||||
staging_list:[
|
||||
{title: '库存管理', icon: 'icon-dingdan1'},
|
||||
{title: '立即进货', icon: 'icon-daifahuo1'},
|
||||
{title: '收入管理', icon: 'icon-jinbi_o'},
|
||||
{title: '管辖门店', icon: 'icon-dianpu1'},
|
||||
{title: '代理资料', icon: 'icon-jiaoyidingdan'},
|
||||
{title: '推广二维码', icon: 'icon-hexiaoma'},
|
||||
{title: '我的进货', icon: 'icon-fenxiaodingdan'},
|
||||
{title: '省分公司', icon: 'icon-gerentouxiang_o'},
|
||||
{title: '下载物料', icon: 'icon-baoguo_shouna_o'},
|
||||
{title: '扫码核销', icon: 'icon-saoma'},
|
||||
{title: '我的申报', icon: 'icon-quanbudingdan-3'},
|
||||
{title: '业务员管理', icon: 'icon-wodetuandui'},
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
// 其他信息
|
||||
use_agent_id: 0,
|
||||
corporate_name: '',
|
||||
agent_info: {},
|
||||
children: {},
|
||||
promotion_qr_code: '',
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
// 参数获取
|
||||
this.agent_id = options.agent_id || 0;
|
||||
if(this.agent_id <= 0){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '非法访问,参数错误!',
|
||||
success: function success(res) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
// 判断:是否登录
|
||||
if (!this.isLogin) {
|
||||
// 未登录 授权登录
|
||||
|
|
@ -140,10 +347,91 @@ export default {
|
|||
this.isShowAuth = e
|
||||
},
|
||||
// 授权成功 初始化
|
||||
init () {},
|
||||
|
||||
|
||||
init () {
|
||||
this.getAgentRoleInfo()
|
||||
},
|
||||
// 获取当前代理角色信息及相关代理角色信息
|
||||
getAgentRoleInfo(){
|
||||
let _this = this;
|
||||
let params = {
|
||||
agent_id: _this.agent_id > 0 ? _this.agent_id : _this.use_agent_id,
|
||||
};
|
||||
roleAndCorrelationRole(params).then(res => {
|
||||
if(res.status == 200){
|
||||
let data = res.data || {};
|
||||
_this.corporate_name = data.corporate_name || '';
|
||||
_this.agent_info = data.agent_info || {};
|
||||
_this.children = data.children || {};
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
// 身份切换 - 显示弹框
|
||||
identityChangeShow(){
|
||||
this.$refs.identityChange.open('bottom');
|
||||
},
|
||||
// 身份切换 - 关闭弹框
|
||||
identityChangeClose(){
|
||||
this.$refs.identityChange.close();
|
||||
},
|
||||
// 身份切换 - 选中新身份,进行切换
|
||||
identityChangeSelected(info){
|
||||
this.agent_info = info;
|
||||
this.identityChangeClose();
|
||||
},
|
||||
// 点击工作台按钮
|
||||
clickStaging(menu){
|
||||
let _this = this;
|
||||
let params = menu.params || {};
|
||||
params.agent_id = _this.agent_info.id || 0;
|
||||
switch (menu.type) {
|
||||
// 推广二维码
|
||||
case 'invite_qr_code':
|
||||
_this.qrCodeTypeShow();
|
||||
break;
|
||||
// 点击跳转
|
||||
case 'link':
|
||||
uni.navigateTo({
|
||||
url: menu.url + '?agent_id=' + params.agent_id
|
||||
})
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 推广二维码 - 二维码类型弹框显示
|
||||
qrCodeTypeShow(){
|
||||
this.$refs.promotionQrCode.open('bottom');
|
||||
},
|
||||
// 推广二维码 - 二维码类型弹框关闭
|
||||
qrCodeTypeClose(){
|
||||
this.$refs.promotionQrCode.close();
|
||||
},
|
||||
// 推广二维码 - 二维码类型选中
|
||||
qrCodeTypeSelected(menu){
|
||||
let _this = this;
|
||||
_this.qrCodeTypeClose();
|
||||
_this.promotion_qr_code = '';
|
||||
|
||||
let params = menu.params || {};
|
||||
params.agent_id = _this.agent_info.id || 0;
|
||||
// 请求获取推广二维码
|
||||
inviteSupplierJoinQrCode(params).then(res => {
|
||||
if (res.status == 200) {
|
||||
_this.promotion_qr_code = res.data.qr_code || '';
|
||||
_this.qrCodeShow();
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$util.Tips({title: err});
|
||||
});
|
||||
},
|
||||
// 推广二维码 - 二维码弹框显示
|
||||
qrCodeShow(){
|
||||
this.$refs.qrCodePopup.open('center');
|
||||
},
|
||||
// 推广二维码 - 二维码弹框关闭
|
||||
qrCodeClose(){
|
||||
this.$refs.qrCodePopup.close();
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
|
@ -275,14 +563,149 @@ export default {
|
|||
}
|
||||
}
|
||||
.info-list{
|
||||
width: 100%;
|
||||
--info-list-item-size-: calc(var(--info-list-content-width-) / 4);
|
||||
.item-icon{
|
||||
.iconfont{
|
||||
font-size: 50rpx;
|
||||
}
|
||||
}
|
||||
.empty-tips{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
height: 150rpx;
|
||||
line-height: 150rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 身份切换弹框
|
||||
.identity-change-content{
|
||||
--list-padding-: 30rpx;
|
||||
|
||||
background: #f6f6f6;
|
||||
width: 100vw;
|
||||
height: 80vh;
|
||||
padding: var(--list-padding-);
|
||||
position: relative;
|
||||
._list{
|
||||
height: calc(100% - 160rpx);
|
||||
width: calc(100% - (var(--list-padding-) * 2));
|
||||
position: fixed;
|
||||
top: var(--list-padding-);
|
||||
left: var(--list-padding-);
|
||||
overflow-y: auto;
|
||||
._list-item{
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 15rpx;
|
||||
padding: 20rpx;
|
||||
.top{
|
||||
width: 100%;
|
||||
height: 50rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
.top-tag{
|
||||
//background-color: #f3e6e8;
|
||||
//color: #926c6b;
|
||||
margin-left: 15rpx;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 24rpx;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 5rpx;
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
background-color: #67c23a;
|
||||
border-color: #67c23a;
|
||||
}
|
||||
}
|
||||
.address{
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
.tag-list{
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 100%;
|
||||
.tag-list-item{
|
||||
background-color: #f3e6e8;
|
||||
color: #926c6b;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 24rpx;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 5rpx;
|
||||
font-weight: normal;
|
||||
margin-right: 15rpx;
|
||||
max-width: 100%;
|
||||
}
|
||||
.tag-list-id{
|
||||
color: #fff;
|
||||
background-color: #e6a23c;
|
||||
border-color: #e6a23c;
|
||||
}
|
||||
.tag-list-item:last-child{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
._list-item:not(:last-child){
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
.close-btn{
|
||||
width: calc(100% - (var(--list-padding-) * 2));
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
text-align: center;
|
||||
font-size: 35rpx;
|
||||
border-radius: 100rpx;
|
||||
position: fixed;
|
||||
bottom: var(--list-padding-);
|
||||
left: var(--list-padding-);
|
||||
color: #fff;
|
||||
background-color: #f56c6c;
|
||||
border-color: #f56c6c;
|
||||
}
|
||||
}
|
||||
// 二维码类型选择
|
||||
.promotion-qr-code{
|
||||
height: 500rpx!important;
|
||||
}
|
||||
// 二维码弹框
|
||||
.qr-code-content{
|
||||
width: 80vw;
|
||||
.image{
|
||||
width: 80vw;
|
||||
height: 80vw;
|
||||
}
|
||||
.close-qr-code{
|
||||
position: fixed;
|
||||
top: 35rpx;
|
||||
right: 70rpx;
|
||||
color: #FFFFFF;
|
||||
border: 2rpx solid #FFFFFF;
|
||||
height: 40rpx;
|
||||
line-height: 36rpx;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -192,15 +192,15 @@
|
|||
</view>
|
||||
</view>
|
||||
<!--商户员工端、平台客服端、酒道馆员工端入口-->
|
||||
<view class="menus-list-item" v-if="userInfo.service" @click="toService(0)">
|
||||
<view class="item-text">
|
||||
<view class="title">
|
||||
<text class="merchant">商家</text>管理
|
||||
</view>
|
||||
<view class="info">进入商家管理中心</view>
|
||||
</view>
|
||||
<view class="image merchant-image"></view>
|
||||
</view>
|
||||
<!--<view class="menus-list-item" v-if="userInfo.service" @click="toService(0)">-->
|
||||
<!-- <view class="item-text">-->
|
||||
<!-- <view class="title">-->
|
||||
<!-- <text class="merchant">商家</text>管理-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="info">进入商家管理中心</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="image merchant-image"></view>-->
|
||||
<!--</view>-->
|
||||
<view class="menus-list-item" v-if="userInfo.topService" @click="toService(1)">
|
||||
<view class="item-text">
|
||||
<view class="title">
|
||||
|
|
@ -210,15 +210,15 @@
|
|||
</view>
|
||||
<view class="image plantform-image"></view>
|
||||
</view>
|
||||
<view class="menus-list-item" v-if="userInfo.shopMerService" @click="toService(2)">
|
||||
<view class="item-text">
|
||||
<view class="title">
|
||||
<text class="plantform">酒道馆</text>管理
|
||||
</view>
|
||||
<view class="info">进入酒道馆管理中心</view>
|
||||
</view>
|
||||
<view class="image plantform-image"></view>
|
||||
</view>
|
||||
<!--<view class="menus-list-item" v-if="userInfo.shopMerService" @click="toService(2)">-->
|
||||
<!-- <view class="item-text">-->
|
||||
<!-- <view class="title">-->
|
||||
<!-- <text class="plantform">酒道馆</text>管理-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="info">进入酒道馆管理中心</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="image plantform-image"></view>-->
|
||||
<!--</view>-->
|
||||
<!--<view class="menu-list-count" v-if="userInfo.topService && userInfo.service">
|
||||
<view class="menu-item" @click="toService(0)">
|
||||
<view class="image merchant-image"></view>
|
||||
|
|
@ -263,12 +263,43 @@
|
|||
<uni-popup ref="agentIdentitySelect" type="bottom" :is-mask-click="false">
|
||||
<view class="agent-identity-list">
|
||||
<view class="_list">
|
||||
<view class="_list-item" v-for="(item,index) in identityCurrent" :key="index" @click="goToAgentCenter(item)">
|
||||
<view class="top">
|
||||
{{ item.contact_name || item.user.nickname }}
|
||||
<view class="top-tag">{{ item.agent_type_text }}</view>
|
||||
<!--固定菜单-->
|
||||
<view class="_list-item" v-if="userInfo.service" @click="toService(0)">
|
||||
<view class="top">商家管理</view>
|
||||
<view class="tag-list">
|
||||
<view class="tag-list-item">进入商家管理中心</view>
|
||||
</view>
|
||||
<view class="address">{{item.province_name || ''}} {{item.city_name || ''}} {{item.area_name || ''}}</view>
|
||||
</view>
|
||||
<view class="_list-item" v-if="userInfo.shopMerService" @click="toService(2)">
|
||||
<view class="top">酒道馆管理</view>
|
||||
<view class="tag-list">
|
||||
<view class="tag-list-item">进入酒道馆管理中心</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--类型:1=总部发起人,2=省公司发起人,3=省合伙人(外勤),4=省合伙人(内勤),5=区县运营商,6=区县合伙人,7=餐厅,8=配送商,9=总部外勤,10=总部内勤-->
|
||||
<view class="_list-item" v-for="(item,index) in identityCurrent" :key="index" @click="goToAgentCenter(item)">
|
||||
<!--餐厅-->
|
||||
<template v-if="item.agent_type == 7">
|
||||
<view class="top">{{ item.mer ? item.mer.mer_name : '' }}</view>
|
||||
<view class="tag-list">
|
||||
<view class="tag-list-item">{{ item.agent_type_text }}</view>
|
||||
<!--<view class="tag-list-item">{{ item.address }}</view>-->
|
||||
</view>
|
||||
</template>
|
||||
<!--配送商-->
|
||||
<template v-else-if="item.agent_type == 8">
|
||||
<view class="top">{{ item.agent_type_text }}</view>
|
||||
<view class="tag-list delivery-tag">
|
||||
<view class="tag-list-item" v-for="(merItem,merIndex) in item.merList" :key="merIndex">{{ merItem.mer_name || '' }}</view>
|
||||
</view>
|
||||
</template>
|
||||
<!--其他角色-->
|
||||
<template v-else>
|
||||
<view class="top">{{ item.corporate_name || '' }}</view>
|
||||
<view class="tag-list">
|
||||
<view class="tag-list-item" v-for="(tagItem,tagIndex) in Object.values(item.agent_type_list)" :key="tagIndex">{{ tagItem || '' }}</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<view class='close-btn' @click="closeAgentIdentitySelect">取消</view>
|
||||
|
|
@ -411,14 +442,13 @@
|
|||
province_list: 0
|
||||
},
|
||||
identityCurrent:{},
|
||||
|
||||
identityCurrentName: '',
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.$nextTick(() => {
|
||||
this.setSwiperHeight(); // 动态设置 swiper 的高度
|
||||
});
|
||||
|
||||
// 关系处理
|
||||
if(options.spread) spread(options.spread, this.isLogin)
|
||||
},
|
||||
|
|
@ -427,7 +457,6 @@
|
|||
},
|
||||
mounted: function() {
|
||||
this.getVersion()
|
||||
this.getIdentityList();
|
||||
},
|
||||
onShow: function() {
|
||||
let that = this;
|
||||
|
|
@ -438,6 +467,7 @@
|
|||
if (that.isLogin) {
|
||||
this.getUserInfo();
|
||||
this.orderNum();
|
||||
this.getIdentityList();
|
||||
} else {
|
||||
// this.userInfo = {
|
||||
// is_svip: 0
|
||||
|
|
@ -563,6 +593,7 @@
|
|||
this.getUserInfo();
|
||||
this.getMyMenus();
|
||||
this.orderNum();
|
||||
this.getIdentityList();
|
||||
this.isShowAuth = false;
|
||||
},
|
||||
Setting: function() {
|
||||
|
|
@ -727,12 +758,13 @@
|
|||
},
|
||||
// 运营中心 - 点击菜单
|
||||
clickOperationCenterMenu(type){
|
||||
this.identityCurrentName = type || '';
|
||||
let keyName = type + '_list';
|
||||
this.identityCurrent = this.identity[keyName] || {};
|
||||
let len = Object.keys(this.identityCurrent).length || 0;
|
||||
// 根据数据进行对应的操作
|
||||
if(len <= 0) return false;
|
||||
else if(len == 1) this.goToAgentCenter(this.identityCurrent[0]);
|
||||
else if(len == 1 || type == 'headquarters') this.goToAgentCenter(this.identityCurrent[0]);
|
||||
else this.$refs.agentIdentitySelect.open('bottom');
|
||||
},
|
||||
// 运营中心 - 关闭弹框
|
||||
|
|
@ -741,8 +773,12 @@
|
|||
},
|
||||
// 运营中心 - 跳转代理中心
|
||||
goToAgentCenter(agentInfo){
|
||||
let path = `/pages/agent/centerV2?agent_id=${agentInfo.id}`; // 默认为跳转代理中心
|
||||
if(agentInfo.agent_type == 7) path = `/pages/admin/business/index?is_sys=0&mer_id=${agentInfo.mer_id}`; // 进入餐厅管理
|
||||
// 页面跳转
|
||||
uni.navigateTo({
|
||||
url: `/pages/agent/center?agent_id=${agentInfo.id}`
|
||||
// url: `/pages/agent/center?agent_id=${agentInfo.id}`
|
||||
url: path
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -801,7 +837,7 @@
|
|||
position: relative;
|
||||
|
||||
._list{
|
||||
height: calc(100 - 90rpx);
|
||||
height: calc(100% - 160rpx);
|
||||
width: calc(100% - (var(--list-padding-) * 2));
|
||||
position: fixed;
|
||||
top: var(--list-padding-);
|
||||
|
|
@ -813,6 +849,7 @@
|
|||
border-radius: 15rpx;
|
||||
padding: 20rpx;
|
||||
.top{
|
||||
width: 100%;
|
||||
height: 50rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
|
|
@ -838,6 +875,41 @@
|
|||
line-height: 35rpx;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
.tag-list{
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 100%;
|
||||
.tag-list-item{
|
||||
background-color: #f3e6e8;
|
||||
color: #926c6b;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 24rpx;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 5rpx;
|
||||
font-weight: normal;
|
||||
margin-right: 15rpx;
|
||||
max-width: 100%;
|
||||
}
|
||||
.tag-list-item:last-child{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
.delivery-tag{
|
||||
.tag-list-item{
|
||||
color: #fff;
|
||||
background-color: #e6a23c;
|
||||
border-color: #e6a23c;
|
||||
}
|
||||
}
|
||||
}
|
||||
._list-item:not(:last-child){
|
||||
margin-bottom: 20rpx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue