xiaoyong931011
2021-03-11 3fc3fcf19503465facc2631d495bd497e4266128
分销员后台3
3 files added
9 files modified
472 ■■■■ changed files
zq-erp/src/main/java/com/matrix/core/pojo/AjaxResult.java 7 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/core/pojo/BasePageQueryDto.java 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java 89 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanApplyDao.java 13 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanAppliingDto.java 22 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanApplyDto.java 21 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanApplyService.java 28 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanAppliingVo.java 17 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanApplyVo.java 10 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml 28 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-apply.html 173 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html 62 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/core/pojo/AjaxResult.java
@@ -4,6 +4,7 @@
import com.matrix.core.tools.InternationaUtil;
import com.matrix.core.tools.MdcUtil;
import com.matrix.core.tools.StringUtils;
import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo;
import java.io.Serializable;
import java.util.HashMap;
@@ -84,6 +85,11 @@
    public static AjaxResult buildSuccessInstance(List<?> rows, Integer total) {
        return new AjaxResult(STATUS_SUCCESS, rows, total);
    }
    public static AjaxResult buildSuccessInstance(List<?> rows, long total) {
        return new AjaxResult(STATUS_SUCCESS, rows, Integer.parseInt(total+""));
    }
    public static AjaxResult buildSuccessInstance(List<?> rows) {
        return new AjaxResult(STATUS_SUCCESS, rows);
@@ -125,6 +131,7 @@
    public Integer getTotal() {
        return total;
    }
zq-erp/src/main/java/com/matrix/core/pojo/BasePageQueryDto.java
@@ -26,7 +26,7 @@
    private String order;
    @ApiModelProperty(value ="排序字段", example = "create_time")
    private String sortField;
    private String sort;
    @ApiModelProperty(value ="关键字")
    private String keywords;
zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java
@@ -1,36 +1,20 @@
package com.matrix.system.fenxiao.action;
import com.matrix.core.anotations.RemoveRequestToken;
import com.matrix.core.constance.MatrixConstance;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.tools.StringUtils;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.common.bean.BusParameterSettings;
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.common.tools.DataAuthUtil;
import com.matrix.system.fenxiao.dto.ShopSalesmanAppliingDto;
import com.matrix.system.fenxiao.dto.ShopSalesmanApplyDto;
import com.matrix.system.fenxiao.service.ShopSalesmanApplyService;
import com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo;
import com.matrix.system.hive.action.util.QueryUtil;
import com.matrix.system.hive.bean.ShoppingGoods;
import com.matrix.system.hive.bean.SysShopInfo;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant;
import com.matrix.system.fenxiao.dto.ShopSalesmanApplyDto;
import com.matrix.system.fenxiao.service.FenXiaoSettingService;
import com.matrix.system.fenxiao.service.ShopSalesmanApplyService;
import com.matrix.system.fenxiao.vo.FenXiaoSettingVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@RestController
@RequestMapping(value = "/fenXiao/fenXiaoUser")
@@ -42,7 +26,6 @@
    /**
     * 查询分销员审核记录
     */
    @ApiOperation(value = "查询分销员审核记录")
    @ApiResponses({
            @ApiResponse(code = 200, message = "OK",  response = ShopSalesmanApplyVo.class)
@@ -52,32 +35,54 @@
    AjaxResult findShopSalesmanApplyList(@RequestBody ShopSalesmanApplyDto shopSalesmanApplyDto) {
        //设置用户公司ID
        QueryUtil.setQueryLimitCom(shopSalesmanApplyDto);
        //排序
        if(StringUtils.isBlank(shopSalesmanApplyDto.getSort())){
            shopSalesmanApplyDto.setSort("createTime");
            shopSalesmanApplyDto.setSort("create_time");
            shopSalesmanApplyDto.setOrder("desc");
        }
        
        List<ShopSalesmanApplyVo> rows = shopSalesmanApplyService.findShopSalesmanApplyList(shopSalesmanApplyDto);
        Integer total = shopSalesmanApplyService.findShopSalesmanApplyListTotal(shopSalesmanApplyDto);
        AjaxResult result = AjaxResult.buildSuccessInstance(rows, total);
        Page<ShopSalesmanApplyVo> page = new Page(shopSalesmanApplyDto.getPageNum(), shopSalesmanApplyDto.getPageSize());
        IPage<ShopSalesmanApplyVo> rows = shopSalesmanApplyService.findShopSalesmanApplyList(page,shopSalesmanApplyDto);
        AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal());
        return result;
    }
    /**
     *获取分销员审核记录
    /**
     * 跳转 分销员待审核记录页面
     *
    @RequestMapping(value = "/shopSalesmanAppliing")
    public String shopSalesmanAppliing() {
        return "admin/fenxiao/fenxiao-apply";
    }
     */
    @RequestMapping(value = "/fenXiaoUserApply")
    public AjaxResult selectFenXiaoUserApply() {
    /**
     *获取分销员待审核记录
     */
    @ApiOperation(value = "查询分销员审核记录")
    @ApiResponses({
            @ApiResponse(code = 200, message = "OK",  response = ShopSalesmanAppliingVo.class)
    })
    @PostMapping(value = "/findShopSalesmanAppliingList")
    public @ResponseBody
    AjaxResult findShopSalesmanAppliingList(@RequestBody ShopSalesmanAppliingDto shopSalesmanAppliingDto) {
        //设置用户公司ID
        QueryUtil.setQueryLimitCom(shopSalesmanAppliingDto);
        //查询条件待审核状态
        shopSalesmanAppliingDto.setApplyStatus(1);
        //排序
        if(StringUtils.isBlank(shopSalesmanAppliingDto.getSort())){
            shopSalesmanAppliingDto.setSort("create_time");
            shopSalesmanAppliingDto.setOrder("desc");
        }
       AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
       SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
       Long companyId = user.getCompanyId();
       //分销员审核记录
       List<ShopSalesmanApplyVo> shopSalesmanApplyVos = shopSalesmanApplyService.selectFenXiaoUserApplyByCompanyId(companyId);
       result.putInMap("fxshjl", shopSalesmanApplyVos);
       return result;
        Page<ShopSalesmanAppliingVo> page = new Page(shopSalesmanAppliingDto.getPageNum(), shopSalesmanAppliingDto.getPageSize());
        IPage<ShopSalesmanAppliingVo> rows = shopSalesmanApplyService.findShopSalesmanAppliingList(page,shopSalesmanAppliingDto);
        AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal());
        return result;
    }
}
zq-erp/src/main/java/com/matrix/system/fenxiao/dao/ShopSalesmanApplyDao.java
@@ -3,13 +3,13 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
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.entity.ShopSalesmanApply;
import com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo;
import com.matrix.system.shopXcx.vo.SalesmanVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * @description 推广员申请记录
@@ -19,12 +19,13 @@
public interface ShopSalesmanApplyDao extends BaseMapper<ShopSalesmanApply> {
    IPage<SalesmanVo> selectInvitationuserInPage(Page<SalesmanVo> page, @Param("openId") String openId, @Param("isSales")String isSales);
    List<ShopSalesmanApplyVo> selectFenXiaoUserApplyByCompanyId(@Param("companyId") Long companyId);
    IPage<SalesmanVo> selectInvitationuserInPage(Page<SalesmanVo> page, @Param("openId") String openId);
    List<ShopSalesmanApplyVo> findShopSalesmanApplyList(@Param("record")ShopSalesmanApplyDto shopSalesmanApplyDto);
    Integer findShopSalesmanApplyListTotal(@Param("record")ShopSalesmanApplyDto shopSalesmanApplyDto);
    IPage<ShopSalesmanApplyVo> findShopSalesmanApplyList(Page<ShopSalesmanApplyVo> page,
            @Param("record")ShopSalesmanApplyDto shopSalesmanApplyDto);
    //根据公司ID、审核状态、会员昵称查询对应的记录
    IPage<ShopSalesmanAppliingVo> findShopSalesmanAppliingList(Page<ShopSalesmanAppliingVo> page,
            @Param("record")ShopSalesmanAppliingDto shopSalesmanAppliingDto);
}
zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanAppliingDto.java
New file
@@ -0,0 +1,22 @@
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 = "ShopSalesmanAppliingDto", description = "查询参数")
public class ShopSalesmanAppliingDto extends BasePageQueryDto {
    @ApiModelProperty(value ="会员名称")
    private String nickName;
    @ApiModelProperty(hidden = true)
    private Long companyId;
    @ApiModelProperty(hidden = true)
    private Integer applyStatus;
}
zq-erp/src/main/java/com/matrix/system/fenxiao/dto/ShopSalesmanApplyDto.java
@@ -1,12 +1,14 @@
package com.matrix.system.fenxiao.dto;
import com.matrix.core.pojo.PaginationDto;
import com.matrix.core.pojo.BasePageQueryDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "ShopSalesmanApplyDto", description = "查询参数")
public class ShopSalesmanApplyDto extends PaginationDto {
public class ShopSalesmanApplyDto extends BasePageQueryDto {
    
