Ext.define('erp.view.scm.product.GetUUid.Viewport',{ extend: 'Ext.Viewport', layout: 'border', initComponent : function(){ var me = this; Ext.apply(me, { items: [{ region: 'north', items: [{ xtype: 'panel', id: 'choose', height: 30, hidden: true, tpl: Ext.create('Ext.XTemplate', '' ) },{ xtype: 'form', layout : 'column', height: 34, bodyStyle: {background: '#f0f0f1'}, items: [{ fieldLabel: '原厂型号', xtype: 'textfield', fieldStyle : "background:#FFFAFA;color:#515151;", labelWidth : 90, columnWidth: .38, id: 'orispecode', name: 'orispecode', emptyText:'原厂型号', margin:'3 3 3 3' },{ xtype: 'button', columnWidth: .1, iconCls: 'x-form-search', cls: 'x-btn-gray-1', name: 'search', text: '搜索', margin:'3 3 3 3' },{ xtype:'button', columnWidth:.1, style: { background: '#f0f0f1' }, name:'refresh', iconCls: 'tree-back', cls: 'x-btn-tb', margin:'3 3 3 3', tooltip: '刷新', hidden: false, handler: function(){ Ext.getCmp('tree-panel').getTreeRootNode(0); Ext.getCmp('orispecode').setValue(null); Ext.getCmp('uuIdGrid').store.loadData(""); } },{ xtype : 'label', id : 'getpage', name : 'getpage', columnWidth: .15, margin:'3 3 3 3', html: ' 找不到标准器件 ' , height:28, listeners: { render : function() {//渲染后添加click事件 Ext.fly(this.el).on('click', function(e, t) { Ext.Ajax.request({//拿到tree数据 url : basePath + 'scm/product/getPageAccess.action', async: false, callback : function(options,success,response){ var res = new Ext.decode(response.responseText); if(res.exceptionInfo){ showError(res.exceptionInfo); }else{ window.open(res.path+'/api/webpage?access_token='+res.access_token+'&redirect_page=product#/componentEdit_T/detail/create/'); } } }); } ) } } }] }] }, { xtype: 'prodb2ckindtree', region: 'center', autoScroll: true },{ xtype:'erpComponentGrid', region: 'east', split: true }] }); me.callParent(arguments); } });