Li Jun
2022-03-31 3ba0123db48f8bab81ddf0913e1b95280ef545e8
force-app/main/default/pages/SearchVisitor.page
@@ -8,6 +8,10 @@
    <!-- 20220217 Li Jun for PIPL End -->
    <script type="text/javascript">
        AWSService.sfSessionId = '{!GETSESSIONID()}';
        //像医生区分(职务)下拉列表加入****
        // var o = new Option();
        // o.text = '****';
        // document.getElementById('Page:mainForm:idSearchVisitor:updateContactDoctorDivision').add(o);
        function addContact(){
            window.opener.showModal();
            
@@ -155,7 +159,7 @@
            //2. inovke aws service
            let contactAwsIds = new Set();
            for(var key in contactInfo){
                if(contactInfo[key].lastName.includes(searchByLastName)){
                if(contactInfo[key].lastName.indexOf(searchByLastName) != -1){
                    contactAwsIds.add(key);
                }
            }
@@ -188,6 +192,10 @@
                let y=window.event.y; 
                createDiv.style.left=x;  
                createDiv.style.top=y;  
                createDiv.style.marginLeft='20px';
                createDiv.style.marginTop='-40px';
                createDiv.style.height='80px';
               createDiv.style.width='120px';
                createDiv.style.background = "#dddddd";
                createDiv.style.position = "absolute";
                parentNode.appendChild(createDiv);  
@@ -269,6 +277,8 @@
            return JSON.stringify([{
                lastName : document.getElementById("Page:mainForm:idSearchVisitor:updateContactLastName").value,
                phone : document.getElementById("Page:mainForm:idSearchVisitor:updateContactPhone").value,
                type : document.getElementById("Page:mainForm:idSearchVisitor:updateContactType").value,
                doctorDivision1 : document.getElementById("Page:mainForm:idSearchVisitor:updateContactDoctorDivision").value,
                dataId:selectedAwsDataId
            }]);
        }
@@ -280,12 +290,26 @@
                return;
            }
            blockme();
            let es = document.getElementsByTagName('select')
            for(let ei in es){
                let e = es[ei];
                for(let opi in e.options){
                    let op = e.options[opi];
                    if(!op)continue;
                    if(op.value == "*****" && op.selected){
                        unblockUI();
                        alert('下拉框不能主动选择密文选项')
                        return;
                    }
                }
            }
            ProcessPIForAWS({},GetEditObj());
        }
        function Trans(){
            console.log('SFRcordId:'+document.getElementById('Page:mainForm:sfContactId').value);
            AWSService.postAWS(staticResources.transactionUrl,AWSService.confirmTrans, JSON.stringify({
                    "txId":aws_result.txId,
                    "sfRecordId":"",
                    "sfRecordId":document.getElementById('Page:mainForm:sfContactId').value,
                    "isSuccess":1
            }), function(result){
                window.location.reload();
@@ -327,7 +351,7 @@
        <apex:actionFunction name="editVistor" action="{!editVistor}" rerender="idRegistration" oncomplete="assignDencrypted();setButtonDisable(document.getElementById('Page:mainForm:idSearchVisitor:idRegSave'), false);">
            <apex:param name="index" assignTo="{!index}" value=""/>
        </apex:actionFunction>
        <apex:actionFunction name="saveNew" action="{!regContact}" rerender="idRegistration,idRezultVisitor,idAddVisitor,idMessage" onComplete="Trans();">
        <apex:actionFunction name="saveNew" action="{!regContact}" rerender="idRegistration,idRezultVisitor,idAddVisitor,idMessage,sfContactId" onComplete="Trans()">
        </apex:actionFunction>
         <!-- Add By Li Jun for PIPL 20220228 Start -->
         <apex:inputHidden id="LastName_Encrypted__c" value="{!rc.LastName_Encrypted__c}"/>
@@ -337,6 +361,7 @@
         <apex:inputHidden id="Doctor_Division1_Encrypted__c" value="{!rc.Doctor_Division1_Encrypted__c}"/>
         <apex:inputHidden id="AWS_Data_Id__c" value="{!rc.AWS_Data_Id__c}"/>
         <apex:inputHidden id="sfContactId" value="{!sfContactId}"/>
         <!-- Add By Li Jun for PIPL 20220221 End -->
            <apex:pageBlock id="idSearchVisitor" >
                <table width="1060" height="50" border="0">