Li Jun
2022-03-20 db4e75dabb6c61be6c3a09e9f11707f6018c2ef2
force-app/main/default/pages/StraightBackAddress.page
@@ -140,7 +140,10 @@
            }
            blockme();
            console.log('{!insUpdData}')
            if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value){
            if(document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:Create_Contacts__c").value //【联系人(新建)】不为空
                &&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:CustomerRecordType").value!='{!accOfficeTypeId}'////记录类型id  办事处
                &&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:CustomerRecordType").value!='{!accAgencyTypeId}'//记录类型id  販売店
                &&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:CustomerRecordType").value!='{!accAgencyContactTypeId}'){//记录类型id  经销商联系人
                //new contact
                ProcessPI({},GetEditObj('contact'),'contact',function(){
                    //new address
@@ -355,7 +358,7 @@
                    PIData[Id] = temp;
                };
                for(var i=0;i<tableDataStr.length;i++){
                    if(tableDataStr[i].address.Contacts__r){
                    if(tableDataStr[i].address.AWS_Data_Id__c){
                        correct++;
                        AWSService.queryRepair(staticResource.queryUrl,
                                                tableDataStr[i].address.AWS_Data_Id__c,
@@ -457,9 +460,12 @@
            let y=window.event.y; 
            createDiv.style.left=x;  
            createDiv.style.top=y;  
            createDiv.style.height='100px';
            createDiv.style.width='100px';
            createDiv.style.background="#dddddd";
            createDiv.style.position = "absolute";
            parentNode.appendChild(createDiv);  
            parentNode.style.position = "relative";
        }
        function hidePIDiv(awsDataId){
@@ -527,6 +533,11 @@
            document.getElementById(contactNodeId).value = contactInfo.ContactId;
            document.getElementById(closeField).value = contactInfo.Name;     
        }
        function queryRecordType(){
            if(document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name').value){
                queryRecordType();
            }
        }
        //2022 02 28 张华建 display PI Data end
    </script>
    <apex:form id="allForm">
@@ -547,6 +558,8 @@
            </apex:actionFunction>
            <!-- 保存和修改方法 -->
            <apex:actionFunction name="save" action="{!save}" rerender="oppBlock2,message" onComplete="unblockUI();{!IF(isSearchBtn,'searchBtnJs()',false)};Trans()"></apex:actionFunction>
            <!-- 查询客户记录类型方法 -->
            <apex:actionFunction name="queryRecordType" action="{!queryRecordType}" rerender="oppBlock2,message" onComplete="unblockUI();"></apex:actionFunction>
            <!-- 点击修改按钮获取修改数据方法 -->
            <apex:actionFunction name="onEditor" action="{!onEditor}" rerender="oppBlock2,checEventFrame,insUpdDataStr" onComplete="decrypt();unblockUI();">
                <apex:param name="UpdId" assignTo="{!UpdId}" value="" />
@@ -682,7 +695,7 @@
            <apex:pageBlock id="oppBlock2" tabStyle="Report">
                <apex:pageblocksection title="编辑地址" id="UpdAddressId" rendered="true" columns="4">
                    <apex:inputfield value="{!insUpdData.Address_Classification__c}" id="Address_Classification__c" />
                    <apex:inputfield value="{!insUpdData.Customer__c}" id="Customer__r_Name" required="false" />
                    <apex:inputfield value="{!insUpdData.Customer__c}" id="Customer__r_Name" required="false" onchange="queryRecordType();" />
                    <!-- Before PIPL 20220308 -->
                    <!-- <apex:inputfield value="{!insUpdData.Contacts__c}" id="Contacts__c" required="false"/> -->
                    <!-- Add By Li Jun for PIPL 20220308 Start -->
@@ -709,6 +722,7 @@
                    <apex:inputHidden id="Telephone_Encrypted__c"        value="{!insUpdData.Telephone_Encrypted__c}"/>
                    <apex:inputHidden id="ZipCode_Encrypted__c"          value="{!insUpdData.ZipCode_Encrypted__c}"/>
                    <apex:inputHidden id="Detailed_Address_Encrypted__c" value="{!insUpdData.Detailed_Address_Encrypted__c}"/>
                    <apex:inputHidden id="CustomerRecordType"            value="{!accRecordTypeId}"/>
                </apex:pageblocksection>
                <div style="text-align: center;">