| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- define(["jquery", "easy-admin"], function ($, ea) {
- var init = {
- table_elem: '#currentTable',
- table_render_id: 'currentTableRenderId',
- index_url: 'box.OpenBoxAction/index',
- add_url: 'coupon.couponarea/add',
- edit_url: 'coupon.couponarea/edit',
- delete_url: 'box.OpenBoxAction/delete',
- opentime_url:'coupon.couponarea/addtime',
- export_url: 'mall.cate/export',
- modify_url: 'coupon.couponarea/modify',
- setting_url:'box.OpenBoxAction/setting',
- openboxaction_url: 'box.OpenBoxAction/',
- beforeopen_url:'box.OpenBoxAction/beforeopen',
- beforehandle_url:'box.HandleBoxAction/index',
- };
- var Controller = {
- index: function () {
- ea.table.render({
- init: init,
- toolbar:['refresh','setting',
- [
- // {
- // text: '匹配',
- // url: init.beforehandle_url,
- // method: 'open',
- // auth: 'add',
- // class: 'layui-btn layui-btn-normal layui-btn-sm',
- // icon: 'fa fa-plus '
- // },
- // ,
- // {
- // text: '确认匹配',
- // url: init.beforehandle_url,
- // method: 'open',
- // auth: 'add',
- // class: 'layui-btn layui-btn-normal layui-btn-sm',
- // icon: 'fa fa-plus '
- // }
- ]
- ],
- cols: [[
- {type: "checkbox"},
- {field: 'id', width: 80, title: 'id'},
- {field: 'box_id', minWidth: 80, title: '盒子id'},
- // {field: 'create_time', minWidth: 180, title: '预约时间'},
- {field: 'qi_count', minWidth: 80, title: '第几期'},
- {field: 'lun_count', minWidth: 80, title: '第几轮'},
- {field: 'num', minWidth: 80, title: '数量',templet: function (d) {
- return '<span class="layui-badge layui-bg-green">' + d.num+'</span>';
- }},
- {field: 'pay_type', minWidth: 100, title: '支付类型', search: 'select', selectList: {'1': '积分', '2': '余额'}},
- {field: 'uid', minWidth: 120, title: '用户uid'},
- {field: 'mobile', minWidth: 150, title: '用户手机号'},
- // {field: 'total_free', minWidth: 120, title: '总共消费金额'},
- // {field: 'total_income', minWidth: 120, title: '总盈利'},
- {field: 'yesterday_money', minWidth: 120, title: '昨日盈利',templet: function (d) {
- return '<span class="layui-badge layui-bg-red">' + d.yesterday_money+'</span>';
- }},
- {field: 'total_free', minWidth: 120, title: '总共消费金额'},
- {field: 'total_income', minWidth: 120, title: '总盈利'},
- {field: 'total_appoint_count', minWidth: 120, title: '总共预约次数'},
- {field: 'total_null_box', minWidth: 180, title: '总共空盒个数'},
- {field: 'ubox10', minWidth: 80, title: '普通'},
- {field: 'ubox20', minWidth: 80, title: '稀有'},
- {field: 'ubox30', minWidth: 80, title: '史诗'},
- {field: 'ubox40', minWidth: 80, title: '传说'},
- {field: 'create_time', minWidth: 200, title: '创建时间'},
- {field: 'box10', minWidth: 120, title: '匹配普通'},
- {field: 'box20', minWidth: 120, title: '匹配稀有'},
- {field: 'box30', minWidth: 120, title: '匹配史诗'},
- {field: 'box40', minWidth: 120, title: '匹配传说'},
- // {field: 'box_img', width: 120, title: '图片封面', templet: function (d) {
- // return '<span><img src="' + d.box_img + '" style="width: 60px;height: 60px;border-radius: 60px;"></span>';
- // }},
- // {field: 'box_title', minWidth: 50, title: '福袋名字'},
- {
- width: 120,
- title: '操作',
- fixed: 'right',
- templet: function (d) {
- console.log(d);
- var button = '';
- button += '<button class="layui-btn layui-btn-xs layui-btn-normal" data-open="box.OpenBoxAction/beforeopen?id=' + d.id + '" data-title="提前匹配">提前匹配</button>';
- return button;
- },
- }
- ]],
- });
- ea.listen();
- },
- add: function () {
- ea.listen();
- },
- edit: function () {
- ea.listen();
- },
- addtime: function () {
- ea.listen();
- },
- beforeopen: function (){
- ea.listen();
- },
- setting: function () {
- ea.listen();
- }
- };
- return Controller;
- });
|