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 ("{!Maintenance_Contract__c.Status__c}" != "寮曞悎涓�") { + <url>{!RequireScript("/soap/ajax/51.0/connection.js")} +{!RequireScript('/resource/1600400985000/CommonUtilJs')} +var foo = function() { +if ("{!Maintenance_Contract__c.Status__c}" != "寮曞悎涓�") { alert("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环"); } else { + //缁翠慨鍚堝悓鏂板缓鎶ヤ环鏃讹紝濡傛灉鏄厛娆惧璞★紝寮瑰嚭瀵硅瘽妗嗘彁绀� thh 20220304 start + if("{!Maintenance_Contract__c.Is_RecognitionModel__c}" == 1){ + if(!confirm("璇ョ粡閿�鍟嗕负鍏堟瀵硅薄锛屾槸鍚︾户缁柊寤烘姤浠凤紵")){ + return; + } + } + //缁翠慨鍚堝悓鏂板缓鎶ヤ环鏃讹紝濡傛灉鏄厛娆惧璞★紝寮瑰嚭瀵硅瘽妗嗘彁绀� thh 20220304 end if("{!Maintenance_Contract__c.RecordTypeId}" == "01210000000gTYq"){ if( "{!Maintenance_Contract__c.URF_Contract__c}" == "0" ){ window.open( "/apex/SelectAssetEstimateVM?mcid={!URLENCODE(Maintenance_Contract__c.Id)}", "_top"); @@ -22,5 +32,8 @@ window.open( "/apex/SelectAssetEstimate?mcid={!URLENCODE(Maintenance_Contract__c.Id)}", "_top"); } -}</url> +} + +} +foo();</url> </WebLink> -- Gitblit v1.9.1