JProcessSet.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. Ext.QuickTips.init();
  2. Ext.define('erp.controller.common.JProcessSet', {
  3. extend: 'Ext.app.Controller',
  4. FormUtil: Ext.create('erp.util.FormUtil'),
  5. BaseUtil: Ext.create('erp.util.BaseUtil'),
  6. views:[
  7. 'core.form.Panel','common.JProcess.JProcessSet','core.grid.Panel','core.button.Add','core.button.Submit','core.button.Audit',
  8. 'core.button.Save','core.button.Close','core.button.Print','core.button.Upload','core.button.Update','core.button.Delete',
  9. 'core.trigger.TextAreaTrigger','core.trigger.DbfindTrigger', 'core.button.Sync'
  10. ],
  11. init:function(){
  12. var me = this;
  13. /*formCondition = this.BaseUtil.getUrlParam('formCondition');
  14. */
  15. this.control({
  16. 'erpSaveButton': {
  17. click: function(btn){
  18. /*var form = me.getForm(btn);*/
  19. me.FormUtil.beforeSave(me);
  20. }
  21. },
  22. 'erpDeleteButton' : {
  23. click: function(btn){
  24. me.FormUtil.onDelete(Ext.getCmp('js_id').value);
  25. }
  26. },
  27. 'erpPostButton' : {
  28. click:function(btn){
  29. me.FormUtil.onPost(Ext.getCmp('js_id').value);
  30. }
  31. },
  32. 'erpUpdateButton': {
  33. click: function(btn){
  34. me.beforeUpdate();
  35. }
  36. },
  37. 'erpAddButton': {
  38. click: function(){
  39. me.FormUtil.onAdd('JProcessSet', '新增流程设置', 'jsps/common/jprocessSet.jsp?whoami='+caller);
  40. }
  41. },
  42. 'erpCloseButton': {
  43. click: function(btn){
  44. me.FormUtil.beforeClose(me);
  45. }
  46. }
  47. });},
  48. getForm: function(btn){
  49. return btn.ownerCt.ownerCt;
  50. },
  51. beforeUpdate: function(){
  52. var bool = true;
  53. if(bool)
  54. this.FormUtil.onUpdate(this);
  55. }
  56. });