userGroupForm.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. Ext.define('erp.view.ma.userGroup.userGroupForm',{
  2. extend: 'Ext.form.Panel',
  3. alias: 'widget.erpUserGroupForm',
  4. id: 'form',
  5. title : 'CS用户组权限维护',
  6. frame : true,
  7. layout: 'column',
  8. autoScroll : true,
  9. defaultType : 'textfield',
  10. cls: 'u-form-default',
  11. enableTools: true,
  12. fieldDefaults : {
  13. fieldStyle : "background:#FFFAFA;color:#515151;",
  14. focusCls: 'x-form-field-cir-focus',
  15. labelAlign : "right",
  16. msgTarget: 'side',
  17. blankText : $I18N.common.form.blankText
  18. },
  19. FormUtil: Ext.create('erp.util.FormUtil'),
  20. BaseUtil: Ext.create('erp.util.BaseUtil'),
  21. items : [{
  22. allowBlank:false,
  23. cls:"form-field-allowBlank",
  24. columnWidth:0.25,
  25. editable:true,
  26. fieldLabel:"<font color='red'>用户组</font>",
  27. labelSeparator : "",
  28. dataIndex:'eg_groupcode',
  29. fieldStyle:"background:#FFFAFA;color:#515151;",
  30. labelAlign:"left",
  31. xtype:"dbfindtrigger",
  32. editable:false,
  33. id:'eg_groupcode',
  34. name:'eg_groupcode',
  35. },{
  36. cls:"form-field-allowBlank",
  37. columnWidth:0.25,
  38. fieldLabel:"对应模块",
  39. labelSeparator : "",
  40. fieldStyle:"background:#FFFAFA;color:#515151;",
  41. labelAlign:"left",
  42. xtype:"combo",
  43. id:'sn_module',
  44. enableKeyEvents:true,
  45. editable:false,
  46. displayField: 'display',
  47. valueField: 'value',
  48. store:Ext.create('Ext.data.Store', {
  49. autoLoad: true,
  50. fields: ['display','value'],
  51. proxy: {
  52. type: 'ajax',
  53. url : basePath + 'ma/getCSSysNavigation.action',
  54. reader: {
  55. type: 'json',
  56. root: 'data'
  57. },
  58. headers: {
  59. 'Content-Type': 'application/json;charset=utf-8'
  60. }
  61. }
  62. })
  63. },{
  64. cls:"form-field-allowBlank",
  65. columnWidth:0.1,
  66. style:{
  67. 'margin-left':'20px'
  68. },
  69. id:'query',
  70. text:'筛选',
  71. fieldStyle:"background:#FFFAFA;color:#515151;",
  72. labelSeparator : ":",
  73. labelAlign:"left",
  74. xtype:"button"
  75. },{
  76. cls:"form-field-allowBlank",
  77. columnWidth:0.1,
  78. style:{
  79. 'margin-left':'20px'
  80. },
  81. id:'save',
  82. text:'保存',
  83. fieldStyle:"background:#FFFAFA;color:#515151;",
  84. labelSeparator : ":",
  85. labelAlign:"left",
  86. xtype:"button"
  87. }],
  88. initComponent : function(){
  89. var me = this;
  90. me.FormUtil=Ext.create('erp.util.FormUtil');
  91. me.GridUtil=Ext.create('erp.util.GridUtil');
  92. me.BaseUtil=Ext.create('erp.util.BaseUtil');
  93. this.callParent(arguments);
  94. }
  95. });