|  |  | 
 |  |  | <apex:page applyHtmlTag="false" Controller="ConsumTrialPDFController" showHeader="false" sidebar="false" id="allPage" action="{!init}"> | 
 |  |  | <apex:page applyHtmlTag="false" Controller="ConsumTrialPDFController" showHeader="false" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true"> | 
 |  |  | <!-- renderAs="pdf" -->    | 
 |  |  |     <html> | 
 |  |  |         <head> | 
 |  |  | 
 |  |  |             </style> | 
 |  |  |             <!-- 20220221 PI改造 by 徐亮 start  --> | 
 |  |  |         <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" /> | 
 |  |  |         <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script> | 
 |  |  |         <apex:includeScript value="{!URLFOR($Resource.connection20)}"/> | 
 |  |  |         <!-- <script src="https://cdn.bootcss.com/es6-promise/4.1.1/es6-promise.auto.min.js" type="text/javascript"></script> --> | 
 |  |  |          | 
 |  |  |         <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> | 
 |  |  | 
 |  |  |  | 
 |  |  |         var form = jQuery("<form method='post'></form>"); | 
 |  |  |         jQuery(document.body).append(form); | 
 |  |  |         form.attr({"action":staticResourceFile.viewUnifiedContactUrl+"?from="+encodeURIComponent(window.location.href)}); | 
 |  |  |         let href = window.location.href | 
 |  |  |         let arr = href.split('/') | 
 |  |  |         form.attr({"action":staticResourceFile.viewUnifiedContactUrl+"?from="+encodeURIComponent(href)+"&fileName="+encodeURIComponent(arr[arr.length-1].split('?')[0])}); | 
 |  |  |         // form.attr({"action":"http://127.0.0.1:8080/a/d?from="+encodeURIComponent(window.location.href)}); | 
 |  |  |         let input = jQuery("<input type='hidden'/>"); | 
 |  |  |         input.attr({"name":"base64Str"}); | 
 |  |  | 
 |  |  |         form.submit(); | 
 |  |  |  | 
 |  |  |         // jQuery("body > *").each(function(){ | 
 |  |  |         //    jQuery(this).css('display','none'); | 
 |  |  |         //  jQuery(this).css('display','none'); | 
 |  |  |         // }) | 
 |  |  |         // jQuery("body").append('<embed style="position:absolute; left: 0; top: 0;" width="100%" height="100%" src="'+pdf.output('datauristring')+'" type="application/pdf"/>') | 
 |  |  |  | 
 |  |  | 
 |  |  |              | 
 |  |  |         }) | 
 |  |  |  | 
 |  |  |       let a1 = false; | 
 |  |  |         let a1 = false; | 
 |  |  |         let a2 = false; | 
 |  |  |         var Foo = function(){ | 
 |  |  |            if(a1 && a2){ | 
 |  |  |                setTimeout(function() { | 
 |  |  |                     jsPdfDownload();  | 
 |  |  |                 }, 1500); | 
 |  |  |             if(a1 && a2){ | 
 |  |  |                 jsPdfDownload();  | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         AWSService.search(staticResource.searchUrl, JSON.stringify({ | 
 |  |  | 
 |  |  |         }, staticResource.token); | 
 |  |  |          | 
 |  |  |         if('{!targetConsumApply.Shippment_adress_detail__c}'){ | 
 |  |  |            a2 = true; | 
 |  |  |             a2 = true; | 
 |  |  |             Foo(); | 
 |  |  |         }else{ | 
 |  |  |            AWSService.query(staticResourceCon.queryUrl, '{!targetConsumApply.AWS_Data_Id__c}', function(data){ | 
 |  |  |             AWSService.query(staticResourceCon.queryUrl, '{!targetConsumApply.AWS_Data_Id__c}', function(data){ | 
 |  |  |                 //unblockUI(); | 
 |  |  |                 if (data && data.object  ) { | 
 |  |  |                      |