From 1b214a96d371ce90578fb7d6c14eecfcba5f87f0 Mon Sep 17 00:00:00 2001
From: 涂煌豪 <tuhuanghao@prec-tech.com>
Date: 星期一, 11 四月 2022 18:52:32 +0800
Subject: [PATCH] Sfdc2PoContactBatch修改
---
force-app/main/default/pages/FixtureRentalPDF.page | 34 +++++++++++++++++++++++-----------
1 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/force-app/main/default/pages/FixtureRentalPDF.page b/force-app/main/default/pages/FixtureRentalPDF.page
index dd9a9df..790a9a4 100644
--- a/force-app/main/default/pages/FixtureRentalPDF.page
+++ b/force-app/main/default/pages/FixtureRentalPDF.page
@@ -92,7 +92,7 @@
<td style="text-align:left;" >绉戝鍚�</td> <td style="text-align:left;font-size: 13px"><apex:outputText value="{!ApplyHeadShow.Account__r.Department_Name__c}" /></td>
</tr>
<tr>
- <td style="text-align:left;" rowspan="3" >鍙戣揣鍦板潃</td> <td colspan="2" rowspan="3" style="text-align:left;font-size: 13px"> <apex:outputText id="Shippmentadress" value="{!Shippmentadress}" /></td>
+ <td style="text-align:left;" rowspan="3" >鍙戣揣鍦板潃</td> <td colspan="2" rowspan="3" style="text-align:left;font-size: 13px"> <apex:outputText styleClass="Shippmentadress" value="{!Shippmentadress}" /></td>
<td style="text-align:left;" colspan="1">閭紪</td> <td style="text-align:left;"> <apex:outputText value="{!IF(ApplyHeadShow.Shipment_address__r.Post_Code__c==null,ApplyHeadShow.Post_Code__c,ApplyHeadShow.Shipment_address__r.Post_Code__c)}" /></td>
</tr>
<tr>
@@ -285,7 +285,7 @@
<td style="box-sizing: border-box;text-align:center;font-size:13px;border-left: solid 1px;" rowspan="2">鍙戣揣鍦板潃</td>
<!-- 20220124 ljh SFDC-C4U3PH update colspan="4" -->
<td style="box-sizing: border-box;text-align:left;font-size: 13px;" colspan="5" rowspan="2">
- <apex:outputText value="{!if(isblank(ApplyHeadShow.Shippment_adress_detail__c), ApplyHeadShow.direct_shippment_address__c, ApplyHeadShow.Shippment_adress_detail__c)}" />
+ <apex:outputText styleClass="address" value="{!if(isblank(ApplyHeadShow.Shippment_adress_detail__c), ApplyHeadShow.direct_shippment_address__c, ApplyHeadShow.Shippment_adress_detail__c)}" />
</td>
</tr>
<tr>
@@ -372,15 +372,25 @@
//blockme();
document.body.onload = function(){
console.log('document.body.onload')
- AWSService.query(staticResources.queryUrl, '{!ApplyHeadShow.AWS_Data_Id__c}', function(data){
- console.log('data----------')
- console.log(data);
- //unblockUI();
- document.getElementById("allPage:Shippmentadress").innerHTML = data.object.directShippmentAddress;
- //document.getElementById("Caller_phone__c").innerHTML = data.object.callerPhone;
-
+ if ({!addFlag} || !'{!ApplyHeadShow.Shippment_adress_detail__c}') {
+ AWSService.query(staticResources.queryUrl, '{!ApplyHeadShow.AWS_Data_Id__c}', function(data){
+ console.log('data----------')
+ console.log(data);
+ //unblockUI();
+ if ({!addFlag}) {
+ jQuery(".Shippmentadress").html(data.object.directShippmentAddress);
+ }
+ //document.getElementById("Caller_phone__c").innerHTML = data.object.callerPhone;
+ if (!'{!ApplyHeadShow.Shippment_adress_detail__c}') {
+ jQuery(".address").html(data.object.directShippmentAddress);
+ //document.getElementById("allPage:address").innerHTML = data.object.directShippmentAddress;
+ }
+ jsPdfDownload();
+ }, staticResources.token);
+ }else{
jsPdfDownload();
- }, staticResources.token);
+ }
+
}
function jsPdfDownload(){
@@ -433,7 +443,9 @@
function Fun(pdf){
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"});
--
Gitblit v1.9.1