|
|
@@ -0,0 +1,509 @@
|
|
|
+let tableIns;
|
|
|
+let tablePlayerLog;
|
|
|
+let tablePlayerProfit;
|
|
|
+let tree;
|
|
|
+let userId;
|
|
|
+let openIndex;
|
|
|
+
|
|
|
+layui.use(['element', 'form', 'table', 'layer', 'laydate', 'tree', 'util'], function () {
|
|
|
+ let table = layui.table;
|
|
|
+ let form = layui.form;//select、单选、复选等依赖form
|
|
|
+ form.verify({
|
|
|
+ positiveNumberRequiredTrue: [/^(([0-9]+[\.]?[0-9]+)|[1-9])$/, '只能填写正数'],//必填,且只能输入正数
|
|
|
+ positiveWholeNumberRequiredTrue: [/^[+]{0,1}(\d+)$/, '只能填写正整数'],//必填,且只能输入正整数
|
|
|
+ });
|
|
|
+
|
|
|
+ let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
|
|
|
+ let laydate = layui.laydate;
|
|
|
+ tree = layui.tree;
|
|
|
+ let height = document.documentElement.clientHeight * 0.8;
|
|
|
+ //用户列表
|
|
|
+ tableIns = table.render({
|
|
|
+ elem: '#mainTable'
|
|
|
+ , url: ctx + "/sys/sysComUsers/findCharacters"
|
|
|
+ , method: 'POST'
|
|
|
+ //请求前参数处理
|
|
|
+ , request: {
|
|
|
+ pageName: 'page' //页码的参数名称,默认:page
|
|
|
+ , limitName: 'rows' //每页数据量的参数名,默认:limit
|
|
|
+ }
|
|
|
+ , where: {sidx: "desc", sord: "createTime"}
|
|
|
+ , response: {
|
|
|
+ statusName: 'flag' //规定数据状态的字段名称,默认:code
|
|
|
+ , statusCode: true //规定成功的状态码,默认:0
|
|
|
+ , msgName: 'msg' //规定状态信息的字段名称,默认:msg
|
|
|
+ , countName: 'records' //规定数据总数的字段名称,默认:count
|
|
|
+ , dataName: 'rows' //规定数据列表的字段名称,默认:data
|
|
|
+ }
|
|
|
+ //响应后数据处理
|
|
|
+ , parseData: function (res) { //res 即为原始返回的数据
|
|
|
+ $("#addForm")[0].reset();
|
|
|
+ userId = null;
|
|
|
+ form.render();
|
|
|
+ var data = res.data;
|
|
|
+ console.log("返回的地址数据:", data);
|
|
|
+ if (data.rows && data.rows.length > 0) {
|
|
|
+ // userId = data.rows[0].userId;//记录当前访问的userId
|
|
|
+ // let _findData = {userId: data.rows[0].userId, sidx: "desc", sord: "createTime"};
|
|
|
+ // if (!tablePlayerLog) {
|
|
|
+ // initPlayerLog(table, _findData);
|
|
|
+ // } else {
|
|
|
+ // playerLogReload(_findData);
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // if(!tablePlayerProfit){
|
|
|
+ // initPlayerProfit(table, _findData);
|
|
|
+ // }else{
|
|
|
+ // playerProfitReload(_findData);
|
|
|
+ // }
|
|
|
+ }
|
|
|
+
|
|
|
+ return {
|
|
|
+ "flag": res.flag, //解析接口状态
|
|
|
+ "msg": res.msg, //解析提示文本
|
|
|
+ "records": data.records, //解析数据长度
|
|
|
+ "rows": data.rows //解析数据列表
|
|
|
+ };
|
|
|
+ }
|
|
|
+ , toolbar: '#mainTableToolbarDemo'
|
|
|
+ , title: '角色列表'
|
|
|
+ , cols: [[
|
|
|
+ {field: 'id', title: '背包ID', hide: true}
|
|
|
+ , {field: 'userId', title: '用户ID'}
|
|
|
+ , {field: 'roleId', title: '属性表ID'}
|
|
|
+ , {field: 'roleType', title: '种类', hide: true}
|
|
|
+ , {field: 'name', title: '名字'}
|
|
|
+ , {field: 'exp', title: '经验'}
|
|
|
+ , {field: 'level', title: '等级'}
|
|
|
+ , {field: 'power', title: '力量'}
|
|
|
+ , {field: 'intelligence', title: '智力值'}
|
|
|
+ , {field: 'skills', title: '技巧值'}
|
|
|
+ , {field: 'random', title: '随机属性值', hide: true}
|
|
|
+ , {
|
|
|
+ field: 'professional', title: '当前工作', templet: function (d) {
|
|
|
+ //挖矿,勘探,运输,伐木
|
|
|
+ if (d.professional == 0) {
|
|
|
+ return '<span style="color: red">无工作</span>';
|
|
|
+ } else if (d.professional == 1) {
|
|
|
+ return '<span style="color: green">挖矿</span>';
|
|
|
+ } else if (d.professional == 2) {
|
|
|
+ return '<span style="color: green">勘探</span>';
|
|
|
+ } else if (d.professional == 3) {
|
|
|
+ return '<span style="color: green">运输</span>';
|
|
|
+ } else if (d.professional == 4) {
|
|
|
+ return '<span style="color: green">伐木</span>';
|
|
|
+ } else {
|
|
|
+ return '未添加:' + d.professional;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ , {field: 'workPos', title: '工作位置'}
|
|
|
+ , {field: 'action', title: '携带动作'}
|
|
|
+ , {field: 'interactive', title: '互动事件'}
|
|
|
+ , {field: 'state', title: '状态', hide: true}
|
|
|
+ , {field: 'modelId', title: '模型ID'}
|
|
|
+ , {field: 'modelColor', title: '颜色ID'}
|
|
|
+ , {field: 'createTime', title: '创建时间', hide: true}
|
|
|
+ , {field: 'updateTime', title: '更新时间', hide: true}
|
|
|
+ , {fixed: 'right', title: '操作', width: 140, toolbar: '#mainTableBarDemo'}
|
|
|
+ ]]
|
|
|
+ , defaultToolbar: ['', 'exports', 'print']
|
|
|
+ , page: true
|
|
|
+ , height: height
|
|
|
+ , cellMinWidth: 80
|
|
|
+ });
|
|
|
+
|
|
|
+ //头工具栏事件
|
|
|
+ table.on('toolbar(test)', function (obj) {
|
|
|
+ switch (obj.event) {
|
|
|
+ case 'query':
|
|
|
+ //根据用户地址查询
|
|
|
+ findByUserAddress(form);
|
|
|
+ break;
|
|
|
+ case 'playerLogReload':
|
|
|
+ playerLogReload();
|
|
|
+ break;
|
|
|
+
|
|
|
+ case 'addNewRow':
|
|
|
+ let queryByAddress = $("#queryByAddress").val();
|
|
|
+ //获取菜单数据
|
|
|
+ if (queryByAddress.length <= 0) {
|
|
|
+ layer.msg("输入用户钱包地址新增", {icon: 2, time: 1000}, function () {
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $.post(ctx + "/sys/sysComUsers/findUserIdByAddress", {address: queryByAddress}, function (res) {
|
|
|
+ if (!res.flag) {
|
|
|
+ layer.msg(res.msg, {icon: 2, time: 2000}, function () {
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ //类型,后面进入页面时候获取一次配置
|
|
|
+ // $('#roleId').find("option").remove();
|
|
|
+ // $('#roleId').append(new Option("角色1", "1"));
|
|
|
+ // $('#roleId').append(new Option("角色2", "2"));
|
|
|
+ // $('#roleId').append(new Option("角色3", "3"));
|
|
|
+ // $('#roleId').append(new Option("角色4", "4"));
|
|
|
+ // form.render("select");
|
|
|
+
|
|
|
+ //按地址查询返回userId后,添加用户信息
|
|
|
+ $("#tableId").css("display", "none");
|
|
|
+ $("#tableTime").css("display", "none");
|
|
|
+ $("#saveBtn").css("display", "none");
|
|
|
+ $("#addBtn").css("display", "block");
|
|
|
+ $("#addForm")[0].reset();
|
|
|
+ // console.log(res);
|
|
|
+ userId = res.data.userId;//记录当前访问的userId
|
|
|
+ form.val("addForm",{"userId":userId});
|
|
|
+ form.render();
|
|
|
+ openIndex = layer.open({
|
|
|
+ type: 1, //可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)
|
|
|
+ title: ['新增数据', 'font-size:18px;'],//数组第二项可以写任意css样式;如果你不想显示标题栏,你可以title: false
|
|
|
+ area: ['50%', '80%'],
|
|
|
+ content: $('#show_add_div')
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //监听行工具事件
|
|
|
+ table.on('tool(test)', function (obj) {
|
|
|
+ let data = obj.data;
|
|
|
+ //编辑
|
|
|
+ if (obj.event === 'edit') {
|
|
|
+ $("#tableId").css("display", "block");
|
|
|
+ $("#tableTime").css("display", "block");
|
|
|
+ $("#saveBtn").css("display", "block");
|
|
|
+ $("#addBtn").css("display", "none");
|
|
|
+ //回显操作表单
|
|
|
+ $("#comForm")[0].reset();
|
|
|
+ $("#comForm").form(data);
|
|
|
+ form.render();
|
|
|
+
|
|
|
+ openIndex = layer.open({
|
|
|
+ type: 1, //可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)
|
|
|
+ title: ['修改数据', 'font-size:18px;'],//数组第二项可以写任意css样式;如果你不想显示标题栏,你可以title: false
|
|
|
+ area: ['80%', '80%'],
|
|
|
+ content: $('#show_div')
|
|
|
+ });
|
|
|
+ } else if (obj.event === 'del') {
|
|
|
+ layer.confirm('真的删除行么?', function (index) {
|
|
|
+ $.post(ctx + "/sys/sysComUsers/deleteCharacters", {id: data.id}, function (data) {
|
|
|
+ if (!data.flag) {
|
|
|
+ layer.msg(data.msg, {icon: 2, time: 2000}, function () {
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ obj.del();
|
|
|
+ tableIns.reload();
|
|
|
+ });
|
|
|
+ layer.close(index);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ //日期选择器
|
|
|
+ laydate.render({
|
|
|
+ elem: '#expiredTimeDate',
|
|
|
+ format: "yyyy-MM-dd HH:mm:ss"
|
|
|
+ });
|
|
|
+
|
|
|
+ //监听提交
|
|
|
+ form.on('submit(comFilter)', function (data) {
|
|
|
+ comFormSave(false);
|
|
|
+ });
|
|
|
+ form.on('submit(comAddFilter)', function (data) {
|
|
|
+ comFormAdd();
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#saveBtn").css("display", "none");
|
|
|
+ $("#addBtn").css("display", "none");
|
|
|
+});
|
|
|
+
|
|
|
+
|
|
|
+function findByUserAddress(form) {
|
|
|
+ if(form){
|
|
|
+ //重置数据
|
|
|
+ $("#comForm")[0].reset();
|
|
|
+ form.render();
|
|
|
+ }
|
|
|
+ let queryByAddress = $("#queryByAddress").val();
|
|
|
+ //获取菜单数据
|
|
|
+ if (queryByAddress.length <= 0) {
|
|
|
+ layer.msg("输入用户钱包地址查询", {icon: 2, time: 1000}, function () {
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ tableIns.reload({
|
|
|
+ page: {
|
|
|
+ curr: 1 //重新从第 1 页开始
|
|
|
+ , limit: 10
|
|
|
+ },
|
|
|
+ method: 'POST'
|
|
|
+ , url: ctx + "/sys/sysComUsers/findCharacters"
|
|
|
+ , where: {address: queryByAddress, sidx: "desc", sord: "createTime"}
|
|
|
+ , done: function (res, curr, count) {
|
|
|
+ // console.log(res, curr, count);
|
|
|
+ $("input[name='queryByAddress']").val(queryByAddress);
|
|
|
+ //this.where={};
|
|
|
+ //不清空,有问题:搜索条件会保留
|
|
|
+ //清空, 有问题:分页的时候没有搜索条件了,分页会受到影响
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 提交保存
|
|
|
+ */
|
|
|
+function comFormSave(isAddNew) {
|
|
|
+ let comForm = $("#comForm").serializeObject();
|
|
|
+ if (!comForm.id && !isAddNew) {
|
|
|
+ layer.msg("选择编辑的对象", {icon: 2, time: 1000}, function () {
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $.post(ctx + "/sys/sysComUsers/saveCharacters", comForm, function (data) {
|
|
|
+ if (!data.flag) {
|
|
|
+ layer.msg(data.msg, {icon: 2, time: 2000}, function () {
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ layer.close(openIndex);
|
|
|
+ tableIns.reload();
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+function comFormAdd() {
|
|
|
+ let addForm = $("#addForm").serializeObject();
|
|
|
+ console.log(addForm);
|
|
|
+ $.post(ctx + "/sys/sysComUsers/addCharacters", {userId: addForm.userId, roleId: addForm.roleId}, function (data) {
|
|
|
+ if (!data.flag) {
|
|
|
+ layer.msg(data.msg, {icon: 2, time: 2000}, function () {
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ layer.close(openIndex);
|
|
|
+ findByUserAddress();
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 用户操作日志
|
|
|
+ * @param table
|
|
|
+ * @param data
|
|
|
+ */
|
|
|
+function initPlayerLog(table, data) {
|
|
|
+ //用户操作playerLog
|
|
|
+ // console.log("playerLog");
|
|
|
+ tablePlayerLog = table.render({
|
|
|
+ elem: '#comPlayerLogTable'
|
|
|
+ , url: ctx + "/sys/sysComUsers/findPlayerLogPage"
|
|
|
+ , method: 'POST'
|
|
|
+ //请求前参数处理
|
|
|
+ , request: {
|
|
|
+ pageName: 'page' //页码的参数名称,默认:page
|
|
|
+ , limitName: 'rows' //每页数据量的参数名,默认:limit
|
|
|
+ }
|
|
|
+ , where: data
|
|
|
+ , response: {
|
|
|
+ statusName: 'flag' //规定数据状态的字段名称,默认:code
|
|
|
+ , statusCode: true //规定成功的状态码,默认:0
|
|
|
+ , msgName: 'msg' //规定状态信息的字段名称,默认:msg
|
|
|
+ , countName: 'records' //规定数据总数的字段名称,默认:count
|
|
|
+ , dataName: 'rows' //规定数据列表的字段名称,默认:data
|
|
|
+ }
|
|
|
+ //响应后数据处理
|
|
|
+ , parseData: function (res) { //res 即为原始返回的数据
|
|
|
+ let data = res.data;
|
|
|
+ // console.log("playerLog",res);
|
|
|
+ return {
|
|
|
+ "flag": res.flag, //解析接口状态
|
|
|
+ "msg": res.msg, //解析提示文本
|
|
|
+ "records": data.records, //解析数据长度
|
|
|
+ "rows": data.rows //解析数据列表
|
|
|
+ };
|
|
|
+ }
|
|
|
+ , toolbar: '#comPlayerLogTableToolbarDemo'
|
|
|
+ , title: '用户仓库操作列表'
|
|
|
+ , cols: [[
|
|
|
+ {field: 'id', title: 'ID', hide: true}
|
|
|
+ , {field: 'userId', title: 'userId', width: 260}
|
|
|
+ , {field: 'tId', title: '目标id', width: 100}
|
|
|
+ , {
|
|
|
+ field: 'tType', title: '交易的类型', width: 100, templet: function (d) {
|
|
|
+ if (d.tType == 0) { // 自定义内容
|
|
|
+ return '<span style="color: green">收获果实</span>';
|
|
|
+ } else if (d.tType == 1) {
|
|
|
+ return '<span style="color: red">种植种子</span>';
|
|
|
+ } else if (d.tType == 2) {
|
|
|
+ return '<span style="color: red">赠送</span>';
|
|
|
+ } else if (d.tType == 3) {
|
|
|
+ return '<span style="color: green">被赠送</span>';
|
|
|
+ } else if (d.tType == 4) {
|
|
|
+ return '<span style="color: green">钻石兑换种子</span>';
|
|
|
+ } else if (d.tType == 5) {
|
|
|
+ return '<span style="color: red">出售果实</span>';
|
|
|
+ } else if (d.tType == 6) {
|
|
|
+ return '<span style="color: green">偷取果实</span>';
|
|
|
+ } else if (d.tType == 7) {
|
|
|
+ return '<span style="color: red">断电扣除果实</span>';
|
|
|
+ } else {
|
|
|
+ return '<span style="color: green">待添加:</span>' + d.tType;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ , {field: 'tName', title: '物品名字', width: 120}
|
|
|
+ // , {field: 'tAmount', title: '交易数量', width: 150}
|
|
|
+ // , {field: 'beforeAmount', title: '交易前数量'}
|
|
|
+ // , {field: 'afterAmount', title: '交易后数量'}
|
|
|
+ , {
|
|
|
+ field: 'tAmount', title: '交易数量', width: 150, templet: function (d) {
|
|
|
+ return (d.tAmount + d.tPart).toFixed(5);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ , {
|
|
|
+ field: 'beforeAmount', title: '交易前数量', templet: function (d) {
|
|
|
+ return (d.beforeAmount + d.beforePart).toFixed(5);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ , {
|
|
|
+ field: 'afterAmount', title: '交易后数量', templet: function (d) {
|
|
|
+ return (d.afterAmount + d.afterPart).toFixed(5);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ , {field: 'tLoss', title: '系统扣除部分'}
|
|
|
+ , {field: 'lMultiple', title: 'land倍数', width: 80}
|
|
|
+ , {
|
|
|
+ field: 'withered', title: '损耗类型', width: 100, templet: function (d) {
|
|
|
+ if (d.withered == 0) { // 自定义内容
|
|
|
+ return '<span style="color: green">---</span>';
|
|
|
+ } else if (d.withered == 1) {
|
|
|
+ return '<span style="color: red">枯萎(死亡)</span>';
|
|
|
+ } else if (d.withered == 2) {
|
|
|
+ return '<span style="color: red">断电损耗</span>';
|
|
|
+ } else {
|
|
|
+ return '<span style="color: green">待添加:</span>' + d.withered;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ , {field: 'createTime', title: '创建时间'}
|
|
|
+ , {field: 'updateTime', title: '更新时间', hide: true}
|
|
|
+ ]]
|
|
|
+ , defaultToolbar: ['', 'exports', 'print']
|
|
|
+ , page: true
|
|
|
+ , height: 500
|
|
|
+ , cellMinWidth: 80
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+function playerLogReload(data) {
|
|
|
+ tablePlayerLog.reload({
|
|
|
+ page: {
|
|
|
+ curr: 1 //重新从第 1 页开始
|
|
|
+ , limit: 10
|
|
|
+ }
|
|
|
+ , method: 'POST'
|
|
|
+ , url: ctx + "/sys/sysComUsers/findPlayerLogPage"
|
|
|
+ , where: data
|
|
|
+ , done: function (res, curr, count) {
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 用户偷取的操作
|
|
|
+ * @param table
|
|
|
+ * @param data
|
|
|
+ */
|
|
|
+function initPlayerProfit(table, data) {
|
|
|
+ //用户操作PlayerProfit
|
|
|
+ tablePlayerProfit = table.render({
|
|
|
+ elem: '#comPlayerProfitTable'
|
|
|
+ , url: ctx + "/sys/sysComUsers/findPlayerProfitPage"
|
|
|
+ , method: 'POST'
|
|
|
+ //请求前参数处理
|
|
|
+ , request: {
|
|
|
+ pageName: 'page' //页码的参数名称,默认:page
|
|
|
+ , limitName: 'rows' //每页数据量的参数名,默认:limit
|
|
|
+ }
|
|
|
+ , where: data
|
|
|
+ , response: {
|
|
|
+ statusName: 'flag' //规定数据状态的字段名称,默认:code
|
|
|
+ , statusCode: true //规定成功的状态码,默认:0
|
|
|
+ , msgName: 'msg' //规定状态信息的字段名称,默认:msg
|
|
|
+ , countName: 'records' //规定数据总数的字段名称,默认:count
|
|
|
+ , dataName: 'rows' //规定数据列表的字段名称,默认:data
|
|
|
+ }
|
|
|
+ //响应后数据处理
|
|
|
+ , parseData: function (res) { //res 即为原始返回的数据
|
|
|
+ let data = res.data;
|
|
|
+ // console.log("playerLog",res);
|
|
|
+ return {
|
|
|
+ "flag": res.flag, //解析接口状态
|
|
|
+ "msg": res.msg, //解析提示文本
|
|
|
+ "records": data.records, //解析数据长度
|
|
|
+ "rows": data.rows //解析数据列表
|
|
|
+ };
|
|
|
+ }
|
|
|
+ , toolbar: '#comPlayerProfitTableToolbarDemo'
|
|
|
+ , title: '用户仓库操作列表'
|
|
|
+ , cols: [[
|
|
|
+ {field: 'id', title: 'ID', hide: true}
|
|
|
+ , {field: 'userId', title: 'userId', width: 260}
|
|
|
+ , {field: 'targetId', title: '目标id', width: 100}
|
|
|
+ , {field: 'plantFlag', title: '种植标识', width: 120}
|
|
|
+ , {field: 'landId', title: '土地号数', width: 120}
|
|
|
+ , {
|
|
|
+ field: 'leaseDate', title: '租赁类型', width: 100, templet: function (d) {
|
|
|
+ if (d.leaseDate == 1) { // 自定义内容
|
|
|
+ return '<span style="color: green">3个月</span>';
|
|
|
+ } else if (d.leaseDate == 2) {
|
|
|
+ return '<span style="color: red">1年</span>';
|
|
|
+ } else if (d.leaseDate == 3) {
|
|
|
+ return '<span style="color: red">5年</span>';
|
|
|
+ } else if (d.leaseDate == 4) {
|
|
|
+ return '<span style="color: red">养殖场</span>';
|
|
|
+ } else {
|
|
|
+ return '<span style="color: green">待添加:</span>' + d.leaseDate;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ , {field: 'leaseMultiple', title: '租赁倍数', width: 120}
|
|
|
+ , {field: 'harvest', title: '土地产出量', width: 150}
|
|
|
+ , {field: 'profit', title: '利润总值'}
|
|
|
+ , {field: 'profitAfter', title: '交易后利润'}
|
|
|
+ , {field: 'stolen', title: '目标损失量', width: 150}
|
|
|
+ , {field: 'finalSteal', title: '玩家偷取得到的数量'}
|
|
|
+ , {field: 'profitRatio', title: '收成的比例值'}
|
|
|
+ , {field: 'stealRatio', title: '比例区间1%~3%'}
|
|
|
+ , {field: 'finalRatio', title: '损失比例', width: 80}
|
|
|
+ , {field: 'createTime', title: '创建时间'}
|
|
|
+ , {field: 'updateTime', title: '更新时间', hide: true}
|
|
|
+ ]]
|
|
|
+ , defaultToolbar: ['', 'exports', 'print']
|
|
|
+ , page: true
|
|
|
+ , height: 500
|
|
|
+ , cellMinWidth: 80
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+function playerProfitReload(data) {
|
|
|
+ tablePlayerProfit.reload({
|
|
|
+ page: {
|
|
|
+ curr: 1 //重新从第 1 页开始
|
|
|
+ , limit: 10
|
|
|
+ }
|
|
|
+ , method: 'POST'
|
|
|
+ , url: ctx + "/sys/sysComUsers/findPlayerProfitPage"
|
|
|
+ , where: data
|
|
|
+ , done: function (res, curr, count) {
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|