FormPanel.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. Ext.define('saas.view.sys.feedback.FormPanel', {
  2. extend: 'Ext.form.Panel',
  3. xtype: 'sys-feedback-formpanel',
  4. controller: 'sys-feedback-formpanel',
  5. viewModel: 'sys-feedback-formpanel',
  6. viewName: 'sys-feedback-formpanel',
  7. caller:'feedBack',
  8. layout: 'column',
  9. autoScroll: true,
  10. fieldDefaults: {
  11. margin: '0 0 16 0',
  12. labelAlign: 'right',
  13. labelWidth: 70,
  14. columnWidth: 0.5,
  15. },
  16. bodyPadding: '0 30 0 30',
  17. border: false,
  18. initComponent: function () {
  19. var me = this;
  20. me.items = [{
  21. xtype: 'hidden',
  22. name: 'id',
  23. fieldLabel: 'id',
  24. readOnly:true,
  25. bind: '{account.id}'
  26. }, {
  27. xtype : "textfield",
  28. name : "name",
  29. fieldLabel : "姓名",
  30. readOnly:true,
  31. bind: '{account.realname}'
  32. }, {
  33. xtype : "textfield",
  34. name : "mobile",
  35. fieldLabel : "手机号",
  36. // regex:/^1(3|4|5|7|8|9)\d{9}$/,
  37. // regexText:'请输入正确的手机号码',
  38. bind: '{account.mobile}'
  39. }, {
  40. xtype : "textfield",
  41. name : "qq",
  42. fieldLabel : "QQ"
  43. }, {
  44. xtype : "textfield",
  45. name : "wechat",
  46. fieldLabel : "微信"
  47. }, {
  48. xtype : "textareafield",
  49. name : "content",
  50. fieldLabel : "反馈内容",
  51. allowBlank: false,
  52. beforeLabelTextTpl: "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
  53. columnWidth: 1,
  54. height: 63,
  55. maxHeight: 63
  56. }];
  57. me.buttonAlign = 'center';
  58. me.buttons = [{
  59. text: '提交',
  60. margin: '0 20 0 20',
  61. formBind: true,
  62. handler:'onSubmit'
  63. },{
  64. text: '关闭',
  65. margin: '0 20 0 20',
  66. handler:'onClose'
  67. }];
  68. me.callParent(arguments);
  69. }
  70. });