高章伟
2022-03-10 8db20630a2675ca14e03ccdee91c614397b5c964
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?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(&quot;/soap/ajax/51.0/connection.js&quot;)}
{!RequireScript(&apos;/resource/1600400985000/CommonUtilJs&apos;)}
var foo = function() {
if (&quot;{!Maintenance_Contract__c.Status__c}&quot; != &quot;引合中&quot;) {
    alert(&quot;维修合同不是询价中的状态,不能新建报价&quot;);
} else {
    //维修合同新建报价时,如果是先款对象,弹出对话框提示 thh 20220304 start
    if(&quot;{!Maintenance_Contract__c.Is_RecognitionModel__c}&quot; == 1){
        if(!confirm(&quot;该经销商为先款对象,是否继续新建报价?&quot;)){
            return;
        }
    }
    //维修合同新建报价时,如果是先款对象,弹出对话框提示 thh 20220304 end
    if(&quot;{!Maintenance_Contract__c.RecordTypeId}&quot;  == &quot;01210000000gTYq&quot;){
       if( &quot;{!Maintenance_Contract__c.URF_Contract__c}&quot;  == &quot;0&quot; ){
           window.open( &quot;/apex/SelectAssetEstimateVM?mcid={!URLENCODE(Maintenance_Contract__c.Id)}&quot;, &quot;_top&quot;);
       }else{
           window.open( &quot;/apex/SelectAssetEstimateURF?mcid={!URLENCODE(Maintenance_Contract__c.Id)}&quot;, &quot;_top&quot;);
       }
    }else{
        window.open( &quot;/apex/SelectAssetEstimate?mcid={!URLENCODE(Maintenance_Contract__c.Id)}&quot;, &quot;_top&quot;);
    }
    
}
 
}
foo();</url>
</WebLink>