QuoteEntryNew online 2023-05-31 SI询价创建报价时取消对询价等级的判断 massActionButton javascript 新規見積 onClickJavaScript false false {!REQUIRESCRIPT('/soap/ajax/51.0/connection.js')} {!RequireScript("/soap/ajax/51.0/apex.js")} sforce.connection.sessionId = '{!$Api.Session_ID}'; var result = sforce.connection.describeSObject("Quote"); var oppid = '{!Opportunity.Id}' ; var excuteRs = sforce.apex.execute("ControllerUtil", "getStatusForISO", {opporID:oppid}); //alert(excuteRs ); //alert('{!Opportunity.Opportunity_stage__c}' ); //&& '{!Opportunity.Opportunity_stage__c}'!='E'&& '{!Opportunity.Opportunity_stage__c}'!='D' if (result.createable == "false") { alert('没有新建报价的权限。'); } else if ('{!Opportunity.Agency_Is_Delete__c}' == "√") { alert('经销商处于无效状态,不能新建报价。'); } else if ('{!Opportunity.Account_Is_Active__c}' == "無効") { alert('科室处于无效状态,不能新建报价。'); } else if ('{!Opportunity.Hospital_Is_Active__c}' == "無効") { alert('医院处于无效状态,不能新建报价。'); } // 2023-05-31 DB202304343398 SI询价创建报价时取消对询价等级的判断 // else if ((excuteRs !='CommitCode')&&'{!Opportunity.RecordTypeId}'=='012100000006KMe'&& '{!Opportunity.Competitor__c}'!='E'&& '{!Opportunity.Competitor__c}'!='D') { else if ((excuteRs !='CommitCode')&&'{!Opportunity.RecordTypeId}'=='012100000006KMe') { alert('没有批准的需求表,不能报价。'); } else { if ({!Opportunity.Estimation_Decision__c}==0){ if('{!HTMLENCODE(Opportunity.RecordTypeId)}'=='012100000006KMe'){ var setQuote = sforce.apex.execute("ControllerUtil", "setQuote", {oppid:oppid}); window.open('/apex/SI_NewQuoteEntry?oppid={!Opportunity.Id}',"_blank"); }else{ window.open('/apex/NewQuoteEntry?oppid={!Opportunity.Id}',"_blank"); } } else { alert('{!$Label.Error_Message9}'); } }