请问一下,为啥调用不到小弟我想要的函数
请教一下,为啥调用不到我想要的函数
/////////////////////////////////////////////////////
// Ajax Framework End
/////////////////////////////////////////////////////
Ext.onReady(function() {
Ext.QuickTips.init();
Ext.util.CSS.swapStyleSheet('theme', '../aws_js/extjs/css/xtheme-gray.css');
var tb = new Ext.Toolbar('toolbar');
tb.add({
id:'editBut',
cls: 'x-btn-text-icon bmenu',
text:'编辑',
icon:'../aws_img/find_obj.gif',
tooltip: {text:'将当前客户信息切换至可编辑状态', title:'提示', autoHide:true},
handler: clickHandler
},{
id:'saveBut',
cls: 'x-btn-text-icon bmenu',
text:'保存',
tooltip: {text:'保存修改的客户信息', title:'提示', autoHide:true},
icon:'../aws_img/save.gif',
handler: clickHandler
}/*,'-'*/,{
id:'removeBut',
cls: 'x-btn-text-icon bmenu',
text:'删除',
tooltip: {text:'删除当前客户', title:'提示', autoHide:true},
handler: clickHandler,
icon:'../aws_img/delete2.gif'
},{
id:'accreditBut',
cls: 'x-btn-text-icon bmenu',
text:'授权',
tooltip: {text:'授权员工修改的客户信息', title:'提示', autoHide:true},
icon:'../aws_img/save.gif',
handler: clickHandler
},{
id:'refuseBut',
cls: 'x-btn-text-icon bmenu',
text:'收回权限',
tooltip: {text:'收回授权权限', title:'提示', autoHide:true},
icon:'../aws_img/save.gif',
handler: clickHandler
});
if(isModifyInfo){
tb.items.get('saveBut').disable();
}else{
tb.items.get('saveBut').disable();
tb.items.get('editBut').disable();
}
//tb.items.get('removeBut').disable();
function clickHandler(item, e) {
var customerId=frmMain.customerId.value;
if(item.text=='编辑'){
AWS_SFA_eFORM.location="./login.wf?sid="+encodeURI(frmMain.sid.value)+"&cmd=SFA_V2_Customer_MyList_Tabs_BaseInfo&customerId="+frmMain.customerId.value+"&isModify=1";
tb.items.get('editBut').disable();
tb.items.get('saveBut').enable();
}else if(item.text=='保存'){
//自动保存工作流数据,如果不能编辑抛出一个错误
try{
AWS_SFA_eFORM.saveData(AWS_SFA_eFORM.document.frmMain,'WorkFlow_Execute_Worklist_BindReport_P_Save');
}catch(e){
//alert("No save");
}
//tb.items.get('saveBut').disable();
//tb.items.get('editBut').enable();
}else if(item.text=='删除'){
Ext.MessageBox.confirm('提示', '确认要删除该客户的全部信息:包括机会和合同的信息吗?', callBack);
function callBack(id) {
if(id=="yes"){
try{
delete_mess(customerId);
//Ext.MessageBox.alert('提示','删除成功!'+customerId);
setTimeout("parent.parent.location.reload()",1000);
}catch(e){
//alert("No save");
/////////////////////////////////////////////////////
// Ajax Framework End
/////////////////////////////////////////////////////
Ext.onReady(function() {
Ext.QuickTips.init();
Ext.util.CSS.swapStyleSheet('theme', '../aws_js/extjs/css/xtheme-gray.css');
var tb = new Ext.Toolbar('toolbar');
tb.add({
id:'editBut',
cls: 'x-btn-text-icon bmenu',
text:'编辑',
icon:'../aws_img/find_obj.gif',
tooltip: {text:'将当前客户信息切换至可编辑状态', title:'提示', autoHide:true},
handler: clickHandler
},{
id:'saveBut',
cls: 'x-btn-text-icon bmenu',
text:'保存',
tooltip: {text:'保存修改的客户信息', title:'提示', autoHide:true},
icon:'../aws_img/save.gif',
handler: clickHandler
}/*,'-'*/,{
id:'removeBut',
cls: 'x-btn-text-icon bmenu',
text:'删除',
tooltip: {text:'删除当前客户', title:'提示', autoHide:true},
handler: clickHandler,
icon:'../aws_img/delete2.gif'
},{
id:'accreditBut',
cls: 'x-btn-text-icon bmenu',
text:'授权',
tooltip: {text:'授权员工修改的客户信息', title:'提示', autoHide:true},
icon:'../aws_img/save.gif',
handler: clickHandler
},{
id:'refuseBut',
cls: 'x-btn-text-icon bmenu',
text:'收回权限',
tooltip: {text:'收回授权权限', title:'提示', autoHide:true},
icon:'../aws_img/save.gif',
handler: clickHandler
});
if(isModifyInfo){
tb.items.get('saveBut').disable();
}else{
tb.items.get('saveBut').disable();
tb.items.get('editBut').disable();
}
//tb.items.get('removeBut').disable();
function clickHandler(item, e) {
var customerId=frmMain.customerId.value;
if(item.text=='编辑'){
AWS_SFA_eFORM.location="./login.wf?sid="+encodeURI(frmMain.sid.value)+"&cmd=SFA_V2_Customer_MyList_Tabs_BaseInfo&customerId="+frmMain.customerId.value+"&isModify=1";
tb.items.get('editBut').disable();
tb.items.get('saveBut').enable();
}else if(item.text=='保存'){
//自动保存工作流数据,如果不能编辑抛出一个错误
try{
AWS_SFA_eFORM.saveData(AWS_SFA_eFORM.document.frmMain,'WorkFlow_Execute_Worklist_BindReport_P_Save');
}catch(e){
//alert("No save");
}
//tb.items.get('saveBut').disable();
//tb.items.get('editBut').enable();
}else if(item.text=='删除'){
Ext.MessageBox.confirm('提示', '确认要删除该客户的全部信息:包括机会和合同的信息吗?', callBack);
function callBack(id) {
if(id=="yes"){
try{
delete_mess(customerId);
//Ext.MessageBox.alert('提示','删除成功!'+customerId);
setTimeout("parent.parent.location.reload()",1000);
}catch(e){
//alert("No save");