| | |
| | | let searchContactKeyWord = document.querySelector("[data-id='Contact_Name__c']").value; |
| | | if(accountValue !='000000000000000'){ |
| | | suffixUrl = "?contactId=" + contactNodeId + "&accountId=" + accountValue+"&searchContactKeyWord=" + searchContactKeyWord; |
| | | let baseUrl = "/apex/SearchContactPage"; |
| | | let newSearchContactParam = 'height=600,width=800,left=100,top=100,dialogHide=true,resizable=no,scrollbars=yes,toolbar=no,status=no'; |
| | | newSearchContactWindow = window.open(baseUrl+suffixUrl, 'Popup', newSearchContactParam); |
| | | if (window.focus) { |
| | | newSearchContactWindow.focus(); |
| | | } |
| | | return false; |
| | | }else{ |
| | | suffixUrl = "?contactId="+contactNodeId+"&searchContactKeyWord=" + searchContactKeyWord; |
| | | // suffixUrl = "?contactId="+contactNodeId+"&searchContactKeyWord=" + searchContactKeyWord; |
| | | alertErrorMessage('请先选择科室名'); |
| | | } |
| | | let baseUrl = "/apex/SearchContactPage"; |
| | | let newSearchContactParam = 'height=600,width=800,left=100,top=100,dialogHide=true,resizable=no,scrollbars=yes,toolbar=no,status=no'; |
| | | newSearchContactWindow = window.open(baseUrl+suffixUrl, 'Popup', newSearchContactParam); |
| | | if (window.focus) { |
| | | newSearchContactWindow.focus(); |
| | | } |
| | | return false; |
| | | } |
| | | //窗口关闭时发生 |
| | | function closePopupWindow() { |
| | |
| | | function replaceSearchContactLookup() { |
| | | let lookUpNode = htmlToElement(contactHtmlString); |
| | | console.log(lookUpNode); |
| | | let eleContactValue = document.querySelector("[data-id='Contact_Name__c']").parentNode.parentNode.children[0].value; |
| | | let eleContactValue = document.querySelector("[data-id='Contact_Name__c']").parentNode.parentNode.children[1].value; |
| | | if (eleContactValue) { |
| | | if (!{!isNewMode} || (eleContactValue != '000000000000000')) { |
| | | //1. Query Contact from AWS by AWSDataId |
| | |
| | | for (let n = 0; n < layoutSection.length; n++) { |
| | | let layoutField = layoutSection[n]; |
| | | if (layoutField.fieldAPI != '' && document.querySelector("[data-id='"+layoutField.fieldAPI+"']") != null) { |
| | | document.querySelector("[data-id='"+layoutField.fieldAPI+"']").disabled = !(layoutField.editableField); |
| | | let e = document.querySelector("[data-id='"+layoutField.fieldAPI+"']"); |
| | | e.disabled = !(layoutField.editableField); |
| | | if (!(layoutField.editableField)) { |
| | | if (e.getAttribute("multiple") && e.getAttribute("multiple") == 'multiple') { |
| | | e.parentNode.classList.add("disabledbutton"); |
| | | }else if (e.tagName == 'DIV') { |
| | | e.classList.add("disabledbutton"); |
| | | }else if (VLookUpFields.indexOf(layoutField.fieldAPI) >= 0) { |
| | | e.parentNode.classList.add("disabledbutton"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |