finishedproduct.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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: 'finishedproduct/index' + location.search,
  7. table: 'finished_products',
  8. }
  9. });
  10. var table = $("#table");
  11. table.bootstrapTable({
  12. url: "finishedproduct/index",
  13. pk: '_id', // MongoDB默认主键字段
  14. sortName: '',
  15. // fixedColumns: true,
  16. columns: [
  17. [
  18. {checkbox: true},
  19. {field: '订单编号', title: __('订单编号'), operate: 'LIKE'},
  20. {field: 'jjcp_gdbh', title: __('jjcp_gdbh'), operate: 'LIKE'},
  21. {field: 'jjcp_cpdh', title: __('jjcp_cpdh'), operate: 'LIKE'},
  22. {
  23. field: 'operate',
  24. title: __('Operate'),
  25. table: table,
  26. events: Table.api.events.operate,
  27. formatter: Table.api.formatter.operate
  28. }
  29. ]
  30. ]
  31. });
  32. Table.api.bindevent(table);
  33. },
  34. add: function () {
  35. Controller.api.bindevent();
  36. },
  37. edit: function () {
  38. Controller.api.bindevent();
  39. }
  40. };
  41. return Controller;
  42. });