Ext.define('saas.view.document.bom.BasePanel', { extend: 'saas.view.core.base.BasePanel', xtype: 'document-bom-basepanel', controller: 'document-bom-basepanel', viewModel: 'document-bom-basepanel', deleteMoreMsg: '删除的BOM资料将不能恢复,请确认是否删除?', deleteOneMsg: '删除的BOM资料将不能恢复,请确认是否删除?', searchField:[{ xtype : "textfield", name : "bo_mothercode", width:150, emptyText:'产品编号或名称', getCondition: function(value) { return ' (bo_mothername like\'%' + value + '%\'' +' or bo_mothercode like \'%'+value+'%\' ) '; } },{ xtype: 'combobox', name: 'bo_statuscode', queryMode: 'local', displayField: 'bo_status', valueField: 'bo_statuscode', emptyText :'状态', editable:false, width:90, store: Ext.create('Ext.data.ArrayStore', { fields: ['bo_statuscode', 'bo_status'], data: [ ["ALL", "全部"], ["OPEN", "已开启"], ["CLOSE", "已关闭"] ] }), getCondition: function(value) { if(value == 'ALL'||value==null) { return '1=1'; }else { return 'bo_statuscode=\'' + value + '\''; } } }], //字段属性 _formXtype:'document-bom-formpanel', _title:'BOM资料', _deleteUrl:'/api/document/bom/delete/', _batchOpenUrl:'/api/document/bom/batchOpen', _batchCloseUrl:'/api/document/bom/batchClose', _batchDeleteUrl:'/api/document/bom/batchDelete', gridConfig: { idField: 'id', codeField: 'bo_mothercode', statusCodeField:'bo_statuscode', dataUrl: '/api/document/bom/list', columns : [{ text : "id", width : 0, dataIndex : "id", xtype : "numbercolumn", },{ text : "产品id", width : 0, dataIndex : "bo_motherid", xtype : "numbercolumn", },{ text : "产品编号", dataIndex : "bo_mothercode", width : 200.0, }, { text : "产品名称", dataIndex : "bo_mothername", width : 120.0, }, { text : "产品状态", dataIndex : "bo_status", width : 120.0, }, { text : "产品状态码", dataIndex : "bo_statuscode", width : 0, }, { text : "产品版本", dataIndex : "bo_version", width : 120.0, }] }, refresh:function(){ this.items.items[0].store.load() } });