handle_box_action.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. define(["jquery", "easy-admin"], function ($, ea) {
  2. var init = {
  3. table_elem: '#currentTable',
  4. table_render_id: 'currentTableRenderId',
  5. index_url: 'box.HandleBoxAction/index',
  6. add_url: 'coupon.couponarea/add',
  7. edit_url: 'coupon.couponarea/edit',
  8. delete_url: 'coupon.couponarea/delete',
  9. opentime_url:'coupon.couponarea/addtime',
  10. export_url: 'mall.cate/export',
  11. modify_url: 'coupon.couponarea/modify',
  12. openboxaction_url: 'box.OpenBoxAction/',
  13. beforeopen_url:'box.OpenBoxAction/beforeopen',
  14. beforehandle_url:'box.HandleBoxAction/index'
  15. };
  16. var Controller = {
  17. index: function () {
  18. ea.table.render({
  19. init: init,
  20. toolbar:['refresh',
  21. [
  22. // {
  23. // text: '匹配',
  24. // url: init.beforehandle_url,
  25. // method: 'open',
  26. // auth: 'add',
  27. // class: 'layui-btn layui-btn-normal layui-btn-sm',
  28. // icon: 'fa fa-plus '
  29. // },
  30. // {
  31. // text: '确认匹配',
  32. // url: init.beforehandle_url,
  33. // method: 'open',
  34. // auth: 'add',
  35. // class: 'layui-btn layui-btn-normal layui-btn-sm',
  36. // icon: 'fa fa-plus '
  37. // },
  38. // {
  39. // text: '导入',
  40. // url: init.putin_url,
  41. // method: 'import',
  42. // auth: 'putin',
  43. // class: 'layui-btn layui-btn-success layui-btn-sm',
  44. // icon: 'fa fa-plus ',
  45. // }
  46. ]
  47. ],
  48. cols: [[
  49. {type: "checkbox"},
  50. {field: 'id', width: 80, title: 'id'},
  51. // {field: 'create_time', minWidth: 180, title: '预约时间'},
  52. {field: 'goods_id', minWidth: 80, title: '商品id'},
  53. {field: 'goods_price', minWidth: 80, title: '商品价格'},
  54. {field: 'uid', minWidth: 80, title: '用户uid'},
  55. {field: 'mobile', minWidth: 80, title: '用户手机号'},
  56. {field: 'total_free', minWidth: 120, title: '总共消费金额'},
  57. {field: 'total_income', minWidth: 120, title: '总盈利'},
  58. {field: 'total_null_box', minWidth: 180, title: '总共空盒个数'},
  59. {field: 'box10', minWidth: 30, title: '普通个数'},
  60. {field: 'box20', minWidth: 30, title: '稀有个数'},
  61. {field: 'box30', minWidth: 30, title: '史诗个数'},
  62. {field: 'box40', minWidth: 30, title: '传说个数'},
  63. {field: 'box_type', minWidth: 100, title: '盒子', search: 'select', selectList: {'10': '普通', '20': '稀有', '30':'史诗', '40':'传说'}},
  64. {field: 'create_time', minWidth: 200, title: '创建时间'},
  65. // {field: 'box_img', width: 120, title: '图片封面', templet: function (d) {
  66. // return '<span><img src="' + d.box_img + '" style="width: 60px;height: 60px;border-radius: 60px;"></span>';
  67. // }},
  68. // {field: 'box_title', minWidth: 50, title: '福袋名字'},
  69. ]],
  70. });
  71. ea.listen();
  72. },
  73. add: function () {
  74. ea.listen();
  75. },
  76. edit: function () {
  77. ea.listen();
  78. },
  79. addtime: function () {
  80. ea.listen();
  81. },
  82. beforeopen: function (){
  83. ea.listen();
  84. }
  85. };
  86. return Controller;
  87. });