123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- 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',
- '<ul class="breadcrumb">',
- '<li><a href="#"><img src="' + basePath + 'resource/images/screens/home.png" alt="Home" class="home" /></a></li>',
- '<tpl for="nodes">',
- '<li><a href="#" title="{.}">{.}</a></li>',
- '</tpl>',
- '</ul>'
- )
- },{
- 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: '<a href=# style="font-size:14px;text-align:left;"> 找不到标准器件 </a>' ,
- 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);
- }
- });
|