Ext.define('erp.view.pm.mes.checkFirst',{ extend: 'Ext.Viewport', layout: 'fit', hideBorders: true, initComponent : function(){ var me = this; Ext.apply(me, { items: [{ layout: 'anchor', items: [{ xtype: 'erpFormPanel', anchor: '100% 50%', autoScroll: true, saveUrl: 'pm/mes/saveCheckFirst.action', deleteUrl: 'pm/mes/deleteCheckFirst.action', updateUrl: 'pm/mes/updateCheckFirst.action', submitUrl: 'pm/mes/submitCheckFirst.action', resSubmitUrl: 'pm/mes/resSubmitCheckFirst.action', auditUrl: 'pm/mes/auditCheckFirst.action', resAuditUrl: 'pm/mes/resAuditCheckFirst.action', getIdUrl: 'common/getId.action?seq=SPOTCHECKRECORD_SEQ', keyField: 'sr_id', codeField: 'sr_code', statusField: 'sr_status', statuscodeField:'sr_statuscode' },{ xtype: 'erpGridPanel2', anchor: '100% 50%', detno: 'srd_detno', keyField: 'srd_id', mainField: 'srd_srid', allowExtraButtons: true, plugins: [Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1, listeners:{ beforeedit:function(e){ var g=e.grid,r=e.record,f=e.field; if(g.binds){ var bool=true; Ext.Array.each(g.binds,function(item){ if(Ext.Array.contains(item.fields,f)){ Ext.each(item.refFields,function(field){ if(r.get(field)!=null && r.get(field)!=0 && r.get(field)!='' && r.get(field)!='0'){ bool=false; } }); } }); return bool; } } } }), Ext.create('erp.view.core.plugin.CopyPasteMenu')] }] }] }); me.callParent(arguments); } });