高章伟
2022-02-18 8b5f4c6c281cfa548f92de52c8021e37aa81901e
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
<apex:page Controller="ConsumReassignController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="重新分配">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
 
<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();
        }
    }
</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>
 
                <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: 750px;">
                    <colgroup>
                        <col width="25"/>
                        <col width="110"/>
                        <col width="110"/>
                        <col width="110"/>
                        <col width="110"/>
                        <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>
                            <td align="center"><apex:outputField value="{!info.caesd.Trial_User__c}"></apex:outputField></td>
                            <td align="center"><apex:outputField value="{!info.caesd.Degree_Of_Importance__c}"></apex:outputField></td>
                        </tr>
                    </apex:repeat>
                </table>
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
</apex:page>