binxie
2024-01-16 4d3febe8045eb0fa0283af3c53b0c48344b8664d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<apex:page Controller="ConsumReassignController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="重新分配"  lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<!-- <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />   deloitte-zhj 20231114 PIPL还原 -->
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning  -->
 
<style>
    /* deloitte-zhj 20231114 PIPL还原 */
    /* .decrypt {
        position: absolute;
        top: 0;
        left: 100%;
        display: none;
        text-align: left;
        padding-left: 5px;
    }
 
    a:hover .decrypt {
        display: block;
        width: 100px
    } */
 
    th > input{
        margin-left: revert;
    }
</style>
<script type="text/javascript">
    function savejs() {
        if (confirm('是否操作重新分配?')) {
            blockme();
            saveBtn();
        }
    }
    function checkAll(checker) {
        var checkList = document.getElementsByClassName("checker");
        Array.prototype.filter.call(checkList, function(testElement){
            testElement.checked = checker.checked;
        });
        //     j$(escapeVfId('Page:Form:headBlock:postRepeat:' + i + ':post'))[0].checked = checker.checked;
    }
    function returnjs() {
        var rentalApplyId = j$(escapeVfId('allPage:allForm:allBlock:rentalApplyId')).text();
        var url = "/" + rentalApplyId;
        window.location.href = url;
    }
    function refresh() {
        var hasError = j$(escapeVfId('allPage:allForm:allBlock:hasError')).text();
        if (hasError == 'false') {
            alert('保存成功');
            returnjs();
        }
    }
    //deloitte-zhj 20231114 PIPL还原
    /*AWSService.sfSessionId = '{!GETSESSIONID()}';
 
    document.body.onload = function () {
        blockme();
        setTimeout(function() {
            DecryptContactName(() => unblockUI());
        }, 1000);
        //DecryptContactName(() => unblockUI());
    }
    var awsdata_map = {};
 
    function DecryptContactName(callback) {
        //2023 08 02 张赫阳 PIPL改造 Start
        console.log('awsdata_map' + JSON.stringify(awsdata_map));
        let no_in_ids = [];
        var elements = document.querySelectorAll("[aws-data-id]");
        if(elements.length != 0){
            elements.each(function (i, e) {
                let id = e.getAttribute("aws-data-id");
                
                console.log('awsdata_map' + JSON.stringify(id));
                console.log('awsdata_map' + JSON.stringify(no_in_ids));
            });
        }else{
            if (callback) callback();
        }
        
        //2023 08 02 张赫阳 PIPL改造 Start
    }
 
    function BindToTile() {
        j$("[aws-data-id]").each(function (i, e) {
            let id = e.getAttribute("aws-data-id");
            if (id && awsdata_map.hasOwnProperty(id) && awsdata_map[id].trialUser) {
                j$(e).find(".decrypt").html(awsdata_map[id].trialUser);
                //2023 07 04 张赫阳 PIPL改造 Start
                document.getElementById(id).innerHTML = awsdata_map[id].trialUser;
                console.log('awsdata_map[id].trialUser' + awsdata_map[id].trialUser)
                //2023 07 04 张赫阳 PIPL改造 End
            }
        });
    }**/
</script>
 
    <apex:form id="allForm">
        <apex:actionFunction name="saveBtn" action="{!saveBtn}" rerender="allBlock,message" onComplete="unblockUI();refresh();">
        </apex:actionFunction>
        <apex:outputPanel id="allPanel">
            <apex:pageBlock title="重新分配" id="allBlock">
                <!-- <apex:pageBlockButtons >
                    <apex:commandButton onclick="savejs(); return false;" value="保存" disabled="{!saveBtn}" rerender="dummy" />
                    <apex:commandButton onclick="returnjs(); return false;" value="返回" rerender="dummy"/>
                </apex:pageBlockButtons> -->
                <div style="width: 100%; text-align: center; vertical-align: middle; margin-bottom:15px;">
                    <apex:commandButton onclick="savejs(); return false;" value="保存" disabled="{!saveBtn}" rerender="dummy" />
                    <apex:commandButton onclick="returnjs(); return false;" value="返回" rerender="dummy"/>
                </div>
 
                <apex:outputPanel id="message">
                    <apex:pageMessages />
                </apex:outputPanel>
 
                <apex:outputText id="hasError" value="{!hasError}" style="display:none"/>
                <apex:outputText id="rentalApplyId" value="{!rentalApplyId}" style="display:none"/>
 
                <table class="linetable" border="1" style="border-collapse: collapse;width: auto;">
                    <colgroup>
                        <col width="60"/>
                        <col width="110"/>
                        <col width="110"/>
                        <col width="110"/>
                        <col width="110"/>
                        <col width="110"/>
                        <col width="175"/>
                        <col width="110"/>
                        <col width="175"/>
                    </colgroup>
                    <tr style="background-color:#DCDCDC;">
                        <th style="text-align:center">全选 
                            <apex:inputCheckbox id="checkAll" value="{!checkAll}" onclick="checkAll(this);" />
                        </th>
                        <th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Consum_Apply_Equipment_Set__c.label}</th>
                        <th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Fixture_Model_No_F__c.label}</th>
                        <th style="text-align:center">数量</th>
                        <th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Asset__c.label}</th>
                        <th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.SerialNumber_F__c.label}</th>
                        <th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.RAESD_Status__c.label}</th>
                        <th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Trial_User__c.label}</th>
                        <th style="text-align:center">{!$ObjectType.Consum_Apply_Equipment_Set_Detail__c.fields.Degree_Of_Importance__c.label}</th>
                    </tr>
                    <apex:repeat value="{!lineInfoList}" var="info" id="records">
                        <tr>
                            <!--<td align="center"><apex:inputCheckbox value="{!info.isSelect}" id="rowCheck" disabled="{!IF(info.status=='cantCancel', true, false)}"/></td>-->
                            <td align="center">
                                <apex:inputCheckbox styleClass="checker" value="{!info.isSelect}" id="rowCheck" />
                            </td>
                            <td align="left">
                                <apex:outputField value="{!info.caesd.Consum_Apply_Equipment_Set__c}"></apex:outputField>
                            </td>
                            <td align="left">
                                <apex:outputField value="{!info.caesd.Fixture_Model_No_F__c}"></apex:outputField>
                            </td>
                            <td align="left">
                                <apex:outputField value="{!info.caesd.Trial_Num__c}"></apex:outputField>
                            </td>
                            <td align="left">
                                <apex:outputField value="{!info.caesd.Asset__c}"></apex:outputField>
                            </td>
                            <td align="left">
                                <apex:outputField value="{!info.caesd.SerialNumber_F__c}"></apex:outputField>
                            </td>
                            <td align="center">
                                <apex:outputField value="{!info.caesd.RAESD_Status__c}"></apex:outputField>
                            </td>
                            <!-- deloitte-zhj 20231114 PIPL还原 start -->
                            <td align="center">
                                <apex:outputField value="{!info.caesd.Trial_User__c}"></apex:outputField>
                            </td>
                            <!-- deloitte-zhj 20231114 PIPL还原 end -->
                            <td align="center">
                                <apex:outputField value="{!info.caesd.Degree_Of_Importance__c}"></apex:outputField>
                            </td>
                        </tr>
                    </apex:repeat>
                </table>
                
                <div style="width: 100%; text-align: center; vertical-align: middle; margin-top:15px;">
                    <apex:commandButton onclick="savejs(); return false;" value="保存" disabled="{!saveBtn}" rerender="dummy" />
                    <apex:commandButton onclick="returnjs(); return false;" value="返回" rerender="dummy"/>
                </div>
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
</apex:page>