    @ApiModelProperty(value ="审核状态")
    private Integer shenheState;
@@ -14,20 +16,5 @@
    @ApiModelProperty(hidden = true)
    private Long companyId;
    public Integer getShenheState() {
        return shenheState;
    }
    public void setShenheState(Integer shenheState) {
        this.shenheState = shenheState;
    }
    public Long getCompanyId() {
        return companyId;
    }
    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }
    
}
zq-erp/src/main/java/com/matrix/system/fenxiao/service/ShopSalesmanApplyService.java
@@ -1,29 +1,28 @@
package com.matrix.system.fenxiao.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.matrix.biz.bean.BizUser;
import com.matrix.biz.dao.BizUserDao;
import com.matrix.biz.service.BizUserService;
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.exception.GlobleException;
import com.matrix.core.tools.StringUtils;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.common.bean.BusParameterSettings;
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.common.dao.BusParameterSettingsDao;
import com.matrix.system.common.interceptor.HostInterceptor;
import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant;
import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao;
import com.matrix.system.fenxiao.dto.ShopSalesmanAppliingDto;
import com.matrix.system.fenxiao.dto.ShopSalesmanApplyDto;
import com.matrix.system.fenxiao.entity.ShopSalesmanApply;
import com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
 * @description 推广员申请记录
@@ -98,18 +97,13 @@
    }
    public List<ShopSalesmanApplyVo> selectFenXiaoUserApplyByCompanyId(Long companyId) {
        //获取当前登录人员信息
        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
        List<ShopSalesmanApplyVo> shopSalesmanApplyVos = salesmanApplyDao.selectFenXiaoUserApplyByCompanyId(companyId);
        return shopSalesmanApplyVos;
    public IPage<ShopSalesmanApplyVo> findShopSalesmanApplyList(Page<ShopSalesmanApplyVo> page, ShopSalesmanApplyDto shopSalesmanApplyDto) {
        return salesmanApplyDao.findShopSalesmanApplyList(page,shopSalesmanApplyDto);
    }
    public IPage<ShopSalesmanAppliingVo> findShopSalesmanAppliingList(Page<ShopSalesmanAppliingVo> page,
            ShopSalesmanAppliingDto shopSalesmanAppliingDto) {
        return salesmanApplyDao.findShopSalesmanAppliingList(page,shopSalesmanAppliingDto);
    }
    public List<ShopSalesmanApplyVo> findShopSalesmanApplyList(ShopSalesmanApplyDto shopSalesmanApplyDto) {
        return salesmanApplyDao.findShopSalesmanApplyList(shopSalesmanApplyDto);
    }
    public Integer findShopSalesmanApplyListTotal(ShopSalesmanApplyDto shopSalesmanApplyDto) {
        return salesmanApplyDao.findShopSalesmanApplyListTotal(shopSalesmanApplyDto);
    }
}
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanAppliingVo.java
New file
@@ -0,0 +1,17 @@
package com.matrix.system.fenxiao.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "ShopSalesmanAppliingVo", description = "查询正在申请分销员的返参")
public class ShopSalesmanAppliingVo {
    @ApiModelProperty(value = "申请用户id")
    private String  userId;
    @ApiModelProperty(value = "分销员")
    private String nickname;
}
zq-erp/src/main/java/com/matrix/system/fenxiao/vo/ShopSalesmanApplyVo.java
@@ -1,15 +1,13 @@
package com.matrix.system.fenxiao.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import com.matrix.core.anotations.Extend;
import io.swagger.annotations.ApiModelProperty;
@Data
public class ShopSalesmanApplyVo {
    @Extend
    private static final long serialVersionUID = 1L;
    /**
     * 审核状态-1、待审核
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml
@@ -58,7 +58,7 @@
    <select id="findShopSalesmanApplyList" resultType="com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo">
        SELECT
        b.nick_name
        a.user_id userId
        FROM
        shop_salesman_apply a
        LEFT JOIN biz_user b ON a.user_id = b.user_id
@@ -66,32 +66,32 @@
        <where>
            and a.company_id=#{record.companyId}
            <if test="record.shenheState != null and record.shenheState != ''">
                and a.apply_status=#{shenheState}
                and a.apply_status=#{record.shenheState}
            </if>
        </where>
        <if test="record.sort !=null">
            order by
            a.${record.sort} ${record.order}
        </if>
        <if test="record.offset >=0  and record.limit >0">
            limit
            #{record.offset},#{record.limit}
        </if>
    </select>
    <select id="findShopSalesmanApplyListTotal" resultType="java.lang.Integer">
        SELECT count(*)
    <select id="findShopSalesmanAppliingList" resultType="com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo">
        SELECT
        a.user_id userId,
        b.nick_name nickName
        FROM
        shop_salesman_apply a
        LEFT JOIN biz_user b ON a.user_id = b.user_id
        LEFT JOIN shop_salesman_grade g ON b.salesman_grade = g.id
        <where>
            and a.company_id=#{record.companyId}
            <if test="record.shenheState != null and record.shenheState != ''">
                and a.apply_status=#{shenheState}
            and a.company_id = #{record.companyId}
            and a.apply_status = #{record.applyStatus}
            <if test="record.nickName != null and record.nickName != ''">
                and b.nick_name like concat('%',#{record.nickName},'%')
            </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-apply.html
New file
@@ -0,0 +1,173 @@
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <LINK rel="Bookmark" href="../images/favicon.ico">
    <!-- 本框架基本脚本和样式 -->
    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
    <title></title>
    <style>
        .panel-body{
            overflow: hidden;
        }
        .rowPanel{
            background: #ffffff;
            padding: 0px 10px ;
            padding-top: 10px;
            margin: 0px 0px 10px 0px;
        }
        .paginationStyle{
            background: #ffffff;
            padding: 10px 10px;
            margin: 0px 0px 10px 0px;
            text-align: right;
        }
    </style>
</head>
<body>
<div class="panel-body" id="app">
    <el-row class="rowPanel"  >
        <el-form ref="form" :model="form" inline >
            <el-form-item prop="nickName">
                <el-input v-model="form.nickName" 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="table.rows"  :height="height" stripe @sort-change="sortChange">
            <el-table-column
                    prop="userId"
                    label="订单号"
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="nickname"
                    label="分销员昵称"
                    width="180">
            </el-table-column>
            <el-table-column label="操作">
                <template slot-scope="scope">
                    <el-button type="text" size="small">设置为分销员</el-button>
                </template>
            </el-table-column>
        </el-table>
    </el-row>
    <el-row class="paginationStyle"  >
        <el-pagination background
                       @size-change="changePageSize"
                       @current-change="changeCurrentPage"
                       :current-page="table.currentPage"
                       :page-sizes="[10, 20, 30, 50]"
                       :page-size="table.pageSize"
                       layout="total, sizes, prev, pager, next, jumper"
                       :total="table.total">
        </el-pagination>
    </el-row>
</div>
</body>
<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
<script type="text/javascript" th:inline="javascript">
    var vue = new Vue({
        el: '#app',
        data: {
            table:{
                rows:[],
                total:0,
                pageSize:10,
                currentPage:1,
            },
            form:{
                nickName:'',
                order:'',
                sort:''
            },
            height:'calc(100vh - 240px)',
        },
        created: function () {
            this.loadData();
            window.addEventListener("keydown", this.keydown);
        },
        methods: {
            changePageSize(val) {
                this.table.pageSize = val;
                this.loadData();
            },
            changeCurrentPage(val) {
                this.table.currentPage = val;
                this.loadData();
            },
            resetForm(formName) {
                this.$refs[formName].resetFields();
            },
            sortChange:function (column){
                if(column.order){
                    if(column.order.indexOf("desc")){
                        this.form.order="desc";
                    }else{
                        this.form.order="asc";
                    }
                    this.form.sort=column.prop;
                    this.loadData();
                }
            },
            loadData:function(){
                let _this = this;
                let data=_this.getRequestParam();
                data.pageSize=_this.table.pageSize;
                data.pageNum=_this.table.currentPage;
                AjaxProxy.requst({
                    app: _this,
                    data:data,
                    url: basePath + '/fenXiao/fenXiaoUser/findShopSalesmanAppliingList',
                    callback: function (data) {
                        _this.table.rows = data.rows;
                        _this.table.total=data.total;
                    }
                });
            },
            getRequestParam(){
                let _this = this;
                return   {
                    nickName:_this.form.nickName,
                    order:_this.form.order,
                    sort:_this.form.sort,
                }
            },
            search:function(){
                this.table.currentPage=1;
                this.loadData();
            },
            keydown(evt){
                if(evt.keyCode==13) {
                    this.search();
                }
            }
        }
    });
</script>
</body>
</html>
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html
@@ -22,6 +22,14 @@
    </script>
    <script type="text/javascript" charset="utf-8"
            th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
    <style>
        .paginationStyle{
            background: #ffffff;
            padding: 10px 10px;
            margin: 0px 0px 10px 0px;
            text-align: right;
        }
    </style>
</head>
<body>
@@ -31,7 +39,7 @@
                <el-tab-pane label="分销员管理" name="first">
                    <el-row style="display:flex;align-items: center;">
                        <el-col>
                            <el-button type="primary" @click="submits()">新增分销员</el-button>
                            <el-button type="primary" @click="addSaleMan()">新增分销员</el-button>
                        </el-col>
                        <el-col>
                            <el-form ref="form" :model="form" inline >
@@ -51,21 +59,16 @@
                            </el-form>
                        </el-col>
                    </el-row>
                    <el-row>
                        <template>
                            <el-table id="proj" :data="fxyList.rows"  :height="height" stripe @sort-change="sortChange">
                            <el-table
                                    ref="multipleTable"
                                    :data="fxy"
                                    tooltip-effect="dark"
                                    style="width: 100%"
                                    @selection-change="handleSelectionChange">
                                <el-table-column
                                        type="selection"
                                        width="55">
                                </el-table-column>
                                <el-table-column
                                        prop="nickname"
                                        label="分销员姓名"
                                        prop="userId"
                                        label="id"
                                        width="180">
                                </el-table-column>
                                <el-table-column
@@ -79,6 +82,18 @@
                                </el-table-column>
                            </el-table>
                        </template>
                    </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">
                    <template>
@@ -165,7 +180,6 @@
<script>
    //百度编辑器
    MUI.initImgUpload(".upload-input");
    var ue = {};
    var app = new Vue({
        el: '#app',
@@ -189,9 +203,9 @@
            //条件查询审核状态
            shenheStateList:[
                {value:'',label:'全部'},
                {value:'1',label:'已审核'},
                {value:'2',label:'未审核'},
                {value:'3',label:'未通过'}
                {value:1,label:'未审核'},
                {value:2,label:'通过'},
                {value:3,label:'未通过'}
            ],
            fxyList:{
                rows:[],
@@ -239,8 +253,8 @@
            loadParamSetting() {
                let _this = this;
                let data=_this.getRequestParam();
                data.limit=_this.fxyList.pageSize;
                data.offset=_this.fxyList.pageSize
                data.pageSize=_this.fxyList.pageSize;
                data.pageNum=_this.fxyList.currentPage;
                AjaxProxy.requst({
                    app: _this,
                    data:data,
@@ -282,6 +296,24 @@
                    this.loadInfo();
                }
            },
            changePageSize(val) {
                this.table.pageSize = val;
                this.loadData();
            },
            changeCurrentPage(val) {
                this.table.currentPage = val;
                this.loadData();
            },
            //新增分销员页面
            addSaleMan(){
                layer.full(layer.open({
                    type: 2,
                    title: "选择会员",
                    maxmin: true,
                    area: [MUI.SIZE_L, '500px'],
                    content : [ basePath + '/admin/redirect/fenxiao/fenxiao-apply']
                }));
            },
            submit() {
            }