From 3156be749dfc93764850b27f7cc2b4514a3ae4d0 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Mon, 30 Oct 2023 16:36:54 +0800 Subject: [PATCH] 用户收益列表 --- src/main/resources/templates/febs/views/modules/chat/userPerkList.html | 155 +++++++++++++++++++++++++++------------------------ 1 files changed, 82 insertions(+), 73 deletions(-) diff --git a/src/main/resources/templates/febs/views/modules/chat/userPerkList.html b/src/main/resources/templates/febs/views/modules/chat/userPerkList.html index 2f30f11..28e916d 100644 --- a/src/main/resources/templates/febs/views/modules/chat/userPerkList.html +++ b/src/main/resources/templates/febs/views/modules/chat/userPerkList.html @@ -3,7 +3,7 @@ <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"> + <form class="layui-form layui-table-form" lay-filter="user-perk-table-form"> <div class="layui-row"> <div class="layui-col-md10"> <div class="layui-form-item"> @@ -13,28 +13,28 @@ <input type="text" placeholder="电话号码" name="phone" autocomplete="off" class="layui-input"> </div> </div> - <div class="layui-inline"> - <label class="layui-form-label">昵称:</label> - <div class="layui-input-inline"> - <input type="text" placeholder="昵称" name="nickName" autocomplete="off" class="layui-input"> - </div> - </div> +<!-- <div class="layui-inline">--> +<!-- <label class="layui-form-label">昵称:</label>--> +<!-- <div class="layui-input-inline">--> +<!-- <input type="text" placeholder="昵称" name="nickName" autocomplete="off" class="layui-input">--> +<!-- </div>--> +<!-- </div>--> <div class="layui-inline"> <label class="layui-form-label">邀请码:</label> <div class="layui-input-inline"> - <input type="text" placeholder="邀请码" name="inviteId" autocomplete="off" class="layui-input"> + <input type="text" placeholder="邀请码(获取团队下的所有成员)" name="inviteId" autocomplete="off" class="layui-input"> </div> </div> - <div class="layui-inline"> - <label class="layui-form-label">账号状态:</label> - <div class="layui-input-inline"> - <select name="status"> - <option value="">请选择</option> - <option value="Y">正常</option> - <option value="N">禁用</option> - </select> - </div> - </div> +<!-- <div class="layui-inline">--> +<!-- <label class="layui-form-label">用户类型:</label>--> +<!-- <div class="layui-input-inline">--> +<!-- <select name="isRobot">--> +<!-- <option value="">请选择</option>--> +<!-- <option value="0">用户</option>--> +<!-- <option value="1">机器人</option>--> +<!-- </select>--> +<!-- </div>--> +<!-- </div>--> </div> </div> <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> @@ -47,7 +47,7 @@ </div> </div> </form> - <table lay-filter="userChatTable" lay-data="{id: 'userChatTable'}"></table> + <table lay-filter="userPerkTable" lay-data="{id: 'userPerkTable'}"></table> </div> </div> </div> @@ -66,6 +66,13 @@ <input type="checkbox" value={{d.userId}} lay-text="是|否" checked lay-skin="switch" lay-filter="switchGetBoom"> {{# } else { }} <input type="checkbox" value={{d.userId}} lay-text="是|否" lay-skin="switch" lay-filter="switchGetBoom"> + {{# } }} +</script> +<script type="text/html" id="isRobot-type"> + {{# if(d.isRobot == 1) { }} + <span class="layui-badge febs-bg-green">机器人</span> + {{# } else { }} + <span class="layui-badge febs-bg-blue">用户</span> {{# } }} </script> <style> @@ -119,75 +126,77 @@ function getQueryParams() { return { phone: $searchForm.find('input[name="phone"]').val().trim(), - nickName: $searchForm.find('input[name="nickName"]').val().trim(), + // nickName: $searchForm.find('input[name="nickName"]').val().trim(), inviteId: $searchForm.find('input[name="inviteId"]').val().trim(), - status: $searchForm.find("select[name='status']").val() + // isRobot: $searchForm.find("select[name='isRobot']").val() }; } function initTable() { tableIns = febs.table.init({ elem: $view.find('table'), - id: 'userChatTable', + id: 'userPerkTable', url: ctx + 'admin/chat/getUserPerkList', - toolbar:"#toolbar", - defaultToolbar:[], + // toolbar:"#toolbar", + // defaultToolbar:[], totalRow: true ,// 开启合计行 cols: [[ - {type: 'checkbox'}, - {field: 'userId', title: '标识', minWidth: 150,align:'left'}, - {field: 'phone', title: '电话号码', minWidth: 100,align:'left', totalRowText: '合计:',align:'center'}, - {field: 'nickName', title: '昵称', minWidth: 100,align:'left',}, - {field: 'inviteId', title: '邀请码', minWidth: 100,align:'left',align:'center'}, - {field: 'phone', title: '注册号码', minWidth: 150,align:'left',align:'center'}, - {field: 'totalAmount', title: '账户总额', minWidth: 80,align:'left',totalRow: '{{= parseInt(d.totalAmount) }}',align:'center'}, - {field: 'avaAmount', title: '账户余额', minWidth: 80,align:'left',totalRow: '{{= parseInt(d.avaAmount) }}',align:'center'}, - {field: 'groupRedBagNum', title: '群红包数', minWidth: 80,align:'left'}, - {field: 'redBagTotalAmount', title: '红包总额', minWidth: 80,align:'left'}, - {field: 'redBagAvaAmount', title: '未领取', minWidth: 80,align:'left'}, + // {type: 'checkbox'}, + {field: 'userId', title: '标识', minWidth: 40,align:'center'}, + {field: 'phone', title: '电话号码', minWidth: 120,align:'center', totalRowText: '合计:'}, + {field: 'inviteId', title: '邀请码', minWidth: 100,align:'center',}, + {title: '用户类型', minWidth: 100,templet: '#isRobot-type',align:'center'}, + {field: 'totalAmount', title: '账户总额', minWidth: 80,align:'center',totalRow: '{{= parseInt(d.totalAmount) }}'}, + {field: 'avaAmount', title: '账户余额', minWidth: 80,align:'center',totalRow: '{{= parseInt(d.avaAmount) }}'}, + {field: 'groupRedBagNum', title: '群红包数', minWidth: 80,align:'center'}, + {field: 'redBagTotalAmount', title: '发红包总额', minWidth: 100,align:'center'}, + {field: 'redBagAvaAmount', title: '未被领取总额', minWidth: 120,align:'center'}, + {field: 'getRedbagAmount', title: '领取红包总额', minWidth: 120,align:'center'}, + {field: 'boomToAmount', title: '中雷扣除', minWidth: 120,align:'center'}, + {field: 'teamPerkAmount', title: '中雷补偿团队奖励', minWidth: 160,align:'center'}, {field: 'getBoom', title: '中雷', templet: '#switchGetBoom', minWidth: 80,align:'center'}, - {field: 'createTime', title: '注册时间', minWidth: 180,align:'center'}, + {field: 'createTime', title: '注册时间', minWidth: 160,align:'center'}, ]] }); } - table.on('toolbar(userChatTable)', function(obj){ - var data = obj.data, - layEvent = obj.event; - - // if (layEvent === 'registerMember') { - // febs.get(ctx + 'admin/chat/registerMember/', null, function () { - // febs.alert.success('操作成功'); - // $query.click(); - // }); - // } - - if (layEvent === 'registerMember') { - var checkData = table.checkStatus('userChatTable').data; - if (checkData.length <= 0) { - febs.alert.warn('请选择需要的用户'); - return; - } - if (checkData.length > 1) { - febs.alert.warn('请选择一个用户'); - return; - } - registerMember("添加会员", checkData[0].inviteId, 1); - } - - if (layEvent === 'balance') { - var checkData = table.checkStatus('userChatTable').data; - if (checkData.length <= 0) { - febs.alert.warn('请选择需要的用户'); - return; - } - if (checkData.length > 1) { - febs.alert.warn('请选择一个用户'); - return; - } - systemPay("修改余额", checkData[0].userId, 1); - } - }); + // table.on('toolbar(userPerkTable)', function(obj){ + // var data = obj.data, + // layEvent = obj.event; + // + // // if (layEvent === 'registerMember') { + // // febs.get(ctx + 'admin/chat/registerMember/', null, function () { + // // febs.alert.success('操作成功'); + // // $query.click(); + // // }); + // // } + // + // if (layEvent === 'registerMember') { + // var checkData = table.checkStatus('userPerkTable').data; + // if (checkData.length <= 0) { + // febs.alert.warn('请选择需要的用户'); + // return; + // } + // if (checkData.length > 1) { + // febs.alert.warn('请选择一个用户'); + // return; + // } + // registerMember("添加会员", checkData[0].inviteId, 1); + // } + // + // if (layEvent === 'balance') { + // var checkData = table.checkStatus('userPerkTable').data; + // if (checkData.length <= 0) { + // febs.alert.warn('请选择需要的用户'); + // return; + // } + // if (checkData.length > 1) { + // febs.alert.warn('请选择一个用户'); + // return; + // } + // systemPay("修改余额", checkData[0].userId, 1); + // } + // }); function registerMember(text, inviteId, type) { febs.modal.open(text, 'modules/chat/mallRegisterMember/'+ inviteId, { -- Gitblit v1.9.1