{
xtype: 'combo',
name: 'PART_BRAND',
fieldLabel: '品牌',
margin: '0 5 5 0',
allowBlank: false,
editable: true,
autoSelect: true,
forceSelection: true,
selectOnFocus: true,
typeAhead: true,
hiddenName: 'para_name',
queryParam: 'PARA_NAME',//后台传值
valueField: "PARA_ID",
displayField: "PARA_NAME",
store: Ext.create('Scripts.BasicData.D_PARTS.store.GParaStore'),
queryMode: 'local',
minChars: 0,
//ref: '../param',
//weight: 50,
maxLength: 20,
listeners: {
render: function (combo, eOpts) {
var store = combo.getStore();
store.proxy.extraParams = {
para_type: '品牌'
}
store.load({
//params: { type: '包装类型' },
callback: function (records, options, success) {
// combo.setValue(records[0]);///默认选择第一条
}
});
},
beforequery: function (e) { // 匹配输入
var combo = e.combo;
if (!e.forceAll) {
var value = e.query;
combo.store.filterBy(function (record, id) {
var text = record.get(combo.displayField);
return (text.indexOf(value) != -1);
});
combo.expand();
return false;
}
}
//,
//change: function (combo, newValue, oldValue, eOpts) {
// var v_store = combo.getStore();
// var bb = combo.getValue();
// if (bb == null) {
// bb = 'CNTSN';// v_store.data.items[0].data.PARA_ID;
// }
// var vindex = v_store.find("PARA_ID", bb);
// var record = v_store.getAt(vindex);
// combo.up("fieldset").down("textfield[name=POR_DESC]").setValue(record.data.PARA_NAME);
//}
},
columnWidth: .49
// ,
//// readOnly: true,
//fieldStyle: 'background-color: #EDEDED; background-image: none;'
},