/**
* 商户下拉框
*
* @class ServicePointCombo
* @extends Ext.form.ComboBox
*/
ServicePointCombo = Ext.extend(Ext.form.ComboBox, {
name : 'servicePoint',
hiddenName : 'ServicePointID',
readOnly : false,
valueField : 'ServicePointID',
displayField : 'Number',
typeAhead : true,
mode : 'remote',
triggerAction : 'query',
lazyInit : false,
emptyText : '请选择',
selectOnFocus : true,
allowBlank : false,
typeAheadDelay : 10000,
isLoaded : false,
store : new Ext.data.JsonStore({
url : '/Terminal/ServicePointList',
root : 'result',
totalProperty : 'total',
forceSelection : true,
fields : [{
name : 'ServicePointID',
type : 'string'
}, {
name : 'Name',
type : 'string'
}, {
name : 'Number',
type : 'string'
}],
listeners : {
load : function() {
isLoaded = true;
}
}
}),
minListWidth : 260,
pageSize : 10,
tpl : new Ext.XTemplate(
'<div class="x-grid3"><div><table>',
'<thead class="x-grid3-header"><tr class="x-grid3-hd-row">',
'<td class="x-grid3-hd x-grid3-cell x-grid3-hd-inner" style="width: 80px;">商户号</td>',
'<td class="x-grid3-hd x-grid3-cell" style="width: 200px;">名称</td>',
'</tr></thead><tbody>',
'<tpl for=".">',
'<tr class="x-combo-list-item">',
'<td class="x-grid3-col x-grid3-cell"><div class="x-grid3-cell-inner" style="font-size:12px;">{Number}</div></td>',
'<td class="x-grid3-col x-grid3-cell"><div class="x-grid3-cell-inner" style="font-size:12px;">{Name}</div></td>',
'</tr>', '</tpl>', '</tbody></table></div></div>')
});
// 注册
Ext.reg('servicepointcombo', ServicePointCombo);