buli
2022-04-06 2d4a8d2dcad5a17127d2c73c48ddc4b67ec79448
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%">