Ext.define('erp.view.pm.bom.Feature',{ extend: 'Ext.Viewport', layout: 'fit', hideBorders: true, initComponent : function(){ var me = this; Ext.apply(me, { items: [{ id:'FeatureViewport', layout: 'anchor', items: [{ xtype: 'erpFormPanel', anchor: '100% 28%', saveUrl: 'pm/bom/saveFeature.action', deleteUrl: 'pm/bom/deleteFeature.action', updateUrl: 'pm/bom/updateFeature.action', auditUrl: 'pm/bom/auditFeature.action', resAuditUrl: 'pm/bom/resAuditFeature.action', submitUrl: 'pm/bom/submitFeature.action', resSubmitUrl: 'pm/bom/resSubmitFeature.action', getIdUrl: 'common/getId.action?seq=FEATURE_SEQ', keyField: 'fe_id', fename:'',//记录初始特征名称 codeField: 'fe_code', },{ xtype: 'erpGridPanel2', anchor: '100% 40%', id:'grid', // title:'允许特征值列表', caller:'FeatureDetail', detno: 'fd_detno', keyField: 'fd_id', mainField: 'fd_feid', necessaryField: 'fd_value', plugins: [Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 })], tbar:[{ xtype:'tbtext', text:'允许特征值列表', // readOnly: true, // fieldStyle: 'background:#EAEAEA;padding:2px 2px;vertical-align:middle;border-top:none;border-right:none;color:blue;border-bottom:none;border-left:none; ' },'->',{ xtype:'button', id: 'toyf', text:'转研发' },'-',{ xtype:'button', id: 'tobz', text:'转标准' },'-',{ xtype:'button', id:'addDetail', text:'新增明细' },'-',{ xtype:'button', id:'forbidden', text:'禁用明细' },'-',{ xtype:'button', id:'noforbidden', text:'反禁用明细' },'-',{ xtype:'button', id:'updateRemark', text:'修改明细备注' },'-',{ xtype:'button', id:'updateSpec', text:'修改规格描述' }] },{ xtype: 'erpGridPanel2', anchor: '100% 32%', layout:'fit', // title:'与其它特征的约束关系表', caller:'FeatureRelation', id:'grid2', detno: 'fr_detno', keyField: 'fr_id', condition: getUrlParam('gridCondition')==null? null : 'fr_feid=' + getUrlParam('gridCondition').split('IS')[1], mainField: 'fr_feid', necessaryField: 'fr_value', bbar:{}, tbar:[{ xtype:'tbtext', // readOnly: true, text:'与其它特征的约束关系表', // fieldStyle: 'background:#EAEAEA;padding:2px 2px;vertical-align:middle;border-top:none;border-right:none;color:blue;border-bottom:none;border-left:none; ' },'->',{ xtype:'button', text:'新增约束', id:'addRelation' },'-',{ xtype:'button', text:'禁用约束', id:'offRelation' }] }] }] }); me.callParent(arguments); } });