From ead4df22dca33a867279471821ca675f91dec760 Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期六, 14 五月 2022 18:44:54 +0800
Subject: [PATCH] FixIssue0514

---
 force-app/main/default/pages/DeliveryConfirmPDF.page |   36 ++++++++++++++++++++++++++----------
 1 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/force-app/main/default/pages/DeliveryConfirmPDF.page b/force-app/main/default/pages/DeliveryConfirmPDF.page
index 55c0e28..9456566 100644
--- a/force-app/main/default/pages/DeliveryConfirmPDF.page
+++ b/force-app/main/default/pages/DeliveryConfirmPDF.page
@@ -158,11 +158,11 @@
                 <apex:outputText styleClass="Customer__r.DivisionName__c" value="{!luLine.lu.Customer__r.DivisionName__c}"/>
             </td>
             <td class="dataCell" style="text-align: center;">
-                <span aws-obj="Contact" aws-api="lastName" aws-id="{!la.AWS_Data_Id__c}">{!luLine.lu.Contact__r.Name}</span>
+                <span aws-obj="Contact" aws-api="lastName" aws-id="{!luLine.lu.Contact__r.AWS_Data_Id__c}">{!luLine.lu.Contact__r.Name}</span>
             </td>
             <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', true , false)}" layout="none">
                 <td class="dataCell" style="text-align: center;">
-                    <span aws-obj="Contact" aws-api="phone" aws-id="{!la.AWS_Data_Id__c}">{!luLine.lu.Contact__r.Phone}</span>
+                    <span aws-obj="Contact" aws-api="phone" aws-id="{!luLine.lu.Contact__r.AWS_Data_Id__c}">{!luLine.lu.Contact__r.Phone}</span>
                 </td>
             </apex:outputPanel>
             <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', false , true)}" layout="none">
@@ -289,7 +289,9 @@
 <!-- 20220221 PI鏀归�� by 寰愪寒 start  -->
 <script>
     AWSService.sfSessionId = '{!GETSESSIONID()}';
+    sforce.connection.serverUrl = '{!$Site.Prefix}/services/Soap/u/53.0';
     var staticResource = JSON.parse('{!staticResource}');
+    var staticResourceContact = JSON.parse('{!staticResourceContact}');     // Update 20220512 By Chen Yanan
                 
     function Fun(pdf){
         var iframe = document.createElement('iframe');
@@ -382,7 +384,7 @@
                     
                 }
             }
-            unblockUI();
+            //unblockUI();
         }
         let ids = [];
         for (const id of dataIds) {
@@ -391,11 +393,11 @@
             }
         }
         if (ids.length > 0) {
-            blockme();
+            //blockme();
             AWSService.search(r.searchUrl,JSON.stringify({
                 "dataIds":ids
             }),function(data){
-                unblockUI();
+                // unblockUI();
                 if(data.object && data.object.length > 0){
                     
                     for(let d of data.object){
@@ -420,16 +422,30 @@
             }
         });
         Decrypt(staticResource,dataIds);
+
+        // Update 20220512 By Chen Yanan Start
+        let dataIds2 = [];
+        j$('[aws-id][aws-obj="Contact"]').each((i,e)=>{
+            let v = j$(e).attr('aws-id');
+            if (v) {
+                dataIds2.push(v);
+            }
+        });
+        Decrypt(staticResourceContact,dataIds2);
+        // Update 20220512 By Chen Yanan End
     }
 
     j$(function(){
-        //DecryptAll();
-        
+        DecryptAll();
+        setTimeout(() => {
+            jsPdfDownload(); 
+        }, 1500);
+
     })
 
-    document.body.onclick = function(){
-        jsPdfDownload(); 
-    }
+    // document.body.onclick = function(){
+    //     jsPdfDownload(); 
+    // }
 </script>
 <!-- 20220221 PI鏀归�� by 寰愪寒 end  -->
 </html>

--
Gitblit v1.9.1