From 44f866419cde0ff12a91d9c1d92daf9e36b063e1 Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期四, 20 四月 2023 13:22:38 +0800 Subject: [PATCH] backup0420 --- force-app/main/default/objects/Tender_information__c/webLinks/Quotation_request.webLink-meta.xml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 48 insertions(+), 12 deletions(-) diff --git a/force-app/main/default/objects/Tender_information__c/webLinks/Quotation_request.webLink-meta.xml b/force-app/main/default/objects/Tender_information__c/webLinks/Quotation_request.webLink-meta.xml index 5609afe..f5201a0 100644 --- a/force-app/main/default/objects/Tender_information__c/webLinks/Quotation_request.webLink-meta.xml +++ b/force-app/main/default/objects/Tender_information__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("/soap/ajax/51.0/connection.js")} + <description>//20220511 +{!RequireScript("/soap/ajax/51.0/connection.js")} {!RequireScript("/soap/ajax/51.0/apex.js")} -{!RequireScript("/resource/CommonUtilJs")} -//2021-10-22 gwy 鐗堟湰鏇存敼涓�51.0 +{!RequireScript("/resource/CommonUtilJs")} var foo = function() { var ProfileId = "{!$Profile.Id}"; if( ProfileId!= '00e1m000000MSci' @@ -33,14 +28,55 @@ } -if('{!Tender_information__c.QuoteIrai__c}' != ''){ -alert("宸茬粡瀛樺湪瀹屾垚鐨勬姤浠峰鎵橈紝璇蜂笉瑕侀噸澶嶅鎵樸��"); -return; -} +//if('{!Tender_information__c.QuoteIrai__c}' != ''){ +//alert("宸茬粡瀛樺湪瀹屾垚鐨勬姤浠峰鎵橈紝璇蜂笉瑕侀噸澶嶅鎵樸��"); +//return; +//} var url = "/apex/NewQuoteIrai?tenderid={!Tender_information__c.Id}"; window.open(url,'_blank','scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes'); //window.location.href="/apex/NewQuoteIrai?tenderid={!Tender_information__c.Id}"; }; +foo();</description> + <displayType>button</displayType> + <linkType>javascript</linkType> + <masterLabel>鎶ヤ环濮旀墭</masterLabel> + <openType>onClickJavaScript</openType> + <protected>false</protected> + <url>{!RequireScript("/soap/ajax/51.0/connection.js")} +{!RequireScript("/soap/ajax/51.0/apex.js")} +{!RequireScript("/resource/CommonUtilJs")} +//2021-10-22 gwy 鐗堟湰鏇存敼涓�51.0 +var foo = function() { +var ProfileId = "{!$Profile.Id}"; +var u_p = "{!$User.Salesdepartment_text__c}"; +if( ProfileId!= '00e1m000000MSci' +// 绯荤粺绠$悊鍛� +&& ProfileId!= '00e10000000Y3o5' +// 2s1 +&& ProfileId!= '00e10000000xnp2' && ProfileId!= '00e10000000xzQ0' + +// 2s2 +&& ProfileId!= '00e10000000xnp7'&& ProfileId!= '00e10000001220i' + +// 2s4 +&& ProfileId!= '00e10000000xnpH' && ProfileId!= '00e10000000xzQA' + +&& ProfileId!= '00e10000000hkas' +) +{ +alert("鍙湁鎷呭綋鍙互鍋氭姤浠峰鎵橈紒"); +return; +} + +if(u_p == '5.鍗庝笢' || u_p == '6.鍗庡崡'){ +alert("璇锋柊寤鸿喘涔版剰鍚戙��"); +return; +} +else{ +var url = "/apex/NewQuoteIrai?tenderid={!Tender_information__c.Id}"; +window.open(url,'_blank','scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes'); +} +}; foo();</url> </WebLink> -- Gitblit v1.9.1