{
text: '部门',
width: 150,
align: 'center',
dataIndex: 'deptname',
editor: {
xtype: 'combo',
editable: false,
name: 'deptname',
reference: 'deptname',
store: {
type: 'departmentalsourcestore',
id: 'departmentalsource-store',
autoLoad: true
},
margin: '0 5 0 0',
displayField: 'deptname',
valueField: 'deptcode'
},
renderer: function (value, metadata, record) {
var departmentalsourcestore = Ext.create('JsApp.store.currency.DepartmentalSourceStore');
var index = departmentalsourcestore.find('deptcode', value);
if (index != -1) {
record.data.deptcode = departmentalsourcestore.getAt(index).data.deptcode;
record.data.deptname = departmentalsourcestore.getAt(index).data.deptname;
return departmentalsourcestore.getAt(index).data.deptname;
}
return record.get('deptname');
}
}