From 4420517bbbffea48cabe7a7dcdf2e1c4b440fc85 Mon Sep 17 00:00:00 2001
From: GWY <guweiyi@prec-tech.com>
Date: 星期一, 30 五月 2022 16:15:26 +0800
Subject: [PATCH] 两个LS特殊条件在说明的增减
---
force-app/main/default/pages/ViewOrderDecryptInfo.page | 83 ++++++++++++++++++++++++++++++++++-------
1 files changed, 69 insertions(+), 14 deletions(-)
diff --git a/force-app/main/default/pages/ViewOrderDecryptInfo.page b/force-app/main/default/pages/ViewOrderDecryptInfo.page
index 75e27ff..c5d1885 100644
--- a/force-app/main/default/pages/ViewOrderDecryptInfo.page
+++ b/force-app/main/default/pages/ViewOrderDecryptInfo.page
@@ -9,6 +9,10 @@
</apex:repeat>
<apex:outputField html-data-id="EndUser__c" title="{!ApiPrefix}EndUser__c" value="{!Order['EndUser__c']}" />
<apex:outputField html-data-id="EndUserD__c" title="{!ApiPrefix}EndUserD__c" value="{!Order['EndUserD__c']}" />
+ <apex:outputField html-data-id="SpecialDeliveryContact2__c" title="{!ApiPrefix}SpecialDeliveryContact2__c" value="{!Order['SpecialDeliveryContact2__c']}" />
+ <apex:outputField html-data-id="Shipping_Address__c" title="{!ApiPrefix}Shipping_Address__c" value="{!Order['Shipping_Address__c']}" />
+ <apex:outputField html-data-id="SpecialDeliveryContact2_D__c" title="{!ApiPrefix}SpecialDeliveryContact2_D__c" value="{!Order['SpecialDeliveryContact2_D__c']}" />
+ <apex:outputField html-data-id="Shipping_Address_D__c" title="{!ApiPrefix}Shipping_Address_D__c" value="{!Order['Shipping_Address_D__c']}" />
</apex:pageBlockSection>
<script>
var config = {
@@ -24,27 +28,36 @@
AWSService.query(staticResources.queryUrl, '{!AWSDataId}', queryBack, staticResources.token);
debugger
let t = "[title='"+config.ApiPrefix+"EndUser__c']";
+ let tD = "[title='"+config.ApiPrefix+"EndUserD__c']";
+ let t2 = "[title='"+config.ApiPrefix+"SpecialDeliveryContact2__c']";
+ let t2D = "[title='"+config.ApiPrefix+"SpecialDeliveryContact2_D__c']";
let ele = document.querySelector(t);
+ let eleD = document.querySelector(tD);
+ let ele2 = document.querySelector(t2);
+ let ele2D = document.querySelector(t2D);
if('{!contactAWSDataId}' != '鏃�' && '{!contactName}' != '鏃�'){
if('{!contactAWSDataId}' != ''){
AWSService.query(staticResourceContact.queryUrl, '{!contactAWSDataId}', queryContactBack, staticResourceContact.token);
}else{
ele.innerHTML = '{!contactName}';
}
- }else{
- ele.innerHTML = '';
- }
-
- let endUserD = "[title='"+config.ApiPrefix+"EndUserD__c']";
- let eleUserD = document.querySelector(endUserD);
- if('{!contactAWSDataId}' != '鏃�' && '{!contactName}' != '鏃�'){
if('{!endUserDAWSDataId}' != ''){
AWSService.query(staticResourceContact.queryUrl, '{!endUserDAWSDataId}', queryEndUserDBack, staticResourceContact.token);
}else{
- eleUserD.innerHTML = '{!endUserDName}';
+ eleD.innerHTML = '{!endUserDName}';
+ }
+ if('{!contact2AWSDataId}' != ''){
+ AWSService.query(staticResourceContact.queryUrl, '{!contact2AWSDataId}', queryContact2Back, staticResourceContact.token);
+ }else{
+ ele2.innerHTML = '{!contact2Name}';
+ }
+ if('{!contact2DAWSDataId}' != ''){
+ AWSService.query(staticResourceContact.queryUrl, '{!contact2DAWSDataId}', queryContact2DBack, staticResourceContact.token);
+ }else{
+ ele2D.innerHTML = '{!contact2DName}';
}
}else{
- eleUserD.innerHTML = '';
+ ele.innerHTML = '';
}
}
var queryContactBack = function queryContactBack(data){
@@ -69,11 +82,53 @@
}
console.log('data.object is ' + data.object);
- let endUserD = "[title='"+config.ApiPrefix+"EndUserD__c']";
- let eleUserD = document.querySelector(endUserD);
- if(eleUserD){
- eleUserD.title='';
- eleUserD.innerHTML = data.object.lastName;
+ let t = "[title='"+config.ApiPrefix+"EndUserD__c']";
+ let ele = document.querySelector(t);
+ if(ele){
+ ele.title='';
+ ele.innerHTML = data.object.lastName;
+ }
+ };
+
+ var queryContact2Back = function queryContact2Back(data){
+ if(!data.object){
+ console.log('data.object is ' + data.object);
+ return;
+ }
+ console.log('data.object is ' + data.object);
+
+ let t = "[title='"+config.ApiPrefix+"SpecialDeliveryContact2__c']";
+ let ele = document.querySelector(t);
+ let tAddress = "[title='"+config.ApiPrefix+"Shipping_Address__c']";
+ let eleAddress = document.querySelector(tAddress);
+ if(ele){
+ ele.title='';
+ ele.innerHTML = data.object.lastName;
+ }
+ if(eleAddress){
+ eleAddress.title='';
+ eleAddress.innerHTML = data.object.address1;
+ }
+ };
+
+ var queryContact2DBack = function queryContact2DBack(data){
+ if(!data.object){
+ console.log('data.object is ' + data.object);
+ return;
+ }
+ console.log('data.object is ' + data.object);
+
+ let t = "[title='"+config.ApiPrefix+"SpecialDeliveryContact2_D__c']";
+ let ele = document.querySelector(t);
+ let tAddress = "[title='"+config.ApiPrefix+"Shipping_Address_D__c']";
+ let eleAddress = document.querySelector(tAddress);
+ if(ele){
+ ele.title='';
+ ele.innerHTML = data.object.lastName;
+ }
+ if(eleAddress){
+ eleAddress.title='';
+ eleAddress.innerHTML = data.object.address1;
}
};
--
Gitblit v1.9.1