|  |  | 
 |  |  |                                 <aura:iteration items="{! section.layoutColumns}" var="col"> | 
 |  |  |                                     <aura:iteration items="{! col.layoutItems}" var="field"> | 
 |  |  |                                         <aura:if isTrue="{! field.behavior != 'Readonly' }"> | 
 |  |  |                                             <lightning:inputField required="{! field.behavior == 'Required' }" fieldName="{! field.field}" value="{! field.value}" /> | 
 |  |  |                                             <lightning:inputField required="{! field.behavior == 'Required' }" aura:id="{! field.field}" fieldName="{! field.field}" value="{! field.value}" /> | 
 |  |  |                                              | 
 |  |  |                                         </aura:if> | 
 |  |  |                                     </aura:iteration> | 
 
 |  |  | 
 |  |  |                                     if(rv.Data && fields.hasOwnProperty(item.field) && fields[item.field].References && fields[item.field].References.map(m=>m.value).indexOf(rv.Data.pidType) > -1){ | 
 |  |  |                                         item.value = pid; | 
 |  |  |                                     } | 
 |  |  |  | 
 |  |  |                                     if(fields.hasOwnProperty(item.field)){ | 
 |  |  |                                         item.fi = fields[item.field]; | 
 |  |  |                                     } | 
 |  |  |                                 } | 
 |  |  |                             } | 
 |  |  |                         } | 
 |  |  | 
 |  |  |                          | 
 |  |  |                         payloadPi[pi_fields_map[item.field].AWS_Field_API__c] = item.value; | 
 |  |  |                     } | 
 |  |  |  | 
 |  |  |                     if (item.behavior == "Required" && !item.value ) { | 
 |  |  |                         return; | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |         } | 
 
 |  |  | 
 |  |  |     public PageReference PageLoad(){ | 
 |  |  |         system.debug('rtTypeId='+rtTypeId); | 
 |  |  |         string s = null; | 
 |  |  |          | 
 |  |  |         if(!string.isBlank(rtTypeId)){ | 
 |  |  |             s = Schema.SObjectType.Contact.getRecordTypeInfosById().get(rtTypeId).getDeveloperName(); | 
 |  |  |             if(s == 'Agency' || s == 'Internal_staff'){ | 
 
 |  |  | 
 |  |  |      * 开始方法 | 
 |  |  |      */ | 
 |  |  |     public PageReference init(){ | 
 |  |  |         System.debug('RepairId-----'+RepairId); | 
 |  |  |         String RepairSql = makeTextRepairSql(RepairId); | 
 |  |  |         System.debug('RepairSql-----'+RepairSql); | 
 |  |  |         try{ | 
 |  |  |             pc = Database.query(RepairSql); | 
 |  |  |             system.debug('pc = ' + pc); | 
 |  |  | 
 |  |  |         }catch(exception e){ | 
 |  |  |             //失败提示 | 
 |  |  |             ApexPages.addMessages(e); | 
 |  |  |             System.debug(e.getMessage()); | 
 |  |  |             System.debug(e.getlineNumber()); | 
 |  |  |         } | 
 |  |  |         insUpdData = new Address__c(); | 
 |  |  |         newCon = new Contact(); | 
 
 |  |  | 
 |  |  | <apex:page controller="SearchContactController" showHeader="false" id="page"> | 
 |  |  |     <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}" /> | 
 |  |  |     <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" /> | 
 |  |  |  | 
 |  |  |     <head> | 
 |  |  | 
 |  |  |                 let requestSearchPayload = preparePayloadForSearchContact(); | 
 |  |  |                 console.log('request payload body:'+requestSearchPayload); | 
 |  |  |                 //2. Invoke AWS Service | 
 |  |  |                 fetch(staticResources.searchUrl, { | 
 |  |  |                     method: 'POST', | 
 |  |  |                     body: requestSearchPayload, | 
 |  |  |                     headers: { | 
 |  |  |                         'Content-Type': 'application/json', | 
 |  |  |                         'pi-token': staticResources.token | 
 |  |  |                     } | 
 |  |  |                 }).then((data) => { | 
 |  |  |                     return data.json(); | 
 |  |  |                 }).then((result) => { | 
 |  |  |                 // fetch(staticResources.searchUrl, { | 
 |  |  |                 //     method: 'POST', | 
 |  |  |                 //     body: requestSearchPayload, | 
 |  |  |                 //     headers: { | 
 |  |  |                 //         'Content-Type': 'application/json', | 
 |  |  |                 //         'pi-token': staticResources.token | 
 |  |  |                 //     } | 
 |  |  |                 // }).then((data) => { | 
 |  |  |                 //     return data.json(); | 
 |  |  |                 // }).then((result) => { | 
 |  |  |                 //     if(result.object&&result.object.length>0){ | 
 |  |  |                 //         initContactTable(result); | 
 |  |  |                 //     }                    | 
 |  |  |                 // }) | 
 |  |  |                 let queryBackContactName = function queryBackContactName(result){ | 
 |  |  |                     if(result.object&&result.object.length>0){ | 
 |  |  |                         initContactTable(result); | 
 |  |  |                     }                    | 
 |  |  |                 }) | 
 |  |  |                     }  | 
 |  |  |                 }; | 
 |  |  |                 AWSService.search(staticResources.searchUrl,requestSearchPayload,queryBackContactName,staticResources.token) | 
 |  |  |             } | 
 |  |  |              | 
 |  |  |             function redirectToParentPage(obj) { | 
 
 |  |  | 
 |  |  | <apex:page controller="SearchLeadController" showHeader="false" id="page"> | 
 |  |  |     <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" /> | 
 |  |  |     <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> | 
 |  |  |  | 
 |  |  |     <head> | 
 |  |  |     </head> | 
 |  |  | 
 |  |  |                 let requestSearchPayload = preparePayloadForSearchLead(); | 
 |  |  |                 console.log('request payload body:'+requestSearchPayload); | 
 |  |  |                 //2. Invoke AWS Service | 
 |  |  |                 fetch(staticResources.searchUrl, { | 
 |  |  |                     method: 'POST', | 
 |  |  |                     body: requestSearchPayload, | 
 |  |  |                     headers: { | 
 |  |  |                         'Content-Type': 'application/json', | 
 |  |  |                         'pi-token': staticResources.token | 
 |  |  |                     } | 
 |  |  |                 }).then((data) => { | 
 |  |  |                     return data.json(); | 
 |  |  |                 }).then((result) => { | 
 |  |  |                  | 
 |  |  |                 // fetch(staticResources.searchUrl, { | 
 |  |  |                 //     method: 'POST', | 
 |  |  |                 //     body: requestSearchPayload, | 
 |  |  |                 //     headers: { | 
 |  |  |                 //         'Content-Type': 'application/json', | 
 |  |  |                 //         'pi-token': staticResources.token | 
 |  |  |                 //     } | 
 |  |  |                 // }).then((data) => { | 
 |  |  |                 //     return data.json(); | 
 |  |  |                 // }).then((result) => { | 
 |  |  |                 //     if(result.object&&result.object.length>0){ | 
 |  |  |                 //         initContactTable(result); | 
 |  |  |                 //     }                    | 
 |  |  |                 // }) | 
 |  |  |                 let queryLeadBack = function(result){ | 
 |  |  |                     if(result.object&&result.object.length>0){ | 
 |  |  |                         initContactTable(result); | 
 |  |  |                     }                    | 
 |  |  |                 }) | 
 |  |  |                     }  | 
 |  |  |                 } | 
 |  |  |                 AWSService.search(staticResources.searchUrl, requestSearchPayload, queryLeadBack, staticResources.token); | 
 |  |  |             } | 
 |  |  |              | 
 |  |  |             function redirectToParentPage(obj) { | 
 
 |  |  | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         function uploadFileToAWS(data, size, fileName) { | 
 |  |  |             debugger | 
 |  |  |             console.log("body=" + JSON.stringify({ 'file': data, "size": size, 'fileName': fileName })); | 
 |  |  |             AWSService.post(uploadUrl, JSON.stringify({  | 
 |  |  |                 'file': data,  | 
 |  |  | 
 |  |  |                         }, | 
 |  |  |                         { escape: true } | 
 |  |  |                     ); | 
 |  |  |                     | 
 |  |  |                     debugger | 
 |  |  |                     console.log('key' + key); | 
 |  |  |                 } else { | 
 |  |  |                     alertErrorMessage('上传失败请稍后再试!'); | 
 
 |  |  | 
 |  |  | <!-- | 
 |  |  |   @description       :  | 
 |  |  |   @author            : ChangeMeIn@UserSettingsUnder.SFDoc | 
 |  |  |   @group             :  | 
 |  |  |   @last modified on  : 03-17-2022 | 
 |  |  |   @last modified by  : ChangeMeIn@UserSettingsUnder.SFDoc | 
 |  |  | --> | 
 |  |  | <apex:page standardController="ASEActivity__c" extensions="NewAndEditASEActivityController" id="page"> | 
 |  |  |     <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }"/> | 
 |  |  |     <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> | 
 |  |  | 
 |  |  |                 <apex:repeat value="{!layoutEncryptedAPIList}" var="encryptedAPI"> | 
 |  |  |                     <apex:outputField html-data-id="{!encryptedAPI}" title="{!ApiPrefix}{!encryptedAPI}" value="{!ASEActivity__c[encryptedAPI]}" /> | 
 |  |  |                 </apex:repeat> | 
 |  |  |                 <apex:outputField html-data-id="ReporterASE__c}" title="{!ApiPrefix}ReporterASE__c" value="{!ASEActivity__c['ReporterASE__c']}" /> | 
 |  |  |                 <!-- <apex:outputField html-data-id="ReporterASE__c}" title="{!ApiPrefix}ReporterASE__c" value="{!ASEActivity__c['ReporterASE__c']}" /> --> | 
 |  |  |             </apex:pageBlockSection> | 
 |  |  |             <script> | 
 |  |  |                 var config = { | 
 |  |  | 
 |  |  |                 function QuerySobjectFromAWS() { | 
 |  |  |                     console.log('AWSDataId:'+'{!AWSDataId}') | 
 |  |  |                     AWSService.query(staticResources.queryUrl, '{!AWSDataId}', queryBack, staticResources.token); | 
 |  |  |                     if('{!contactAWS}' != null && '{!contactAWS}' != ''){ | 
 |  |  |                         AWSService.query(staticResourcesContact .queryUrl, '{!contactAWS}', queryContactBack, staticResources.token); | 
 |  |  |                     } | 
 |  |  |                     // if('{!contactAWS}' != null && '{!contactAWS}' != ''){ | 
 |  |  |                     //     AWSService.query(staticResourcesContact .queryUrl, '{!contactAWS}', queryContactBack, staticResources.token); | 
 |  |  |                     // } | 
 |  |  |                 } | 
 |  |  |                                  | 
 |  |  |                 var queryContactBack = function queryContactBack(data){ |