日期:2014-05-20 浏览次数:20944 次
MES= {version : '0.1'};
Ext.Toolbar.prototype.hiddenAllItems = function() {
this.items.each(function(item) {
if (item.hide) {
item.hide();
}
});
};
MES.BtnToolBar=function(obj, tree){
this.toolbar = obj;
if (this.toolbar) {
Ext.Ajax.request({
url : '/mis/wlcsp/rbac/BtnToolBar.jsp?DbType=check',
success : function(response, options) {
var responseArray = Ext.util.JSON.decode(response.responseText);
if (responseArray.success) {
obj.hiddenAllItems();
var strs= new Array(); //定义一数组
strs=responseArray.BtnName.split(',');//按钮数组
for(var i=0;i<strs.length;i++){
var strstemp= new Array(); //定义一数组
strstemp=strs[i].split(".");//每个数组中对应的多个信息
//加载按钮
LoadBtn(strstemp[0],strstemp[1]);
}
}else{
obj.hiddenAllItems();
}
}
});
}
//加载按钮方法
var LoadBtn = function(btnid,btnname) {
obj.add(new Ext.Button({
id:btnid,
text:btnname,
listeners:{click:BtnClick}
}));
};
var BtnClick = function(obj, e) {
obj.getId();
};
};
function SearchCustomerpoOp(){
dsCustomerpoList.proxy = new Ext.data.HttpProxy({
url:'CustomerpoListData.jsp?DbType=GetCustomerpo&CustomerID='+Ext.getCmp("txt_customername_customerposearch_id").getValue()+'&CustPO='+Ext.getCmp("txt_custpo_customerposearch_id").getValue()
});
dsCustomerpoList.load({params : {start : 0,limit : 30}});
}