lingyunUser.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. define(function (require) {
  2. return function (context) {
  3. var $grid1, $form;
  4. // 输入搜索文本后点击回车按钮查询列表
  5. function enterQueryGrid1(e) {
  6. if (e.keyCode === 13) {
  7. var tmp = $(this).val();
  8. $form.formSet({queryProperties: tmp});
  9. queryGrid1();
  10. }
  11. }
  12. // 检索条件查询
  13. function queryGrid1() {
  14. var queryForm = $form.formGet();
  15. $grid1.reload({
  16. mtype: 'POST',
  17. url: api('/sweepCode/selectLingyunUser'),
  18. queryParams: queryForm
  19. }, true);
  20. }
  21. var queryToolbar = {
  22. xtype: 'toolbar',
  23. title: '用户管理',
  24. items: [
  25. {
  26. text: '查询', iconCls: 'fa fa-search', onClick: function () {
  27. queryGrid1();
  28. }
  29. }, {
  30. text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
  31. $form.formClear();
  32. queryGrid1();
  33. }
  34. }, {
  35. text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
  36. App.closeMe(this);
  37. }
  38. }
  39. ]
  40. };
  41. var queryForm = {
  42. onRender: function () {
  43. $form = $(this);
  44. },
  45. xtype: 'form',
  46. items: [[
  47. {
  48. xtype: 'textbox',
  49. label: '检索条件',
  50. name: 'queryProperties',
  51. prompt: "小区名称/用户名称/电话号码",
  52. labelWidth: 'auto',
  53. events: {keydown: enterQueryGrid1}, width: 350
  54. },
  55. ]]
  56. };
  57. return {
  58. north: {
  59. height: 88,
  60. /* split: true,
  61. border: false,*///底框是否可变动
  62. items: [
  63. queryToolbar,
  64. queryForm
  65. ]
  66. },
  67. center: {
  68. height: '60%',
  69. split: true,
  70. items:
  71. {
  72. onRender: function () {
  73. $grid1 = $(this);
  74. queryGrid1()
  75. },
  76. xtype: 'grid',
  77. toolbar: {
  78. xtype: 'toolbar',
  79. title: '用户列表',
  80. items: [
  81. {
  82. text: '生成健康及旅居申请表', iconCls: 'fa fa-plus-circle fa-lg', onClick: function () {
  83. }
  84. },
  85. {
  86. text: '生成隔离人员解除隔离审批表', iconCls: 'fa fa-plus-circle fa-lg', onClick: function () {
  87. }
  88. }
  89. ]
  90. },
  91. multiselect: true, /// 表格多选
  92. idField: 'userId',
  93. editable: true,
  94. editOnSelected: true,
  95. autoSizeColumns: true,
  96. columns:
  97. [
  98. [
  99. {field: 'userId', title: '用户ID', hidden: true},
  100. {field: 'linkman', title: '用户名', maxWidth: 200, align: 'left',},
  101. {field: 'uptownName', title: '小区名称', maxWidth: 200, align: 'left',},
  102. {field: 'phone', title: '电话', maxWidth: 200, align: 'left',},
  103. {field: 'dept', title: '部门', maxWidth: 200, align: 'left',},
  104. ]
  105. ]
  106. }
  107. }
  108. };
  109. };
  110. }
  111. );