Ext.QuickTips.init(); Ext.define('erp.controller.common.JProcessSet', { extend: 'Ext.app.Controller', FormUtil: Ext.create('erp.util.FormUtil'), BaseUtil: Ext.create('erp.util.BaseUtil'), views:[ 'core.form.Panel','common.JProcess.JProcessSet','core.grid.Panel','core.button.Add','core.button.Submit','core.button.Audit', 'core.button.Save','core.button.Close','core.button.Print','core.button.Upload','core.button.Update','core.button.Delete', 'core.trigger.TextAreaTrigger','core.trigger.DbfindTrigger', 'core.button.Sync' ], init:function(){ var me = this; /*formCondition = this.BaseUtil.getUrlParam('formCondition'); */ this.control({ 'erpSaveButton': { click: function(btn){ /*var form = me.getForm(btn);*/ me.FormUtil.beforeSave(me); } }, 'erpDeleteButton' : { click: function(btn){ me.FormUtil.onDelete(Ext.getCmp('js_id').value); } }, 'erpPostButton' : { click:function(btn){ me.FormUtil.onPost(Ext.getCmp('js_id').value); } }, 'erpUpdateButton': { click: function(btn){ me.beforeUpdate(); } }, 'erpAddButton': { click: function(){ me.FormUtil.onAdd('JProcessSet', '新增流程设置', 'jsps/common/jprocessSet.jsp?whoami='+caller); } }, 'erpCloseButton': { click: function(btn){ me.FormUtil.beforeClose(me); } } });}, getForm: function(btn){ return btn.ownerCt.ownerCt; }, beforeUpdate: function(){ var bool = true; if(bool) this.FormUtil.onUpdate(this); } });