FUYU
2023-12-13 4488f711dbc01a8db6753907cae2ef4021dede68
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Quotation_request</fullName>
    <availability>online</availability>
    <description>//20220511
{!RequireScript(&quot;/soap/ajax/51.0/connection.js&quot;)} 
{!RequireScript(&quot;/soap/ajax/51.0/apex.js&quot;)} 
{!RequireScript(&quot;/resource/CommonUtilJs&quot;)} 
var foo = function() { 
var AgencyHospitalLink = sforce.connection.query(&quot;select id,isSame__c from  Agency_Hospital_Link__c where id = &apos;&quot;+&quot;{!Agency_Opportunity__c.Agency_HospitalId__c}&quot;+&quot;&apos;&quot;); 
var AgencyHospital = AgencyHospitalLink.getArray(&quot;records&quot;);
if(AgencyHospital.length &gt; 0){
if(AgencyHospital[0].isSame__c == &apos;0&apos;){
alert(&quot;医院名称有变更,请等待15分钟&quot;);
return;
}
 
}
var url = &quot;/apex/NewQuoteIrai?agencyoppid={!Agency_Opportunity__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?agencyoppid={!Agency_Opportunity__c.Id}&quot;;
};
foo();</description>
    <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 AgencyHospitalLink = sforce.connection.query(&quot;select id,isSame__c from Agency_Hospital_Link__c where id = &apos;&quot;+&quot;{!Agency_Opportunity__c.Agency_HospitalId__c}&quot;+&quot;&apos;&quot;);
var AgencyHospital = AgencyHospitalLink.getArray(&quot;records&quot;);
var IsTransformed = &quot;{!Agency_Opportunity__c.Is_Transformed__c}&quot;;
if(AgencyHospital.length &gt; 0){
if(AgencyHospital[0].isSame__c == &apos;0&apos;){
alert(&quot;医院名称有变更,请等待15分钟&quot;);
return;
}
 
if(IsTransformed == true){
alert(&quot;请从询价画面新建报价委托&quot;);
return;
}
 
var u_p = &quot;{!$User.Salesdepartment_text__c}&quot;;
if(u_p == &apos;5.华东&apos; || u_p == &apos;6.华南&apos;){
alert(&quot;请新建购买意向。&quot;);
return;
}
 
}
var url = &quot;/apex/NewQuoteIrai?agencyoppid={!Agency_Opportunity__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?agencyoppid={!Agency_Opportunity__c.Id}&quot;;
};
foo();</url>
</WebLink>