From 1b214a96d371ce90578fb7d6c14eecfcba5f87f0 Mon Sep 17 00:00:00 2001
From: 涂煌豪 <tuhuanghao@prec-tech.com>
Date: 星期一, 11 四月 2022 18:52:32 +0800
Subject: [PATCH] Sfdc2PoContactBatch修改
---
force-app/main/default/pages/CampaignMember.page | 50 +++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/pages/CampaignMember.page b/force-app/main/default/pages/CampaignMember.page
index ba54e2c..31a2fcb 100644
--- a/force-app/main/default/pages/CampaignMember.page
+++ b/force-app/main/default/pages/CampaignMember.page
@@ -6,6 +6,9 @@
<apex:includeScript value="{!URLFOR($Resource.jquerysuggestjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
+<!-- 2022/02/15 寮犲崕寤� dependency start -->
+<apex:includeScript value="{!URLFOR($Resource.AWSService, 'AWSService.js') }" />
+<!-- 2022/02/15 寮犲崕寤� dependency end -->
<style type="text/css">
.visitorplace_results {
border: 1px solid gray;
@@ -138,8 +141,49 @@
}
}
+ // 20220216 PI鏀归�� by 寰愪寒 start
+ var staticResource = JSON.parse('{!staticResource}');
+
+ var awsids = [];
+ var aws_result={};
+
+ jQuery(function(){
+
+ jQuery("input.contact").each(function(){
+ let awsid = this.getAttribute('awsid');
+ if(awsid) awsids.push(awsid);
+ })
+
+ if(awsids.length > 0){
+ AWSService.search(staticResource.searchUrl,JSON.stringify({dataIds:awsids}),function(result){
+ if(result.status == '0' && result.object && result.object.length > 0){
+ for(let obji in result.object){let obj=result.object[obji];
+ jQuery("[awsid='"+obj.dataId + "']").val(obj.lastName);
+ }
+ }
+ },staticResource.token);
+ }
+ })
+
+
+
+
+
+ //jQuery(".contact").attr("awsid");
+
+ function encrypt(){
+ jQuery(".contact").each(function(i,e){
+ if(e.value){
+ e.value = '***';
+ }
+ });
+ }
+
+ // 20220216 PI鏀归�� by 寰愪寒 end
+
function saveJs() {
blockme();
+ encrypt() // 20220216 PI鏀归�� by 寰愪寒
saveLine();
}
function addJs() {
@@ -160,8 +204,8 @@
alert("璇峰厛閫夋嫨鍖婚櫌绉戝銆�");
return false;
}
- var urlStr = 'apex/CM_SearchContact?line='+ line + '&acc=' + vpHiddenId;
- var w = window.open(urlStr,'CM_SearchContact','menubar=no,height=580,width=620');
+ var urlStr = 'apex/CM_SearchContactService?line='+ line + '&acc=' + vpHiddenId;
+ var w = window.open(urlStr,'CM_SearchContactService','menubar=no,height=580,width=620');
w.focus();
}
@@ -349,7 +393,7 @@
<apex:inputHidden id="departmentHiddenId" value="{!lineInfo.cm.Department_ID__c}" />
</td>
<td align="center">
- <apex:inputField id="contact" value="{!lineInfo.cm.Contact__c}" onclick="openSearchContact({!lineInfo.line})" style="width: 95%"></apex:inputField>
+ <apex:inputField styleClass="contact" html-awsid="{!lineInfo.cm.Contact_ID__r.AWS_Data_Id__c}" id="contact" value="{!lineInfo.cm.Contact__c}" onclick="openSearchContact({!lineInfo.line})" style="width: 95%"></apex:inputField>
<apex:inputHidden id="contactId" value="{!lineInfo.cm.Contact_ID__c}"></apex:inputHidden>
<apex:inputHidden id="contactSDCName" value="{!lineInfo.cm.Contact_ID__r.Strategic_dept_Class__r.Name}"></apex:inputHidden>
</td>
--
Gitblit v1.9.1