Grid.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. Ext.define('uas.view.form.formpanel.Grid', {
  2. extend: 'Ext.grid.Panel',
  3. xtype: 'formpanel-grid',
  4. emptyText: '无数据',
  5. loadMask: true,
  6. bind:'{formGridStore}',
  7. initComponent: function () {
  8. var me = this;
  9. Ext.apply(me, {
  10. store: Ext.create('uas.store.FormGridStore',{
  11. grid: me,
  12. autoLoad: true,
  13. autoDestroy: true
  14. })
  15. });
  16. me.callParent(arguments);
  17. },
  18. dockedItems: [{
  19. cls:'x-grid-operateToolbar',
  20. xtype: 'toolbar',
  21. dock: 'top',
  22. height:32,
  23. defaults:{
  24. cls:'x-btn-blue',
  25. xtype:'button',
  26. margin:'0 0 0 6',
  27. },
  28. items:[{
  29. text:'新增'
  30. },{
  31. text:'处理'
  32. },{
  33. text:'删除'
  34. },{
  35. text:'复制行'
  36. },{
  37. text:'粘贴行'
  38. }]
  39. }],
  40. columns: [{
  41. dataIndex: 'id',
  42. text: '序号',
  43. width:60,
  44. align:'center',
  45. locked: true
  46. }, {
  47. dataIndex: 'code',
  48. text: '采购单号',
  49. width:240,
  50. locked: true,
  51. filter: {
  52. type:'string'
  53. }
  54. }, {
  55. dataIndex: 'status',
  56. text: '单据状态',
  57. width:100,
  58. filter: {
  59. type:'string'
  60. }
  61. }, {
  62. xtype: 'datecolumn',
  63. dataIndex: 'date',
  64. text: '下单日期',
  65. width: 200,
  66. filter: {
  67. type:'date'
  68. }
  69. }, {
  70. dataIndex: 'vendor',
  71. text: '供应商名',
  72. width: 220,
  73. filter: {
  74. type:'string'
  75. }
  76. }, {
  77. dataIndex: 'price',
  78. text: '含税金额',
  79. width:190,
  80. filter: {
  81. type:'number'
  82. }
  83. },{
  84. dataIndex: 'special',
  85. text:'特殊采购',
  86. width:120,
  87. filter: {
  88. type:'combo',
  89. combo:[
  90. ["true", "是"],
  91. ["false", "否"]
  92. ]
  93. }
  94. },{
  95. dataIndex: 'currency',
  96. text: '币别',
  97. width:70
  98. },{
  99. dataIndex: 'recordman',
  100. text: '采购员',
  101. width:70
  102. },{
  103. dataIndex: 'auditman',
  104. text: '审核人',
  105. width:70
  106. }]
  107. });