QueryPanel.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. * 自制品供需平衡
  3. */
  4. Ext.define('make.view.sale.selfmakebalance.QueryPanel', {
  5. extend: 'Ext.form.Panel',
  6. xtype: 'sale-selfmakebalance-querypanel',
  7. controller: 'sale-selfmakebalance-querypanel',
  8. frame: true,
  9. layout: 'fit',
  10. cls: 'core-base-basepanel',
  11. searchField: [{
  12. xtype: "textfield",
  13. name: "keyWords",
  14. width: 250,
  15. emptyText: '请输入物料编号、名称、型号或厂家/品牌'
  16. }],
  17. caller: 'selfMakeBalance',
  18. _title: '自制品供需平衡',
  19. initComponent: function () {
  20. var me = this;
  21. Ext.apply(me, {
  22. dockedItems: [{
  23. frame: false,
  24. xtype: 'toolbar',
  25. dock: 'top',
  26. layout: 'column',
  27. style: {
  28. margin: '0 0 12px 0',
  29. padding: '10px 0 14px 8px',
  30. },
  31. items: Ext.Array.merge(me.searchField, [{
  32. xtype: 'button',
  33. text: '查询',
  34. handler: function () {
  35. me.onQuery();
  36. }
  37. }])
  38. }],
  39. items: [{ xtype: 'sale-selfmakebalance-gridpanel' }]
  40. });
  41. me.callParent(arguments);
  42. },
  43. onQuery: function () {
  44. var me = this,
  45. grid = me.down('sale-selfmakebalance-gridpanel');
  46. grid.store.load();
  47. }
  48. });