matching_box.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. define(["jquery", "easy-admin"], function ($, ea) {
  2. var init = {
  3. table_elem: '#currentTable',
  4. table_render_id: 'currentTableRenderId',
  5. index_url: 'box.MatchingBox/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. };
  13. var Controller = {
  14. index: function () {
  15. ea.table.render({
  16. init: init,
  17. toolbar:['refresh',
  18. [
  19. ]
  20. ],
  21. cols: [[
  22. {type: "checkbox"},
  23. {field: 'id', width: 80, title: '预约记录id'},
  24. {field: 'box_id', minWidth: 80, title: '预约盒子id'},
  25. {field: 'create_time', minWidth: 80, title: '预约时间'},
  26. {field: 'qi_count', minWidth: 80, title: '预约第几期'},
  27. {field: 'lun_count', minWidth: 80, title: '预约第几轮'},
  28. {field: 'num', minWidth: 120, title: '数量'},
  29. {field: 'pay_type', minWidth: 50, title: '支付类型', search: 'select', selectList: {'1': '积分', '2': '余额'}},
  30. {field: 'mobile', minWidth: 180, title: '用户手机号'},
  31. {field: 'total_free', minWidth: 180, title: '总共消费金额'},
  32. {field: 'total_income', minWidth: 180, title: '总共消费金额'},
  33. {field: 'box_type', minWidth: 50, title: '拆出来的类型', search: 'select', selectList: {'0': '预约成功', '2': '普通', '3':'稀有', '4':'史诗', '5':'传说'}},
  34. {field: 'create_time', minWidth: 200, title: '创建时间'},
  35. {field: 'box_img', width: 120, title: '图片封面', templet: function (d) {
  36. return '<span><img src="' + d.box_img + '" style="width: 60px;height: 60px;border-radius: 60px;"></span>';
  37. }},
  38. {field: 'box_title', minWidth: 50, title: '福袋名字'}
  39. ]],
  40. });
  41. ea.listen();
  42. },
  43. add: function () {
  44. ea.listen();
  45. },
  46. edit: function () {
  47. ea.listen();
  48. },
  49. addtime: function () {
  50. ea.listen();
  51. }
  52. };
  53. return Controller;
  54. });