usercampaignconsume.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
  2. var Controller = {
  3. index: function () {
  4. Table.api.init({
  5. extend: {
  6. index_url: 'auth/usercampaignconsume/index/ids/' + Config.id
  7. },
  8. searchFormVisible: false,
  9. search: false,
  10. commonSearch: false,
  11. });
  12. var table = $("#table");
  13. // 初始化表格
  14. table.bootstrapTable({
  15. url: $.fn.bootstrapTable.defaults.extend.index_url,
  16. pk: 'id',
  17. sortName: 'id',
  18. columns: [
  19. [
  20. {checkbox: true, visible: false},
  21. {field: 'createdate', title: __('时间'), operate: false},
  22. {field: 'campaign_name', title: __('消费活动名称'), operate: false},
  23. {field: 'match_name', title: __('活动场次名称'), operate: false},
  24. {field: 'total_kandian', title: __('消费书币')}
  25. ]
  26. ]
  27. });
  28. Table.api.bindevent(table);
  29. },
  30. api: {
  31. bindevent: function () {
  32. Form.api.bindevent($("form[role=form]"));
  33. }
  34. }
  35. };
  36. return Controller;
  37. });