彭锟
2022-03-24 3a414ec8f1715b3b72e06f8598e08e6a8729ca23
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<apex:page id="Page" showHeader="false" sidebar="false" controller="BatchSelectRepairPageController" applyBodyTag="false" applyHtmlTag="false" action="{!init}">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
    <title>批量选择修理功能</title>
    <style type="text/css">
        .pure-table {
            /* border-collapse: collapse; */
            /* border-spacing: 0; */
            empty-cells: show;
            border: 1px solid #cbcbcb;
            width: 100%;
        }
 
        .pure-table caption {
            color: #000;
            font: italic 85%/1 arial,sans-serif;
        /* padding: 1em 0;*/
            text-align: center;
        }
        
        .pure-table td,.pure-table th {
            border-left: 1px solid #cbcbcb;
            border-width: 0 0 0 1px;
            font-size: inherit;
            margin: 0;
            overflow: visible;
            padding: .5em 1em;
        }
        
        .pure-table thead {
            background-color: #c3bfbf;
            color: #000;
            text-align: center;
            vertical-align: bottom;
        }
        
        .pure-table td {
            background-color: transparent; 
        }
 
        .pure-table-horizontal th,.pure-table-horizontal td {
            border-width: 0 0 1px 0;
            border-bottom: 1px solid #cbcbcb;
        }
 
        .pure-table-horizontal tbody>tr:last-child>td {
            border-bottom-width: 0;
        }
    </style>
    <script type="text/javascript">
        //全选功能
        function checkAll() {
            var cnt = j$(escapeVfId('raCnt')).val();
            if (j$(escapeVfId('Page:allForm:allBlock:j_id66:checkAll')).attr('checked') == 'checked') {
                for (var i = 0; i < cnt; i++) {
                    j$(escapeVfId('Page:allForm:allBlock:j_id66:records:' + i + ':checklist')).attr('checked',true);
                }
            } else {
                for (var i = 0; i < cnt; i++) {
                    j$(escapeVfId('Page:allForm:allBlock:j_id66:records:' + i + ':checklist')).attr('checked',false);
                }
            }
        }
    </script>
    <apex:form id="allForm" style="margin: 10px 10px;">
        <apex:actionFunction name="RetrievalBtn" action="{!RetrievalBtn}" rerender="Form, message" onComplete="unblockUI();"/>
        <!-- <apex:actionFunction name="showPDF" action="{!showPDF}" rerender="Form, message" onComplete="unblockUI();" /> -->
        <!-- 后台报错信息显示的关键 -->
        <apex:outputPanel id="message">
            <apex:pageMessages ></apex:pageMessages>
        </apex:outputPanel>
        <apex:outputPanel id="allPanel">
            <apex:pageBlock mode="maindetail" Id="allBlock">
                <div style="position: relative; width:100%; ">
                    <apex:pageBlock title="检索列" id="Editable">
                        <table>
                            <tr><td style="text-align: left;padding-right: 100px;">&nbsp;</td></tr>
                            <tr>
                                <td style="text-align: right; width:100px;">
                                    <apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="状态1"/>
                                </td>
                                <td style="text-align: left;position: relative; top: 7px;">
                                    <apex:selectList value="{!RevalInfo.Status1}" size="1" style="width: 150px; height: 24px;">
                                        <apex:selectOptions value="{!StatusItems}"/>
                                    </apex:selectList><p/>
                                </td>
                                <td style="text-align: right; width:150px;">
                                    <apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="RS修理单号"/>
                                </td>
                                <td style="text-align: left;">
                                    <apex:inputText id="RepairName" value="{!RevalInfo.RepairName}"/>
                                </td>
                                <td style="text-align: right; width:130px;">
                                    <apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="SAP修理单号"/>
                                </td>
                                <td style="text-align: left;padding-right: 70px;">
                                    <apex:inputText id="SAPRepairNo" value="{!RevalInfo.SAPRepairNo}"/>
                                </td>
                                <td style="text-align: right; width:60px;">
                                    <apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="服务方式"/>
                                </td>
                                <td style="text-align: left;position: relative; top: 7px;">
                                    <apex:selectList value="{!RevalInfo.onSiteRepair}" size="1" style="width: 150px; height: 24px;">
                                        <apex:selectOptions value="{!SiteRepairItems}"/>
                                    </apex:selectList><p/>
                                </td>
                            </tr>
                            <tr><td style="text-align: left;padding-right: 100px;">&nbsp;</td></tr>
                            <tr>
                                <td style="text-align: right; width:100px;">
                                    <apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="机身编码"/>
                                </td>
                                <td style="text-align: left;">
                                    <apex:inputText id="SerialNumber" value="{!RevalInfo.SerialNumber}"/>
                                </td>
                                <td style="text-align: right; width:150px;">
                                    <apex:outputLabel style="font-weight: bold; " value="修理委托者"/>
                                </td>
                                <td style="text-align: left;">
                                    <apex:inputField id="InchargeStaffName" value="{!RevalInfo.repair.Incharge_Staff__c}"/>
                                </td>
                                <td style="text-align: right; width:130px;">
                                    <apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="FSE申请日"/>
                                </td>
                                <td style="text-align: left;padding-right: 50px;">
                                    <apex:inputField id="FSE_ApplyForRepair_Day" value="{!RevalInfo.repair.Aware_date__c}"/>
                                </td>
                                <td style="text-align: right; width:60px;">
                                    <apex:outputLabel style="font-weight: bold; padding-right: 5px;" value="维修中心"/>
                                </td>
                                <td style="text-align: left;">
                                    <apex:inputText id="workLocationSelect" value="{!RevalInfo.workLocationSelect}"/>
                                </td>
                            </tr>
                            <tr><td style="text-align: left;padding-right: 100px;">&nbsp;</td></tr>
                            <tr>
                                <td style="text-align: center;" colspan="6">
                                    <apex:commandButton style="width:80px;" value="检索" action="{!RetrievalBtn}" onclick="blockme();" reRender="allForm,message" onComplete="unblockUI();"/>
                                </td>
                            </tr>
                        </table>
                    </apex:pageBlock>  
                    <apex:pageBlock title="详细信息" >
                        <input type="hidden" id="raCnt" value="{!RACount}" />
                        <apex:commandButton style="width:80px;" value="打印PDF" action="{!showPDF}" onclick="blockme();" reRender="allForm,message" onComplete="unblockUI();"/>
                        <div style="width:100%;height:385px;overflow:auto;">
                        <table class="pure-table pure-table-horizontal" id="theTable_header" style="width:99%; margin-top:10px;border-collapse: collapse;table-layout:fixed;">
                            <tr style="background-color:#f2f3f3;">
                                <th style="align:left; width:2%"><apex:inputCheckbox id="checkAll" onclick="checkAll();" style="text-align:left;"/></th>
                                <th style="text-align:left; width:6%">状态1</th>
                                <th style="text-align:left; width:6%">状态2</th>
                                <th style="text-align:left; width:7%">RS修理单号</th>
                                <th style="text-align:left; width:8%">SAP修理单号</th>
                                <th style="text-align:left; width:10%">型号</th>
                                <th style="text-align:left; width:5%">机身编号</th>
                                <th style="text-align:left; width:9%">医院名称</th>
                                <th style="text-align:left; width:5%">省份</th>
                                <th style="text-align:left; width:5%">修理委托者</th>
                                <th style="text-align:left; width:8%">FSE申请日期</th>
                                <th style="text-align:left; width:6%">维修中心</th>
                                <th style="text-align:left; width:5%">服务方式</th>
                                <th style="text-align:left; width:8%">有无维修合同对象</th>
                                <th style="text-align:left; width:8%">无偿区别标志</th>
                            </tr>
                        </table>
                        <table class="pure-table pure-table-horizontal" id="theTable_header" style="width:99%; border-collapse: collapse;table-layout:fixed;">
                            <apex:repeat value="{!RAInfoList}" var="ra" id="records">
                            <tr>
                                <td align="left" width="2%">
                                    <apex:inputCheckbox style="text-align:left;" id="checklist" value="{!ra.IFCheck}" />
                                </td>
                                <td align="left" width="6%">
                                    <apex:outputField id="Status1" value="{!ra.repair.Status1__c}"/>
                                </td>
                                <td align="left" width="6%">
                                    <apex:outputField id="Status2" value="{!ra.repair.Status2__c}"/>
                                </td>
                                <td align="left" width="7%">
                                    <apex:outputField id="OTCode" value="{!ra.repair.Name}"/>
                                </td>
                                <td align="left" width="8%">
                                    <apex:outputField id="SAP_Service_Repair_No" value="{!ra.repair.SAP_Service_Repair_No__c}"/>
                                </td>
                                <td align="left" width="10%">
                                    <apex:outputField id="Delivered_Product" value="{!ra.repair.Delivered_Product__c}"/>
                                </td>
                                <td align="left" width="5%" style="word-wrap:break-word;word-break:break-all;">
                                    <apex:outputField id="SerialNumber" value="{!ra.repair.SerialNumber__c}"/>
                                </td>
                                <td align="left" width="9%">
                                    <apex:outputField id="HP_Name" value="{!ra.repair.HP_Name__c}"/>
                                </td>
                                <td align="left" width="5%">
                                    <apex:outputField id="State_Hospital" value="{!ra.repair.State_Hospital__c}"/>
                                </td>
                                <td align="left" width="5%">
                                    <apex:outputField id="Incharge_Staff" value="{!ra.repair.Incharge_Staff__c}"/>
                                </td>
                                <td align="left" width="8%">
                                    <apex:outputField id="FSE_ApplyForRepair_Day" value="{!ra.repair.FSE_ApplyForRepair_Day__c}"/>
                                </td>
                                <td align="left" width="6%">
                                    <apex:outputField id="work_location_select" value="{!ra.repair.work_location_select__c}"/>
                                </td>
                                <td align="left" width="5%">
                                    <apex:outputField id="On_site_repair" value="{!ra.repair.On_site_repair__c}"/>
                                </td>
                                <td align="center" width="8%">
                                    <apex:outputField id="Number_of_EffectiveContract" value="{!ra.repair.Number_of_EffectiveContract__c}"/>
                                </td>
                                <td align="left" width="8%">
                                    <apex:outputField id="NewProductGuaranteeObject" value="{!ra.repair.NewProductGuaranteeObject__c}"/>
                                </td>
                            </tr>
                            </apex:repeat>
                        </table>
                        </div>
                    </apex:pageBlock>
                </div>
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
</apex:page>