xiaoyong931011
2021-03-13 626e9811c77cd89182d16d12d3c5890904daea02
分销员后台0313
4 files added
6 files modified
656 ■■■■ changed files
zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java 39 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanApplyDao.java 12 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanDetailDto.java 23 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanApplyService.java 26 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/SalesmanBasicDetailVo.java 45 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopCustomDetailVo.java 27 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanDetailVo.java 5 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml 78 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-update.html 397 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html 4 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java
@@ -16,10 +16,14 @@
import com.matrix.system.fenxiao.dto.ExamineSaleManApplyDto;
import com.matrix.system.fenxiao.dto.ShopSalesmanAppliingDto;
import com.matrix.system.fenxiao.dto.ShopSalesmanApplyDto;
import com.matrix.system.fenxiao.dto.ShopSalesmanDetailDto;
import com.matrix.system.fenxiao.entity.ShopSalesmanApply;
import com.matrix.system.fenxiao.service.ShopSalesmanApplyService;
import com.matrix.system.fenxiao.vo.SalesmanBasicDetailVo;
import com.matrix.system.fenxiao.vo.ShopCustomDetailVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanDetailVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanGradeVo;
import com.matrix.system.hive.action.util.QueryUtil;
import io.swagger.annotations.ApiOperation;
@@ -40,6 +44,41 @@
    private ShopSalesmanApplyDao shopSalesmanApplyDao;
    @Autowired
    private BizUserDao bizUserDao;
    /**
     * 分销员详情页面信息
     */
    @ApiOperation(value = "分销员详情页面信息")
    @ApiResponses({
            @ApiResponse(code = 200, message = "OK",  response = ShopSalesmanDetailVo.class)
    })
    @PostMapping(value = "/findShopSalesmanDetail")
    public @ResponseBody
    AjaxResult findShopSalesmanDetail(@RequestBody ShopSalesmanDetailDto shopSalesmanDetailDto) {
        //设置用户公司ID
        QueryUtil.setQueryLimitCom(shopSalesmanDetailDto);
        AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
        //根据OPENID查询基础信息
        String userId = shopSalesmanDetailDto.getUserId();
        SalesmanBasicDetailVo salesmanBasicDetailVo = shopSalesmanApplyService.selectShopSalesmanDetailByOpenId(userId);
        result.putInMap("basicdetail", salesmanBasicDetailVo);
        //排序
        if(StringUtils.isBlank(shopSalesmanDetailDto.getSort())){
            shopSalesmanDetailDto.setSort("create_time");
            shopSalesmanDetailDto.setOrder("desc");
        }
        //查询绑定客户信息
        Page<ShopCustomDetailVo> page = new Page(shopSalesmanDetailDto.getPageNum(), shopSalesmanDetailDto.getPageSize());
        IPage<ShopCustomDetailVo> customDetailRows = shopSalesmanApplyService.findCustomDetail(page,shopSalesmanDetailDto);
        result.putInMap("customDetailRecords", customDetailRows.getRecords());
        result.putInMap("customDetailTotal", customDetailRows.getTotal());
        //查询邀请下级信息
        Page<ShopCustomDetailVo> pageLow = new Page(shopSalesmanDetailDto.getPageNum(), shopSalesmanDetailDto.getPageSize());
        IPage<ShopCustomDetailVo> customLowRows = shopSalesmanApplyService.findCustomLow(pageLow,shopSalesmanDetailDto);
        result.putInMap("customLowRecords", customLowRows.getRecords());
        result.putInMap("customLowTotal", customLowRows.getTotal());
        return result;
    }
    /**
     * 查询分销员审核记录
zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanApplyDao.java
@@ -5,7 +5,10 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.matrix.system.fenxiao.dto.ShopSalesmanAppliingDto;
import com.matrix.system.fenxiao.dto.ShopSalesmanApplyDto;
import com.matrix.system.fenxiao.dto.ShopSalesmanDetailDto;
import com.matrix.system.fenxiao.entity.ShopSalesmanApply;
import com.matrix.system.fenxiao.vo.SalesmanBasicDetailVo;
import com.matrix.system.fenxiao.vo.ShopCustomDetailVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo;
import com.matrix.system.shopXcx.vo.SalesmanCenterInfo;
@@ -33,4 +36,13 @@
            @Param("record")ShopSalesmanAppliingDto shopSalesmanAppliingDto);
    SalesmanCenterInfo selectSalesmanCenterInfo(String openId);
    SalesmanBasicDetailVo selectShopSalesmanDetailByOpenId(@Param("userId")String userId, @Param("companyId")Long companyId);
    IPage<ShopCustomDetailVo> findCustomDetail(Page<ShopCustomDetailVo> page,
                                               @Param("record")ShopSalesmanDetailDto shopSalesmanDetailDto);
    IPage<ShopCustomDetailVo> findCustomLow(Page<ShopCustomDetailVo> pageLow,
            @Param("record")ShopSalesmanDetailDto shopSalesmanDetailDto);
}
zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanDetailDto.java
New file
@@ -0,0 +1,23 @@
package com.matrix.system.fenxiao.dto;
import com.matrix.core.pojo.BasePageQueryDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "ShopSalesmanDetailDto", description = "查询参数")
public class ShopSalesmanDetailDto extends BasePageQueryDto {
    @ApiModelProperty(value ="会员姓名")
    private String userName;
    @ApiModelProperty(value ="会员OPENID")
    private String userId;
    @ApiModelProperty(hidden = true)
    private Long companyId;
}
zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanApplyService.java
@@ -17,8 +17,11 @@
import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao;
import com.matrix.system.fenxiao.dto.ShopSalesmanAppliingDto;
import com.matrix.system.fenxiao.dto.ShopSalesmanApplyDto;
import com.matrix.system.fenxiao.dto.ShopSalesmanDetailDto;
import com.matrix.system.fenxiao.entity.ShopSalesmanApply;
import com.matrix.system.fenxiao.entity.ShopSalesmanGrade;
import com.matrix.system.fenxiao.vo.SalesmanBasicDetailVo;
import com.matrix.system.fenxiao.vo.ShopCustomDetailVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanGradeVo;
@@ -161,6 +164,29 @@
        bizUserDao.updateByModel(bizUser);
    }
    public IPage<ShopSalesmanApplyVo> findShopSalesmanDetail(Page<ShopSalesmanApplyVo> page,
            ShopSalesmanDetailDto shopSalesmanDetailDto) {
        // TODO Auto-generated method stub
        return null;
    }
    public SalesmanBasicDetailVo selectShopSalesmanDetailByOpenId(String userId) {
        //获取个人信息
        BizUser bizUser = bizUserDao.findByOpenId(userId);
        Long companyId = bizUser.getCompanyId();
        return shopSalesmanApplyDao.selectShopSalesmanDetailByOpenId(userId,companyId);
    }
    public IPage<ShopCustomDetailVo> findCustomDetail(Page<ShopCustomDetailVo> page,
                                                      ShopSalesmanDetailDto shopSalesmanDetailDto) {
        return shopSalesmanApplyDao.findCustomDetail(page,shopSalesmanDetailDto);
    }
    public IPage<ShopCustomDetailVo> findCustomLow(Page<ShopCustomDetailVo> pageLow,
            ShopSalesmanDetailDto shopSalesmanDetailDto) {
        return shopSalesmanApplyDao.findCustomLow(pageLow,shopSalesmanDetailDto);
    }
    
    
    
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/SalesmanBasicDetailVo.java
New file
@@ -0,0 +1,45 @@
package com.matrix.system.fenxiao.vo;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "SalesmanBasicDetailVo", description = "分销员基本信息的返参")
public class SalesmanBasicDetailVo {
    @ApiModelProperty(value = "申请用户id")
    private String  userId;
    @ApiModelProperty(value = "头像")
    private String avatarUrl;
    @ApiModelProperty(value = "分销员")
    private String nickname;
    @ApiModelProperty(value = "等级")
    private String grade;
    @ApiModelProperty(value = "手机号码")
    private String phone;
    @ApiModelProperty(value = "加入时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
    private Date createTime;
    @ApiModelProperty(value = "邀请人")
    private String parentUser;
    @ApiModelProperty(value = "申请方式1、自主申请,2、自动添加,3上级邀请,4、手动添加(来源)")
    private Integer  applyWay;
    @ApiModelProperty(value = "申请状态1、待审核,2通过,3未通过")
    private Integer  applyStatus;
    @ApiModelProperty(value = "绑定客户")
    private Integer lowerLevelNum;
    @ApiModelProperty(value = "邀请下级")
    private Integer invitedNum;
    @ApiModelProperty(value = "累计收益")
    private BigDecimal totalRevenue;
    @ApiModelProperty(value = "待结算")
    private BigDecimal balance;
}
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopCustomDetailVo.java
New file
@@ -0,0 +1,27 @@
package com.matrix.system.fenxiao.vo;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "ShopCustomDetailVo", description = "分销员客户基本信息的返参")
public class ShopCustomDetailVo {
    @ApiModelProperty(value = "申请用户id")
    private String  userId;
    @ApiModelProperty(value = "头像")
    private String avatarUrl;
    @ApiModelProperty(value = "分销员")
    private String nickname;
    @ApiModelProperty(value = "加入时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
    private Date createTime;
    @ApiModelProperty(value = "申请方式1、自主申请,2、自动添加,3上级邀请,4、手动添加(来源)")
    private Integer  applyWay;
}
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanDetailVo.java
New file
@@ -0,0 +1,5 @@
package com.matrix.system.fenxiao.vo;
public class ShopSalesmanDetailVo {
}
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml
@@ -192,4 +192,82 @@
    </select>
    <select id="selectShopSalesmanDetailByOpenId" resultType="com.matrix.system.fenxiao.vo.SalesmanBasicDetailVo">
        SELECT
        a.user_id userId,
        b.avatar_url avatarUrl,
        b.nick_name nickname,
        g.NAME grade,
        b.phone_number phone,
        (SELECT s.nick_name FROM biz_user s
        WHERE s.open_id = a.parent_user_id ) parentUser,
        ( SELECT COUNT(*) FROM biz_user
        WHERE parent_open_id = a.user_id AND is_sales != 1 ) lowerLevelNum,
        ( SELECT COUNT(*) FROM biz_user
        WHERE parent_open_id = a.user_id AND is_sales = 1 ) invitedNum,
        ( SELECT IFNULL(sum(IFNULL(amount, 0)), 0) FROM shop_salesman_order
        WHERE user_id = a.user_id AND order_status = 2 AND sales_user_id = a.user_id ) totalRevenue,
        ( SELECT IFNULL(sum(IFNULL(amount, 0)), 0) FROM shop_salesman_order
        WHERE user_id = a.user_id AND order_status = 1 AND sales_user_id = a.user_id ) balance,
        a.create_time createTime,
        a.apply_status applyStatus,
        a.apply_way applyWay
        FROM
        shop_salesman_apply a
        LEFT JOIN biz_user b ON a.user_id = b.open_id
        LEFT JOIN shop_salesman_grade g ON a.grade_id = g.id
        <where>
            a.company_id=#{companyId} and a.user_id = #{userId}
        </where>
    </select>
    <select id="findCustomDetail" resultType="com.matrix.system.fenxiao.vo.ShopCustomDetailVo">
        SELECT
        a.user_id userId,
        b.avatar_url avatarUrl,
        b.nick_name nickname,
        a.create_time createTime,
        a.apply_way applyWay
        FROM
        shop_salesman_apply a
        LEFT JOIN biz_user b ON b.parent_open_id = a.user_id
        <where>
            a.company_id = #{record.companyId}
            AND b.is_sales != 1
            and b.parent_open_id = #{record.userId}
            <if test="record.userName != null and record.userName != ''">
                and b.nick_name like concat('%',#{record.userName},'%')
            </if>
        </where>
        <if test="record.sort !=null">
            order by
            a.${record.sort} ${record.order}
        </if>
    </select>
    <select id="findCustomLow" resultType="com.matrix.system.fenxiao.vo.ShopCustomDetailVo">
        SELECT
        a.user_id userId,
        b.avatar_url avatarUrl,
        b.nick_name nickname,
        a.create_time createTime,
        a.apply_way applyWay
        FROM
        shop_salesman_apply a
        LEFT JOIN biz_user b ON b.parent_open_id = a.user_id
        <where>
            a.company_id = #{record.companyId}
            AND b.is_sales = 1
            and b.parent_open_id = #{record.userId}
            <if test="record.userName != null and record.userName != ''">
                and b.nick_name like concat('%',#{record.userName},'%')
            </if>
        </where>
        <if test="record.sort !=null">
            order by
            a.${record.sort} ${record.order}
        </if>
    </select>
</mapper>
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-update.html
@@ -29,64 +29,222 @@
            margin: 0px 0px 10px 0px;
            text-align: right;
        }
        .el-aside {
            color: #333;
            line-height: 50px;
        }
        .el-main {
            color: #333;
            line-height: 50px;
        }
    </style>
</head>
<body>
<div class="ibox-content" id="app" v-cloak>
    <el-row>
        <p class="el-big-title">个人详情</p>
    </el-row>
    <el-row>
        <el-col>
            <template>
                <img :src="detailVo.avatarUrl" width="50" height="50" class="head_pic"/>
            </template>
        </el-col>
        <el-col>
            <div>张三</div>
            <div>
                <el-form-item label="分销员等级" prop="salemanGrade">
                    <el-select v-model="form.salemanGrade"  placeholder="请选择" filterable allow-create>
                        <el-option v-for="item in salemanGradeList " :key="item.id" :label="item.name" :value="item.id">
                        </el-option>
    <el-container>
        <el-aside width="200px" style="display:flex;align-items: center;">
            <el-avatar :size="100" :src="basicdetail.avatarUrl" style="display:flex;align-items: center;margin-left: 50px"></el-avatar>
        </el-aside>
        <el-main>
            <el-row style="display:flex;align-items: center;">
                <el-col :span="3" style="display:flex;align-items: center;">
                    <span style="font-size: 20px;">{{basicdetail.nickname}} </span>
                </el-col>
                <el-col :span="3">
                    <el-select v-model="basicdetail.grade" @focus="getDatalist()" placeholder="请选择" filterable allow-create>
                        <el-option v-for="item in salemanGradeList " :key="item.id" :label="item.name" :value="item.id"></el-option>
                    </el-select>
                </el-form-item>
            </div>
        </el-col>
    </el-row>
    <el-row>
        <el-col>
            <div>手机号码:</div>
            <div>加入时间:</div>
            <div>邀请人:</div>
            <div>来源:</div>
        </el-col>
    </el-row>
    <el-row>
        <el-row>
            <el-col :span="24">
                <el-form-item>
                    <el-col class="line" :span="6" style="text-align: center">绑定客户</el-col>
                    <el-col class="line" :span="6" style="text-align: center">邀请下级</el-col>
                    <el-col class="line" :span="6" style="text-align: center">累计收益</el-col>
                    <el-col class="line" :span="6" style="text-align: center">待结算</el-col>
                </el-form-item>
                </el-col>
                <el-col :span="18">
                </el-col>
            </el-row>
            <el-row style="display:flex;">
                <el-col>
                    <span>
                        手机号码:{{basicdetail.phone}}   |
                        加入时间:{{basicdetail.createTime}}   |
                        邀请人:{{basicdetail.parentUser}}   |
                        来源:
                            <span v-if="basicdetail.applyWay == 1">自主申请</span>
                            <span v-if="basicdetail.applyWay == 2">自动添加</span>
                            <span v-if="basicdetail.applyWay == 3">上级邀请</span>
                            <span v-if="basicdetail.applyWay == 4">手动添加</span>   |
                        状态:
                            <span v-if="basicdetail.applyStatus == 1">待审核</span>
                            <span v-if="basicdetail.applyStatus == 2">通过</span>
                            <span v-if="basicdetail.applyStatus == 3">未通过</span>
                    </span>
                </el-col>
            </el-row>
        </el-main>
    </el-container>
    <el-row style="padding: 30px;">
        <el-row :gutter="100">
            <el-col class="line" :span="6" style="text-align: center">
                <el-card class="box-card" style="background-color: #eee;border-radius: 30px;">
                    <div>绑定客户</div>
                    <div style="padding: 5px;font-size: 18px;">{{basicdetail.lowerLevelNum}}人</div>
                </el-card >
            </el-col>
        </el-row>
        <el-row>
            <el-col :span="24">
                <el-form-item>
                    <el-col class="line" :span="6" style="text-align: center">0</el-col>
                    <el-col class="line" :span="6" style="text-align: center">0</el-col>
                    <el-col class="line" :span="6" style="text-align: center">0</el-col>
                    <el-col class="line" :span="6" style="text-align: center">0</el-col>
                </el-form-item>
            <el-col class="line" :span="6" style="text-align: center">
                <el-card class="box-card" style="background-color: #eee;border-radius: 30px;">
                    <div>邀请下级</div>
                    <div style="padding: 5px;font-size: 18px;">{{basicdetail.invitedNum}}人</div>
                </el-card >
            </el-col>
            <el-col class="line" :span="6" style="text-align: center">
                <el-card class="box-card" style="background-color: #eee;border-radius: 30px;">
                    <div>累计收益</div>
                    <div style="padding: 5px;font-size: 18px;">{{basicdetail.totalRevenue}}元</div>
                </el-card >
            </el-col>
            <el-col class="line" :span="6" style="text-align: center">
                <el-card class="box-card" style="background-color: #eee;border-radius: 30px;">
                    <div>待结算</div>
                    <div style="padding: 5px;font-size: 18px;">{{basicdetail.balance}}元</div>
                </el-card >
            </el-col>
        </el-row>
    </el-row>
    <el-row>
        <el-tabs v-model="activeName" >
            <el-tab-pane label="分销员管理" name="first">
                <el-row style="display:flex;align-items: center;">
                    <el-form ref="form" :model="form" inline >
                        <el-form-item prop="userName">
                            <el-input v-model="form.userName" placeholder="请输入会员姓名"></el-input>
                        </el-form-item>
                        <el-button type="primary" @click="search" >搜索</el-button>
                        <el-button @click="resetForm('form')">重置</el-button>
                    </el-form>
                </el-row>
                <el-row class="table-style" >
                    <el-table id="proj" :data="fxyList.rows"  :height="height" stripe:true  @sort-change="sortChange">
                        <el-table-column
                                type="selection">
                        </el-table-column>
                        <el-table-column
                                label="头像" width="100">
                            <template slot-scope="scope">
                                <img :src="scope.row.avatarUrl" width="40" height="40" class="head_pic"/>
                            </template>
                        </el-table-column>
                        <el-table-column
                                prop="nickname"
                                label="分销员" width="100">
                        </el-table-column>
                        <el-table-column
                                prop="createTime"
                                label="绑定时间">
                        </el-table-column>
                        <el-table-column
                                label="绑定方式">
                            <template slot-scope="scope">
                                <span v-if="scope.row.applyWay == 1">自主申请</span>
                                <span v-if="scope.row.applyWay == 2">自动添加</span>
                                <span v-if="scope.row.applyWay == 3">上级邀请</span>
                                <span v-if="scope.row.applyWay == 4">手动添加</span>
                            </template>
                        </el-table-column>
                        <el-table-column
                                label="客户状态">
                            <template slot-scope="scope">
                            </template>
                        </el-table-column>
                        <el-table-column label="操作" width="240">
                            <template slot-scope="scope">
                                <el-row style="display:flex;">
                                    <el-button type="primary" size="mini" @click="openExamineSsaleManApply(scope.row)">解绑</el-button>
                                </el-row>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-row>
                <el-row class="paginationStyle"  >
                    <el-pagination background
                                   @size-change="changePageSize"
                                   @current-change="changeCurrentPage"
                                   :current-page="fxyList.currentPage"
                                   :page-sizes="[10, 20, 30, 50]"
                                   :page-size="fxyList.pageSize"
                                   layout="total, sizes, prev, pager, next, jumper"
                                   :total="fxyList.total">
                    </el-pagination>
                </el-row>
            </el-tab-pane>
            <el-tab-pane label="邀请下级" name="second">
                <el-row style="display:flex;align-items: center;">
                    <el-form ref="formlow" :model="formlow" inline >
                        <el-form-item prop="userName">
                            <el-input v-model="formlow.userName" placeholder="请输入会员姓名"></el-input>
                        </el-form-item>
                        <el-button type="primary" @click="searchlow" >搜索</el-button>
                        <el-button @click="resetFormlow('formlow')">重置</el-button>
                    </el-form>
                </el-row>
                <el-row class="table-style" >
                    <el-table id="proj" :data="lowLevelList.rows"  :height="height" stripe:true  @sort-change="sortChange">
                        <el-table-column
                                type="selection">
                        </el-table-column>
                        <el-table-column
                                label="头像" width="100">
                            <template slot-scope="scope">
                                <img :src="scope.row.avatarUrl" width="40" height="40" class="head_pic"/>
                            </template>
                        </el-table-column>
                        <el-table-column
                                prop="nickname"
                                label="分销员" width="100">
                        </el-table-column>
                        <el-table-column
                                prop="createTime"
                                label="绑定时间">
                        </el-table-column>
                        <el-table-column
                                label="绑定方式">
                            <template slot-scope="scope">
                                <span v-if="scope.row.applyWay == 1">自主申请</span>
                                <span v-if="scope.row.applyWay == 2">自动添加</span>
                                <span v-if="scope.row.applyWay == 3">上级邀请</span>
                                <span v-if="scope.row.applyWay == 4">手动添加</span>
                            </template>
                        </el-table-column>
                        <el-table-column
                                label="客户状态">
                            <template slot-scope="scope">
                            </template>
                        </el-table-column>
                        <el-table-column label="操作" width="240">
                            <template slot-scope="scope">
                                <el-row style="display:flex;">
                                    <el-button type="primary" size="mini" @click="openExamineSsaleManApply(scope.row)">解绑</el-button>
                                </el-row>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-row>
                <el-row class="paginationStyle"  >
                    <el-pagination background
                                   @size-change="changePageSizelow"
                                   @current-change="changeCurrentPagelow"
                                   :current-page="lowLevelList.currentPage"
                                   :page-sizes="[10, 20, 30, 50]"
                                   :page-size="lowLevelList.pageSize"
                                   layout="total, sizes, prev, pager, next, jumper"
                                   :total="lowLevelList.total">
                    </el-pagination>
                </el-row>
            </el-tab-pane>
        </el-tabs>
    </el-row>
</div>
</body>
<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
@@ -100,19 +258,15 @@
<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
<script>
    //获取传输的USERID对象
    var userId = $.query.get("userId");
    var app = new Vue({
        el: '#app',
        data: {
            activeName: 'first',
            shenheAgreeType : 2,
            shenheDisagreeType : 3,
            form:{
                shenheState:'',
                salemanGrade:'',
                userName:'',
                order:'',
                sort:''
            },
            //条件查询审核状态
            shenheStateList:[
                {value:'',label:'全部'},
@@ -120,9 +274,27 @@
                {value:2,label:'通过'},
                {value:3,label:'未通过'}
            ],
            basicdetail:{},
            //条件查询分销员等级
            form:{
                userName:'',
                order:'',
                sort:''
            },
            salemanGradeList:[],
            fxyList:{
                rows:[],
                total:0,
                pageSize:10,
                currentPage:1,
            },
            formlow:{
                userName:'',
                order:'',
                sort:''
            },
            lowLevelList:{
                rows:[],
                total:0,
                pageSize:10,
@@ -140,9 +312,11 @@
            //加载分类
            loadInfo() {
                let _this = this;
                //_this.loadParamSetting();
                //_this.getSalemanGradeList();
                _this.loadParamSetting();
                _this.loadParamSettinglow();
                _this.getDatalist();
            },
            //绑定客户
            loadParamSetting() {
                let _this = this;
                let data=_this.getRequestParam();
@@ -151,15 +325,88 @@
                AjaxProxy.requst({
                    app: _this,
                    data:data,
                    url: basePath + '/fenXiao/fenXiaoUser/findShopSalesmanApplyList',
                    url: basePath + '/fenXiao/fenXiaoUser/findShopSalesmanDetail',
                    callback: function (data) {
                        _this.fxyList.rows = data.rows;
                        _this.fxyList.total=data.total;
                        _this.basicdetail = data.mapInfo.basicdetail;
                        _this.fxyList.rows = data.mapInfo.customDetailRecords;
                        _this.fxyList.total = data.mapInfo.customDetailTotal;
                    }
                });
            },
            // 下拉框数据源---分销员等级
            getSalemanGradeList() {
            //查询参数
            getRequestParam(){
                let _this = this;
                return   {
                    userName:_this.form.userName,
                    order:_this.form.order,
                    sort:_this.form.sort,
                    userId:userId,
                }
            },
            //查询
            search:function(){
                this.fxyList.currentPage=1;
                this.loadInfo();
            },
            //重置
            resetForm(formName) {
                this.$refs[formName].resetFields();
            },
            changePageSize(val) {
                this.fxyList.pageSize = val;
                this.loadInfo();
            },
            changeCurrentPage(val) {
                this.fxyList.currentPage = val;
                this.loadInfo();
            },
            //邀请下级
            loadParamSettinglow() {
                let _this = this;
                let data=_this.getRequestParamlow();
                data.pageSize=_this.lowLevelList.pageSize;
                data.pageNum=_this.lowLevelList.currentPage;
                AjaxProxy.requst({
                    app: _this,
                    data:data,
                    url: basePath + '/fenXiao/fenXiaoUser/findShopSalesmanDetail',
                    callback: function (data) {
                        _this.basicdetail = data.mapInfo.basicdetail;
                        _this.lowLevelList.rows = data.mapInfo.customLowRecords;
                        _this.lowLevelList.total = data.mapInfo.customLowTotal;
                    }
                });
            },
            //查询参数
            getRequestParamlow(){
                let _this = this;
                return   {
                    userName:_this.formlow.userName,
                    order:_this.formlow.order,
                    sort:_this.formlow.sort,
                    userId:userId,
                }
            },
            //查询
            searchlow:function(){
                this.lowLevelList.currentPage=1;
                this.loadInfo();
            },
            //重置
            resetFormlow(formName) {
                this.$refs[formName].resetFields();
            },
            changePageSizelow(val) {
                this.lowLevelList.pageSize = val;
                this.loadInfo();
            },
            changeCurrentPagelow(val) {
                this.lowLevelList.currentPage = val;
                this.loadInfo();
            },
            // select下拉框获取焦点的时候下拉框数据源---分销员等级
            getDatalist() {
                let _this = this;
                AjaxProxy.requst({
                    app: _this,
@@ -169,23 +416,6 @@
                        _this.salemanGradeList = data.mapInfo.salesGrade;
                    }
                });
            },
            getRequestParam(){
                let _this = this;
                return   {
                    shenheState:_this.form.shenheState,
                    salemanGrade:_this.form.salemanGrade,
                    userName:_this.form.userName,
                    order:_this.form.order,
                    sort:_this.form.sort,
                }
            },
            search:function(){
                this.fxyList.currentPage=1;
                this.loadInfo();
            },
            resetForm(formName) {
                this.$refs[formName].resetFields();
            },
            sortChange:function (column){
                if(column.order){
@@ -197,23 +427,6 @@
                    this.form.sort=column.prop;
                    this.loadInfo();
                }
            },
            changePageSize(val) {
                this.table.pageSize = val;
                this.loadData();
            },
            changeCurrentPage(val) {
                this.table.currentPage = val;
                this.loadData();
            },
            //时间格式化
            formatDate(row,column){
                let data = row[column.property]
                if (data ===null) {
                    return ''
                }
                let dt = new Date(data)
                return dt.getFullYear() + '-' + (dt.getMonth() + 1) + '-' + dt.getDate() + ' ' + dt.getHours() + ':' + dt.getMinutes()
            },
            //新增分销员页面
            addSaleMan(){
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html
@@ -397,13 +397,13 @@
                }));
            },
            //修改等级
            openUpdateSaleManGrade(){
            openUpdateSaleManGrade(row){
                layer.full(layer.open({
                    type: 2,
                    title: "修改等级",
                    maxmin: true,
                    area: [MUI.SIZE_L, '500px'],
                    content : [ basePath + '/admin/redirect/fenxiao/fenxiao-udpate']
                    content : [ basePath + '/admin/redirect/fenxiao/fenxiao-update?userId=' + row.userId ]
                }));
            },
            //审核