From d8dc84a3d56df839895f1c417a4d9cbee763d262 Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 03 三月 2023 14:50:59 +0800
Subject: [PATCH] gzw 测试环境代码更新

---
 force-app/main/default/objects/Agency_Opportunity__c/webLinks/Quotation_request.webLink-meta.xml |   45 ++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/force-app/main/default/objects/Agency_Opportunity__c/webLinks/Quotation_request.webLink-meta.xml b/force-app/main/default/objects/Agency_Opportunity__c/webLinks/Quotation_request.webLink-meta.xml
index f3f566d..751ff5c 100644
--- a/force-app/main/default/objects/Agency_Opportunity__c/webLinks/Quotation_request.webLink-meta.xml
+++ b/force-app/main/default/objects/Agency_Opportunity__c/webLinks/Quotation_request.webLink-meta.xml
@@ -2,15 +2,10 @@
 <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;)} 
+    <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;)} 
-//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;);
@@ -25,5 +20,41 @@
 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>

--
Gitblit v1.9.1