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/InstructReport.page | 90 ++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 84 insertions(+), 6 deletions(-)
diff --git a/force-app/main/default/pages/InstructReport.page b/force-app/main/default/pages/InstructReport.page
index 99d639a..706a682 100644
--- a/force-app/main/default/pages/InstructReport.page
+++ b/force-app/main/default/pages/InstructReport.page
@@ -6,14 +6,82 @@
<apex:includeScript value="/soap/ajax/29.0/connection.js"/>
<apex:includeScript value="/soap/ajax/29.0/apex.js"/>
<!-- <apex:includeScript value="{!URLFOR($Resource.OpportunityPCLJs)}"/> -->
-
+ <!-- 20220222 PI鏀归�� by Bright--start -->
+ <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
+ <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
+ <!-- 20220222 PI鏀归�� by Bright--end -->
+
<style type="text/css">
-
+ [aws-api] {
+ position: relative;
+ }
+ [aws-api] .decrypt{position: absolute;top: 0;left: 100%;display: none;text-align: left;
+ padding-left: 5px;}
+ [aws-api]:hover .decrypt{display: block;width: 100px}
</style>
<script type="text/javascript">
+
function init() {
-
}
+ // 20220222 PI鏀归�� by Bright--start
+ AWSService.sfSessionId = '{!GETSESSIONID()}';
+ var staticResource = JSON.parse('{!staticResource}');
+ var aws_data = {};
+
+ function Decrypt(dataIds){
+ let Foo = function(){
+ for (const id of dataIds) {
+ if (aws_data.hasOwnProperty(id)) {
+ let d = aws_data[id];
+ let $e =j$("[aws-id='"+d.dataId+ "']");
+ $e.find(".decrypt").html(d[$e.attr("aws-api")]);
+ }
+ }
+ }
+ let ids = [];
+ for (const id of dataIds) {
+ if (!aws_data.hasOwnProperty(id)) {
+ ids.push(id);
+ }
+ }
+ if (ids.length > 0) {
+ blockme();
+ AWSService.search(staticResource.searchUrl,JSON.stringify({
+ "dataIds":ids
+ }),function(data){
+ unblockUI();
+ if(data.object && data.object.length > 0){
+
+ for(let d of data.object){
+ if(d.dataId){
+ aws_data[d.dataId] = d;
+ }
+ }
+ Foo();
+ }
+ },staticResource.token);
+ }else{
+ Foo();
+ }
+ }
+
+ function DecryptAll(){
+ let dataIds = [];
+ j$("[aws-id]").each((i,e)=>{
+ let v = j$(e).attr('aws-id');
+ if (v) {
+ dataIds.push(v);
+ }
+ });
+ Decrypt(dataIds);
+ }
+
+ j$(function(){
+ DecryptAll();
+
+ })
+ // 20220222 PI鏀归�� by Bright--end
+
function checkAll(checker) {
var cnt = j$(escapeVfId('allPage:allForm:allBlock:'+checker.alt+':memberCnt')).val();
for (var i = 0; i < cnt; i++) {
@@ -110,7 +178,12 @@
</apex:column>
<!-- 琚甫鏁欎汉 -->
<apex:column style="width: 2%">
- <apex:outputLink style="resize:vertical;width: 95%" id="Name" value="/{!checkedIS.CamMem.Contact_ID__c}" target="LINK_{!checkedIS.CamMem.Contact_ID__c}"><apex:outputField value="{!checkedIS.IS.Name}" /></apex:outputLink>
+ <apex:outputLink html-aws-api="lastName" html-aws-id="{!checkedIS.IS.ContactID__r.AWS_Data_Id__c}" style="resize:vertical;width: 95%" id="Name" value="/{!checkedIS.CamMem.Contact_ID__c}" target="LINK_{!checkedIS.CamMem.Contact_ID__c}">
+ <!-- 20220222 PI鏀归�� by Bright--start -->
+ <span class="encrypt">{!checkedIS.IS.Name}</span>
+ <span class="decrypt"></span>
+ <!-- 20220222 PI鏀归�� by Bright--end -->
+ </apex:outputLink>
</apex:column>
<!-- 瀹㈡埛鍚� -->
<!-- 澧炲姞鏃犳晥绉戝绾㈣壊鎻愰啋 绮剧悽鎶�鏈� wql 2021/02/04 start -->
@@ -203,7 +276,7 @@
<table style="width:100%;">
<tr>
<td>
- <apex:commandButton value="鍒锋柊閫変腑鐨勫弬浼氫汉鍛�" action="{!exchangeInstructedstaff}" onclick="blockme();" oncomplete="unblockUI();" rerender="allPage:allForm:allBlock:InstructedStaff,allPage:allForm:allBlock:Campaign_members" />
+ <apex:commandButton value="鍒锋柊閫変腑鐨勫弬浼氫汉鍛�" action="{!exchangeInstructedstaff}" onclick="blockme();" oncomplete="unblockUI();DecryptAll();" rerender="allPage:allForm:allBlock:InstructedStaff,allPage:allForm:allBlock:Campaign_members" />
</td>
</tr>
</table>
@@ -237,7 +310,12 @@
</apex:column>
<apex:column style="width: 10%">
<!-- LJPH-BVNBMM 鏄剧ず褰撳墠鑱旂郴浜哄悕绉�- start -->
- <apex:outputLink style="resize:vertical;width: 95%" id="Name" value="/{!uncheckedIS.CamMem.Contact_ID__c}" target="LINK_{!uncheckedIS.CamMem.Contact_ID__c}"><apex:outputtext value="{!uncheckedIS.CamMem.ContactName__c}" /></apex:outputLink>
+ <apex:outputLink html-aws-api="lastName" html-aws-id="{!uncheckedIS.CamMem.Contact_ID__r.AWS_Data_Id__c}" style="resize:vertical;width: 95%" id="Name" value="/{!uncheckedIS.CamMem.Contact_ID__c}" target="LINK_{!uncheckedIS.CamMem.Contact_ID__c}">
+ <!-- 20220222 PI鏀归�� by Bright--start -->
+ <span class="encrypt">{!uncheckedIS.CamMem.ContactName__c}</span>
+ <span class="decrypt"></span>
+ <!-- 20220222 PI鏀归�� by Bright--end -->
+ </apex:outputLink>
</apex:column>
<!-- LJPH-BVNBMM end -->
<apex:column style="width: 10%">
--
Gitblit v1.9.1