Commit 01861514 authored by 黄媛媛's avatar 黄媛媛

update

parent 7092084b
...@@ -34,6 +34,9 @@ ...@@ -34,6 +34,9 @@
.w100{ .w100{
width:100px!important; width:100px!important;
} }
.w200{
width:200px!important;
}
.el-icon-search{ .el-icon-search{
cursor: pointer; cursor: pointer;
} }
......
...@@ -379,13 +379,15 @@ ...@@ -379,13 +379,15 @@
<div flex="dir:left cross:center" style="background: rgb(255, 255, 255); color: rgb(102, 102, 102); height: 80px; padding: 0px 12px; font-size: 13pt; border-top: 1px solid rgb(226, 226, 226); border-bottom: 1px solid rgb(226, 226, 226);"> <div flex="dir:left cross:center" style="background: rgb(255, 255, 255); color: rgb(102, 102, 102); height: 80px; padding: 0px 12px; font-size: 13pt; border-top: 1px solid rgb(226, 226, 226); border-bottom: 1px solid rgb(226, 226, 226);">
<div style="color: rgb(255, 69, 68); font-size: 30pt;"></div> <div style="color: rgb(255, 69, 68); font-size: 30pt;"></div>
<div style="padding-left: 20px; color: rgb(205, 205, 205); font-size: 19pt;"> <div style="padding-left: 20px; color: rgb(205, 205, 205); font-size: 19pt;">
请输入100 请输入{{addMsg.WithdrawalAmountName}}
</div> </div>
</div> </div>
<div flex="dir:top main:center" style="padding: 10px 12px; color: rgb(102, 102, 102); font-size: 12pt;"> <div flex="dir:top main:center" style="padding: 10px 12px; color: rgb(102, 102, 102); font-size: 12pt;">
<div>说明: 100必须不能大于¥80</div> <div>说明: {{addMsg.WithdrawalAmountName}}必须不能大于¥80</div>
</div>
<div style="background: rgb(255, 255, 255); padding: 16px 12px;">
{{addMsg.WithdrawalWayName}}
</div> </div>
<div style="background: rgb(255, 255, 255); padding: 16px 12px;"></div>
<div flex="dir:left cross:center" style="margin-bottom: 10px; padding-left: 8px; padding-bottom: 10px; background: rgb(255, 255, 255);"> <div flex="dir:left cross:center" style="margin-bottom: 10px; padding-left: 8px; padding-bottom: 10px; background: rgb(255, 255, 255);">
<div flex="dir:left cross:center" style="margin-left: 10px; padding: 0px 16px; height: 34px; border: 1px solid rgb(255, 69, 68); border-radius: 19px;"> <div flex="dir:left cross:center" style="margin-left: 10px; padding: 0px 16px; height: 34px; border: 1px solid rgb(255, 69, 68); border-radius: 19px;">
<img src="../../assets/img/userman/wx.png" style="width:20px;height:20px" alt=""> <img src="../../assets/img/userman/wx.png" style="width:20px;height:20px" alt="">
...@@ -420,14 +422,14 @@ ...@@ -420,14 +422,14 @@
<div flex="dir:left cross:center" class="share-text"> <div flex="dir:left cross:center" class="share-text">
<div class="default">提现金额</div> <div class="default">提现金额</div>
<img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt=""> <img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt="">
<el-input v-model="addMsg.val" style="width:40%" size="small" placeholder="请输入内容"></el-input> <el-input v-model="addMsg.WithdrawalAmountName" style="width:40%" size="small" placeholder="请输入内容"></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<div flex="dir:left cross:center" class="share-text"> <div flex="dir:left cross:center" class="share-text">
<div class="default">提现方式</div> <div class="default">提现方式</div>
<img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt=""> <img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt="">
<el-input v-model="addMsg.val" style="width:40%" size="small" placeholder="请输入内容"></el-input> <el-input v-model="addMsg.WithdrawalWayName" style="width:40%" size="small" placeholder="请输入内容"></el-input>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -446,14 +448,14 @@ ...@@ -446,14 +448,14 @@
<div flex="dir:left box:mean cross:center" style="height: 50px; border: 1px solid rgb(226, 226, 226); background: rgb(255, 255, 255);"> <div flex="dir:left box:mean cross:center" style="height: 50px; border: 1px solid rgb(226, 226, 226); background: rgb(255, 255, 255);">
<div flex="main:center"> <div flex="main:center">
<div flex="cross:center" style="height: 50px; border-bottom: 1px solid rgb(255, 69, 68); color: rgb(255, 69, 68);"> <div flex="cross:center" style="height: 50px; border-bottom: 1px solid rgb(255, 69, 68); color: rgb(255, 69, 68);">
一级分销名称(0) {{addMsg.OneDistributionName}}(0)
</div> </div>
</div> </div>
<div flex="main:center"> <div flex="main:center">
<div>二级分销名称(10)</div> <div>{{addMsg.TwoDistributionName}}(10)</div>
</div> </div>
<div flex="main:center"> <div flex="main:center">
<div>三级分销名称(0)</div> <div>{{addMsg.ThreeDistributionName}}(0)</div>
</div> </div>
</div> </div>
<div flex="dir:top" style="margin-bottom: 10px;"> <div flex="dir:top" style="margin-bottom: 10px;">
...@@ -506,21 +508,21 @@ ...@@ -506,21 +508,21 @@
<div flex="dir:left cross:center" class="share-text"> <div flex="dir:left cross:center" class="share-text">
<div class="default">一级分销名称</div> <div class="default">一级分销名称</div>
<img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt=""> <img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt="">
<el-input v-model="addMsg.val" style="width:40%" size="small" placeholder="请输入内容"></el-input> <el-input v-model="addMsg.OneDistributionName" style="width:40%" size="small" placeholder="请输入内容"></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<div flex="dir:left cross:center" class="share-text"> <div flex="dir:left cross:center" class="share-text">
<div class="default">二级分销名称</div> <div class="default">二级分销名称</div>
<img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt=""> <img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt="">
<el-input v-model="addMsg.val" style="width:40%" size="small" placeholder="请输入内容"></el-input> <el-input v-model="addMsg.TwoDistributionName" style="width:40%" size="small" placeholder="请输入内容"></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<div flex="dir:left cross:center" class="share-text"> <div flex="dir:left cross:center" class="share-text">
<div class="default">三级分销名称</div> <div class="default">三级分销名称</div>
<img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt=""> <img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt="">
<el-input v-model="addMsg.val" style="width:40%" size="small" placeholder="请输入内容"></el-input> <el-input v-model="addMsg.ThreeDistributionName" style="width:40%" size="small" placeholder="请输入内容"></el-input>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -566,7 +568,7 @@ export default { ...@@ -566,7 +568,7 @@ export default {
}, },
data(){ data(){
return{ return{
activeName:'second', activeName:'five',
addMsg:{}, addMsg:{},
HeadImagePath:'', HeadImagePath:'',
BottomImagePath:'', BottomImagePath:'',
......
<template>
<div class="usersList">
<div class="head-title">
分销商等级
<el-button @click="EditgoUrl" style="float:right;margin-top: -5px;" size="small" type="primary">
添加分销商等级
</el-button>
</div>
<div class="content">
<div>
<!-- <el-select class="w100" @change="getList" style="margin-right: 10px;" v-model="msg.Source" size="small" placeholder="请选择">
<el-option label="全部平台" :value="0"></el-option>
<el-option
v-for="item in platList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select> -->
<div class="searchInput" style="width:230px">
<el-input style="display:inline-block;width:205px;height:30px"
placeholder="请输入分销商等级名称查询"
v-model="msg.Name"
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
</div>
<el-table
:data="tableData"
v-loading="loading"
border
style="width: 100%;margin:20px 0">
<el-table-column
prop="Id"
label="ID">
</el-table-column>
<el-table-column
prop="address"
label="分销商等级">
<template slot-scope="scope">
等级{{scope.row.Grade}}
</template>
</el-table-column>
<el-table-column
prop="Name"
label="分销商等级名称">
</el-table-column>
<el-table-column
prop="UpGradeCondition"
label="升级条件">
<template slot-scope="scope">
<el-tag v-if="scope.row.IsAutoUpGrade==2" type="warning">不可自动升级</el-tag>
<el-tag v-if="scope.row.IsAutoUpGrade==1" type="success">可自动升级</el-tag>
</template>
</el-table-column>
<el-table-column
prop="OneCommission"
label="一级佣金">
<template slot-scope="scope">
<span v-if="scope.row.DistributionCommissionType==1">{{scope.row.OneCommission}}%</span>
<span v-if="scope.row.DistributionCommissionType==2">{{scope.row.OneCommission}}</span>
</template>
</el-table-column>
<el-table-column
prop="name"
label="二级佣金">
<template slot-scope="scope">
<span v-if="tierInfo.DistributorTier==2 || tierInfo.DistributorTier==3">
<span v-if="scope.row.DistributionCommissionType==1">{{scope.row.TwoCommission}}%</span>
<span v-if="scope.row.DistributionCommissionType==2">{{scope.row.TwoCommission}}</span>
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column
prop="name"
label="三级佣金">
<template slot-scope="scope">
<span v-if="tierInfo.DistributorTier==3">
<span v-if="scope.row.DistributionCommissionType==1">{{scope.row.ThreeCommission}}%</span>
<span v-if="scope.row.DistributionCommissionType==2">{{scope.row.ThreeCommission}}</span>
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column
prop="name"
label="启用状态">
<template slot-scope="scope">
<el-switch
@change="SetEnabled(scope.row)"
v-model="scope.row.Enabled"
active-color="#409EFF"
:active-value="1"
:inactive-value="2">
</el-switch>
</template>
</el-table-column>
<el-table-column
prop="address"
width="150"
label="操作">
<template slot-scope="scope">
<img @click="EditgoUrl(scope.row)" style="width:32px;height:32px" src="../../assets/img/userman/edit.png" alt="">
<img v-if="scope.row.Enabled==2" @click="Delete(scope.row,1)" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/del.png" alt="">
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="total">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
data() {
return {
czType:1,
czjfDig:false,
changeState:false,
loading:false,
isIndeterminate: true,
addMsg:{},
dialogVisible:false,
value:'',
options:[],
tableData:[],
msg:{
pageIndex:1,
pageSize:15,
Name:'',
Grade:0,
MemberGrade:0,
Enabled:0,
},
total:0,
addMsg:{
MallBaseId:0,
Type:1,
UserId:0,
Integral:0,
Image:'',
Description:'',
},
tierInfo:{},
};
},
created() {
this.getList();
this.GetTierInfo();
this.addMsg.MallBaseId=this.getLocalStorage().MallBaseId;
},
methods: {
SetEnabled(row){
let that=this;
that.apipost(
"/api/user/SetDistributorGradeEnabledStatus",
{GradeId:row.Id},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
},
null
);
},
Delete(row){
let that=this;
that.Confirm("是否删除?", function () {
that.apipost(
"/api/user/DelDistributorGradeInfo",
{GradeId:row.Id},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
},
null
);
});
},
EditgoUrl(row){
if(row){
this.$router.push({
name: 'setDistributorLevel',
query: {
UserId:row.Id
}
});
}else{
this.$router.push({
name: 'setDistributorLevel',
});
}
},
getList(){
this.loading=true;
this.apipost("/api/user/GetDistributorGradePageList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.total=res.data.data.count;
let pageData=res.data.data.pageData;
this.tableData=pageData;
}
})
},
GetTierInfo(){
this.apipost("/api/user/GetDistributorTierInfo",{}, res => {
this.tierInfo=res.data.data;
})
},
handleCheckAllChange(val) {
this.checkedCities = val ? this.cityOptions : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
},
mounted() {
}
};
</script>
<style>
.usersList .remark_name {
color: #888888;
font-size: 12px;
margin-left: 10px;
float: right;
}
.usersList .app-image{
background-position: center center;
width: 50px;
height: 50px;
border-radius:0%;
float: left;
margin-right: 8px;
}
.usersList .blue{
color:#409EFF;
}
.usersList .content .searchInput{
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.usersList .content .searchInput .el-input__inner{
border:none;outline:none;
height: 30px;
line-height: 30px;
}
.usersList .content .searchInput{
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width:250px;
margin-right: 20px;
}
.usersList .content{
background: #fff;
margin-top:10px;
padding: 20px;
box-sizing: border-box;
}
</style>
<template>
<div class="distributors usersList">
<div class="head-title">
分销商列表
<el-button @click="dialogVisible=true" style="float:right;margin-top: -5px;" size="small" type="primary">批量导出</el-button>
</div>
<div class="content">
<div>
<el-select class="w100" @change="getList" style="margin-right: 10px;" v-model="msg.GradeId" size="small" placeholder="请选择">
<el-option label="全部等级" :value="-1"></el-option>
<el-option label="默认等级" :value="0"></el-option>
<el-option
v-for="item in DropdownList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
<el-select class="w100" @change="getList" style="margin-right: 10px;" v-model="msg.Source" size="small" placeholder="请选择">
<el-option label="全部平台" :value="0"></el-option>
<el-option
v-for="item in platList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
<div class="searchInput" style="width:150px">
<el-input style="display:inline-block;width:125px;height:30px"
placeholder="请输入ID"
v-model="msg.Id"
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<div class="searchInput" style="width:150px">
<el-input style="display:inline-block;width:125px;height:30px"
placeholder="请输入昵称"
v-model="msg.Name"
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<div class="searchInput" style="width:150px">
<el-input style="display:inline-block;width:125px;height:30px"
placeholder="请输入手机号"
v-model="msg.Moblie"
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<el-button @click="plSet" size="small" type="primary">批量设置</el-button>
<el-button @click="addUserBtn" style="float:right" size="small" type="primary">添加分销商</el-button>
</div>
<div style="margin-top:20px">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全部" name="first" :dataId="0"></el-tab-pane>
<el-tab-pane v-for="(item,index) in AuditStatusList" :dataId="item.Id" :key="index" :label="item.Name" :name="item.Name"></el-tab-pane>
</el-tabs>
</div>
<el-table
class="table_samll"
:data="tableData"
v-loading="loading"
border
@select-all="CheckAllTable"
@select="SingelCheck"
style="width: 100%;margin:0 0 20px 0">
<el-table-column
type="selection">
</el-table-column>
<el-table-column
prop="Id"
label="用户ID">
</el-table-column>
<el-table-column
prop="address"
label="基本信息">
<template slot-scope="scope">
<div class="app-image" :style="{backgroundImage:'url(' + scope.row.Photo + ')',backgroundSize:'cover'}"></div>
<div flex="dir:left cross:center">
{{scope.row.NickName}}
</div>
<img v-if="scope.row.Source==1" style="width:24px;height:24px" src="../../assets/img/userman/wx.png" alt="" class="platform-img">
</template>
</el-table-column>
<el-table-column
prop="Moblie"
label="姓名">
<el-table-column
prop="Moblie"
label="手机号">
<template slot-scope="scope">
<p>{{scope.row.Name}}</p>
<p>{{scope.row.Mobile}}</p>
</template>
</el-table-column>
</el-table-column>
<el-table-column
prop="Moblie"
label="可提现佣金">
<el-table-column
prop="Moblie"
label="累积佣金">
<template slot-scope="scope">
<p>{{scope.row.CommissionWithdrawal.toFixed(2)}}</p>
<p>{{scope.row.TotalCommission.toFixed(2)}}</p>
</template>
</el-table-column>
</el-table-column>
<el-table-column
prop="SuperiorName"
label="推荐人">
</el-table-column>
<el-table-column
prop="name"
label="下级用户">
<template slot-scope="scope">
<p class="blue">一级:{{scope.row.OneNum}}</p>
<p class="blue">二级:{{scope.row.TwoNum}}</p>
<p class="blue">三级:{{scope.row.ThreeNum}}</p>
</template>
</el-table-column>
<el-table-column
prop="name"
label="分销商等级">
<template slot-scope="scope">
<el-tag v-if="scope.row.GradeName=='默认等级'" type="info">{{scope.row.GradeName}}</el-tag>
<el-tag v-else>{{scope.row.GradeName}}</el-tag>
</template>
</el-table-column>
<el-table-column
prop="name"
label="状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.AuditStatusName=='待审核'" type="info">{{scope.row.AuditStatusName}}</el-tag>
<el-tag v-else>{{scope.row.AuditStatusName}}</el-tag>
</template>
</el-table-column>
<el-table-column
prop="name"
label="时间">
<template slot-scope="scope">
<p>申请时间:</p>
<span>{{scope.row.CreateDate}}</span>
</template>
</el-table-column>
<el-table-column
prop="Remark"
label="备注信息">
</el-table-column>
<el-table-column
prop="address"
width="200"
label="操作">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="同意" placement="top-start">
<img v-if="scope.row.AuditStatus==1" @click="openReason(1,scope.row)" style="width:32px;height:32px" src="../../assets/img/userman/pass.png" alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="拒绝" placement="top-start">
<img v-if="scope.row.AuditStatus==1" @click="openReason(2,scope.row)" style="width:32px;height:32px" src="../../assets/img/userman/nopass.png" alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="修改分销商等级" placement="top-start">
<img @click="openReason(4,scope.row)" style="width:32px;height:32px" src="../../assets/img/userman/edit.png" alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="添加备注" placement="top-start">
<img @click="openRemark(5,scope.row)" style="width:32px;height:32px" src="../../assets/img/userman/add_remark.png" alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<img @click="Delete(3,scope.row)" style="width:32px;height:32px" src="../../assets/img/userman/del.png" alt="">
</el-tooltip>
<img @click="OpenczjfDig(scope.row,1)" style="width:32px;height:32px;" src="../../assets/img/userman/integral.png" alt="">
<img @click="OpenczjfDig(scope.row,2)" style="width:32px;height:32px" src="../../assets/img/userman/balance.png" alt="">
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="total">
</el-pagination>
</div>
<!-- 选择导出信息 -->
<el-dialog
title="选择导出信息"
:visible.sync="dialogVisible"
width="960px">
<el-form style="border: 1px solid #F0F2F7;" :model="addMsg" ref="addMsg" label-width="100px">
<div style="box-sizing: border-box;background-color: #F3F5F6;width: 100%;padding-left: 20px;height: 50px;line-height: 50px;">
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
</div>
<div style="margin: 15px 0;"></div>
<div style="padding: 10px 25px 20px;">
<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
<el-checkbox style="margin-bottom:10px" v-for="city in cities" :label="city.Id" :key="city.Name">{{city.Name}}</el-checkbox>
</el-checkbox-group>
</div>
</el-form>
<div style="text-align:right;margin-top:20px">
<el-button size="small" type="primary" @click="Export">导出</el-button>
</div>
</el-dialog>
<!-- 审批同意或拒绝单个修改等级 -->
<el-dialog title="提示" :visible.sync="reasonDig" width="500px">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="0">
<template v-if="addMsg.Type==1 || addMsg.Type==2">
<p style="margin-bottom:10px">请输入原因</p>
<el-form-item>
<el-input size="small" v-model="addMsg.Remark"></el-input>
</el-form-item>
</template>
<el-form-item label-width="100px" v-if="addMsg.Type==4" label="分销商等级">
<el-select class="w200" v-model="addMsg.NewGradeId" size="small" placeholder="请选择">
<el-option label="默认等级" :value="0"></el-option>
<el-option
v-for="item in DropdownList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="reasonDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="czsubmitForm('addMsg')">确 定</el-button>
</span>
</el-dialog>
<!-- 批量修改 -->
<el-dialog custom-class="plxg" title="批量修改" :visible.sync="plDig" width="960px">
<span class="absoSpan">已选分销商{{checllen.length}}个</span>
<el-form class="app-batch" :model="addMsg" :rules="rules" ref="addMsg" label-width="100px">
<div class="batch-remark">注:每次只能修改一项,修改后点击确定即可生效。如需修改多项,需多次操作。</div>
<div style="margin-top:15px" flex="dir:left box:first">
<div flex="dir:top" class="batch-box-left">
<div flex="main:center" class="batch-div-active">
分销商等级
</div>
</div>
<div class="batch-box-right">
<el-form-item label="分销商等级">
<el-select class="w200" v-model="addMsg.NewGradeId" size="small" placeholder="请选择">
<el-option label="默认等级" :value="0"></el-option>
<el-option
v-for="item in DropdownList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</el-form-item>
</div>
</div>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="plDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="czsubmitForm('addMsg')">确 定</el-button>
</span>
</el-dialog>
<!-- 添加备注 -->
<el-dialog title="添加备注" :visible.sync="remarkDig" width="850px">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="0">
<p style="margin:0 0 15px 0">备注</p>
<el-form-item>
<el-input type="textarea" row="2" size="small" v-model="addMsg.Remark"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="remarkDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="czsubmitForm('addMsg')">确 定</el-button>
</span>
</el-dialog>
<!-- 添加分销商 -->
<el-dialog title="添加备注" :visible.sync="adduserDig" width="600px">
<el-form :model="adduserMsg" :rules="userrules" ref="adduserMsg" label-width="80px">
<el-form-item label="用户昵称">
<el-select size="small" v-model="adduserMsg.UserId" :filter-method="ChangeListName" filterable placeholder="请选择">
<el-option
v-for="item in userData"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="adduserDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="adduserForm('adduserMsg')">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
export default {
components: {
ChooseImg
},
data() {
return {
adduserDig:false,
remarkDig:false,
plDig:false,
activeName:'first',
czType:1,
changeState:false,
loading:false,
checkAll: false,
checkedCities: [],
cities: [],
cityOptions: [],
isIndeterminate: true,
dialogVisible:false,
value:'',
options:[],
tableData:[],
msg:{
pageIndex:1,
pageSize:15,
UserId:0,
AuditStatus:0,
GradeId:-1,
Name:'',
Source:0,
NickName:'',
Moblie:''
},
total:0,
platList:[],
memberGradeList:[],
userrules:{
UserId: [
{ required: true, message: '请选择用户', trigger: 'change' }
],
},
rules:{
Type: [
{ required: true, message: '请选择类型', trigger: 'change' }
],
Integral: [
{ required: true, message: '请输入积分', trigger: 'blur' }
],
},
addMsg:{
UserIds:0,
Type:1,
NewGradeId:0,
Remark:'',
},
imgurl:'',
AuditStatusList:[],
reasonDig:false,
DropdownList:[],
checktableList:[],
checllen:0,
usermsg:{
pageIndex:1,
pageSize:20,
Name:'',
Source:0,
MemberGrade:0,
Id:0,
Moblie:''
},
userData:[],
adduserMsg:{
UserId:'',
IsFormSelfApplication:2,
Name:'',
Mobile:'',
},
};
},
created() {
this.getList();
this.getplat();
this.getDown();
this.GetMemberGradeList();
this.GetAuditStatus();
this.GetDropdownList();
this.getUserList();
},
methods: {
// 申请
adduserForm (formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let cmd="/api/user/SetDistributorInfo";
this.apipost(cmd,this.adduserMsg,
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
this.adduserDig=false;
} else {
this.Error(res.data.message);
}
},
null
);
} else {
return false;
}
});
},
addUserBtn(){
this.adduserDig=true;
this.adduserMsg={
UserId:'',
IsFormSelfApplication:2,
Name:'',
Mobile:'',
}
},
ChangeListName(val){
this.usermsg.Name=val;
this.getUserList();
},
getUserList(){
this.loading=true;
this.apipost("/api/user/GetMemberUserDropDownList", this.usermsg, res => {
this.loading=false;
if(res.data.resultCode==1){
let pageData=res.data.data.pageData;
this.userData=pageData;
}
})
},
Delete(num,row){
this.addMsg.Type=num;
this.addMsg.UserIds=row.Id;
let that=this;
console.log("this.addMsg.Type",this.addMsg.Type)
that.Confirm("是否删除?", function () {
that.apipost(
"/api/user/SetDistributorAudit",
that.addMsg,
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
},
null
);
});
},
plSet(){
let arr=this.unique(this.checktableList);
this.checllen=this.unique(this.checktableList);
if(arr.length==0){
this.Error("至少选择一项!");
return;
}
this.addMsg.UserIds= arr.join(",");
this.plDig=true;
this.addMsg.Type=4;
},
// 数组去重
unique(arr) {
return arr.filter(function(item, index, arr) {
//当前元素,在原始数组中的第一个索引==当前索引值,否则返回当前元素
return arr.indexOf(item, 0) === index;
});
},
CheckAllTable(selection){
selection.forEach(item=>{
this.checktableList.push(item.Id);
})
},
SingelCheck(selection, row){
this.checktableList.push(row.Id);
},
openRemark(num,row){
this.addMsg.Type=num;
this.addMsg.UserIds=row.Id;
this.addMsg.Remark=row.Remark;
this.remarkDig=true;
},
openReason(num,row){
this.addMsg.Type=num;
this.addMsg.UserIds=row.Id;
this.addMsg.NewGradeId=row.GradeId;
this.reasonDig=true;
},
handleClick(val){
this.msg.AuditStatus=val.$attrs.dataId;
},
SelectId(msg){
this.changeState=false;
this.addMsg.Image=msg.id;
this.imgurl="http://viitto-1301420277.cos.ap-chengdu.myqcloud.com"+msg.url;
},
EditgoUrl(row){
this.$router.push({
name: 'usersListEdit',
query: {
UserId:row.Id,
blank: "y"
}
});
},
czsubmitForm (formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let cmd="/api/user/SetDistributorAudit";
this.apipost(cmd,this.addMsg,
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
this.reasonDig=false;
this.remarkDig=false;
this.plDig=false;
} else {
this.Error(res.data.message);
}
},
null
);
} else {
return false;
}
});
},
openChangeDig(){
this.changeState=true;
setTimeout(()=>{
this.$refs.mychild.InitData(this.czType);
},10)
},
Export(){
this.msg.ExcelEnumIds=this.checkedCities;
console.log("this.msg",this.msg)
let msg = JSON.parse(JSON.stringify(this.msg));
this.JavaGetLocalFile(
"/api/user/GetDistributorListToExcel",
msg,
"分销商.xls"
);
},
ChangeOpenidState(index,row){
this.tableData[index].OpenIdState=!this.tableData[index].OpenIdState;
},
getList(){
this.loading=true;
this.apipost("/api/user/GetDistributorInfoPageList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.total=res.data.data.count;
let pageData=res.data.data.pageData;
this.tableData=pageData;
console.log("this.tableData",this.tableData)
}
})
},
GetDropdownList(){
let msg={
Id:0,
Grade:0,
Name:'',
Enabled:0,
}
this.apipost("/api/user/GetDistributorGradeDropdownList",msg, res => {
this.DropdownList=res.data.data;
})
},
GetAuditStatus(){
this.apipost("/api/user/GetDistributorAuditStatusEnumList",{}, res => {
this.AuditStatusList=res.data.data;
console.log("AuditStatusList",this.AuditStatusList)
})
},
getDown(){
this.cityOptions=[];
this.apipost("/api/user/GetDistributorExportEnumList",{}, res => {
this.cities=res.data.data;
let data=res.data.data;
data.forEach(item=>{
this.cityOptions.push(item.Id)
})
})
},
GetMemberGradeList(){
let msg={
Grade:0,
Name:'',
Enabled:0,
};
this.apipost("/api/user/GetMemberGradeList",msg, res => {
this.memberGradeList=res.data.data;
})
},
getplat(){
this.apipost("/api/user/GetMemberUserSourceEnumList",{}, res => {
this.platList=res.data.data;
})
},
handleCheckAllChange(val) {
this.checkedCities = val ? this.cityOptions : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
},
mounted() {
}
};
</script>
<style>
.table_samll .cell img{
margin-right:10px;
}
.plxg .el-dialog__body{
padding-top:10px!important;
}
.plxg .app-batch .batch-box-left div {
padding: 5px 0;
margin: 5px 0;
cursor: pointer;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.plxg .app-batch .batch-div-active {
background-color: #e2e2e2;
}
.plxg .app-batch .batch-box-right {
padding: 5px 20px;
}
.plxg .app-batch .batch-box-left {
width: 120px;
border-right: 1px solid #e2e2e2;
padding: 0 20px;
}
.plxg .app-batch .batch-remark {
margin-top: 5px;
color: #999999;
font-size: 14px;
}
.distributors .absoSpan{
position: absolute;
top:22px;
left:100px;
}
.table_samll td, .table_samll th{
padding: 8px 0!important;
font-size:12px;
}
.usersList .remark_name {
color: #888888;
font-size: 12px;
margin-left: 10px;
float: right;
}
.usersList .app-image{
background-position: center center;
width: 50px;
height: 50px;
border-radius:0%;
float: left;
margin-right: 8px;
}
.usersList .blue{
color:#409EFF;
}
.usersList .content .searchInput{
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.usersList .content .searchInput .el-input__inner{
border:none;outline:none;
height: 30px;
line-height: 30px;
}
.usersList .content .searchInput{
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width:250px;
margin-right: 20px;
}
.usersList .content{
background: #fff;
margin-top:10px;
padding: 20px;
box-sizing: border-box;
}
</style>
<template>
<div v-loading="loading" class="setMember usersList usersListEdit">
<div class="head-title">
<span @click="goUrl" class="blue point">分销商等级</span> / 编辑分销商等级
</div>
<div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px">
<el-form-item label="分销商等级选择" prop="Grade">
<el-select style="width:500px;" size="small" v-model="addMsg.Grade" placeholder="请选择">
<el-option
v-for="(item,index) in 10"
:key="index"
:label="`等级${index+1}`"
:value="index+1">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="分销商等级名称" prop="Name">
<el-input v-model="addMsg.Name" style="width:500px" size="small"></el-input>
</el-form-item>
<el-form-item label="是否启用自动升级">
{{addMsg.IsAutoUpGrade}}
<el-switch
v-model="addMsg.IsAutoUpGrade"
active-color="#409EFF"
:active-value="1"
:inactive-value="2">
</el-switch>
</el-form-item>
<el-form-item v-if="addMsg.IsAutoUpGrade==1" label="升级条件">
<el-radio v-for="(item,index) in gradeList" v-model="addMsg.UpGradeCondition" :key="index" :label="item.Id">{{item.Name}}</el-radio>
</el-form-item>
<el-form-item prop="ReferralsNumber" v-if="addMsg.IsAutoUpGrade==1 && addMsg.UpGradeCondition==1" class="commonLabel" label="下线用户数">
<el-input v-model="addMsg.ReferralsNumber" style="width:500px;" type="number" min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">%</el-button>
</el-input>
</el-form-item>
<el-form-item prop="TotalCommission" v-if="addMsg.IsAutoUpGrade==1 && addMsg.UpGradeCondition==2" class="commonLabel" label="累积佣金">
<el-input v-model="addMsg.TotalCommission" style="width:500px;" type="number" min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">%</el-button>
</el-input>
</el-form-item>
<el-form-item prop="CommissionWithdrawn" v-if="addMsg.IsAutoUpGrade==1 && addMsg.UpGradeCondition==3" class="commonLabel" label="已提现佣金">
<el-input v-model="addMsg.CommissionWithdrawn" style="width:500px;" type="number" min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">%</el-button>
</el-input>
</el-form-item>
<el-form-item label="分销佣金类型">
<el-radio v-model="addMsg.DistributionCommissionType" :label="1">百分比</el-radio>
<el-radio v-model="addMsg.DistributionCommissionType" :label="2">固定金额</el-radio>
</el-form-item>
<el-form-item class="commonLabel" label="一级佣金">
<el-input v-model="addMsg.OneCommission" style="width:500px;" type="number" min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">%</el-button>
</el-input>
</el-form-item>
<el-form-item v-if="tierInfo.DistributorTier==2 || tierInfo.DistributorTier==3" class="commonLabel" label="二级佣金">
<el-input v-model="addMsg.TwoCommission" style="width:500px;" type="number" min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">%</el-button>
</el-input>
</el-form-item>
<el-form-item v-if="tierInfo.DistributorTier==3" class="commonLabel" label="三级佣金">
<el-input v-model="addMsg.ThreeCommission" style="width:500px;" type="number" min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">%</el-button>
</el-input>
</el-form-item>
<el-form-item label="是否启用" prop="Enabled">
<el-switch
v-model="addMsg.Enabled"
active-color="#409EFF"
:active-value="1"
:inactive-value="2">
</el-switch>
</el-form-item>
<el-form-item label="等级说明" prop="GradeExplain">
<el-input type="textarea" row="2" v-model="addMsg.GradeExplain" style="width:500px" maxlength="80" show-word-limit></el-input>
</el-form-item>
</el-form>
</div>
<div style="margin-top:20px">
<el-button size="small" type="primary" @click="Save('addMsg')">保存</el-button>
</div>
</div>
</template>
<script>
export default {
data() {
return {
addMsg:{
Id:'',
Grade:1,
Name:'',
IsAutoUpGrade:1,
UpGradeCondition:1,
ReferralsNumber:0,
TotalCommission:0,
CommissionWithdrawn:0,
DistributionCommissionType:1,
OneCommission:0,
TwoCommission:0,
ThreeCommission:0,
Enabled:1,
GradeExplain:'',
},
val:'',
value:'',
total:0,
rules: {
Grade: [
{ required: true, message: '请选择分销商等级', trigger: 'change' }
],
Name: [
{ required: true, message: '请输入分销商等级名称', trigger: 'blur' }
],
GradeExplain: [
{ required: true, message: '请输入等级说明', trigger: 'blur' }
],
ReferralsNumber: [
{ required: true, message: '请输入下线用户数', trigger: 'blur' }
],
TotalCommission: [
{ required: true, message: '请输入累积佣金', trigger: 'blur' }
],
CommissionWithdrawn: [
{ required: true, message: '请输入已提现佣金', trigger: 'blur' }
],
Enabled:[
{ required: true, message: '请选择是否启用', trigger: 'change' }
],
},
GradeId:'',
loading:false,
tierInfo:{},
gradeList:[],
};
},
created() {
if(this.$route.query.UserId){
this.GradeId=this.$route.query.UserId;
this.getData()
}
this.GetTierInfo();
this.getgradeList();
},
methods: {
Save(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost("/api/user/SetDistributorGradeInfo",this.addMsg, res => {
if(res.data.resultCode==1){
this.goUrl();
}else {
this.Error(res.data.message);
}
})
} else {
return false;
}
});
},
openChangeDig(){
this.changeState=true;
},
goUrl(){
this.$router.push({
name: 'distributorLevel',
query: {
blank: "y"
}
});
},
GetTierInfo(){
this.apipost("/api/user/GetDistributorTierInfo",{}, res => {
this.tierInfo=res.data.data;
})
},
getData(){
this.loading=true;
this.apipost("/api/user/GetDistributorGradeInfo",{GradeId:this.GradeId}, res => {
this.loading=false;
this.addMsg=res.data.data;
})
},
getgradeList(){
this.apipost("/api/user/GetDistrbutorGradeUpdateEnumList",{}, res => {
this.gradeList=res.data.data;
console.log("this.gradeList",this.gradeList)
})
},
},
mounted() {
}
};
</script>
<style>
.usersListEdit .tip {
margin-left: 10px;
display: inline-block;
height: 30px;
line-height: 30px;
color: #ff4544;
background-color: #FEF0F0;
padding: 0 20px;
border-radius: 5px;
}
.usersListEdit .app-image{
background-size: cover; background-position: center center; width: 80px; height: 80px; border-radius: 0%;
}
.setMember .setTable .el-table__body .cell{
display: flex;
align-items: center;
}
.setMember .commonLabel .el-form-item__label{
margin-top: -4px;
}
.setMember .discount .el-form-item__label{
padding-right: 30px;
margin-top: -4px;
}
.setMember .el-form-item .elzk{
position: absolute;
left: -25px;
top:8px;
}
.setMember .el-form-item{
position: relative;
}
.usersList .blue{
color:#409EFF;
}
.usersList .content{
background: #fff;
margin-top:10px;
padding: 20px;
box-sizing: border-box;
}
</style>
...@@ -102,6 +102,24 @@ export default new Router({ ...@@ -102,6 +102,24 @@ export default new Router({
name: 'customSet', name: 'customSet',
component: resolve => require(['@/components/UserMan/customSet'], resolve), component: resolve => require(['@/components/UserMan/customSet'], resolve),
}, },
// 用户管理 分销商管理 分销商等级
{
path: '/distributorLevel',
name: 'distributorLevel',
component: resolve => require(['@/components/UserMan/distributorLevel'], resolve),
},
// 用户管理 分销商管理 新增或编辑分销商等级
{
path: '/setDistributorLevel',
name: 'setDistributorLevel',
component: resolve => require(['@/components/UserMan/setDistributorLevel'], resolve),
},
// 用户管理 分销商管理 分销商
{
path: '/distributors',
name: 'distributors',
component: resolve => require(['@/components/UserMan/distributors'], resolve),
},
// 商品管理 素材管理 // 商品管理 素材管理
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment