Merge branch 'master' of http://120.27.238.55:7000/r/xc-mall
 
	
	
	
	
	
	
		
		14 files modified
	
		
		3 files added
	
	
 
	
	
	
	
	
	
	
	
 |  |  | 
 |  |  | import cc.mrbird.febs.common.controller.BaseController; | 
 |  |  | import cc.mrbird.febs.common.entity.FebsResponse; | 
 |  |  | import cc.mrbird.febs.common.entity.QueryRequest; | 
 |  |  | import cc.mrbird.febs.mall.dto.AgentDto; | 
 |  |  | import cc.mrbird.febs.mall.dto.MoneyChargeListDto; | 
 |  |  | import cc.mrbird.febs.mall.dto.MoneyFlowListDto; | 
 |  |  | import cc.mrbird.febs.mall.entity.MallMember; | 
 |  |  | 
 |  |  |         return mallMemberService.chargeDisagree(id); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 代理列表 | 
 |  |  |      * @param agentDto | 
 |  |  |      * @param request | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @GetMapping("getAgentList") | 
 |  |  |     public FebsResponse getAgentList(AgentDto agentDto, QueryRequest request) { | 
 |  |  |         Map<String, Object> data = getDataTable(mallMemberService.getAgentList(agentDto, request)); | 
 |  |  |         return new FebsResponse().success().data(data); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | } | 
 
 |  |  | 
 |  |  |         return FebsUtil.view("modules/mallMember/paymentInfo"); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 代理列表 | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @GetMapping("agentList") | 
 |  |  |     @RequiresPermissions("agentList:view") | 
 |  |  |     public String agentList() { | 
 |  |  |         return FebsUtil.view("modules/mallMember/agentList"); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 
| New file | 
 |  |  | 
 |  |  | package cc.mrbird.febs.mall.dto; | 
 |  |  |  | 
 |  |  | import io.swagger.annotations.ApiModel; | 
 |  |  | import lombok.Data; | 
 |  |  |  | 
 |  |  | @Data | 
 |  |  | @ApiModel(value = "AgentDto", description = "地址接收参数类") | 
 |  |  | public class AgentDto { | 
 |  |  |  | 
 |  |  |     private String name; | 
 |  |  |  | 
 |  |  |     private String account; | 
 |  |  |  | 
 |  |  |     private String level; | 
 |  |  | } | 
 
 |  |  | 
 |  |  | package cc.mrbird.febs.mall.mapper; | 
 |  |  |  | 
 |  |  | import cc.mrbird.febs.mall.dto.AgentDto; | 
 |  |  | import cc.mrbird.febs.mall.entity.MallMember; | 
 |  |  | import cc.mrbird.febs.mall.vo.AdminAgentVo; | 
 |  |  | import cc.mrbird.febs.mall.vo.MallMemberVo; | 
 |  |  | import cc.mrbird.febs.mall.vo.TeamListVo; | 
 |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
 |  |  | 
 |  |  |     List<MallMember> selectChildAgentList(@Param("inviteId") String inviteId, @Param("agentLevel") String agentLevel); | 
 |  |  |  | 
 |  |  |     List<MallMember> selectByInviteIds(@Param("list") List<String> inviteIds); | 
 |  |  |  | 
 |  |  |     IPage<AdminAgentVo> getAgentListInPage(Page<AdminAgentVo> page, @Param("record")AgentDto agentDto); | 
 |  |  |  | 
 |  |  |     List<MallMember> selectChildAgentListByInviteId(@Param("inviteId")String inviteId); | 
 |  |  |  | 
 |  |  |     List<MallMember> selectAllChildAgentListByInviteId(@Param("inviteId")String inviteId); | 
 |  |  | } | 
 
 |  |  | 
 |  |  |  | 
 |  |  | import cc.mrbird.febs.common.entity.FebsResponse; | 
 |  |  | import cc.mrbird.febs.common.entity.QueryRequest; | 
 |  |  | import cc.mrbird.febs.mall.dto.AgentDto; | 
 |  |  | import cc.mrbird.febs.mall.dto.MoneyChargeListDto; | 
 |  |  | import cc.mrbird.febs.mall.dto.MoneyFlowListDto; | 
 |  |  | import cc.mrbird.febs.mall.entity.MallMember; | 
 |  |  | 
 |  |  |     FebsResponse chargeDisagree(Long id); | 
 |  |  |  | 
 |  |  |     AdminMallMemberPaymentVo getMallMemberPaymentInfoByFlowId(long id); | 
 |  |  |  | 
 |  |  |     IPage<AdminAgentVo> getAgentList(AgentDto agentDto, QueryRequest request); | 
 |  |  | } | 
 
 |  |  | 
 |  |  |  | 
 |  |  | import cc.mrbird.febs.common.entity.FebsResponse; | 
 |  |  | import cc.mrbird.febs.common.entity.QueryRequest; | 
 |  |  | import cc.mrbird.febs.mall.dto.AgentDto; | 
 |  |  | import cc.mrbird.febs.mall.dto.MoneyChargeListDto; | 
 |  |  | import cc.mrbird.febs.mall.dto.MoneyFlowListDto; | 
 |  |  | import cc.mrbird.febs.mall.entity.MallMember; | 
 |  |  | 
 |  |  | import cc.mrbird.febs.mall.service.IAdminMallMemberService; | 
 |  |  | import cc.mrbird.febs.mall.service.IApiMallMemberWalletService; | 
 |  |  | import cc.mrbird.febs.mall.vo.*; | 
 |  |  | import cn.hutool.core.collection.CollUtil; | 
 |  |  | import cn.hutool.core.util.ObjectUtil; | 
 |  |  | import com.baomidou.mybatisplus.core.metadata.IPage; | 
 |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
 |  |  | 
 |  |  | import lombok.extern.slf4j.Slf4j; | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  | import org.springframework.transaction.annotation.Transactional; | 
 |  |  |  | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * @author wzy | 
 |  |  | 
 |  |  |         return adminMallMemberPaymentVo; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public IPage<AdminAgentVo> getAgentList(AgentDto agentDto, QueryRequest request) { | 
 |  |  |         Page<AdminAgentVo> page = new Page<>(request.getPageNum(), request.getPageSize()); | 
 |  |  |         IPage<AdminAgentVo> adminAgentVos = this.baseMapper.getAgentListInPage(page, agentDto); | 
 |  |  |         List<AdminAgentVo> records = adminAgentVos.getRecords(); | 
 |  |  |         if(CollUtil.isNotEmpty(records)){ | 
 |  |  |             for(AdminAgentVo adminAgentVo : records){ | 
 |  |  |                 String inviteId = adminAgentVo.getInviteId(); | 
 |  |  |                 //直接下级 | 
 |  |  |                 List<MallMember> mallMembers = mallMemberMapper.selectChildAgentListByInviteId(inviteId); | 
 |  |  |                 adminAgentVo.setMemberNum(CollUtil.isEmpty(mallMembers) ? 0 : mallMembers.size()); | 
 |  |  |  | 
 |  |  |                 //获取总数 | 
 |  |  |                 List<MallMember> allMallMembers =mallMemberMapper.selectAllChildAgentListByInviteId(inviteId); | 
 |  |  |                 adminAgentVo.setAllMemberNum(CollUtil.isEmpty(allMallMembers) ? 0 : allMallMembers.size()); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         return adminAgentVos; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | } | 
 
| New file | 
 |  |  | 
 |  |  | package cc.mrbird.febs.mall.vo; | 
 |  |  |  | 
 |  |  | import io.swagger.annotations.ApiModel; | 
 |  |  | import lombok.Data; | 
 |  |  |  | 
 |  |  | @Data | 
 |  |  | @ApiModel(value = "AdminAgentVo", description = "信息返回类") | 
 |  |  | public class AdminAgentVo { | 
 |  |  |  | 
 |  |  |     private Long id; | 
 |  |  |  | 
 |  |  |     private String name; | 
 |  |  |  | 
 |  |  |     private String phone; | 
 |  |  |  | 
 |  |  |     private String level; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 邀请码 | 
 |  |  |      */ | 
 |  |  |     private String inviteId; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 父级邀请码 | 
 |  |  |      */ | 
 |  |  |     private String referrerId; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 邀请码链 | 
 |  |  |      */ | 
 |  |  |     private String referrerIds; | 
 |  |  |  | 
 |  |  |     //下级总代理人数 | 
 |  |  |     private Integer allMemberNum; | 
 |  |  |     //发展下级代理人数 | 
 |  |  |     private Integer memberNum; | 
 |  |  |  | 
 |  |  | } | 
 
 |  |  | 
 |  |  |     private Integer isHot; | 
 |  |  |  | 
 |  |  |     private Integer saleVolume; | 
 |  |  |  | 
 |  |  |     private String categaryName; | 
 |  |  |  | 
 |  |  |     private Integer skuVolume; | 
 |  |  |  | 
 |  |  |     private Integer stock; | 
 |  |  | } | 
 
 |  |  | 
 |  |  |  | 
 |  |  |     private Integer status; | 
 |  |  |  | 
 |  |  |     private String payMethod; | 
 |  |  |  | 
 |  |  | } | 
 
 |  |  | 
 |  |  |         a.is_sale, | 
 |  |  |         a.original_price, | 
 |  |  |         a.present_price, | 
 |  |  |         a.is_hot | 
 |  |  |         a.is_hot, | 
 |  |  |         b.name categaryName, | 
 |  |  |         sum(c.sku_volume) skuVolume, | 
 |  |  |         sum(c.stock) stock | 
 |  |  |         from mall_goods a | 
 |  |  |         left join mall_goods_category b on b.id = a.category_id | 
 |  |  |         left join mall_goods_sku c on c.goods_id = a.id | 
 |  |  |         <where> | 
 |  |  |             <if test="record != null"> | 
 |  |  |                 <if test="record.goodsName != null and record.goodsName != ''"> | 
 
 |  |  | 
 |  |  |         </foreach > | 
 |  |  |         order by id desc | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="getAgentListInPage" resultType="cc.mrbird.febs.mall.vo.AdminAgentVo"> | 
 |  |  |         SELECT * FROM mall_member m | 
 |  |  |         <where> | 
 |  |  |             <if test="record != null" > | 
 |  |  |                 <if test="record.name!=null and record.name!=''"> | 
 |  |  |                     and m.name like concat('%',  #{record.name},'%') | 
 |  |  |                 </if> | 
 |  |  |                 <if test="record.level!=null and record.level!=''"> | 
 |  |  |                     and m.level = #{record.level} | 
 |  |  |                 </if> | 
 |  |  |                 <if test="record.account!=null and record.account!=''"> | 
 |  |  |                     and m.phone like concat('%',  #{record.account},'%') | 
 |  |  |                 </if> | 
 |  |  |             </if> | 
 |  |  |         </where> | 
 |  |  |         order by m.CREATED_TIME desc | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectChildAgentListByInviteId" resultType="cc.mrbird.febs.mall.entity.MallMember"> | 
 |  |  |         select * from mall_member where  referrer_id = #{inviteId} | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="selectAllChildAgentListByInviteId" resultType="cc.mrbird.febs.mall.entity.MallMember"> | 
 |  |  |         select * from mall_member where  find_in_set(#{inviteId}, referrer_ids) | 
 |  |  |     </select> | 
 |  |  | </mapper> | 
 
 |  |  | 
 |  |  |         select | 
 |  |  |         a.*, | 
 |  |  |         b.name, | 
 |  |  |         c.pay_method payMethod, | 
 |  |  |         b.phone | 
 |  |  |         from mall_money_flow a | 
 |  |  |         inner join mall_member b on a.member_id=b.id | 
 |  |  |         left join mall_order_info c on a.order_no = c.order_no | 
 |  |  |         <where> | 
 |  |  |             a.type != 6 | 
 |  |  |             <if test="record != null" > | 
 
 |  |  | 
 |  |  |                             </div> | 
 |  |  |                             <div id="attrWrap"></div> | 
 |  |  |                             <div class="layui-form-item"> | 
 |  |  |                                 <label class="layui-form-label">缩略图:</label> | 
 |  |  |                                 <label class="layui-form-label febs-form-item-require">缩略图:</label> | 
 |  |  |                                 <div class="layui-input-block"> | 
 |  |  |                                     <div class="layui-upload"> | 
 |  |  |                                         <button type="button" class="layui-btn layui-btn-normal layui-btn-xs" id="test2">上传</button> | 
 |  |  | 
 |  |  |                             <div class="layui-form-item febs-hide"> | 
 |  |  |                                 <label class="layui-form-label">缩略图链接:</label> | 
 |  |  |                                 <div class="layui-input-block"> | 
 |  |  |                                     <input type="text" id="thumb" name="thumb" autocomplete="off" class="layui-input" readonly> | 
 |  |  |                                     <input type="text" id="thumb" lay-verify="required" name="thumb" autocomplete="off" class="layui-input" readonly> | 
 |  |  |                                 </div> | 
 |  |  |                             </div> | 
 |  |  |  | 
 |  |  |                             <div class="layui-form-item"> | 
 |  |  |                                 <label class="layui-form-label">轮播图:</label> | 
 |  |  |                                 <label class="layui-form-label febs-form-item-require">轮播图:</label> | 
 |  |  |                                 <div class="layui-input-block"> | 
 |  |  |                                     <div class="layui-upload"> | 
 |  |  |                                         <button type="button" class="layui-btn layui-btn-normal layui-btn-xs" id="thumbsBanner">上传</button> | 
 |  |  | 
 |  |  |                             <div class="layui-form-item febs-hide"> | 
 |  |  |                                 <label class="layui-form-label">缩略图链接:</label> | 
 |  |  |                                 <div class="layui-input-block"> | 
 |  |  |                                     <input type="text" id="thumbs" name="thumbs" autocomplete="off" class="layui-input" readonly> | 
 |  |  |                                     <input type="text" id="thumbs" lay-verify="required" name="thumbs" autocomplete="off" class="layui-input" readonly> | 
 |  |  |                                 </div> | 
 |  |  |                             </div> | 
 |  |  |  | 
 |  |  |                             <div class="layui-form-item"> | 
 |  |  |                                 <label class="layui-form-label">商品详情:</label> | 
 |  |  |                                 <label class="layui-form-label febs-form-item-require">商品详情:</label> | 
 |  |  |                                 <div class="layui-input-block"> | 
 |  |  |                                     <textarea id="lay_edit" lay-verify="goodsDetails" name = "goodsDetails" class="layui-textarea"></textarea> | 
 |  |  |                                     <textarea id="lay_edit" lay-verify="required" name = "goodsDetails" class="layui-textarea"></textarea> | 
 |  |  |                                 </div> | 
 |  |  |                             </div> | 
 |  |  |                             <div class="layui-row layui-col-space10 layui-form-item"> | 
 |  |  | 
 |  |  |                     presentPrice: $("input[name='presentPrice" + i + "']").val() | 
 |  |  |                 }) | 
 |  |  |             } | 
 |  |  |             // if(skuArr.length < 0){ | 
 |  |  |             //     febs.alert.warn("请填写商品规格"); | 
 |  |  |             //     return false; | 
 |  |  |             // } | 
 |  |  |             // console.log(skuArrs) | 
 |  |  |             data.field.addMallGoodsSkuDtos = skuArrs; | 
 |  |  |             // console.log(data.field) | 
 
 |  |  | 
 |  |  |                         </div> | 
 |  |  |                     </form> | 
 |  |  |                     <table lay-filter="userTable" lay-data="{id: 'userTable'}"></table> | 
 |  |  |                     <style type="text/css"> | 
 |  |  |                         .layui-table-cell{ | 
 |  |  |                             text-align:center; | 
 |  |  |                             height: auto; | 
 |  |  |                             white-space: nowrap; /*文本不会换行,在同一行显示*/ | 
 |  |  |                             overflow: hidden; /*超出隐藏*/ | 
 |  |  |                             text-overflow: ellipsis; /*省略号显示*/ | 
 |  |  |                         } | 
 |  |  |                         .layui-table img{ | 
 |  |  |                             max-width:100px | 
 |  |  |                         } | 
 |  |  |                     </style> | 
 |  |  |                 </div> | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  | 
 |  |  |                     maxmin: true, | 
 |  |  |                 }); | 
 |  |  |             } | 
 |  |  |             if (layEvent === 'seeImgThumb') { | 
 |  |  |                 var t = $view.find('#seeImgThumb'+data.id+''); | 
 |  |  |                 //页面层 | 
 |  |  |                 layer.open({ | 
 |  |  |                     type: 1, | 
 |  |  |                     title: "图片", | 
 |  |  |                     skin: 'layui-layer-rim', //加上边框 | 
 |  |  |                     area: ['80%', '80%'], //宽高 | 
 |  |  |                     shadeClose: true, //开启遮罩关闭 | 
 |  |  |                     end: function (index, layero) { | 
 |  |  |                         return false; | 
 |  |  |                     }, | 
 |  |  |                     content: '<div style="text-align:center"><img src="' + $(t).attr('src') + '" /></div>' | 
 |  |  |                 }); | 
 |  |  |             } | 
 |  |  |         }); | 
 |  |  |         function downGoods(id) { | 
 |  |  |             febs.get(ctx + 'admin/goods/downMallGoods/' + id, null, function () { | 
 |  |  | 
 |  |  |                 id: 'userTable', | 
 |  |  |                 url: ctx + 'admin/goods/goodsList', | 
 |  |  |                 cols: [[ | 
 |  |  |                     {field: 'goodsNo', title: '商品编号', minWidth: 150,align:'left'}, | 
 |  |  |                     {field: 'goodsName', title: '商品名称', minWidth: 150,align:'left'}, | 
 |  |  |                 //     {field: 'accountType', title: '账号类型', | 
 |  |  |                 //         templet: function (d) { | 
 |  |  |                 //             if (d.accountType === 2) { | 
 |  |  |                 //                 return '<span style="color:red;">测试账号</span>' | 
 |  |  |                 //             } else if (d.accountType === 1) { | 
 |  |  |                 //                 return '<span style="color:green;">正常账号</span>' | 
 |  |  |                 //             }else{ | 
 |  |  |                 //                 return '' | 
 |  |  |                 //             } | 
 |  |  |                 //         }, minWidth: 80,align:'center'}, | 
 |  |  |                     {field: 'thumb', title: '缩略图', | 
 |  |  |                         templet: function (d) { | 
 |  |  |                             return '<a lay-event="seeImgThumb"><img id="seeImgThumb'+d.id+'" src="'+d.thumb+'" alt=""></a>'; | 
 |  |  |                         }, minWidth: 100,align:'center'}, | 
 |  |  |                     {field: 'categaryName', title: '分类', minWidth: 150,align:'left'}, | 
 |  |  |                     {field: 'isSale', title: '是否上架', | 
 |  |  |                         templet: function (d) { | 
 |  |  |                             if (d.isSale === 1) { | 
 |  |  |                                 return '<span>上架</span>' | 
 |  |  |                             } else if (d.isSale === 2) { | 
 |  |  |                                 return '<span>下架</span>' | 
 |  |  |                             }else{ | 
 |  |  |                                 return '' | 
 |  |  |                             } | 
 |  |  |                         }, minWidth: 80,align:'center'}, | 
 |  |  |                     {field: 'presentPrice', title: '现价', minWidth: 150,align:'left'}, | 
 |  |  |                     {field: 'originalPrice', title: '原价', minWidth: 150,align:'left'}, | 
 |  |  |                     {field: 'stock', title: '商品库存', minWidth: 150,align:'left'}, | 
 |  |  |                     {field: 'skuVolume', title: '商品销量', minWidth: 150,align:'left'}, | 
 |  |  |                 //     {field: 'accountStatus', title: '账号状态', | 
 |  |  |                 //         templet: function (d) { | 
 |  |  |                 //             if (d.accountStatus === 1) { | 
 |  |  | 
 |  |  |                     {title: '操作', | 
 |  |  |                         templet: function (d) { | 
 |  |  |                             if (d.isSale === 1) { | 
 |  |  |                                 return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="downGoods" shiro:hasPermission="user:update">下架</button>' | 
 |  |  |                                 return '<button class="layui-btn layui-btn-normal layui-btn-xs febs-bg-orange" lay-event="downGoods" shiro:hasPermission="user:update">下架</button>' | 
 |  |  |                                 + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detailGoods" shiro:hasPermission="user:update">详情</button>' | 
 |  |  |                             }else{ | 
 |  |  |                                 return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="upGoods" shiro:hasPermission="user:update">上架</button>' | 
 |  |  |                                 + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="delGoods" shiro:hasPermission="user:update">删除</button>' | 
 |  |  |                                 return '<button class="layui-btn layui-btn-normal layui-btn-xs febs-bg-green" lay-event="upGoods" shiro:hasPermission="user:update">上架</button>' | 
 |  |  |                                 + '<button class="layui-btn layui-btn-normal layui-btn-xs febs-bg-red" lay-event="delGoods" shiro:hasPermission="user:update">删除</button>' | 
 |  |  |                                 + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="updateGoods" shiro:hasPermission="user:update">编辑</button>' | 
 |  |  |  | 
 |  |  |                             } | 
 
| New file | 
 |  |  | 
 |  |  | <div class="layui-fluid layui-anim febs-anim" id="febs-user-agent" lay-title="代理列表"> | 
 |  |  |     <div class="layui-row febs-container"> | 
 |  |  |         <div class="layui-col-md12"> | 
 |  |  |             <div class="layui-card"> | 
 |  |  |                 <div class="layui-card-body febs-table-full"> | 
 |  |  |                     <form class="layui-form layui-table-form" lay-filter="user-table-form"> | 
 |  |  |                         <div class="layui-row"> | 
 |  |  |                             <div class="layui-col-md10"> | 
 |  |  |                                 <div class="layui-form-item"> | 
 |  |  |                                     <div class="layui-inline"> | 
 |  |  |                                         <div class="layui-input-inline"> | 
 |  |  |                                             <input type="text" placeholder="用户名" name="name" autocomplete="off" class="layui-input"> | 
 |  |  |                                         </div> | 
 |  |  |                                     </div> | 
 |  |  |                                     <div class="layui-inline"> | 
 |  |  |                                         <div class="layui-input-inline"> | 
 |  |  |                                             <input type="text" placeholder="手机号" name="account" autocomplete="off" class="layui-input"> | 
 |  |  |                                         </div> | 
 |  |  |                                     </div> | 
 |  |  |                                     <div class="layui-inline"> | 
 |  |  |                                         <label class="layui-form-label layui-form-label-sm">账户状态</label> | 
 |  |  |                                         <div class="layui-input-inline"> | 
 |  |  |                                             <select name="level"> | 
 |  |  |                                                 <option value="">请选择</option> | 
 |  |  |                                                 <option value="FIRST_LEVEL">FIRST_LEVEL</option> | 
 |  |  |                                                 <option value="SECOND_LEVEL">SECOND_LEVEL</option> | 
 |  |  |                                             </select> | 
 |  |  |                                         </div> | 
 |  |  |                                     </div> | 
 |  |  |                                 </div> | 
 |  |  |                             </div> | 
 |  |  |                             <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> | 
 |  |  |                                 <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain table-action" id="query"> | 
 |  |  |                                     <i class="layui-icon"></i> | 
 |  |  |                                 </div> | 
 |  |  |                                 <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="reset"> | 
 |  |  |                                     <i class="layui-icon"></i> | 
 |  |  |                                 </div> | 
 |  |  |                             </div> | 
 |  |  |                         </div> | 
 |  |  |                     </form> | 
 |  |  |                     <table lay-filter="userAgentTable" lay-data="{id: 'userAgentTable'}"></table> | 
 |  |  |                 </div> | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |     </div> | 
 |  |  | </div> | 
 |  |  | <!-- 表格操作栏 start --> | 
 |  |  | <script type="text/html" id="user-option"> | 
 |  |  |     <span shiro:lacksPermission="user:view,user:update,user:delete"> | 
 |  |  |         <span class="layui-badge-dot febs-bg-orange"></span> 无权限 | 
 |  |  |     </span> | 
 |  |  |     <a lay-event="edit" shiro:hasPermission="user:update"><i | 
 |  |  |             class="layui-icon febs-edit-area febs-blue"></i></a> | 
 |  |  | </script> | 
 |  |  | <!-- 表格操作栏 end --> | 
 |  |  | <script data-th-inline="none" type="text/javascript"> | 
 |  |  |     // 引入组件并初始化 | 
 |  |  |     layui.use([ 'jquery', 'form', 'table', 'febs'], function () { | 
 |  |  |         var $ = layui.jquery, | 
 |  |  |             febs = layui.febs, | 
 |  |  |             form = layui.form, | 
 |  |  |             table = layui.table, | 
 |  |  |             $view = $('#febs-user-agent'), | 
 |  |  |             $query = $view.find('#query'), | 
 |  |  |             $reset = $view.find('#reset'), | 
 |  |  |             $searchForm = $view.find('form'), | 
 |  |  |             sortObject = {field: 'phone', type: null}, | 
 |  |  |             tableIns; | 
 |  |  |  | 
 |  |  |         form.render(); | 
 |  |  |  | 
 |  |  |         // 表格初始化 | 
 |  |  |         initTable(); | 
 |  |  |  | 
 |  |  |         // 初始化表格操作栏各个按钮功能 | 
 |  |  |         table.on('tool(userAgentTable)', function (obj) { | 
 |  |  |             var data = obj.data, | 
 |  |  |                 layEvent = obj.event; | 
 |  |  |             // if (layEvent === 'close') { | 
 |  |  |             //     febs.modal.confirm('禁用', '确认禁用该账号?', function () { | 
 |  |  |             //         closeAccount(data.id); | 
 |  |  |             //     }); | 
 |  |  |             // } | 
 |  |  |             // if (layEvent === 'open') { | 
 |  |  |             //     febs.modal.confirm('开启', '确认开启该账号?', function () { | 
 |  |  |             //         openAccount(data.id); | 
 |  |  |             //     }); | 
 |  |  |             // } | 
 |  |  |             // if (layEvent === 'see') { | 
 |  |  |             //     febs.modal.open( '个人信息', 'modules/mallMember/detail/' + data.id, { | 
 |  |  |             //         maxmin: true, | 
 |  |  |             //     }); | 
 |  |  |             // } | 
 |  |  |             // if (layEvent === 'moneyFlow') { | 
 |  |  |             //     febs.modal.open( '用户资金流水', 'modules/mallMember/moneyFlow/' + data.id, { | 
 |  |  |             //         maxmin: true, | 
 |  |  |             //     }); | 
 |  |  |             // } | 
 |  |  |         }); | 
 |  |  |         // function closeAccount(id) { | 
 |  |  |         //     febs.get(ctx + 'admin/mallMember/closeAccount/' + id, null, function () { | 
 |  |  |         //         febs.alert.success('禁用成功'); | 
 |  |  |         //         $query.click(); | 
 |  |  |         //     }); | 
 |  |  |         // } | 
 |  |  |         // function openAccount(id) { | 
 |  |  |         //     febs.get(ctx + 'admin/mallMember/openAccount/' + id, null, function () { | 
 |  |  |         //         febs.alert.success('开启成功'); | 
 |  |  |         //         $query.click(); | 
 |  |  |         //     }); | 
 |  |  |         // } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         // 查询按钮 | 
 |  |  |         $query.on('click', function () { | 
 |  |  |             var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type}); | 
 |  |  |             tableIns.reload({where: params, page: {curr: 1}}); | 
 |  |  |         }); | 
 |  |  |  | 
 |  |  |         // 刷新按钮 | 
 |  |  |         $reset.on('click', function () { | 
 |  |  |             $searchForm[0].reset(); | 
 |  |  |             sortObject.type = 'null'; | 
 |  |  |             tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); | 
 |  |  |         }); | 
 |  |  |  | 
 |  |  |         function initTable() { | 
 |  |  |             tableIns = febs.table.init({ | 
 |  |  |                 elem: $view.find('table'), | 
 |  |  |                 id: 'userAgentTable', | 
 |  |  |                 url: ctx + 'admin/mallMember/getAgentList', | 
 |  |  |                 cols: [[ | 
 |  |  |                     {field: 'phone', title: '手机号', minWidth: 150,align:'left'}, | 
 |  |  |                     {field: 'name', title: '名称', minWidth: 100,align:'left'}, | 
 |  |  |                     {field: 'inviteId', title: '邀请码', minWidth: 100,align:'left'}, | 
 |  |  |                     {field: 'level', title: '代理层级', minWidth: 100,align:'left'}, | 
 |  |  |                     {field: 'memberNum', title: '下级', minWidth: 100,align:'left'}, | 
 |  |  |                     {field: 'allMemberNum', title: '我的团队总数', minWidth: 100,align:'left'}, | 
 |  |  |                     // {title: '操作', | 
 |  |  |                     //     templet: function (d) { | 
 |  |  |                     //         if (d.accountStatus === 1) { | 
 |  |  |                     //             return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="see" shiro:hasPermission="user:update">详情</button>' | 
 |  |  |                     //                 +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="close" shiro:hasPermission="user:update">禁用</button>' | 
 |  |  |                     //                 +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="moneyFlow" shiro:hasPermission="user:update">资金流水</button>' | 
 |  |  |                     // | 
 |  |  |                     //         }else{ | 
 |  |  |                     //             return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="see" shiro:hasPermission="user:update">详情</button>' | 
 |  |  |                     //                 +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="open" shiro:hasPermission="user:update">启用</button>' | 
 |  |  |                     //                 +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="moneyFlow" shiro:hasPermission="user:update">资金流水</button>' | 
 |  |  |                     // | 
 |  |  |                     //         } | 
 |  |  |                     //     },minWidth: 300,align:'center'} | 
 |  |  |                 ]] | 
 |  |  |             }); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         // 获取查询参数 | 
 |  |  |         function getQueryParams() { | 
 |  |  |             return { | 
 |  |  |                 name: $searchForm.find('input[name="name"]').val().trim(), | 
 |  |  |                 account: $searchForm.find('input[name="account"]').val().trim(), | 
 |  |  |                 level: $searchForm.find("select[name='level']").val(), | 
 |  |  |             }; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     }) | 
 |  |  | </script> | 
 
 |  |  | 
 |  |  |                                 return '' | 
 |  |  |                             } | 
 |  |  |                         }, minWidth: 80,align:'center'}, | 
 |  |  |                     {field: 'type', title: '支付方式', | 
 |  |  |                         templet: function (d) { | 
 |  |  |                             if (d.type === 3) { | 
 |  |  |                                 return '<span>'+d.payMethod+'</span>' | 
 |  |  |                             } else{ | 
 |  |  |                                 return '' | 
 |  |  |                             } | 
 |  |  |                         }, minWidth: 80,align:'center'}, | 
 |  |  |                     {field: 'createdTime', title: '创建时间', minWidth: 180,align:'center'} | 
 |  |  |                 ]] | 
 |  |  |             }); | 
 
 |  |  | 
 |  |  | <div class="layui-fluid layui-anim febs-anim" id="febs-order" lay-title="商品列表"> | 
 |  |  | <div class="layui-fluid layui-anim febs-anim" id="febs-order" lay-title="订单列表"> | 
 |  |  |     <div class="layui-row febs-container"> | 
 |  |  |         <div class="layui-col-md12"> | 
 |  |  |             <div class="layui-card"> |