| <?xml version="1.0" encoding="UTF-8"?> | 
| <WebLink xmlns="http://soap.sforce.com/2006/04/metadata"> | 
|     <fullName>CustomNewMC</fullName> | 
|     <availability>online</availability> | 
|     <description>服务合同页面用</description> | 
|     <displayType>massActionButton</displayType> | 
|     <linkType>javascript</linkType> | 
|     <masterLabel>新建新服务合同报价</masterLabel> | 
|     <openType>onClickJavaScript</openType> | 
|     <protected>false</protected> | 
|     <requireRowSelection>false</requireRowSelection> | 
|     <url>{!RequireScript("/soap/ajax/51.0/connection.js")} | 
| {!RequireScript('/resource/1600400985000/CommonUtilJs')} | 
| var foo = function() { | 
| if ("{!Maintenance_Contract__c.Status__c}" != "引合中") { | 
|     alert("维修合同不是询价中的状态,不能新建报价"); | 
| } else { | 
|     //维修合同新建报价时,如果是先款对象,弹出对话框提示 thh 20220304 start | 
|     if("{!Maintenance_Contract__c.Is_RecognitionModel__c}" == 1){ | 
|         if(!confirm("该经销商为先款对象,是否继续新建报价?")){ | 
|             return; | 
|         } | 
|     } | 
|     //维修合同新建报价时,如果是先款对象,弹出对话框提示 thh 20220304 end | 
|     if("{!Maintenance_Contract__c.RecordTypeId}"  == "01210000000gTYq"){ | 
|        if( "{!Maintenance_Contract__c.URF_Contract__c}"  == "0" ){ | 
|            window.open( "/apex/SelectAssetEstimateVM?mcid={!URLENCODE(Maintenance_Contract__c.Id)}", "_top"); | 
|        }else{ | 
|            window.open( "/apex/SelectAssetEstimateURF?mcid={!URLENCODE(Maintenance_Contract__c.Id)}", "_top"); | 
|        } | 
|     }else{ | 
|         window.open( "/apex/SelectAssetEstimate?mcid={!URLENCODE(Maintenance_Contract__c.Id)}", "_top"); | 
|     } | 
|      | 
| } | 
|   | 
| } | 
| foo();</url> | 
| </WebLink> |