From 7f55c18d7db36c9cad2ac96e481680bc1107e51c Mon Sep 17 00:00:00 2001 From: Hentua <wangdoubleone@gmail.com> Date: Thu, 15 Jun 2023 11:16:11 +0800 Subject: [PATCH] Merge branch 'meiye_mall' of http://120.27.238.55:7000/r/xc-mall into meiye_mall --- src/main/resources/templates/febs/views/modules/mallMember/teamList.html | 146 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 146 insertions(+), 0 deletions(-) diff --git a/src/main/resources/templates/febs/views/modules/mallMember/teamList.html b/src/main/resources/templates/febs/views/modules/mallMember/teamList.html new file mode 100644 index 0000000..f45351a --- /dev/null +++ b/src/main/resources/templates/febs/views/modules/mallMember/teamList.html @@ -0,0 +1,146 @@ +<div class="layui-fluid layui-anim febs-anim" id="febs-team-list" 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="team-list-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="query" 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="refererId" autocomplete="off" data-th-value="${refererId}" class="layui-input"> + </div> + </div> + <div class="layui-inline febs-hide"> + <label class="layui-form-label">上级邀请码:</label> + <div class="layui-input-inline"> + <input type="text" placeholder="" name="type" autocomplete="off" data-th-value="${type}" class="layui-input"> + </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="teamListTable" lay-data="{id: 'teamListTable'}"></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> + +<script type="text/html" id="directCntTemplate"> + <a lay-href="/modules/mallMember/teamList/1/{{d.inviteId}}" target="_blank">{{d.directCnt}}</a> +</script> +<script type="text/html" id="teamCntTemplate"> + <a lay-href="/modules/mallMember/teamList/2/{{d.inviteId}}" target="_blank">{{d.teamCnt}}</a> +</script> +<script type="text/html" id="teamMoneyFlow"> + <a lay-href="/modules/mallMember/moneyFlowList?refererId={{d.inviteId}}" target="_blank">{{d.teamProfitAmount}}</a> +</script> +<script type="text/html" id="selfMoneyFlow"> + <a lay-href="/modules/mallMember/moneyFlowList?inviteId={{d.inviteId}}" target="_blank">{{d.selfProfitAmount}}</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-team-list'), + $query = $view.find('#query'), + $reset = $view.find('#reset'), + $searchForm = $view.find('form'), + refererId = $searchForm.find('input[name="refererId"]').val().trim(), + sortObject = {field: 'phone', type: null}, + tableIns; + + form.render(); + + // 表格初始化 + initTable(); + + // 初始化表格操作栏各个按钮功能 + table.on('tool(teamListTable)', function (obj) { + var data = obj.data, + layEvent = obj.event; + if (layEvent === 'agentLevelUpdate') { + febs.modal.open('编辑', 'modules/mallMember/agentLevelUpdate/' + data.id, { + btn: ['确认', '取消'], + yes: function (index, layero) { + $('#agent-level-edit').find('#submit').trigger('click'); + }, + btn2: function () { + layer.closeAll(); + } + }); + } + }); + + // 查询按钮 + $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() { + var type = $searchForm.find('input[name="type"]').val().trim(), + tableIns = febs.table.init({ + elem: $view.find('table'), + id: 'teamListTable', + url: ctx + 'admin/mallMember/teamList?referrerId=' + refererId + "&type=" + type, + where : getQueryParams, + cols: [[ + {field: 'name', title: '会员名称', minWidth: 100}, + {field: 'phone', title: '会员账号', minWidth: 100}, + {field: 'directCnt', title: '直推人数', templet:"#directCntTemplate", minWidth: 100}, + {field: 'teamCnt', title: '团队人数', templet:"#teamCntTemplate", minWidth: 100}, + {field: 'selfProfitAmount', title: '会员收益', templet:"#selfMoneyFlow", minWidth: 100}, + {field: 'teamOrderAmount', title: '团队订单金额', minWidth: 100}, + {field: 'teamProfitAmount', title: '团队收益', templet:"#teamMoneyFlow", minWidth: 100}, + ]] + }); + } + + // 获取查询参数 + function getQueryParams() { + return { + query: $searchForm.find('input[name="query"]').val().trim(), + referrerId: $searchForm.find('input[name="refererId"]').val().trim(), + }; + } + }) +</script> +<script> +</script> \ No newline at end of file -- Gitblit v1.9.1