FormPanel.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. Ext.define('saas.view.document.vendor.FormPanel', {
  2. extend: 'saas.view.core.baseform.FormPanel',
  3. xtype: 'document-vendor-formpanel',
  4. controller: 'document-vendor-formpanel',
  5. viewModel: 'document-vendor-formpanel',
  6. //工具类
  7. FormUtil: Ext.create('saas.util.FormUtil'),
  8. BaseUtil: Ext.create('saas.util.BaseUtil'),
  9. //基础属性
  10. layout: 'fit',
  11. autoScroll: true,
  12. border: 1,
  13. bodyPadding: 5,
  14. fieldDefaults: {
  15. margin: '0 5 5 0',
  16. labelAlign: 'right',
  17. labelWidth: 90,
  18. blankText: '该字段不能为空'
  19. },
  20. //字段属性
  21. _title:'供应商管理',
  22. _dataUrl:basePath + 'document/vendor/getVendorsByCondition',
  23. _saveUrl:basePath + 'document/vendor/save',
  24. _deleteUrl:basePath + 'document/vendor/delete',
  25. initComponent: function () {
  26. var me = this;
  27. Ext.apply(me, {
  28. items: [{
  29. name : "vendorGrid",
  30. xtype : "core-baseform-gridpanel",
  31. layout:'fit',
  32. dataUrl:me._dataUrl,
  33. columns : [
  34. {
  35. text : "序号",
  36. dataIndex : "pd_detno",
  37. width : 100,
  38. xtype : "numbercolumn",
  39. align : 'center',
  40. format:'0',
  41. summaryType: 'count',
  42. summaryRenderer: function(value, summaryData, dataIndex) {
  43. return Ext.String.format('合计: {0}条', value);
  44. },
  45. },
  46. {
  47. editor : {
  48. displayField : "display",
  49. editable : true,
  50. format : "",
  51. hideTrigger : false,
  52. maxLength : 100.0,
  53. minValue : null,
  54. positiveNum : false,
  55. queryMode : "local",
  56. store : null,
  57. valueField : "value",
  58. xtype : "multidbfindtrigger"
  59. },
  60. text : "物料编号",
  61. width : 200.0,
  62. dataIndex : "pd_prodcode",
  63. xtype : "",
  64. items : null
  65. },
  66. {
  67. text : "单位",
  68. editor : {
  69. xtype : "textfield"
  70. },
  71. dataIndex : "pd_unit",
  72. width : 120.0,
  73. xtype : "",
  74. items : null
  75. },
  76. {
  77. text : "数量",
  78. dataIndex : "pd_yqty",
  79. editor : {
  80. xtype : "numberfield"
  81. },
  82. width : 120.0,
  83. xtype : "numbercolumn",
  84. format:'0',
  85. items : null,
  86. summaryType: 'sum'
  87. },
  88. {
  89. text : "单价",
  90. editor : {
  91. xtype : "numberfield"
  92. },
  93. format:'0,000.00',
  94. dataIndex : "pd_price",
  95. width : 120.0,
  96. xtype : "numbercolumn",
  97. items : null,
  98. summaryType: 'sum'
  99. },
  100. {
  101. text : "总额",
  102. dataIndex : "pd_total",
  103. width : 120.0,
  104. xtype : "numbercolumn",
  105. summaryType: 'sum'
  106. },
  107. {
  108. text : "税额",
  109. dataIndex : "pd_taxtotal",
  110. flex : 1.0,
  111. xtype : "numbercolumn",
  112. summaryType: 'sum'
  113. }
  114. ]
  115. }]
  116. });
  117. me.callParent(arguments);
  118. }
  119. });