From 3d29090cfcde7bfb1b72de7e9d470a6a32931f3a Mon Sep 17 00:00:00 2001 From: Li Jun <buli@deloitte.com.cn> Date: 星期四, 17 三月 2022 21:32:18 +0800 Subject: [PATCH] PIPLFunctionDeployV3 --- force-app/main/default/aura/NewAgencyContact/NewAgencyContact.cmp | 2 force-app/main/default/aura/NewAgencyContact/NewAgencyContactController.js | 8 ++-- force-app/main/default/pages/UploadPdf.page | 3 + force-app/main/default/pages/SearchContactPage.page | 31 +++++++++------ force-app/main/default/pages/SearchLeadPage.page | 32 ++++++++++------ force-app/main/default/classes/NewAndEditContactController.cls | 1 force-app/main/default/pages/ViewASEActivityDecryptInfo.page | 15 ++----- force-app/main/default/classes/StraightBackAddressController.cls | 4 -- 8 files changed, 50 insertions(+), 46 deletions(-) diff --git a/force-app/main/default/aura/NewAgencyContact/NewAgencyContact.cmp b/force-app/main/default/aura/NewAgencyContact/NewAgencyContact.cmp index 066b6b1..281b5f5 100644 --- a/force-app/main/default/aura/NewAgencyContact/NewAgencyContact.cmp +++ b/force-app/main/default/aura/NewAgencyContact/NewAgencyContact.cmp @@ -36,7 +36,7 @@ <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> diff --git a/force-app/main/default/aura/NewAgencyContact/NewAgencyContactController.js b/force-app/main/default/aura/NewAgencyContact/NewAgencyContactController.js index 5056425..08b932a 100644 --- a/force-app/main/default/aura/NewAgencyContact/NewAgencyContactController.js +++ b/force-app/main/default/aura/NewAgencyContact/NewAgencyContactController.js @@ -76,10 +76,6 @@ 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]; - } } } } @@ -127,6 +123,10 @@ payloadPi[pi_fields_map[item.field].AWS_Field_API__c] = item.value; } + + if (item.behavior == "Required" && !item.value ) { + return; + } } } } diff --git a/force-app/main/default/classes/NewAndEditContactController.cls b/force-app/main/default/classes/NewAndEditContactController.cls index 5df7aa7..faf5b4c 100644 --- a/force-app/main/default/classes/NewAndEditContactController.cls +++ b/force-app/main/default/classes/NewAndEditContactController.cls @@ -33,7 +33,6 @@ 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'){ diff --git a/force-app/main/default/classes/StraightBackAddressController.cls b/force-app/main/default/classes/StraightBackAddressController.cls index c2a0a89..fefec47 100644 --- a/force-app/main/default/classes/StraightBackAddressController.cls +++ b/force-app/main/default/classes/StraightBackAddressController.cls @@ -100,9 +100,7 @@ * 寮�濮嬫柟娉� */ public PageReference init(){ - System.debug('RepairId-----'+RepairId); String RepairSql = makeTextRepairSql(RepairId); - System.debug('RepairSql-----'+RepairSql); try{ pc = Database.query(RepairSql); system.debug('pc = ' + pc); @@ -144,8 +142,6 @@ }catch(exception e){ //澶辫触鎻愮ず ApexPages.addMessages(e); - System.debug(e.getMessage()); - System.debug(e.getlineNumber()); } insUpdData = new Address__c(); newCon = new Contact(); diff --git a/force-app/main/default/pages/SearchContactPage.page b/force-app/main/default/pages/SearchContactPage.page index 67cb3b9..b09aeb7 100644 --- a/force-app/main/default/pages/SearchContactPage.page +++ b/force-app/main/default/pages/SearchContactPage.page @@ -1,4 +1,5 @@ <apex:page controller="SearchContactController" showHeader="false" id="page"> + <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}" /> <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" /> <head> @@ -48,20 +49,26 @@ 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) { diff --git a/force-app/main/default/pages/SearchLeadPage.page b/force-app/main/default/pages/SearchLeadPage.page index 64275ca..e90b950 100644 --- a/force-app/main/default/pages/SearchLeadPage.page +++ b/force-app/main/default/pages/SearchLeadPage.page @@ -1,5 +1,6 @@ <apex:page controller="SearchLeadController" showHeader="false" id="page"> <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" /> + <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> <head> </head> @@ -48,20 +49,27 @@ 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) { diff --git a/force-app/main/default/pages/UploadPdf.page b/force-app/main/default/pages/UploadPdf.page index 0b6f64c..0d2702d 100644 --- a/force-app/main/default/pages/UploadPdf.page +++ b/force-app/main/default/pages/UploadPdf.page @@ -89,6 +89,7 @@ } } function uploadFileToAWS(data, size, fileName) { + debugger console.log("body=" + JSON.stringify({ 'file': data, "size": size, 'fileName': fileName })); AWSService.post(uploadUrl, JSON.stringify({ 'file': data, @@ -121,7 +122,7 @@ }, { escape: true } ); - + debugger console.log('key' + key); } else { alertErrorMessage('涓婁紶澶辫触璇风◢鍚庡啀璇曪紒'); diff --git a/force-app/main/default/pages/ViewASEActivityDecryptInfo.page b/force-app/main/default/pages/ViewASEActivityDecryptInfo.page index 81c9bdd..44549fc 100644 --- a/force-app/main/default/pages/ViewASEActivityDecryptInfo.page +++ b/force-app/main/default/pages/ViewASEActivityDecryptInfo.page @@ -1,10 +1,3 @@ -<!-- - @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)}"/> @@ -15,7 +8,7 @@ <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 = { @@ -31,9 +24,9 @@ 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){ -- Gitblit v1.9.1