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/ViewRepairDecryptInfo.page | 41 ++++++++++++++++++++++++++++++++---------
1 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/force-app/main/default/pages/ViewRepairDecryptInfo.page b/force-app/main/default/pages/ViewRepairDecryptInfo.page
index 72e3047..b3abff0 100644
--- a/force-app/main/default/pages/ViewRepairDecryptInfo.page
+++ b/force-app/main/default/pages/ViewRepairDecryptInfo.page
@@ -4,8 +4,9 @@
<apex:pageblock id="pageBlock">
<apex:pageBlockSection showHeader="false" title="" collapsible="true" columns="2" id="pageBlockSection">
<!--Each section has layoutFields, let's iterate them as well-->
- <apex:outputField value="{!Repair__c.Telephonen__c}" />
-
+ <apex:outputField html-data-id="ContactD__c" title="{!ApiPrefix}ContactD__c" value="{!Repair__c['ContactD__c']}" />
+ <apex:outputField html-data-id="Telephonen__c" title="{!ApiPrefix}Telephonen__c" value="{!Repair__c['Telephonen__c']}" />
+ <!-- <apex:outputField value="{!Repair__c.Telephonen__c}" /> -->
</apex:pageBlockSection>
<script>
var config = {
@@ -15,19 +16,41 @@
AWSToSobjectNonEncryptedMap:{!AWSToSobjectNonEncryptedMapJson},
AWSToSobjectEncryptedMap:{!AWSToSobjectEncryptedMapJson}
};
+ var contactAWSDataId = '{!contactAWSDataId}'
var staticResources = JSON.parse('{!staticResource}');
var staticResourceContact = JSON.parse('{!staticResourceContact}');
function QuerySobjectFromAWS() {
- AWSService.query(staticResourceContact.queryUrl, '{!contactAWSDataId.AWS_Data_Id__c}', queryBack, staticResources.token);
+ let t = "[title='"+config.ApiPrefix+"Telephonen__c']";
+ let ele = document.querySelector(t);
+ let t1 = "[title='"+config.ApiPrefix+"ContactD__c']";
+ let ele1 = document.querySelector(t1);
+ if(contactAWSDataId != '' || contactAWSDataId != null){
+ AWSService.query(staticResourceContact.queryUrl, contactAWSDataId, queryBack, staticResources.token);
+ } else {
+ ele.innerHTML = '{!contactPhone}';
+ ele1.innerHTML = '{!contactName}';
+ }
}
var queryBack = function queryBack(data) {
- //if(!data.object){
- // console.log('data.object is ' + data.object);
- // return;
- //}
- console.log('data.object.Phone is ' + JSON.stringify(data.object));
+ if(!data.object){
+ console.log('data.object is ' + data.object);
+ return;
+ }
+ console.log('data is ' + JSON.stringify(data.object));
- document.getElementById("page:form:pageBlock:pageBlockSection:j_id1").innerText = data.object.phone;
+ let t = "[title='"+config.ApiPrefix+"Telephonen__c']";
+ let ele = document.querySelector(t);
+ let t1 = "[title='"+config.ApiPrefix+"ContactD__c']";
+ let ele1 = document.querySelector(t1);
+ if(ele){
+ ele.title='';
+ ele.innerHTML = data.object.phone;
+ }
+ if(ele1){
+ ele1.title='';
+ ele1.innerHTML = data.object.lastName;
+ }
+
// 褰撲笉鑳借嚜鍔ㄦ纭浛鎹㈠姞瀵嗘暟鎹椂闇�瑕佸湪姝ゅ娣诲姞js锛岀‖缂栫爜澶勭悊
//document.querySelector("[data-id='LastName']").value = data.object.lastName;
};
--
Gitblit v1.9.1