DataListPanel.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /*
  2. * @Description: 数据列表
  3. * @Author: hy
  4. * @Date: 2019-08-12 18:33:04
  5. * @LastEditTime: 2019-08-20 08:54:26
  6. */
  7. Ext.define('uas.view.grid.dataList.DataListPanel', {
  8. extend: 'Ext.grid.Panel',
  9. xtype: 'dataListPanel',
  10. plugins: {
  11. gridHeaderFilter: true
  12. },
  13. selModel: {
  14. type: 'checkboxmodel',
  15. checkOnly: true
  16. },
  17. emptyText: '无数据',
  18. loadMask: true,
  19. bind:'{dataListGridStore}',
  20. initComponent: function () {
  21. var me = this;
  22. Ext.apply(me, {
  23. store: Ext.create('uas.store.DataListGridStore',{
  24. grid: me,
  25. autoLoad: true,
  26. autoDestroy: true
  27. })
  28. });
  29. me.callParent(arguments);
  30. },
  31. dockedItems: [{
  32. name:'operateToolbar',
  33. cls:'x-grid-operateToolbar',
  34. xtype: 'toolbar',
  35. dock: 'top',
  36. height:32,
  37. items:[{
  38. xtype:'button',
  39. text:'筛选',
  40. handler:function(me){
  41. const grid = me.up('dataListPanel');
  42. if(!grid.searchPlanWindow){
  43. grid.searchPlanWindow = Ext.create('widget.searchPlanWindow',{
  44. height:grid.getHeight()*0.8,
  45. width:grid.getWidth()*0.8,
  46. renderTo:grid.getEl()
  47. }).show();
  48. }else{
  49. grid.searchPlanWindow.show();
  50. }
  51. }
  52. },{
  53. margin:'0 0 0 6',
  54. xtype:'button',
  55. text:'批处理'
  56. },{
  57. margin:'0 0 0 6',
  58. xtype:'button',
  59. text:'上一页'
  60. },{
  61. margin:'0 0 0 6',
  62. xtype:'button',
  63. text:'下一页'
  64. },{
  65. margin:'0 0 0 6',
  66. xtype:'button',
  67. text:'导出'
  68. },{
  69. margin:'0 0 0 6',
  70. xtype:'button',
  71. text:'个性设置'
  72. },{
  73. margin:'0 0 0 12',
  74. xtype:'button',
  75. text:'关闭'
  76. }]
  77. },{
  78. xtype: 'toolbar',
  79. dock: 'top',
  80. name:'searchPlan',
  81. cls:'x-grid-searchPlan',
  82. height:32,
  83. items:[{
  84. xtype:'displayfield',
  85. value:'查询方案:'
  86. },{
  87. xtype:'button',
  88. text:'缺省方案'
  89. },{
  90. xtype:'button',
  91. text:'新方案A'
  92. },{
  93. xtype:'button',
  94. text:'新方案B'
  95. }]
  96. },{
  97. xtype: 'toolbar',
  98. dock: 'top',
  99. name:'filterToolbar',
  100. cls:'x-grid-filterToolbar',
  101. height:32,
  102. items:[{
  103. xtype:'displayfield',
  104. value:'筛选条件:'
  105. },'->']
  106. },{
  107. xtype: 'dataListPaging'
  108. }],
  109. columns: [{
  110. dataIndex: 'id',
  111. text: '序号',
  112. width:60,
  113. locked: true
  114. }, {
  115. dataIndex: 'code',
  116. text: '采购单号',
  117. width:240,
  118. locked: true,
  119. filter: {
  120. type:'string'
  121. }
  122. }, {
  123. dataIndex: 'status',
  124. text: '单据状态',
  125. width:100,
  126. filter: {
  127. type:'string'
  128. }
  129. }, {
  130. xtype: 'datecolumn',
  131. dataIndex: 'date',
  132. text: '下单日期',
  133. width: 200,
  134. filter: {
  135. type:'date'
  136. }
  137. }, {
  138. dataIndex: 'vendor',
  139. text: '供应商名',
  140. width: 220,
  141. filter: {
  142. type:'string'
  143. }
  144. }, {
  145. dataIndex: 'price',
  146. text: '含税金额',
  147. width:190,
  148. filter: {
  149. type:'number'
  150. }
  151. },{
  152. dataIndex: 'special',
  153. text:'特殊采购',
  154. width:120,
  155. filter: {
  156. type:'combo',
  157. combo:[
  158. ["true", "是"],
  159. ["false", "否"]
  160. ]
  161. }
  162. },{
  163. dataIndex: 'currency',
  164. text: '币别',
  165. width:70
  166. },{
  167. dataIndex: 'recordman',
  168. text: '采购员',
  169. width:70
  170. },{
  171. dataIndex: 'auditman',
  172. text: '审核人',
  173. width:70
  174. }]
  175. });