87,991
社区成员




applyAccount.gridManager = new Ext.grid.GridPanel({
//title : '客户经理选取列表',
store : applyAccount.storeManager,
colModel : applyAccount.colModelManager,
bbar : applyAccount.CusBbar,
selModel : applyAccount.CusSelModel,
columnLines : true,//否显示列分割线,默认为false
autoScroll : 'auto',
autoSizeColumns : true,//根据列内容自动适应列宽度
viewConfig : {
forceFit : true
},
loadMask : true,
tbar : [
'客户经理编号:',{
xtype: 'textfield',
//fieldLabel: '客户姓名',
allowBlank :false,
id: 'accountManager'
},
{
text : '查询',
iconCls : 'query',
handler : function() {
//alert(Ext.get('accountManager').getValue());
applyAccount.storeManager.load({
params: { start: 0,
limit: applyAccount.CusPageSize,
level:2,
managerNum:Ext.get('accountManager').dom.value
},
callback:function(store,resc){
var record2 = applyAccount.grid.getSelectionModel().getSelected();
if(record2){
var records = new Array();
applyAccount.storeManager.each(function(record){
if(record.data.account == record2.data.clientManagerNum){
records.push(record);
}
});
applyAccount.CusSelModel.selectRecords(records,true);
}
}
});
}
}]
});
applyAccount.tuiJianGrid = new Ext.grid.GridPanel({
//title : '推荐人选取列表',
store : applyAccount.tuiJianStore,
colModel : applyAccount.colModelTuiJian,
bbar : applyAccount.TjBbar,
selModel : applyAccount.TjSelModel,
columnLines : true,//否显示列分割线,默认为false
autoScroll : 'auto',
viewConfig : {
forceFit : true
},
autoSizeColumns : true,//根据列内容自动适应列宽度
loadMask : true,
tbar : [
'推荐人编号:',
{
xtype: 'textfield',
//fieldLabel: '客户姓名',
allowBlank :false,
id: 'refaccount'
},
{
text : '查询',
iconCls : 'query',
handler : function() {
applyAccount.tuiJianStore.load({
params: { start: 0,
limit: applyAccount.TjPageSize,
level:2,
refPersonNum:Ext.get('refaccount').dom.value
},
callback:function(store){
var record2 = applyAccount.grid.getSelectionModel().getSelected();
if(record2){
var records = new Array();
applyAccount.tuiJianStore.each(function(record){
if(record.data.account == record2.data.refPersonAccount){
records.push(record);
}
});
applyAccount.TjSelModel.selectRecords(records,true);
}
}
});
}
}]
});
//
applyAccount.fromPanel = new Ext.form.FormPanel({
frame : true,
title : '',
labelAlign: 'right',
bodyStyle : 'padding:10px;border:0px',
labelwidth : 70,
items:[
{
xtype : 'textfield',
fieldLabel : 'validAcount',
hidden:true,
name:'validAcount',
//name : 'remark',
anchor : '40%'
},{
xtype : 'textfield',
fieldLabel : 'validAcountName',
hidden:true,
name:'validAcountName',
//name : 'remark',
anchor : '40%'
},{
autoHeight:true,
layout:'column',
border:false,
allowBlank : false,
items: [{
columnWidth:.33,
layout:'form',
defaults: {anchor: '95%'},
style: 'margin-left: 5px;padding-left: 5px;',
items:[
{xtype: 'textfield',
fieldLabel: '客户姓名',
allowBlank :false,
name: 'clientName'
} ]
}, {
columnWidth:.33,
layout:'form',
defaults: {anchor: '95%'},
style: 'margin-left: 5px;padding-left: 5px;',
items:[
{xtype: 'textfield',
fieldLabel: '帐户号',
allowBlank :false,
name: 'accountNum'
} ]
}
]
}
]
});
applyAccount.addWindow = new Ext.Window({
layout : 'border',
width : 800,
height : 400,
closeAction : 'hide',
plain : true,
modal : true,
resizable : true,
items : [ { region: "north", height:50,border: false,items:[applyAccount.fromPanel] },
{ region: "center", split: true, layout:'fit', border: true,items:[applyAccount.gridManager] },
{ region: "east", width: 400,layout:'fit', items:[applyAccount.tuiJianGrid] }
],
buttons : [ {
text : '保存',
handler : function() {
applyAccount.saveFun();
}
}, {
text : '重置',
handler : function() {
applyAccount.commonFun();
}
} ]
});