DataListPanel.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * @Description: 数据列表
  3. * @Author: hy
  4. * @Date: 2019-08-12 18:33:04
  5. * @LastEditTime: 2019-08-19 14:55:29
  6. */
  7. Ext.define('uas.view.grid.dataList.DataListPanel', {
  8. extend: 'Ext.grid.Panel',
  9. xtype: 'dataListPanel',
  10. requires: [
  11. 'Ext.toolbar.Paging',
  12. 'Ext.ux.PreviewPlugin'
  13. ],
  14. plugins: {
  15. gridHeaderFilter: true
  16. },
  17. emptyText: '无数据',
  18. loadMask: true,
  19. viewModel:{
  20. stores: {
  21. dataListGridStore:{
  22. type: 'dataListGridStore',
  23. autoLoad: true,
  24. autoDestroy: true
  25. }
  26. },
  27. },
  28. bind:'{dataListGridStore}',
  29. // Dispatch named listener and handler methods to this instance
  30. defaultListenerScope: true,
  31. tbar: {
  32. name:'filterToolbar',
  33. height:46,
  34. items:['->']
  35. },
  36. bbar: {
  37. xtype: 'pagingtoolbar',
  38. displayInfo: true,
  39. displayMsg: '显示 {0} - {1} 每页显示{3} 共 {2} 行',
  40. emptyMsg: "无数据"
  41. },
  42. columns: [{
  43. dataIndex: 'id',
  44. text: '序号',
  45. width:60,
  46. locked: true
  47. }, {
  48. dataIndex: 'code',
  49. text: '采购单号',
  50. width:240,
  51. locked: true,
  52. filter: {
  53. type:'string'
  54. }
  55. }, {
  56. dataIndex: 'status',
  57. text: '单据状态',
  58. width:100,
  59. filter: {
  60. type:'string'
  61. }
  62. }, {
  63. xtype: 'datecolumn',
  64. dataIndex: 'date',
  65. text: '下单日期',
  66. width: 200,
  67. filter: {
  68. type:'date'
  69. }
  70. }, {
  71. dataIndex: 'vendor',
  72. text: '供应商名',
  73. width: 220,
  74. filter: {
  75. type:'string'
  76. }
  77. }, {
  78. dataIndex: 'price',
  79. text: '含税金额',
  80. width:190,
  81. filter: {
  82. type:'number'
  83. }
  84. },{
  85. dataIndex: 'special',
  86. text:'特殊采购',
  87. width:120,
  88. filter: {
  89. type:'combo',
  90. combo:[
  91. ["true", "是"],
  92. ["false", "否"]
  93. ]
  94. }
  95. },{
  96. dataIndex: 'currency',
  97. text: '币别',
  98. width:70
  99. },{
  100. dataIndex: 'recordman',
  101. text: '采购员',
  102. width:70
  103. },{
  104. dataIndex: 'auditman',
  105. text: '审核人',
  106. width:70
  107. }]
  108. });