CustomerCreditSet.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. Ext.QuickTips.init();
  2. Ext.define('erp.controller.fa.ars.CustomerCreditSet', {
  3. extend: 'Ext.app.Controller',
  4. FormUtil: Ext.create('erp.util.FormUtil'),
  5. BaseUtil: Ext.create('erp.util.BaseUtil'),
  6. views:[
  7. 'fa.ars.CustomerCreditSet','core.form.Panel',
  8. 'core.button.Save','core.button.Close',
  9. 'core.trigger.DbfindTrigger','core.trigger.TextAreaTrigger','core.form.YnField'
  10. ],
  11. init:function(){
  12. var me = this;
  13. this.control({
  14. 'erpSaveButton': {
  15. click: function(btn){
  16. // var form = me.getForm(btn);
  17. // if(Ext.getCmp(form.codeField).value == null || Ext.getCmp(form.codeField).value == ''){
  18. // me.BaseUtil.getRandomNumber();//自动添加编号
  19. // }
  20. // var id = Ext.getCmp('cu_id').value;
  21. // if(id == null || id == '' || id == '0' || id == 0){
  22. // this.FormUtil.beforeSave(this);
  23. // } else {
  24. this.FormUtil.onUpdate(this);
  25. // }
  26. }
  27. },
  28. 'erpCloseButton': {
  29. click: function(btn){
  30. me.FormUtil.beforeClose(me);
  31. }
  32. }
  33. });
  34. },
  35. getForm: function(btn){
  36. return btn.ownerCt.ownerCt;
  37. }
  38. });