|  |  | 
 |  |  |     <url>{!RequireScript("/soap/ajax/51.0/connection.js")} | 
 |  |  | {!RequireScript("/soap/ajax/51.0/apex.js")} | 
 |  |  | {!RequireScript("/resource/CommonUtilJs")} | 
 |  |  | //2021-10-21 gwy 版本更改为51.0 | 
 |  |  | function foo(){ | 
 |  |  |    //0.当前状态(只有草案中才可以进行审批) | 
 |  |  |     var NowStatus = "{!OPDPlan__c.Status__c}"; | 
 |  |  | 
 |  |  |   //2.提示 | 
 |  |  |    if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { | 
 |  |  | return; | 
 |  |  | } | 
 |  |  | }   | 
 |  |  |    //2022-07-20   zyh | 
 |  |  |    var RentalReson = "{!OPDPlan__c.RentalReson__c}"; | 
 |  |  |    var Related_Opportunity1_ID = "{!OPDPlan__c.Related_Opportunity1_ID__c}"; | 
 |  |  |    var Related_Opportunity2_ID = "{!OPDPlan__c.Related_Opportunity2_ID__c}"; | 
 |  |  |    if (RentalReson == "OPD" &&  (Related_Opportunity1_ID == null || Related_Opportunity1_ID == "" ) && (Related_Opportunity2_ID == null || Related_Opportunity2_ID == "" ) ){ | 
 |  |  |       if(!confirm("无询价OPD申请将审批到副总裁")){ | 
 |  |  |       return; | 
 |  |  |       } | 
 |  |  |    } | 
 |  |  |    //2022-07-20   zyh | 
 |  |  |    var rac = new sforce.SObject("OPDPlan__c"); | 
 |  |  |    rac.Id = "{!OPDPlan__c.Id}"; | 
 |  |  |    //3.状态改为 提交 |