涂煌豪
2022-05-06 ff435968945d457f9ee653a9620fa1c7d78d2d4c
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
40
41
42
43
44
45
46
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Quotation_request</fullName>
    <availability>online</availability>
    <displayType>button</displayType>
    <linkType>javascript</linkType>
    <masterLabel>报价委托</masterLabel>
    <openType>onClickJavaScript</openType>
    <protected>false</protected>
    <url>{!RequireScript(&quot;/soap/ajax/51.0/connection.js&quot;)} 
{!RequireScript(&quot;/soap/ajax/51.0/apex.js&quot;)} 
{!RequireScript(&quot;/resource/CommonUtilJs&quot;)}
//2021-10-22 gwy 版本更改为51.0 
var foo = function() { 
var ProfileId = &quot;{!$Profile.Id}&quot;;
if( ProfileId!= &apos;00e1m000000MSci&apos;
// 系统管理员
&amp;&amp; ProfileId!= &apos;00e10000000Y3o5&apos;
// 2s1
&amp;&amp; ProfileId!= &apos;00e10000000xnp2&apos; &amp;&amp; ProfileId!= &apos;00e10000000xzQ0&apos;
 
// 2s2
&amp;&amp; ProfileId!= &apos;00e10000000xnp7&apos;&amp;&amp; ProfileId!= &apos;00e10000001220i&apos;
 
// 2s4
&amp;&amp; ProfileId!= &apos;00e10000000xnpH&apos; &amp;&amp; ProfileId!= &apos;00e10000000xzQA&apos;
 
&amp;&amp; ProfileId!= &apos;00e10000000hkas&apos;
)
{
alert(&quot;只有担当可以做报价委托!&quot;);
return;
}
 
 
if(&apos;{!Tender_information__c.QuoteIrai__c}&apos;  !=  &apos;&apos;){
alert(&quot;已经存在完成的报价委托,请不要重复委托。&quot;);
return;
}
 
var url = &quot;/apex/NewQuoteIrai?tenderid={!Tender_information__c.Id}&quot;;
window.open(url,&apos;_blank&apos;,&apos;scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes&apos;);
//window.location.href=&quot;/apex/NewQuoteIrai?tenderid={!Tender_information__c.Id}&quot;;
};
foo();</url>
</WebLink>