From f5a94e721ae5a26f817f0df75065b64f1f192eb3 Mon Sep 17 00:00:00 2001 From: Li Jun <buli@deloitte.com.cn> Date: 星期一, 28 三月 2022 21:43:51 +0800 Subject: [PATCH] PIPLFunctionDeploy0328 --- force-app/main/default/pages/StraightBackAddress.page | 42 ++++++++++++++++++++++++++++++------------ 1 files changed, 30 insertions(+), 12 deletions(-) diff --git a/force-app/main/default/pages/StraightBackAddress.page b/force-app/main/default/pages/StraightBackAddress.page index b8c278d..2510d5d 100644 --- a/force-app/main/default/pages/StraightBackAddress.page +++ b/force-app/main/default/pages/StraightBackAddress.page @@ -56,7 +56,8 @@ if(isAddCon){ AWSService.post(staticResourceContact.transactionUrl, JSON.stringify({ "txId":con_aws_result.txId, - "isSuccess":b ? 0 : 1 + "isSuccess":b ? 0 : 1, + "sfRecordId":document.getElementById('allPage:allForm:sfRecordId').value }), function(result){ if(!b) window.location.reload(); @@ -140,7 +141,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 璨╁2搴� + &&document.getElementById("allPage:allForm:oppBlock2:UpdAddressId:CustomerRecordType").value!='{!accAgencyContactTypeId}'){//璁板綍绫诲瀷id 缁忛攢鍟嗚仈绯讳汉 //new contact ProcessPI({},GetEditObj('contact'),'contact',function(){ //new address @@ -355,7 +359,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, @@ -446,8 +450,8 @@ '\n閭紪: '+PIData[awsDataId].zipCode+ '\n璇︾粏鍦板潃: '+PIData[awsDataId].detailedAddress }else{ - piInformation = '鑱旂郴浜�: null'+ - '\n鐢佃瘽: '+PIData[awsDataId].telephone+ + piInformation = + '鐢佃瘽: '+PIData[awsDataId].telephone+ '\n閭紪: '+PIData[awsDataId].zipCode+ '\n璇︾粏鍦板潃: '+PIData[awsDataId].detailedAddress } @@ -457,9 +461,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){ @@ -496,6 +503,7 @@ //鑷畾涔塴ookup鏌ヨ function searchContact(contactNodeId,field){ closeField = field; + let searchContactKeyWord = document.getElementById(field).value let accountValue = ""; if (document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name')!=null) { let accountNodeId = document.getElementById('allPage:allForm:oppBlock2:UpdAddressId:Customer__r_Name').id + '_lkid'; @@ -504,7 +512,7 @@ console.log(accountValue); if(accountValue !='000000000000000'){ let baseUrl = "/apex/SearchContactPage"; - let suffixUrl = "?contactId="+contactNodeId+"&accountId="+accountValue; + let suffixUrl = "?contactId="+contactNodeId+"&accountId="+accountValue+"&searchContactKeyWord=" + searchContactKeyWord; 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) { @@ -512,7 +520,7 @@ } return false; }else{ - console.log('璇峰厛閫夋嫨瀹㈡埛鍐嶉�夋嫨鑱旂郴浜�') + alert('璇峰厛閫夋嫨瀹㈡埛鍐嶉�夋嫨鑱旂郴浜�') } } @@ -527,12 +535,18 @@ 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"> <apex:inputHidden id="tableValueFrontEnd" value="{!tableDataStr}"/> <apex:inputHidden value="{!contactId}" id="contactId"/> <apex:inputHidden value="{!insUpdDataStr}" id="insUpdDataStr"/> + <apex:inputHidden value="{!sfRecordId}" id="sfRecordId"/> <div id="tab01"> <!-- 椤甸潰鏁版嵁鍒濆鍖栨柟娉� --> <apex:actionFunction name="init" action="{!init}" rerender="oppBlock1,message,checEventFrame" onComplete="unblockUI();"></apex:actionFunction> @@ -546,7 +560,9 @@ <apex:param name="isUpload" assignTo="{!isUpload}" value="" /> </apex:actionFunction> <!-- 淇濆瓨鍜屼慨鏀规柟娉� --> - <apex:actionFunction name="save" action="{!save}" rerender="oppBlock2,message" onComplete="unblockUI();{!IF(isSearchBtn,'searchBtnJs()',false)};Trans()"></apex:actionFunction> + <apex:actionFunction name="save" action="{!save}" rerender="oppBlock2,message,sfRecordId" 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="" /> @@ -655,9 +671,9 @@ <td align="left" style="vertical-align: inherit;border-width: 0px 1px 1px 0px;"> <apex:outputText value="{!or.address.Detailed_Address__c}" /> </td> - <!-- <td align="center" style="vertical-align: inherit;width:30px;"> + <td align="center" style="vertical-align: inherit;width:30px;"> <apex:commandButton value=" 缂栬緫 " onclick="onEditorJs('{!or.address.id}');return false;" style="background:#98c1fbf7;display:{!or.canEdit};"/> - </td> --> + </td> <td align="center" style="vertical-align: inherit;width:30px;"> <apex:commandButton value=" 澶嶅埗 " onclick="onCopyJs('{!or.address.id}');return false;" style="background: #98c1fbf7;display:{!or.canCopy};"/> </td> @@ -682,11 +698,12 @@ <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 --> - <apex:inputText label="鑱旂郴浜�" disabled="true" value="{!contactNameValue}" id="Contacts__c"> + <!-- <apex:inputText label="鑱旂郴浜�" disabled="true" value="{!contactNameValue}" id="Contacts__c">--> + <apex:inputText label="鑱旂郴浜�" value="{!contactNameValue}" id="Contacts__c"> </apex:inputText> <apex:inputHidden id="contactIdValue" value="{!contactIdValue}"/> <!-- Add By Li Jun for PIPL 20220308 End --> @@ -709,6 +726,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;"> -- Gitblit v1.9.1