|
|
@@ -0,0 +1,324 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
|
|
|
+<head>
|
|
|
+ <th:block th:include="include :: header('直播间礼物列表展示列表')"/>
|
|
|
+</head>
|
|
|
+<body class="pear-container">
|
|
|
+<div class="layui-card">
|
|
|
+ <div class="layui-card-body">
|
|
|
+ <div class="col-sm-12 search-collapse">
|
|
|
+ <form id="formId" class="layui-form">
|
|
|
+ <div class="layui-form-item">
|
|
|
+ <label class="layui-form-label">平台:</label>
|
|
|
+ <div class="layui-input-inline">
|
|
|
+ <select name="platform" dict-code="platform" >
|
|
|
+ <option value="">所有</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <label class="layui-form-label">游戏:</label>
|
|
|
+ <div class="layui-input-inline">
|
|
|
+ <select name="game" dict-code="tk_game" >
|
|
|
+ <option value="">所有</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <label class="layui-form-label">礼物状态:</label>
|
|
|
+ <div class="layui-input-inline">
|
|
|
+ <select name="status" dict-code="gift_status" >
|
|
|
+ <option value="">所有</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <label class="layui-form-label">模式:</label>
|
|
|
+ <div class="layui-input-inline">
|
|
|
+ <select name="mode" dict-code="gift_mode" >
|
|
|
+ <option value="">所有</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <label class="layui-form-label">用户昵称:</label>
|
|
|
+ <div class="layui-input-inline">
|
|
|
+ <input type="text" name="userNickName" placeholder="请输入用户昵称"
|
|
|
+ class="layui-input" />
|
|
|
+ </div>
|
|
|
+ <label class="layui-form-label">主播昵称:</label>
|
|
|
+ <div class="layui-input-inline">
|
|
|
+ <input type="text" name="anchorNickName" placeholder="请输入主播昵称"
|
|
|
+ class="layui-input" />
|
|
|
+ </div>
|
|
|
+ <button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="giftRecord-query">
|
|
|
+ <i class="layui-icon layui-icon-search"></i>
|
|
|
+ 查询
|
|
|
+ </button>
|
|
|
+ <button type="reset" class="pear-btn pear-btn-md">
|
|
|
+ <i class="layui-icon layui-icon-refresh"></i>
|
|
|
+ 重置
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<div class="layui-card">
|
|
|
+ <div class="layui-card-body">
|
|
|
+ <div id="gift-statistics">
|
|
|
+ 付费用户数量:<span id="user-count">0</span>
|
|
|
+ 送礼次数:<span id="gift-count">0</span>
|
|
|
+ 总价值:<span id="total-value">0</span>
|
|
|
+ </div>
|
|
|
+ <table id="giftRecord-table" lay-filter="giftRecord-table"></table>
|
|
|
+<!-- <script type="text/html" id="giftRecord-toolbar">-->
|
|
|
+<!-- <button sec:authorize="hasPermission('/bz/giftRecord/add','bz:giftRecord:add')"-->
|
|
|
+<!-- class="pear-btn pear-btn-primary pear-btn-md" lay-event="add">-->
|
|
|
+<!-- <i class="layui-icon layui-icon-add-1"></i>-->
|
|
|
+<!-- 新增-->
|
|
|
+<!-- </button>-->
|
|
|
+<!-- <button sec:authorize="hasPermission('/bz/giftRecord/remove','bz:giftRecord:remove')"-->
|
|
|
+<!-- class="pear-btn pear-btn-danger pear-btn-md" lay-event="batchRemove">-->
|
|
|
+<!-- <i class="layui-icon layui-icon-delete"></i>-->
|
|
|
+<!-- 删除-->
|
|
|
+<!-- </button>-->
|
|
|
+<!-- </script>-->
|
|
|
+<!-- <script type="text/html" id="giftRecord-bar">-->
|
|
|
+<!-- <button sec:authorize="hasPermission('/bz/giftRecord/edit','bz:giftRecord:edit')"-->
|
|
|
+<!-- class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit"><i-->
|
|
|
+<!-- class="layui-icon layui-icon-edit"></i>-->
|
|
|
+<!-- </button>-->
|
|
|
+<!-- <button sec:authorize="hasPermission('/bz/giftRecord/remove','bz:giftRecord:remove')"-->
|
|
|
+<!-- class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i-->
|
|
|
+<!-- class="layui-icon layui-icon-delete"></i>-->
|
|
|
+<!-- </button>-->
|
|
|
+<!-- </script>-->
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+ <script type="text/html" id="platform_parseDictText">
|
|
|
+ {{layui.dictionary.parseDictText(d.platform, 'platform')}}
|
|
|
+ </script>
|
|
|
+ <script type="text/html" id="game_parseDictText">
|
|
|
+ {{layui.dictionary.parseDictText(d.game, 'tk_game')}}
|
|
|
+ </script>
|
|
|
+ <script type="text/html" id="status_parseDictText">
|
|
|
+ {{layui.dictionary.parseDictText(d.status, 'gift_status')}}
|
|
|
+ </script>
|
|
|
+ <script type="text/html" id="mode_parseDictText">
|
|
|
+ {{layui.dictionary.parseDictText(d.mode, 'gift_mode')}}
|
|
|
+ </script>
|
|
|
+<th:block th:include="include :: footer"/>
|
|
|
+<script>
|
|
|
+ layui.use(['table', 'form', 'jquery', 'dictionary', 'popup'], function () {
|
|
|
+ let table = layui.table;
|
|
|
+ let form = layui.form;
|
|
|
+ let $ = layui.jquery;
|
|
|
+ let popup = layui.popup;
|
|
|
+
|
|
|
+ let prefix = "/bz/giftRecord/";
|
|
|
+
|
|
|
+ let cols = [
|
|
|
+ [
|
|
|
+ {type: 'checkbox'},
|
|
|
+ {
|
|
|
+ field: 'id',
|
|
|
+ title: 'ID'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'platform',
|
|
|
+ title: '平台'
|
|
|
+ , templet: "#platform_parseDictText"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'game',
|
|
|
+ title: '游戏'
|
|
|
+ , templet: "#game_parseDictText"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'giftInfo',
|
|
|
+ title: '礼物信息'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'giftCount',
|
|
|
+ title: '礼物数量'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'giftValue',
|
|
|
+ title: '总价值'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'status',
|
|
|
+ title: '礼物状态'
|
|
|
+ , templet: "#status_parseDictText"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'mode',
|
|
|
+ title: '模式'
|
|
|
+ , templet: "#mode_parseDictText"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'userNickName',
|
|
|
+ title: '用户昵称'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'userId',
|
|
|
+ title: '用户ID'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'anchorCode',
|
|
|
+ title: '主播CODE'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'anchorNickName',
|
|
|
+ title: '主播昵称'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'roomId',
|
|
|
+ title: 'roomId'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'publishTime',
|
|
|
+ title: '赠送时间'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'remark',
|
|
|
+ title: '备注'
|
|
|
+ }
|
|
|
+ // ,
|
|
|
+ // {title: '操作', toolbar: '#giftRecord-bar', align: 'center', width: 130}
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+
|
|
|
+ table.render({
|
|
|
+ elem: '#giftRecord-table',
|
|
|
+ url: prefix + 'data',
|
|
|
+ page: true,
|
|
|
+ cols: cols,
|
|
|
+ skin: 'line',
|
|
|
+ toolbar: '#giftRecord-toolbar',
|
|
|
+ defaultToolbar: [{
|
|
|
+ layEvent: 'refresh',
|
|
|
+ icon: 'layui-icon-refresh',
|
|
|
+ }, 'filter']
|
|
|
+ });
|
|
|
+
|
|
|
+ table.on('tool(giftRecord-table)', function (obj) {
|
|
|
+ if (obj.event === 'remove') {
|
|
|
+ window.remove(obj);
|
|
|
+ } else if (obj.event === 'edit') {
|
|
|
+ window.edit(obj);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ table.on('toolbar(giftRecord-table)', function (obj) {
|
|
|
+ if (obj.event === 'add') {
|
|
|
+ window.add();
|
|
|
+ } else if (obj.event === 'refresh') {
|
|
|
+ window.refresh();
|
|
|
+ } else if (obj.event === 'batchRemove') {
|
|
|
+ window.batchRemove(obj);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ form.on('submit(giftRecord-query)', function (data) {
|
|
|
+ table.reload('giftRecord-table', {where: data.field})
|
|
|
+ $.ajax({
|
|
|
+ url: prefix + "statistics",
|
|
|
+ data: data.field,
|
|
|
+ dataType: 'json',
|
|
|
+ type: 'get',
|
|
|
+ success: function (result) {
|
|
|
+ for (const key in result.data) {
|
|
|
+ $("span#" + key).html(result.data[key]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+
|
|
|
+ window.add = function () {
|
|
|
+ layer.open({
|
|
|
+ type: 2,
|
|
|
+ title: '新增直播间礼物列表展示',
|
|
|
+ shade: 0.1,
|
|
|
+ area: ['550px', '500px'],
|
|
|
+ content: prefix + 'add'
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ window.edit = function (obj) {
|
|
|
+ layer.open({
|
|
|
+ type: 2,
|
|
|
+ title: '修改直播间礼物列表展示',
|
|
|
+ shade: 0.1,
|
|
|
+ area: ['550px', '500px'],
|
|
|
+ content: prefix + 'edit?id=' + obj.data['id']
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ window.remove = function (obj) {
|
|
|
+ layer.confirm('确定要删除该直播间礼物列表展示', {icon: 3, title: '提示'}, function (index) {
|
|
|
+ layer.close(index);
|
|
|
+ let loading = layer.load();
|
|
|
+ $.ajax({
|
|
|
+ url: prefix + "remove/" + obj.data['id'],
|
|
|
+ dataType: 'json',
|
|
|
+ type: 'delete',
|
|
|
+ success: function (result) {
|
|
|
+ layer.close(loading);
|
|
|
+ if (result.success) {
|
|
|
+ layer.msg(result.msg, {icon: 1, time: 1000}, function () {
|
|
|
+ obj.del();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ layer.msg(result.msg, {icon: 2, time: 1000});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ window.batchRemove = function (obj) {
|
|
|
+ let data = table.checkStatus(obj.config.id).data;
|
|
|
+ if (data.length === 0) {
|
|
|
+ layer.msg("未选中数据", {icon: 3, time: 1000});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ let ids = "";
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
+ ids += data[i].id + ",";
|
|
|
+ }
|
|
|
+ ids = ids.substr(0, ids.length - 1);
|
|
|
+ layer.confirm('确定要删除这些直播间礼物列表展示', {icon: 3, title: '提示'}, function (index) {
|
|
|
+ layer.close(index);
|
|
|
+ let loading = layer.load();
|
|
|
+ $.ajax({
|
|
|
+ url: prefix + "batchRemove",
|
|
|
+ dataType: 'json',
|
|
|
+ data: {"ids": ids},
|
|
|
+ type: 'delete',
|
|
|
+ success: function (result) {
|
|
|
+ layer.close(loading);
|
|
|
+ if (result.success) {
|
|
|
+ layer.msg(result.msg, {icon: 1, time: 1000}, function () {
|
|
|
+ table.reload('giftRecord-table');
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ layer.msg(result.msg, {icon: 2, time: 1000});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ window.refresh = function (param) {
|
|
|
+ table.reload('giftRecord-table', {where: param});
|
|
|
+ $.ajax({
|
|
|
+ url: prefix + "statistics",
|
|
|
+ data: param,
|
|
|
+ dataType: 'json',
|
|
|
+ type: 'get',
|
|
|
+ success: function (result) {
|
|
|
+ for (const key in result.data) {
|
|
|
+ $("span#" + key).html(result.data[key]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|