FormPanel.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. style: {
  26. 'border-bottom': '1px solid #35baf6 !important'
  27. },
  28. frame:true,
  29. items:['->',{
  30. text:'保存',
  31. handler:function(){
  32. }
  33. }]
  34. },
  35. items: [{
  36. xtype: 'hidden',
  37. name: 'id',
  38. fieldLabel: 'id',
  39. allowBlank: true,
  40. columnWidth: 0.25
  41. },{
  42. xtype: 'textfield',
  43. name: 'en_name',
  44. fieldLabel: '公司名称',
  45. allowBlank: false,
  46. columnWidth: 0.5
  47. },{
  48. xtype: 'textfield',
  49. name: 'en_address',
  50. fieldLabel: '公司地址',
  51. allowBlank: true,
  52. columnWidth: 0.5
  53. },{
  54. xtype: 'textfield',
  55. name: 'en_tel',
  56. fieldLabel: '电话',
  57. allowBlank: true,
  58. columnWidth: 0.25
  59. },{
  60. xtype: 'textfield',
  61. name: 'en_fax',
  62. fieldLabel: '传真',
  63. allowBlank: true,
  64. columnWidth: 0.5
  65. },{
  66. xtype : "datefield",
  67. name : "en_begindate",
  68. fieldLabel : "开账日期",
  69. allowBlank : true,
  70. editable:false,
  71. columnWidth : 0.25
  72. },{
  73. displayField : "display",
  74. editable:false,
  75. hideTrigger : false,
  76. maxLength : 100.0,
  77. minValue : null,
  78. queryMode : "local",
  79. valueField : "value",
  80. xtype : "combo",
  81. store:{
  82. fields: ['display', 'value'],
  83. data : [
  84. {"display":"加权平均法", "value":'1'},
  85. {"display":"先进先出法", "value":'0'}
  86. ]
  87. },
  88. name : "en_pricemethod",
  89. fieldLabel : "库存计算方式",
  90. allowBlank : false,
  91. columnWidth : 0.25
  92. },{
  93. xtype : "textfield",
  94. name : "en_signet",
  95. fieldLabel : "打印章上传",
  96. allowBlank : true,
  97. editable:false,
  98. columnWidth : 0.25
  99. },{
  100. xtype : "datefield",
  101. name : "updateTime",
  102. fieldLabel : "更新时间",
  103. allowBlank : true,
  104. editable:false,
  105. columnWidth : 0.25
  106. }]
  107. });