PersonRegInfo.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /**
  2. * 个人注册数据
  3. */
  4. Ext.define('saas.view.statistical.PersonRegInfo', {
  5. extend: 'saas.view.core.base.BasePanel',
  6. xtype: 'statistical-personreginfo',
  7. initComponent: function () {
  8. Ext.apply(this, {
  9. searchField: [{
  10. xtype: "textfield",
  11. name: "username",
  12. emptyText: '用户名/手机号',
  13. getCondition: function (v) {
  14. return "(upper(CONCAT(username, '#', mobile) like '%" + v.toUpperCase() + "%'))";
  15. },
  16. }, {
  17. xtype: 'combobox',
  18. name: 'bind',
  19. fieldLabel: '绑定企业',
  20. queryMode: 'local',
  21. displayField: 'name',
  22. valueField: 'value',
  23. emptyText :'全部',
  24. editable:false,
  25. store: Ext.create('Ext.data.ArrayStore', {
  26. fields: ['value', 'name'],
  27. data: [
  28. ["ALL", "全部"],
  29. ["Y", "是"],
  30. ["N", "否"]
  31. ]
  32. }),
  33. getCondition: function(value) {
  34. if(value == 'ALL') {
  35. return '1=1';
  36. }else if(value == 'Y') {
  37. return 'bind > 0';
  38. }else if(value == 'N') {
  39. return 'bind = 0';
  40. }
  41. }
  42. }],
  43. gridConfig: {
  44. dataUrl: '/api/operation/data/getAccount',
  45. // dataUrl: 'http://10.1.80.35:9040/data/getAccount',
  46. columns: [{
  47. text: 'id',
  48. dataIndex: 'id',
  49. hidden: true
  50. }, {
  51. text: '账号',
  52. dataIndex: 'username',
  53. width: 120
  54. }, {
  55. text: '姓名',
  56. dataIndex: 'realname',
  57. width: 120
  58. }, {
  59. text: '邮箱',
  60. dataIndex: 'email',
  61. width: 180
  62. }, {
  63. text: '手机号',
  64. dataIndex: 'mobile',
  65. width: 120
  66. }, {
  67. text: '类型',
  68. dataIndex: 'type',
  69. width: 140,
  70. renderer: function(v, m, r) {
  71. return v == 1 ? '<span style="font-weight: bold;">管理员</span>' : '普通用户';
  72. }
  73. }, {
  74. text: '状态',
  75. dataIndex: 'enabled',
  76. align: 'center',
  77. width: 80,
  78. renderer: function(v, m, r) {
  79. return v == true ? '<span style="color: #81CB31;">启用</span>' : '<span style="color: #DD6550;">未启用</span>';
  80. }
  81. }, {
  82. text: '绑定企业',
  83. dataIndex: 'bind',
  84. align: 'center',
  85. width: 80,
  86. renderer: function(v, m, r) {
  87. return v > 0 ? '是' : '否';
  88. }
  89. }, {
  90. text: '注册时间',
  91. xtype: 'datecolumn',
  92. dataIndex: 'createTime',
  93. width: 180,
  94. renderer: function(v, m, r) {
  95. return Ext.Date.format(new Date(v), 'Y-m-d H:i:s');
  96. }
  97. }, {
  98. text: 'UU号',
  99. dataIndex: 'uu',
  100. width: 120
  101. }]
  102. },
  103. });
  104. this.callParent(arguments);
  105. }
  106. });