|  |  | 
 |  |  | <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)}"/> | 
 |  |  | 
 |  |  |                 } else { | 
 |  |  |                     payloadJson.AWS_Data_Id__c = '{!AWSDataId}'; | 
 |  |  |                 } | 
 |  |  |                 if('{!rtTypeId}'){ | 
 |  |  |                     payloadJson.RecordTypeId = '{!rtTypeId}';//Add by zhj for Record Type Issue 20220421 | 
 |  |  |                 } | 
 |  |  |                 return payloadJson; | 
 |  |  |             }, | 
 |  |  |             queryBack:function (data) { | 
 |  |  | 
 |  |  |         function ProcessPI(sobjJson, payloadForNewPI) { | 
 |  |  |             blockme(); | 
 |  |  |             if ({!isNewMode} || {!isCloneMode}) { | 
 |  |  |                NewPIToAWS(sobjJson, payloadForNewPI) | 
 |  |  |                 NewPIToAWS(sobjJson, payloadForNewPI) | 
 |  |  |             }else { | 
 |  |  |                 UpdatePIToAWS(sobjJson, payloadForNewPI) | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         function EditButton(isDisabled){ | 
 |  |  |             var topele = document.getElementById('topButtonRow'); | 
 |  |  |             var bottomele = document.getElementById('bottomButtonRow'); | 
 |  |  |  | 
 |  |  |             if (isDisabled) { | 
 |  |  |                 topele.classList.add("disabledbutton"); | 
 |  |  |                 bottomele.classList.add("disabledbutton"); | 
 |  |  |             }else { | 
 |  |  |                 topele.classList.remove("disabledbutton"); | 
 |  |  |                 bottomele.classList.remove("disabledbutton"); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         function IsFormElement(tag_name){ | 
 |  |  |             return ['input','select','textarea'].indexOf(tag_name)>-1; | 
 |  |  |             return ['input','select','textarea','div'].indexOf(tag_name)>-1; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         function getPIPayload(sobjJson) { | 
 |  |  | 
 |  |  |                     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){ | 
 |  |  | 
 |  |  |         } | 
 |  |  |         //按钮点击方法 | 
 |  |  |         function saveSobjectProcess(save_and_new) { | 
 |  |  |             EditButton(true); | 
 |  |  |             if(save_and_new){ | 
 |  |  |                 config.SaveAndNew = true; | 
 |  |  |             } | 
 |  |  | 
 |  |  |             let errorMsgNode = document.getElementById("page:form:block:msgContent"); | 
 |  |  |             errorMsgNode.innerText = errorMsg; | 
 |  |  |             errorMsgNode.className = 'pbError'; | 
 |  |  |             EditButton(false); | 
 |  |  |         } | 
 |  |  |         function hiddenErrorMsgNode() { | 
 |  |  |             let errorMsgNode = document.getElementById("page:form:block:msgContent"); | 
 |  |  | 
 |  |  |                     jQuery('a[data-id="OwnerId"]').remove(); | 
 |  |  |  | 
 |  |  |                     //Updated by Li Jun 20220322 Start | 
 |  |  |                /* | 
 |  |  |                     /* | 
 |  |  |                      | 
 |  |  |                     jQuery(".lookupInput").on("mouseenter","img[generate]",function(e){ | 
 |  |  |                         this.className = "closeIconOn"; | 
 |  |  | 
 |  |  |                         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 = ''; | 
 |  |  |                             } | 
 |  |  |                         } | 
 |  |  |                     });*/ | 
 |  |  | 
 |  |  |  | 
 |  |  |                                 } | 
 |  |  |                             }else { | 
 |  |  |                                clearVlookup('Department_Class__c'); | 
 |  |  |                                 clearVlookup('Department_Class__c'); | 
 |  |  |                                 clearVlookup('Hospital__c'); | 
 |  |  |                            } | 
 |  |  |                             } | 
 |  |  |                         }, | 
 |  |  |                         { escape: true } | 
 |  |  |                     ); |