我已经在pageshow事件中定义了函数但是在尝试调用该函数时我得到的错误函数没有定义。这是什么原因?我怎么称呼功能?请让我知道
$(document).on('pageshow',"#summaryDetailPg", function() {
$("#uploadButton").removeClass('ui-disabled');
$("#sendEmailButton").removeClass('ui-disabled');
riskAssessmentCheckedNotesCountStatus = 0;
riskAssessmentCheckedCount = 0;
$.mobile.showPageLoadingMsg("a", "Loading...", false);
getSiteRequiredInfo();
getBriefRequiredInfo();
getCustomerRequiredInfo();
$("#summaryDetailPgDiscipline").empty().append("").trigger('create');
getSystemDetailSiteInfo();
getSystemDetailCustomerInfo();
getSystemDetailRiskInfo();
getSystemDetailDisciplineInfo();
getSignature();
getRiskAssessmentCheckedCount();
function GetStatus()
{
if (window.localStorage.getItem("userrole").indexOf("SendPdfToCustomer") != -1) {
//console.log("grandTotalCostProposal:::",+grandTotalCostProposal);
// console.log("window.localStorage.getInternal Notes:"+ window.localStorage.getItem("internalNotesValues"));
console.log("window.localStorage.userProposalReview0:::"+window.localStorage.getItem("userProposalReview"));
console.log("grandTotalCostProposal"+grandTotalCostProposal);
//quote price is greater than totalRevenue Limit
if((grandTotalCostProposal > window.localStorage.getItem("userProposalReview")) && $('#enq6').val().length >0)
{
console.log("if block condition inside");
$('#sendToOfficeAndCustomer').hide();
$('#sendToOfficeAndCustomer').addClass('ui-disabled');
}
else
{
$('#sendToOfficeAndCustomer').show();
}
$('#sendToOfficeAndCustomer').off("click").on("click", function () {
// checkConnection();
$("#sendEmailButton").removeClass('ui-disabled');
pdfFlag = "mail";
uploadDataType = "office";
$.mobile.changePage("#sendToEmailForm",null,true,true);
//if quote price is lesser than button enable
});
else {
alert("sendPdfToCustomer is equal -1");
$('#sendToOfficeAndCustomer').hide();
}
}
无法调用函数GetStatus()