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 | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 112 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/pages/ViewOrderDecryptInfo.page b/force-app/main/default/pages/ViewOrderDecryptInfo.page
index 8d8d597..c5d1885 100644
--- a/force-app/main/default/pages/ViewOrderDecryptInfo.page
+++ b/force-app/main/default/pages/ViewOrderDecryptInfo.page
@@ -7,6 +7,12 @@
<apex:repeat value="{!layoutEncryptedAPIList}" var="encryptedAPI">
<apex:outputField html-data-id="{!encryptedAPI}" title="{!ApiPrefix}{!encryptedAPI}" value="{!Order[encryptedAPI]}" />
</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 = {
@@ -17,9 +23,115 @@
AWSToSobjectEncryptedMap:{!AWSToSobjectEncryptedMapJson}
};
var staticResources = JSON.parse('{!staticResource}');
+ var staticResourceContact = JSON.parse('{!staticResourceContact}');
function QuerySobjectFromAWS() {
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}';
+ }
+ if('{!endUserDAWSDataId}' != ''){
+ AWSService.query(staticResourceContact.queryUrl, '{!endUserDAWSDataId}', queryEndUserDBack, staticResourceContact.token);
+ }else{
+ 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{
+ ele.innerHTML = '';
+ }
}
+ var queryContactBack = function queryContactBack(data){
+ if(!data.object){
+ console.log('data.object is ' + data.object);
+ return;
+ }
+ console.log('data.object is ' + data.object);
+
+ let t = "[title='"+config.ApiPrefix+"EndUser__c']";
+ let ele = document.querySelector(t);
+ if(ele){
+ ele.title='';
+ ele.innerHTML = data.object.lastName;
+ }
+ };
+
+ var queryEndUserDBack = function queryEndUserDBack(data){
+ if(!data.object){
+ console.log('data.object is ' + data.object);
+ return;
+ }
+ console.log('data.object is ' + data.object);
+
+ 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;
+ }
+ };
+
var queryBack = function queryBack(data) {
if(!data.object){
console.log('data.object is ' + data.object);
--
Gitblit v1.9.1