FormPanel.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. Ext.define('saas.view.sys.config.FormPanel', {
  2. extend: 'Ext.form.Panel',
  3. xtype: 'sys-config-formpanel',
  4. controller: 'sys-config-formpanel',
  5. viewModel: 'sys-config-formpanel',
  6. //字段属性
  7. _idField: 'id',
  8. _readUrl:'/api/document/vendor/read/',
  9. _saveUrl:'/api/document/vendor/save',
  10. //基础属性
  11. frame:true,
  12. initId: 0,
  13. layout: 'column',
  14. autoScroll: true,
  15. border: 1,
  16. bodyPadding: 5,
  17. fieldDefaults: {
  18. margin: '0 5 5 0',
  19. labelAlign: 'right',
  20. labelWidth: 90,
  21. columnWidth: 0.25,
  22. blankText: '该字段不能为空'
  23. },
  24. tbar:[{
  25. text:'保存',
  26. handler:function(){
  27. }
  28. }],
  29. items: [{
  30. xtype: 'hidden',
  31. name: 'id',
  32. fieldLabel: 'id',
  33. allowBlank: true,
  34. columnWidth: 0.25
  35. },{
  36. xtype: 'textfield',
  37. name: 'en_name',
  38. fieldLabel: '公司名称',
  39. allowBlank: false,
  40. columnWidth: 0.5
  41. },{
  42. xtype: 'textfield',
  43. name: 'en_address',
  44. fieldLabel: '公司地址',
  45. allowBlank: true,
  46. columnWidth: 0.5
  47. },{
  48. xtype: 'textfield',
  49. name: 'en_tel',
  50. fieldLabel: '电话',
  51. allowBlank: true,
  52. columnWidth: 0.25
  53. },{
  54. xtype: 'textfield',
  55. name: 'en_fax',
  56. fieldLabel: '传真',
  57. allowBlank: true,
  58. columnWidth: 0.5
  59. },{
  60. xtype : "datefield",
  61. name : "en_begindate",
  62. fieldLabel : "开账日期",
  63. allowBlank : true,
  64. editable:false,
  65. columnWidth : 0.25
  66. },{
  67. displayField : "display",
  68. editable:false,
  69. hideTrigger : false,
  70. maxLength : 100.0,
  71. minValue : null,
  72. queryMode : "local",
  73. valueField : "value",
  74. xtype : "combo",
  75. store:{
  76. fields: ['display', 'value'],
  77. data : [
  78. {"display":"加权平均法", "value":'1'},
  79. {"display":"先进先出法", "value":'0'}
  80. ]
  81. },
  82. name : "en_pricemethod",
  83. fieldLabel : "库存计算方式",
  84. allowBlank : false,
  85. columnWidth : 0.25
  86. },{
  87. xtype : "textfield",
  88. name : "en_signet",
  89. fieldLabel : "打印章上传",
  90. allowBlank : true,
  91. editable:false,
  92. columnWidth : 0.25
  93. },{
  94. xtype : "datefield",
  95. name : "updateTime",
  96. fieldLabel : "更新时间",
  97. allowBlank : true,
  98. editable:false,
  99. columnWidth : 0.25
  100. }]
  101. });