BOMSon.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Ext.QuickTips.init();
  2. Ext.define('erp.controller.pm.bom.BOMSon', {
  3. extend: 'Ext.app.Controller',
  4. FormUtil: Ext.create('erp.util.FormUtil'),
  5. BaseUtil: Ext.create('erp.util.BaseUtil'),
  6. views:[
  7. 'pm.bom.BOMSon','core.form.Panel',
  8. 'core.button.Add','core.button.Save','core.button.Close',
  9. 'core.button.Update','core.button.Delete','core.form.YnField',
  10. 'core.trigger.TextAreaTrigger','core.trigger.DbfindTrigger'
  11. ],
  12. init:function(){
  13. var me = this;
  14. this.control({
  15. 'erpSaveButton': {
  16. click: function(btn){
  17. this.FormUtil.beforeSave(this);
  18. }
  19. },
  20. 'erpCloseButton': {
  21. click: function(btn){
  22. this.FormUtil.beforeClose(this);
  23. }
  24. },
  25. 'erpUpdateButton': {
  26. click: function(btn){
  27. this.FormUtil.onUpdate(this);
  28. }
  29. },
  30. 'erpDeleteButton': {
  31. click: function(btn){
  32. me.FormUtil.onDelete(Ext.getCmp('bd_id').value);
  33. }
  34. },
  35. 'erpAddButton': {
  36. click: function(){
  37. me.FormUtil.onAdd('addBBOMSon', '新增BOM子件资料', 'jsps/pm/bom/BOMSon.jsp');
  38. }
  39. }
  40. });
  41. },
  42. getForm: function(btn){
  43. return btn.ownerCt.ownerCt;
  44. },
  45. });