withdrawal.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
  2. var Controller = {
  3. index: function () {
  4. // 初始化表格参数配置
  5. Table.api.init({
  6. extend: {
  7. index_url: 'platprofit/withdrawal/index' + location.search,
  8. table: 'user_withdrawal_profit_log',
  9. }
  10. });
  11. var table = $("#table");
  12. // 初始化表格
  13. table.bootstrapTable({
  14. url: $.fn.bootstrapTable.defaults.extend.index_url,
  15. pk: 'id',
  16. sortName: 'id',
  17. pagination:false,
  18. columns: [
  19. [
  20. {checkbox: true},
  21. {field: 'id', title: __('Id'),operate: false},
  22. {field: 'u_id', title: __('U_id')},
  23. {field: 'nickname', title: __('Nickname'), operate: false},
  24. {field: 'plat_value', title: __('Plat_value'),operate: false},
  25. {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
  26. // {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
  27. ]
  28. ]
  29. });
  30. // 为表格绑定事件
  31. Table.api.bindevent(table);
  32. },
  33. add: function () {
  34. Controller.api.bindevent();
  35. },
  36. edit: function () {
  37. Controller.api.bindevent();
  38. },
  39. api: {
  40. bindevent: function () {
  41. Form.api.bindevent($("form[role=form]"));
  42. }
  43. }
  44. };
  45. return Controller;
  46. });