From ff435968945d457f9ee653a9620fa1c7d78d2d4c Mon Sep 17 00:00:00 2001
From: 涂煌豪 <tuhuanghao@prec-tech.com>
Date: 星期五, 06 五月 2022 18:17:54 +0800
Subject: [PATCH] MceConfigPDFController 修改

---
 force-app/main/default/objects/Maintenance_Contract_Estimate__c/webLinks/CustomNewMC.webLink-meta.xml |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/force-app/main/default/objects/Maintenance_Contract_Estimate__c/webLinks/CustomNewMC.webLink-meta.xml b/force-app/main/default/objects/Maintenance_Contract_Estimate__c/webLinks/CustomNewMC.webLink-meta.xml
index 39a798c..4904016 100644
--- a/force-app/main/default/objects/Maintenance_Contract_Estimate__c/webLinks/CustomNewMC.webLink-meta.xml
+++ b/force-app/main/default/objects/Maintenance_Contract_Estimate__c/webLinks/CustomNewMC.webLink-meta.xml
@@ -9,9 +9,19 @@
     <openType>onClickJavaScript</openType>
     <protected>false</protected>
     <requireRowSelection>false</requireRowSelection>
-    <url>if (&quot;{!Maintenance_Contract__c.Status__c}&quot; != &quot;寮曞悎涓�&quot;) {
+    <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;);
@@ -22,5 +32,8 @@
         window.open( &quot;/apex/SelectAssetEstimate?mcid={!URLENCODE(Maintenance_Contract__c.Id)}&quot;, &quot;_top&quot;);
     }
     
-}</url>
+}
+
+}
+foo();</url>
 </WebLink>

--
Gitblit v1.9.1