| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- define(["jquery", "easy-admin"], function ($, ea) {
- var init = {
- table_elem: '#currentTable',
- table_render_id: 'currentTableRenderId',
- index_url: 'box.HandleBoxAction/index',
- add_url: 'coupon.couponarea/add',
- edit_url: 'coupon.couponarea/edit',
- delete_url: 'coupon.couponarea/delete',
- opentime_url:'coupon.couponarea/addtime',
- export_url: 'mall.cate/export',
- modify_url: 'coupon.couponarea/modify',
- 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',
- [
- // {
- // 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 '
- // },
- // {
- // text: '导入',
- // url: init.putin_url,
- // method: 'import',
- // auth: 'putin',
- // class: 'layui-btn layui-btn-success layui-btn-sm',
- // icon: 'fa fa-plus ',
- // }
- ]
- ],
- cols: [[
- {type: "checkbox"},
- {field: 'id', width: 80, title: 'id'},
- // {field: 'create_time', minWidth: 180, title: '预约时间'},
- {field: 'goods_id', minWidth: 80, title: '商品id'},
- {field: 'goods_price', minWidth: 80, title: '商品价格'},
- {field: 'uid', minWidth: 80, title: '用户uid'},
- {field: 'mobile', minWidth: 80, title: '用户手机号'},
- {field: 'total_free', minWidth: 120, title: '总共消费金额'},
- {field: 'total_income', minWidth: 120, title: '总盈利'},
- {field: 'total_null_box', minWidth: 180, title: '总共空盒个数'},
- {field: 'box10', minWidth: 30, title: '普通个数'},
- {field: 'box20', minWidth: 30, title: '稀有个数'},
- {field: 'box30', minWidth: 30, title: '史诗个数'},
- {field: 'box40', minWidth: 30, title: '传说个数'},
- {field: 'box_type', minWidth: 100, title: '盒子', search: 'select', selectList: {'10': '普通', '20': '稀有', '30':'史诗', '40':'传说'}},
- {field: 'create_time', minWidth: 200, 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: '福袋名字'},
- ]],
- });
- ea.listen();
- },
- add: function () {
- ea.listen();
- },
- edit: function () {
- ea.listen();
- },
- addtime: function () {
- ea.listen();
- },
- beforeopen: function (){
- ea.listen();
- }
- };
- return Controller;
- });
|