sadjv3/anmo-admin/src/views/user/userList.vue

2184 lines
83 KiB
Vue
Raw Normal View History

2024-06-04 10:03:14 +08:00
<template>
<div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全部用户" name="first">
<div style="margin:5px;display: inline-block;">
<span>手机号:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
v-model="phone"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>昵称:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
v-model="userNameT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>邀请码:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
v-model="invitationCodeT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>渠道来源:</span>
<el-select v-model="platformT" style="width:150px;margin-left: 10px;" @change="select()">
<el-option v-for="item in homeDataQ" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>性别</span>
<el-select v-model="sex1" style="width:150px;margin-left: 10px;" @change="animeDat2(sex1)">
<el-option v-for="item in homeData1" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>
<div style="display: inline-block;">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
</el-button>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column fixed prop="userName" label="昵称" width="150">
<template slot-scope="scope">
<span style="color: #f56c6c;">{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="isAuthentication" label="性别">
<template slot-scope="scope">
<span v-if="scope.row.sex==1"></span>
<span v-else-if="scope.row.sex==2"></span>
<span v-else>未设置</span>
</template>
</el-table-column>
<el-table-column label="图像">
<template slot-scope="scope">
<img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
height="40">
<img v-else :src="scope.row.avatar" alt="" width="40" height="40">
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)">
{{ scope.row.phone ? scope.row.phone : '未绑定' }}
</span>
</template>
</el-table-column>
<el-table-column prop="isAuthentication" label="是否是师傅">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==2"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="invitationCode" label="邀请码"></el-table-column>
<el-table-column label="邀请人邀请码">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;"
@click="updates2(scope.row)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="是否实名">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==1">审核中</span>
<span v-else-if="scope.row.isAuthentication==2">已实名</span>
<span v-else>未实名</span>
</template>
</el-table-column>
<el-table-column prop="isCashDeposit" label="是否缴纳保证金">
<template slot-scope="scope">
<span v-if="scope.row.isCashDeposit==2">已缴纳</span>
<span v-else-if="scope.row.isCashDeposit==3">申请退款中</span>
<span v-else>待缴纳</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="支付宝名称">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBao" label="支付宝账号">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="userRate" label="邀请好友佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.userRate?scope.row.userRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(scope.row,'userRate')">
修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="shopRate" label="邀请师傅佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.shopRate?scope.row.shopRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;"
@click="xiugai(scope.row,'shopRate')">修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="platform" label="渠道来源"></el-table-column>
<el-table-column prop="vipEndTime" label="会员到期时间" width="160"></el-table-column>
<el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
<el-table-column prop="isAgency " label="是否是推广员">
<template slot-scope="scope">
<el-switch v-model="scope.row.isAgency" @change="updateDl(scope.row.isAgency,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateTgy')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="state " label="状态">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateStatus')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="120">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
<!-- <el-button size = "mini" type = "danger" @click = "updates1(scope.row)">封号</el-button> -->
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[5, 10, 15, 20]" :page-size="limit" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
</el-pagination>
</div>
</el-tab-pane>
<el-tab-pane label="师傅端注册用户" name="second">
<div style="margin:5px;display: inline-block;">
<span>手机号:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
v-model="phone"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>昵称:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
v-model="userNameT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>邀请码:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
v-model="invitationCodeT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>渠道来源:</span>
<el-select v-model="platformT" style="width:150px;margin-left: 10px;" @change="select()">
<el-option v-for="item in homeDataQ" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>是否实名:</span>
<el-select v-model="isAuthentication" style="width:150px;margin-left: 10px;" @change="select()">
<el-option v-for="item in homeDataSm" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>性别</span>
<el-select v-model="sex1" style="width:150px;margin-left: 10px;" @change="animeDat2(sex1)">
<el-option v-for="item in homeData1" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>
<div style="display: inline-block;">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
</el-button>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleansSm">重置
</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column fixed prop="userName" label="昵称" width="150">
<template slot-scope="scope">
<span style="color: #f56c6c;">{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="sex" label="性别">
<template slot-scope="scope">
<span v-if="scope.row.sex==1"></span>
<span v-else-if="scope.row.sex==2"></span>
<span v-else>未设置</span>
</template>
</el-table-column>
<el-table-column label="图像">
<template slot-scope="scope">
<img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
height="40">
<img v-else :src="scope.row.avatar" alt="" width="40" height="40">
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)">
{{ scope.row.phone ? scope.row.phone : '未绑定' }}
</span>
</template>
</el-table-column>
<el-table-column prop="isAuthentication" label="是否是师傅">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==2"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="shopName" label="绑定的商家"></el-table-column>
<el-table-column prop="invitationCode" label="邀请码"></el-table-column>
<el-table-column label="邀请人邀请码">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;"
@click="updates2(scope.row)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="是否实名">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==1">审核中</span>
<span v-else-if="scope.row.isAuthentication==2">已实名</span>
<span v-else>未实名</span>
</template>
</el-table-column>
<el-table-column prop="isCashDeposit" label="是否缴纳保证金">
<template slot-scope="scope">
<span v-if="scope.row.isCashDeposit==2">已缴纳</span>
<span v-else-if="scope.row.isCashDeposit==3">申请退款中</span>
<span v-else>待缴纳</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="支付宝名称">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBao" label="支付宝账号">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="userRate" label="邀请好友佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.userRate?scope.row.userRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(scope.row,'userRate')">
修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="shopRate" label="邀请师傅佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.shopRate?scope.row.shopRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;"
@click="xiugai(scope.row,'shopRate')">修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="platform" label="渠道来源"></el-table-column>
<el-table-column prop="vipEndTime" label="会员到期时间" width="160"></el-table-column>
<el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
<el-table-column prop="isAgency " label="是否是推广员">
<template slot-scope="scope">
<el-switch v-model="scope.row.isAgency" @change="updateDl(scope.row.isAgency,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateTgy')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="state " label="状态">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateStatus')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="120">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:updatejb')" v-if="scope.row.consortiaId"
@click="jiebanguser(scope.row)" plain>解绑商家</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
<!-- <el-button size = "mini" type = "danger" @click = "updates1(scope.row)">封号</el-button> -->
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[5, 10, 15, 20]" :page-size="limit" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
</el-pagination>
</div>
</el-tab-pane>
<el-tab-pane label="普通用户" name="third">
<div style="margin:5px;display: inline-block;">
<span>手机号:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
v-model="phone"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>昵称:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
v-model="userNameT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>邀请码:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
v-model="invitationCodeT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>渠道来源:</span>
<el-select v-model="platformT" style="width:150px;margin-left: 10px;" @change="select()">
<el-option v-for="item in homeDataQ" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>性别</span>
<el-select v-model="sex1" style="width:150px;margin-left: 10px;" @change="animeDat2(sex1)">
<el-option v-for="item in homeData1" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>
<div style="display: inline-block;">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
</el-button>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column fixed prop="userName" label="昵称" width="150">
<template slot-scope="scope">
<span style="color: #f56c6c;">{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="isAuthentication" label="性别">
<template slot-scope="scope">
<span v-if="scope.row.sex==1"></span>
<span v-else-if="scope.row.sex==2"></span>
<span v-else>未设置</span>
</template>
</el-table-column>
<el-table-column label="图像">
<template slot-scope="scope">
<img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
height="40">
<img v-else :src="scope.row.avatar" alt="" width="40" height="40">
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)">
{{ scope.row.phone ? scope.row.phone : '未绑定' }}
</span>
</template>
</el-table-column>
<el-table-column prop="isAuthentication" label="是否是师傅">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==2"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="invitationCode" label="邀请码"></el-table-column>
<el-table-column label="邀请人邀请码">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;"
@click="updates2(scope.row)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="是否实名">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==1">审核中</span>
<span v-else-if="scope.row.isAuthentication==2">已实名</span>
<span v-else>未实名</span>
</template>
</el-table-column>
<el-table-column prop="isCashDeposit" label="是否缴纳保证金">
<template slot-scope="scope">
<span v-if="scope.row.isCashDeposit==2">已缴纳</span>
<span v-else-if="scope.row.isCashDeposit==3">申请退款中</span>
<span v-else>待缴纳</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="支付宝名称">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBao" label="支付宝账号">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="userRate" label="邀请好友佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.userRate?scope.row.userRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(scope.row,'userRate')">
修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="shopRate" label="邀请师傅佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.shopRate?scope.row.shopRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;"
@click="xiugai(scope.row,'shopRate')">修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="platform" label="渠道来源"></el-table-column>
<el-table-column prop="vipEndTime" label="会员到期时间" width="160"></el-table-column>
<el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
<el-table-column prop="isAgency " label="是否是推广员">
<template slot-scope="scope">
<el-switch v-model="scope.row.isAgency" @change="updateDl(scope.row.isAgency,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateTgy')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="state " label="状态">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateStatus')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="120">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
<!-- <el-button size = "mini" type = "danger" @click = "updates1(scope.row)">封号</el-button> -->
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[5, 10, 15, 20]" :page-size="limit" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
</el-pagination>
</div>
</el-tab-pane>
<el-tab-pane label="会员用户" name="four">
<div style="margin:5px;display: inline-block;">
<span>手机号:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
v-model="phone"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>昵称:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
v-model="userNameT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>邀请码:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
v-model="invitationCodeT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>渠道来源:</span>
<el-select v-model="platformT" style="width:150px;margin-left: 10px;" @change="select()">
<el-option v-for="item in homeDataQ" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>性别</span>
<el-select v-model="sex1" style="width:150px;margin-left: 10px;" @change="animeDat2(sex1)">
<el-option v-for="item in homeData1" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>
<div style="display: inline-block;">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
</el-button>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column fixed prop="userName" label="昵称" width="150">
<template slot-scope="scope">
<span style="color: #f56c6c;">{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="isAuthentication" label="性别">
<template slot-scope="scope">
<span v-if="scope.row.sex==1"></span>
<span v-else-if="scope.row.sex==2"></span>
<span v-else>未设置</span>
</template>
</el-table-column>
<el-table-column label="图像">
<template slot-scope="scope">
<img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
height="40">
<img v-else :src="scope.row.avatar" alt="" width="40" height="40">
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)">
{{ scope.row.phone ? scope.row.phone : '未绑定' }}
</span>
</template>
</el-table-column>
<el-table-column prop="isAuthentication" label="是否是师傅">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==2"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="invitationCode" label="邀请码"></el-table-column>
<el-table-column label="邀请人邀请码">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;"
@click="updates2(scope.row)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="是否实名">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==1">审核中</span>
<span v-else-if="scope.row.isAuthentication==2">已实名</span>
<span v-else>未实名</span>
</template>
</el-table-column>
<el-table-column prop="isCashDeposit" label="是否缴纳保证金">
<template slot-scope="scope">
<span v-if="scope.row.isCashDeposit==2">已缴纳</span>
<span v-else-if="scope.row.isCashDeposit==3">申请退款中</span>
<span v-else>待缴纳</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="支付宝名称">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBao" label="支付宝账号">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="userRate" label="邀请好友佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.userRate?scope.row.userRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(scope.row,'userRate')">
修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="shopRate" label="邀请师傅佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.shopRate?scope.row.shopRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;"
@click="xiugai(scope.row,'shopRate')">修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="platform" label="渠道来源"></el-table-column>
<el-table-column prop="vipEndTime" label="会员到期时间" width="160"></el-table-column>
<el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
<el-table-column prop="isAgency " label="是否是推广员">
<template slot-scope="scope">
<el-switch v-model="scope.row.isAgency" @change="updateDl(scope.row.isAgency,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateTgy')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="state " label="状态">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateStatus')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="120">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
<!-- <el-button size = "mini" type = "danger" @click = "updates1(scope.row)">封号</el-button> -->
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[5, 10, 15, 20]" :page-size="limit" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
</el-pagination>
</div>
</el-tab-pane>
<el-tab-pane label="订单用户" name="five">
<div style="margin:5px;display: inline-block;">
<span>手机号:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
v-model="phone"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>昵称:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
v-model="userNameT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>邀请码:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
v-model="invitationCodeT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>渠道来源:</span>
<el-select v-model="platformT" style="width:150px;margin-left: 10px;" @change="select()">
<el-option v-for="item in homeDataQ" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>性别</span>
<el-select v-model="sex1" style="width:150px;margin-left: 10px;" @change="animeDat2(sex1)">
<el-option v-for="item in homeData1" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>
<div style="display: inline-block;">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
</el-button>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column fixed prop="userName" label="昵称" width="150">
<template slot-scope="scope">
<span style="color: #f56c6c;">{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="isAuthentication" label="性别">
<template slot-scope="scope">
<span v-if="scope.row.sex==1"></span>
<span v-else-if="scope.row.sex==2"></span>
<span v-else>未设置</span>
</template>
</el-table-column>
<el-table-column label="图像">
<template slot-scope="scope">
<img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
height="40">
<img v-else :src="scope.row.avatar" alt="" width="40" height="40">
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)">
{{ scope.row.phone ? scope.row.phone : '未绑定' }}
</span>
</template>
</el-table-column>
<el-table-column prop="isAuthentication" label="是否是师傅">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==2"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="invitationCode" label="邀请码"></el-table-column>
<el-table-column label="邀请人邀请码">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;"
@click="updates2(scope.row)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="是否实名">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==1">审核中</span>
<span v-else-if="scope.row.isAuthentication==2">已实名</span>
<span v-else>未实名</span>
</template>
</el-table-column>
<el-table-column prop="isCashDeposit" label="是否缴纳保证金">
<template slot-scope="scope">
<span v-if="scope.row.isCashDeposit==2">已缴纳</span>
<span v-else-if="scope.row.isCashDeposit==3">申请退款中</span>
<span v-else>待缴纳</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="支付宝名称">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBao" label="支付宝账号">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="userRate" label="邀请好友佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.userRate?scope.row.userRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(scope.row,'userRate')">
修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="shopRate" label="邀请师傅佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.shopRate?scope.row.shopRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;"
@click="xiugai(scope.row,'shopRate')">修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="platform" label="渠道来源"></el-table-column>
<el-table-column prop="vipEndTime" label="会员到期时间" width="160"></el-table-column>
<el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
<el-table-column prop="isAgency " label="是否是推广员">
<template slot-scope="scope">
<el-switch v-model="scope.row.isAgency" @change="updateDl(scope.row.isAgency,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateTgy')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="state " label="状态">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateStatus')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="120">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
<!-- <el-button size = "mini" type = "danger" @click = "updates1(scope.row)">封号</el-button> -->
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[5, 10, 15, 20]" :page-size="limit" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
</el-pagination>
</div>
</el-tab-pane>
<el-tab-pane label="推广员用户" name="tuiguang">
<div style="margin:5px;display: inline-block;">
<span>手机号:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
v-model="phone"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>昵称:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
v-model="userNameT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>邀请码:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
v-model="invitationCodeT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>渠道来源:</span>
<el-select v-model="platformT" style="width:150px;margin-left: 10px;" @change="select()">
<el-option v-for="item in homeDataQ" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>性别</span>
<el-select v-model="sex1" style="width:150px;margin-left: 10px;" @change="animeDat2(sex1)">
<el-option v-for="item in homeData1" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>
<div style="display: inline-block;">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
</el-button>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column fixed prop="userName" label="昵称" width="150">
<template slot-scope="scope">
<span style="color: #f56c6c;">{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="isAuthentication" label="性别">
<template slot-scope="scope">
<span v-if="scope.row.sex==1"></span>
<span v-else-if="scope.row.sex==2"></span>
<span v-else>未设置</span>
</template>
</el-table-column>
<el-table-column label="图像">
<template slot-scope="scope">
<img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
height="40">
<img v-else :src="scope.row.avatar" alt="" width="40" height="40">
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)">
{{ scope.row.phone ? scope.row.phone : '未绑定' }}
</span>
</template>
</el-table-column>
<el-table-column prop="isAuthentication" label="是否是师傅">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==2"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="invitationCode" label="邀请码"></el-table-column>
<el-table-column label="邀请人邀请码">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;"
@click="updates2(scope.row)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="是否实名">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==1">审核中</span>
<span v-else-if="scope.row.isAuthentication==2">已实名</span>
<span v-else>未实名</span>
</template>
</el-table-column>
<el-table-column prop="isCashDeposit" label="是否缴纳保证金">
<template slot-scope="scope">
<span v-if="scope.row.isCashDeposit==2">已缴纳</span>
<span v-else-if="scope.row.isCashDeposit==3">申请退款中</span>
<span v-else>待缴纳</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="支付宝名称">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBao" label="支付宝账号">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="userRate" label="邀请好友佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.userRate?scope.row.userRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(scope.row,'userRate')">
修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="shopRate" label="邀请师傅佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.shopRate?scope.row.shopRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;"
@click="xiugai(scope.row,'shopRate')">修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="platform" label="渠道来源"></el-table-column>
<el-table-column prop="vipEndTime" label="会员到期时间" width="160"></el-table-column>
<el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
<el-table-column prop="isAgency " label="是否是推广员">
<template slot-scope="scope">
<el-switch v-model="scope.row.isAgency" @change="updateDl(scope.row.isAgency,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateTgy')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="state " label="状态">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateStatus')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="120">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
<!-- <el-button size = "mini" type = "danger" @click = "updates1(scope.row)">封号</el-button> -->
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[5, 10, 15, 20]" :page-size="limit" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
</el-pagination>
</div>
</el-tab-pane>
<el-tab-pane label="商家用户" name="shop">
<div style="margin:5px;display: inline-block;">
<span>手机号:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入手机号"
v-model="phone"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>昵称:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入昵称"
v-model="userNameT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>邀请码:</span>
<el-input style="width: 150px;" @keydown.enter.native="select" clearable placeholder="请输入邀请码"
v-model="invitationCodeT"></el-input>
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>渠道来源:</span>
<el-select v-model="platformT" style="width:150px;margin-left: 10px;" @change="select()">
<el-option v-for="item in homeDataQ" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>&emsp;&emsp;
<div style="margin:5px;display: inline-block;">
<span>性别</span>
<el-select v-model="sex1" style="width:150px;margin-left: 10px;" @change="animeDat2(sex1)">
<el-option v-for="item in homeData1" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;
</div>
<div style="display: inline-block;">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
</el-button>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
</el-button>
</div>
<el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column fixed prop="userName" label="昵称" width="150">
<template slot-scope="scope">
<span style="color: #f56c6c;">{{ scope.row.userName ? scope.row.userName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="isAuthentication" label="性别">
<template slot-scope="scope">
<span v-if="scope.row.sex==1"></span>
<span v-else-if="scope.row.sex==2"></span>
<span v-else>未设置</span>
</template>
</el-table-column>
<el-table-column label="图像">
<template slot-scope="scope">
<img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40"
height="40">
<img v-else :src="scope.row.avatar" alt="" width="40" height="40">
</template>
</el-table-column>
<el-table-column prop="phone" label="手机号">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)">
{{ scope.row.phone ? scope.row.phone : '未绑定' }}
</span>
</template>
</el-table-column>
<el-table-column prop="isAuthentication" label="是否是师傅">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==2"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="shopName" label="绑定的商家"></el-table-column>
<el-table-column prop="invitationCode" label="邀请码"></el-table-column>
<el-table-column label="邀请人邀请码">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;"
@click="updates2(scope.row)">{{ scope.row.inviterCode ? scope.row.inviterCode : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="是否实名">
<template slot-scope="scope">
<span v-if="scope.row.isAuthentication==1">审核中</span>
<span v-else-if="scope.row.isAuthentication==2">已实名</span>
<span v-else>未实名</span>
</template>
</el-table-column>
<el-table-column prop="isCashDeposit" label="是否缴纳保证金">
<template slot-scope="scope">
<span v-if="scope.row.isCashDeposit==2">已缴纳</span>
<span v-else-if="scope.row.isCashDeposit==3">申请退款中</span>
<span v-else>待缴纳</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBaoName" label="支付宝名称">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBaoName ? scope.row.zhiFuBaoName : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="zhiFuBao" label="支付宝账号">
<template slot-scope="scope">
<span>{{ scope.row.zhiFuBao ? scope.row.zhiFuBao : '未绑定' }}</span>
</template>
</el-table-column>
<el-table-column prop="userRate" label="邀请好友佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.userRate?scope.row.userRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(scope.row,'userRate')">
修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="shopRate" label="邀请师傅佣金比例" width="150">
<template slot-scope="scope">
<span>{{scope.row.shopRate?scope.row.shopRate:'0'}}</span>
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
style="color: #4f9dec;background: #fff;border: none;"
@click="xiugai(scope.row,'shopRate')">修改</el-button>
</span>
</template>
</el-table-column>
<el-table-column prop="platform" label="渠道来源"></el-table-column>
<el-table-column prop="vipEndTime" label="会员到期时间" width="160"></el-table-column>
<el-table-column prop="createTime" label="创建时间" width="160"></el-table-column>
<el-table-column prop="isAgency " label="是否是推广员">
<template slot-scope="scope">
<el-switch v-model="scope.row.isAgency" @change="updateDl(scope.row.isAgency,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateTgy')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="state " label="状态">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" @change="change(scope.row.status,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('userList:updateStatus')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="120">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="updateJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication!=2">设置师傅</el-button>
<el-button size="mini" type="primary" @click="quxiaoJs(scope.row)" :disabled="!isAuth('userList:updateJs')" v-if="scope.row.isAuthentication==2" plain>取消师傅</el-button>
<el-button size="mini" type="primary" @click="updates(scope.row)">用户详情</el-button>
<el-button size="mini" type="warning" @click="updateVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member!=1">设置会员</el-button>
<el-button size="mini" type="warning" @click="quxiaoVip(scope.row)" :disabled="!isAuth('userList:updateVip')" v-if="scope.row.member==1" plain>取消会员</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button>
<!-- <el-button size = "mini" type = "danger" @click = "updates1(scope.row)">封号</el-button> -->
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[5, 10, 15, 20]" :page-size="limit" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
</el-pagination>
</div>
</el-tab-pane>
<!-- 实名验证 -->
<el-dialog title="填写实名信息" :visible.sync="dialogVisible" width="70%" center>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">真实姓名</span>
<el-input v-model="name" style="width:45%;" placeholder="请输入真实姓名"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">项目类型</span>
<el-select v-model="classifyId" style="width:45%;">
<el-option v-for="item in fwData" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>&nbsp;&nbsp;
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">性别</span>
<el-radio-group v-model="sex">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">出生日期</span>
<el-date-picker v-model="birthdate" type="date" placeholder="选择日期" style="width: 45%;">
</el-date-picker>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">身份证号</span>
<el-input v-model="idNumber" style="width:45%;" placeholder="请输入身份证号"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">联系方式</span>
<el-input v-model="phone1" style="width:45%;" placeholder="请输入联系方式"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">地址</span>
<el-input v-model="address" style="width:45%;" placeholder="请输入地址"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">保证金金额</span>
<el-input v-model="money" style="width:45%;" placeholder="请输入保证金金额"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">个人简介</span>
<el-input v-model="individualResume" style="width:45%;" placeholder="请输入个人简介"></el-input>
</div>
<div style="margin-bottom: 10px;display:flex;">
<span style="width: 200px;display: inline-block;text-align: right;">身份证正面</span>
<div
style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
<el-upload class="avatar-uploader" v-model="front"
action="https://admin.sjajk.com/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccess">
<img v-if="front" :src="front" class="avatar"
style="border-radius: 6px;width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon iconss"></i>
</el-upload>
</div>
</div>
<div style="margin-bottom: 10px;display:flex;">
<span style="width: 200px;display: inline-block;text-align: right;">身份证反正面</span>
<div
style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
<el-upload class="avatar-uploader" v-model="back"
action="https://admin.sjajk.com/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccess1">
<img v-if="back" :src="back" class="avatar"
style="border-radius: 6px;width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon iconss"></i>
</el-upload>
</div>
</div>
<div style="margin-bottom: 10px;display:flex;">
<span style="width: 200px;display: inline-block;text-align: right;">资格证书</span>
<div class="imgs" v-for="(item,index) in certification" :key="index">
<img width="100%" class="images" height="100%" :src="item" alt="">
<span class="dels">
<i class="el-icon-delete" @click="dels(index)"></i>
</span>
</div>
<div class="imgs" style="width: 50%;">
<el-upload action="https://admin.sjajk.com/sqx_fast/alioss/uploadWatermark"
list-type="picture-card" :show-file-list="false" :on-success="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible1">
<img width="100%" :src="certification" alt="">
</el-dialog>
</div>
</div>
<div style="margin-bottom: 10px;display:flex;">
<span style="width: 200px;display: inline-block;text-align: right;">形象照</span>
<div class="imgs" v-for="(item,index) in imagePhoto" :key="index">
<img width="100%" class="images" height="100%" :src="item" alt="">
<span class="dels">
<i class="el-icon-delete" @click="dels1(index)"></i>
</span>
</div>
<div class="imgs" style="width: 50%;">
<el-upload action="https://admin.sjajk.com/sqx_fast/alioss/upload"
list-type="picture-card" :show-file-list="false" :on-success="handleRemove1">
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible2">
<img width="100%" :src="imagePhoto" alt="">
</el-dialog>
</div>
</div>
<div style="margin-bottom: 10px;display:flex;">
<span style="width: 200px;display: inline-block;text-align: right;">头像</span>
<div
style=" width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
<el-upload class="avatar-uploader" v-model="avater"
action="https://admin.sjajk.com/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccessAvater">
<img v-if="avater" :src="avater" class="avatar"
style="border-radius: 6px;width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon iconss"></i>
</el-upload>
</div>
</div>
<div slot="footer" class="dialog-footer" style="margin-top: 30px;text-align: center;">
<el-button @click="prev"> </el-button>
<el-button type="primary" @click="addmissionNoticeTo()"> </el-button>
</div>
</el-dialog>
<!-- 修改比例 -->
<el-dialog :title="titleBl" :visible.sync="dialogFormVisible2" center>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">比例</span>
<el-input style="width:50%;" v-model="proportion" type="number" :min="0" :controls="false"
:placeholder="titleBl"></el-input>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible2 = false"> </el-button>
<el-button type="primary" @click="StairNoticeTo2()"> </el-button>
</div>
</el-dialog>
</el-tabs>
</div>
</template>
<script>
export default {
data() {
return {
openValue: 1,
closeValue: 2,
state: 'false',
limit: 10,
page: 1,
phone: '',
nickNam: '',
platform: 'all',
isRelation: -1,
isTuan: -1,
value: '',
payData: [],
individualResume:"",//个人简介
nickName: '',
grade: '',
activeName: 'first',
tableDataLoading: true,
dialogVisible: false,
dialogVisible1: false,
dialogVisible2: false,
dialogVisible3:false,
tableData: [],
platforms: [{
value: 'all',
label: '全部'
}, {
value: 'wap',
label: '网站'
}, {
value: 'app',
label: 'APP'
}, {
value: 'weixin',
label: '微信公众号'
},
{
value: 'mp',
label: '微信小程序'
}
],
homeData1: [{
value: '',
label: '全部'
}, {
value: 1,
label: '男'
}, {
value: 2,
label: '女'
}, ],
type: '',
sex1:'',
userId:'',
sex: '',
birthdate: '',
idNumber: '',
name: '',
phone1: '',
money:'',
address:'',
front: '',
back: '',
avater:'',
imagePhoto: [],
certification: [],
fwData: [],
classifyId: '',
member:'',
ordersUser:'',
userNameT:'',
invitationCodeT:'',
platformT:'',
homeDataQ:[
{
value: '',
label: '全部'
}, {
value: 'H5',
label: 'H5'
}, {
value: 'app',
label: 'app'
},{
value: '小程序',
label: '小程序'
},
],
dialogFormVisible2: false,
titleBl: '修改佣金比例',
proportion:'',
isAgency:'',
isShop:'',
homeDataSm:[
{
value: 3,
label: '全部'
}, {
value: 2,
label: '是'
}, {
value: 4,
label: '否'
}
],
isAuthentication:'',
}
},
methods: {
// tabs切换
handleClick(tab, event) {
this.limit = 10
this.page = 1
if (tab._props.label == '全部用户') {
this.isAuthentication = ''
this.member= ''
this.ordersUser= ''
this.isAgency = ''
this.isShop = ''
this.dataSelect()
}
if (tab._props.label == '师傅端注册用户') {
this.isAuthentication = 3
this.member= ''
this.ordersUser= ''
this.isAgency = ''
this.isShop = ''
this.dataSelect()
}
if (tab._props.label == '普通用户') {
this.isAuthentication = 1
this.member= ''
this.ordersUser= ''
this.isAgency = ''
this.isShop = ''
this.dataSelect()
}
if (tab._props.label == '会员用户') {
this.isAuthentication = ''
this.member= 1
this.ordersUser= ''
this.isAgency = ''
this.isShop = ''
this.dataSelect()
}
if (tab._props.label == '订单用户') {
this.isAuthentication = ''
this.member= ''
this.ordersUser= 1
this.isAgency = ''
this.isShop = ''
this.dataSelect()
}
if (tab._props.label == '推广员用户') {
this.isAuthentication = ''
this.member= ''
this.ordersUser= ''
this.isShop = ''
this.isAgency = 1
this.dataSelect()
}
if (tab._props.label == '商家用户') {
this.isAuthentication = ''
this.member= ''
this.ordersUser= ''
this.isAgency = ''
this.isShop = 1
this.dataSelect()
}
},
// 状态
change(val, userId) {
this.$http({
url: this.$http.adornUrl(`user/updateUserStatusByUserId?userId=${userId}`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
})
},
// 详情跳转
updates(row) {
this.$router.push({
path: '/userDetail',
query: {
userId:row.userId,
artificerId: row.artificerId,
}
})
},
// 详情跳转
updates2(row) {
this.$http({
url: this.$http.adornUrl('user/queryByInvitationCode'),
method: 'get',
params: this.$http.adornParams({
'invitationCode':row.inviterCode
})
}).then(({
data
}) => {
if (data.code == 0) {
if(data.data.userId){
this.$router.push({
path: '/userDetail',
query: {
userId: data.data.userId
}
})
}
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
},
// 设置师傅
updateJs(row) {
console.log('设置师傅')
this.userId = row.userId
this.sex = ''
this.birthdate = ''
this.idNumber = ''
this.name = ''
this.phone1 = ''
this.address = ''
this.money = ''
this.front = ''
this.back = ''
this.classifyId = ''
this.individualResume= ''
this.avater = ''
this.imagePhoto = []
this.certification = []
this.dialogVisible = true
},
handleSizeChange(val) {
this.limit = val
this.dataSelect()
},
handleCurrentChange(val) {
this.page = val
this.dataSelect()
},
handleSizeChange1(val) {
this.limit = val
this.paySelect()
},
handleCurrentChange1(val) {
this.page = val
this.paySelect()
},
// select自动选择
selectTrigger() {
this.dataSelect()
},
// 查询
select() {
this.page = 1
this.dataSelect()
},
select2() {
this.paySelect()
},
// 重置
cleans() {
this.page = 1
this.sex1 = ''
this.phone = ''
this.userNameT = ''
this.invitationCodeT = ''
this.platformT = ''
this.dataSelect()
},
// 重置
cleansSm() {
this.page = 1
this.sex1 = ''
this.phone = ''
this.userNameT = ''
this.invitationCodeT = ''
this.platformT = ''
this.isAuthentication = 3
this.dataSelect()
},
//删除用户
deleteuser(row) {
let delid = row.userId
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`user/deleteUserByUserId/${delid}`),
method: 'post',
params: this.$http.adornData({})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
})
},
// 封号
updates1(row) {
},
// 获取社区数据列表
homeSelect() {
this.$http({
url: this.$http.adornUrl('helpCampus/selectCampusList'),
method: 'get',
params: this.$http.adornParams({
// 'page':this.page,
// 'limit':this.limit,
// 'content':this.content
})
}).then(({
data
}) => {
let returnData = data.data;
this.homeData1 = returnData
})
},
// 筛选信息
animeDat2(state) {
this.dataSelect()
},
// 获取数据列表
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('user/selectUserList'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'isAuthentication': this.isAuthentication,
'phone': this.phone,
'sex': this.sex1,
'member': this.member,
'ordersUser': this.ordersUser,
'userName':this.userNameT,
'invitationCode':this.invitationCodeT,
'platform':this.platformT,
'isAgency':this.isAgency,
'isShop':this.isShop
})
}).then(({
data
}) => {
this.tableDataLoading = false
let returnData = data.data
this.tableData = returnData
})
},
// 身份证正面上传
handleAvatarSuccess(file) {
this.front = file.data
},
// 身份证反面上传
handleAvatarSuccess1(file) {
this.back = file.data
},
// 头像上传
handleAvatarSuccessAvater(file) {
this.avater = file.data
},
// 删除轮播图
dels(index) {
this.certification.splice(index, 1);
console.log(this.certification)
},
// 轮播图片上传
handleRemove(file) {
console.log(file, this.certification)
this.certification.push(file.data);
},
handleDownload(file) {
console.log(file, this.certification)
},
// 删除轮播图
dels1(index) {
this.imagePhoto.splice(index, 1);
console.log(this.imagePhoto)
},
// 轮播图片上传
handleRemove1(file) {
console.log(file, this.imagePhoto)
this.imagePhoto.push(file.data);
},
handleDownload1(file) {
console.log(file, this.imagePhoto)
},
// 删除轮播图
dels2(index) {
this.avater.splice(index, 1);
console.log(this.avater)
},
// 轮播图片上传
handleRemove2(file) {
console.log(file, this.avater)
this.avater.push(file.data);
},
handleDownload2(file) {
console.log(file, this.avater)
},
// 返回上一级
prev() {
this.dialogVisible = false
},
// 确定添加
addmissionNoticeTo() {
if (this.name == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入真实姓名',
type: 'warning'
});
return
}
if (this.classifyId == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请选择项目类型',
type: 'warning'
});
return
}
if (this.sex == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请选择性别',
type: 'warning'
});
return
}
if (this.birthdate == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请选择出生日期',
type: 'warning'
});
return
}
if (this.idNumber == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入身份证号',
type: 'warning'
});
return
}
if (this.phone1 == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入联系电话',
type: 'warning'
});
return
}
if (this.address == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入地址',
type: 'warning'
});
return
}
if (this.phone1 == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入联系电话',
type: 'warning'
});
return
}
if (this.front == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传身份证正面图',
type: 'warning'
});
return
}
if (this.back == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传身份证背面图',
type: 'warning'
});
return
}
if (this.individualResume == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请设置个人简介',
type: 'warning'
});
return
}
if (this.avater == '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传头像',
type: 'warning'
});
return
}
if (this.imagePhoto.length == 0) {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传形象照',
type: 'warning'
});
return
}
if (this.certification.length == 0) {
this.$notify({
title: '提示',
duration: 1800,
message: '请上传资格证书',
type: 'warning'
});
return
}
this.$http({
url: this.$http.adornUrl('user/updateArtificer'),
method: 'post',
data: this.$http.adornData({
// params: this.$http.adornParams({
'userId':this.userId,
'sex':this.sex,
'birthdate':this.birthdate,
'idNumber':this.idNumber,
'name':this.name,
'phone':this.phone1,
'address':this.address,
'money':this.money,
'front':this.front,
'back':this.back,
'individualResume':this.individualResume,
'avatar':this.avater,
'imagePhoto':this.imagePhoto.toString(),
'certification':this.certification.toString(),
'status':1,
'classifyId':this.classifyId
})
}).then(({
data
}) => {
if(data.code==0){
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
this.dialogVisible = false
}else{
}
})
},
// 取消师傅
quxiaoJs(row){
this.$confirm(`确定要取消师傅?取消后师傅的认证信息将会删除,确定继续操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('user/updateArtificer'),
method: 'post',
data: this.$http.adornData({
// params: this.$http.adornParams({
'userId':row.userId,
'status':2
})
}).then(({
data
}) => {
if(data.code==0){
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}else{
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
}
})
})
},
// 设置推广员
updateDl(isAgency,userId){
this.$http({
url: this.$http.adornUrl(`user/updateUserIsAgency`),
method: 'post',
params: this.$http.adornParams({
'userId':userId,
'isAgency':isAgency
})
}).then(({
data
}) => {
if(data.code==0){
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}else{
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}
})
},
// 项目类型
fwSelect() {
this.$http({
url: this.$http.adornUrl('sys/dict/selectDictList'),
method: 'get',
params: this.$http.adornParams({
'type': '服务类型'
})
}).then(({
data
}) => {
let returnData = data.data
this.fwData = returnData
})
},
xiugai(row, text) {
if (text == 'userRate') {
this.titleBl = '修改邀请好友佣金比例'
this.proportion = row.userRate
}
if (text == 'shopRate') {
this.titleBl = '修改邀请师傅佣金比例'
this.proportion = row.shopRate
}
this.texts = text
this.userIdss = row.userId
this.dialogFormVisible2 = true
},
StairNoticeTo2() {
var datas = {}
if (this.texts == 'userRate') {
datas.userRate = this.proportion
}
if (this.texts == 'shopRate') {
datas.shopRate = this.proportion
}
datas.userId = this.userIdss
this.$http({
url: this.$http.adornUrl('user/updateUserByUserId'),
method: 'post',
data: this.$http.adornData(datas)
}).then(({
data
}) => {
console.log('data', data)
if(data.code==0){
this.$message({
message: '修改成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dialogFormVisible2 = false
this.dataSelect()
}
})
}else{
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
}
})
},
// 设置会员
updateVip(row){
this.$http({
url: this.$http.adornUrl('user/giveUserVip'),
method: 'post',
params: this.$http.adornParams({
'userId':row.userId,
'day':30
})
}).then(({
data
}) => {
if(data.code==0){
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}else{
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}
})
},
// 取消会员
quxiaoVip(row){
this.$confirm(`确定要取消会员?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('user/removeUserVip'),
method: 'post',
// data: this.$http.adornData({
params: this.$http.adornParams({
'userId':row.userId
})
}).then(({
data
}) => {
if(data.code==0){
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}else{
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
}
})
})
},
//解绑用户
jiebanguser(row) {
let delid = row.userId
this.$confirm(`确定要解绑商户?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('consortia/deleteConsortiaUser'),
method: 'post',
params: this.$http.adornParams({
'userId':row.userId
})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {}
})
}
})
})
},
},
mounted() {
// this.homeSelect()
this.dataSelect()
this.fwSelect()
}
}
</script>
<style scoped="scoped">
.el-button+.el-button {
margin-left: 0 !important;
margin-top: 5px !important;
}
.imgs {
position: relative;
border-radius: 6px;
width: 148px;
height: 148px;
margin-right: 10px;
display: inline-block;
}
.dels {
position: absolute;
top: 0;
left: 0;
display: none;
}
.dels .el-icon-delete {
line-height: 148px;
padding-left: 58px;
font-size: 25px;
color: #fff;
}
.imgs:hover .dels {
width: 100%;
height: 100%;
background: #000;
display: block;
opacity: 0.5;
}
</style>