From e6068da47c1bef5517c9e5fdc8c726766867ad4e Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期五, 14 七月 2023 15:10:02 +0800 Subject: [PATCH] Merge branch 'master' into LEXUpgrade2023-Deloitte --- force-app/main/default/pages/NewAndEditInquiryForm.page | 43 +++++++++++++++++++++++++++++-------------- 1 files changed, 29 insertions(+), 14 deletions(-) diff --git a/force-app/main/default/pages/NewAndEditInquiryForm.page b/force-app/main/default/pages/NewAndEditInquiryForm.page index e0d29ad..d01a8f4 100644 --- a/force-app/main/default/pages/NewAndEditInquiryForm.page +++ b/force-app/main/default/pages/NewAndEditInquiryForm.page @@ -1,6 +1,6 @@ <apex:page standardController="Inquiry_form__c" extensions="NewAndEditInquiryFormController" id="page"> <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" /> - <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script> + <apex:includeScript value="{!URLFOR($Resource.connection20)}"/> <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> @@ -126,6 +126,9 @@ var requiredFieldAPIList = JSON.parse('{!requiredFieldAPIListStr}'); var fieldAPIToLabelMap = JSON.parse('{!fieldAPIToLabelMapStr}'); var staticResources = JSON.parse('{!staticResource}'); + //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start + var staticResourcesV2 = JSON.parse('{!staticResourceV2}'); + //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 end var staticResourcesContact = JSON.parse('{!staticResourceContact}'); var staticResourcesLead = JSON.parse('{!staticResourceLead}'); console.log('{!staticResource}'); @@ -133,7 +136,7 @@ function ProcessPI(sobjJson, payloadForNewPI) { blockme(); if ({!isNewMode} || {!isCloneMode}) { - NewPIToAWS(sobjJson, payloadForNewPI) + NewPIToAWS(sobjJson, payloadForNewPI) }else { UpdatePIToAWS(sobjJson, payloadForNewPI) } @@ -169,7 +172,7 @@ } function IsFormElement(tag_name){ - return ['input','select','textarea'].indexOf(tag_name)>-1; + return ['input','select','textarea','div'].indexOf(tag_name)>-1; } function getPIPayload(sobjJson) { @@ -229,6 +232,9 @@ console.log(ele.id.indexOf('lkwgt')); if (ele.id.indexOf('lkwgt') == -1) { let vlookUpNodeId = ele.id + '_lkid'; + if (tag_name == 'div') { + vlookUpNodeId = ele.id.substring(0,ele.id.length-4) + '_lkid'; + } let vlook_ele = document.getElementById(vlookUpNodeId); let v = ''; if(vlook_ele){ @@ -309,21 +315,27 @@ let obj = JSON.parse(payloadForNewPI); obj[0].dataId = '{!AWSDataId}'; let payloadForNewPIJson = JSON.stringify(obj); - AWSService.update(staticResources.updateUrl, sobjJson, payloadForNewPIJson, controllerSaveMethod, staticResources.token, staticResources.transactionUrl, false, insertOrUpdateBack,redirectCallBack); - + //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start + //AWSService.update(staticResources.updateUrl, sobjJson, payloadForNewPIJson, controllerSaveMethod, staticResources.token, staticResources.transactionUrl, false, insertOrUpdateBack,redirectCallBack); + AWSService.update(staticResourcesV2.updateUrl, sobjJson, payloadForNewPIJson, controllerSaveMethod, staticResourcesV2.token, staticResources.transactionUrl, false, insertOrUpdateBack,redirectCallBack); + //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start } //鏂板缓 to AWS function NewPIToAWS(sobjJson, payloadForNewPI) { let controllerSaveMethod = config.insertMethod; - AWSService.insert(staticResources.newUrl, sobjJson, payloadForNewPI, controllerSaveMethod, staticResources.token, staticResources.transactionUrl, true, insertOrUpdateBack,redirectCallBack); - + //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start + //AWSService.insert(staticResources.newUrl, sobjJson, payloadForNewPI, controllerSaveMethod, staticResources.token, staticResources.transactionUrl, true, insertOrUpdateBack,redirectCallBack); + AWSService.insert(staticResourcesV2.newUrl, sobjJson, payloadForNewPI, controllerSaveMethod, staticResourcesV2.token, staticResources.transactionUrl, true, insertOrUpdateBack,redirectCallBack); + //zhj MEBG鏂版柟妗堟敼閫� 2022-11-29 start } //蹇呭~瀛楁 function checkRequiredFieldMsg(formData) { let blankRequiredFields = ''; for(i = 0;i<requiredFieldAPIList.length;i++){ - if(formData[requiredFieldAPIList[i]]){ + if(formData[requiredFieldAPIList[i]] && (VLookUpFields.indexOf(requiredFieldAPIList[i]) == -1)){ + continue; + }else if((VLookUpFields.indexOf(requiredFieldAPIList[i]) != -1) && formData[requiredFieldAPIList[i]] != '000000000000000'){ continue; }else{ if(blankRequiredFields == ''){ @@ -434,6 +446,9 @@ let contactNodeId = document.querySelector("[data-id='Contact_Name__c']").id + '_lkid'; document.getElementById(contactNodeId).value = contactInfo.ContactId; document.querySelector("[data-id='Contact_Name__c']").value = contactInfo.Name; + //2022-5-7 yjk 澧炲姞鍙傛暟 + document.querySelector("[data-id='Email__c']").value = contactInfo.email; + document.querySelector("[data-id='Phone__c']").value = contactInfo.phone; } //鏇挎崲vlookup @@ -670,7 +685,7 @@ jQuery('a[data-id="OwnerId"]').remove(); //Updated by Li Jun 20220322 Start - /* + /* jQuery(".lookupInput").on("mouseenter","img[generate]",function(e){ this.className = "closeIconOn"; @@ -684,10 +699,10 @@ let id = jQuery("input[data-id='"+jQuery(this).attr("data-id")+ "']").attr("id"); let input = document.getElementById(id); if(input){ - input.value = ''; - let hidden = document.getElementById(id+'_lkid'); + input.value = ''; + let hidden = document.getElementById(id+'_lkid'); if(hidden){ - hidden.value = ''; + hidden.value = ''; } } });*/ @@ -758,9 +773,9 @@ } }else { - clearVlookup('Department_Class__c'); + clearVlookup('Department_Class__c'); clearVlookup('Hospital__c'); - } + } }, { escape: true } ); -- Gitblit v1.9.1