高章伟
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
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
<apex:page controller="InsReportPDFController" showHeader="false" sidebar="false" renderAs="PDF" action="{!init}" applyHtmlTag="false">
<html>
<apex:stylesheet value="{!URLFOR($Resource.BeforeOPDPDF)}"/>
 
    <head>
    <meta name="viewport" content="width=860,user-scalable=yes" />
        <style>
        @page {
            size: A4 landscape;
            margin: 5mm 12mm 5mm 12mm;
            
            @bottom-center {
                content: counter(page) " / " counter(pages);
            }
        }
        
        table {border-collapse: collapse;}
        
        th {text-align: center;}
        th.border-thick-title { border-width: 1pt 0pt 1pt 0pt; border-style: solid; border-color: black; text-align: center;}
        td.middle {text-align: center;}
        td.topClear {border-top-color: white;}
        </style>
        <script>
        </script>
    </head>
    
    <body style="font-family: Arial Unicode MS;">
        <table border="0" style="width:100%;">
            <tr>
                <!-- update by rentx 20210707 start -->
                <!-- <td colspan="3" style="text-align: center; font-size: 16pt; font-weight: bold;">点检报告书</td> -->
                <apex:outputText rendered="{!ir.Contract__c = null}">
                    <td colspan="3" style="text-align: center; font-size: 16pt; font-weight: bold;">点检报告书</td>
                </apex:outputText>
                <apex:outputText rendered="{!ir.Contract__c != null}">
                    <td colspan="3" style="text-align: center; font-size: 16pt; font-weight: bold;">合同点检报告书</td>
                </apex:outputText>
                
                <!-- update by rentx 20210707 end -->
 
            </tr>
            <tr><td colspan="3" height="20px"></td></tr>
            <apex:outputText rendered="{!ir.Contract__c = null}">
                <tr>
                    <td>医院名&nbsp;&nbsp;&nbsp;&nbsp;{!ir.Hospital__r.Name}</td>
                    <td colspan="2">点检报告书号码&nbsp;&nbsp;&nbsp;&nbsp;{!ir.Name}</td>
                </tr>
                <tr>
                    <td>科室名&nbsp;&nbsp;&nbsp;&nbsp;{!ir.Department_name_formula__c}</td>
                    <td>点检日期</td>
                    <td>点检人</td>
                </tr>
                <tr>
                    <td width="70%">院方负责人 &nbsp;&nbsp;&nbsp;&nbsp;{!ir.Responsible_Person__c}</td>
                    <td width="15%"><apex:outputField value="{!ir.Inspection_Date__c}" /></td>
                    <td width="15%">{!usr.Alias__c}</td>
                </tr>
            </apex:outputText>
            <tr><td colspan="3" height="20px"></td></tr>
            <apex:outputText rendered="{!ir.Contract__c != null}">
                <tr>
                    <td />
                    <td colspan="2">合同号 &nbsp;&nbsp;&nbsp;&nbsp; {!ir.Contract__r.Maintenance_Contract_No__c} </td>
                </tr>
                <tr>
                    <td> 医院名 &nbsp;&nbsp;&nbsp;&nbsp; {!ir.Hospital__r.Name}</td>
                    <td> 预定点检对象总数 &nbsp;&nbsp;&nbsp;&nbsp; {!ir.Contract__r.dianjiansum__c}</td>
                </tr>
                <tr>
                    <td> 科室名 &nbsp;&nbsp;&nbsp;&nbsp;{!ir.Department_name_formula__c}</td>
                    <td> 本次点检对象数 &nbsp;&nbsp;&nbsp;&nbsp; {!ir.Inspection_asset_number__c}</td>
                </tr>
                <tr>
                    <td width="70%"> 院方负责人 &nbsp;&nbsp;&nbsp;&nbsp;{!ir.Responsible_Person__c}</td>
                    <td > 本次点检日期 &nbsp;&nbsp;&nbsp;&nbsp; <apex:outputField value="{!ir.Inspection_Date__c}" /></td>
                </tr>
                <tr>
                    <td />
                    <td colspan="2"> 本次点检时间 &nbsp;&nbsp;&nbsp;&nbsp; {!ir.StartHour_Page__c}:{!startfen} - {!ir.EndHour_Page__c}:{!endfen}  </td>
                </tr>
            </apex:outputText>
        </table>
        <br/>
        <table border="1" style="width:100%;">
            <!-- update by rentx 20210707 start -->
            <apex:outputText rendered="{!ir.Contract__c = null}">
                <tr>
                    <td width="50%">点检设备总数&nbsp;&nbsp;&nbsp;&nbsp;{!ir.Inspection_asset_number__c}</td>
                    <td width="50%">发现异常设备数&nbsp;&nbsp;&nbsp;&nbsp;{!ir.Failourassetnumber__c}</td>
                </tr>
                <tr>
                    <td>维修合同点检设备数&nbsp;&nbsp;&nbsp;&nbsp;{!ir.Contract_product_number__c}</td>
                    <td>OER点检设备数&nbsp;&nbsp;&nbsp;&nbsp;{!ir.OER_inspection_number__c}</td>
                </tr>
                <tr>
                    <td>本次点检对象数&nbsp;&nbsp;&nbsp;&nbsp;{!ir.Inspection_asset_number__c}</td>
                    <td/>
                </tr>
            </apex:outputText>
            <apex:outputText rendered="{!ir.Contract__c != null}">
                <tr>
                    <td width="50%">点检人&nbsp;&nbsp;&nbsp;&nbsp;{!usr.Alias__c}</td>
                    <td width="50%">发现异常设备数&nbsp;&nbsp;&nbsp;&nbsp;{!ir.Failourassetnumber__c}</td>
                </tr>
                <tr>
                    <td>OER点检设备数&nbsp;&nbsp;&nbsp;&nbsp;{!ir.OER_inspection_number__c}</td>
                    <td>本次点检对象数&nbsp;&nbsp;&nbsp;&nbsp;{!ir.Inspection_asset_number__c}</td>
                </tr>
            </apex:outputText>
            <!-- update by rentx 20210707 end -->
        </table>
        <br/>
        
        <apex:variable value="{!1}" var="cnt" />
        <apex:repeat value="{!itemList}" var="t">
            <table cellspacing="0" cellpadding="0" border="1" style="width:100%; table-layout: fixed;">
                <tr>
                    <th width="3%" >No</th>
                    <th >产品名</th>
                    <th width="8%" >机身号</th>
                    <th width="10%" >维修合同对象</th>
                    <th width="12%" >上次修理结束日</th>
                    <th width="8%" >点检结果</th>
                    <th width="25%" >故障描述</th>
                    <!-- add by rentx 20210831 start -->
                    <apex:outputText rendered="{!ir.Contract__c != null}">
                    <th>是否送修</th>
                    </apex:outputText>
                    <!-- add by rentx 20210831 end -->
                </tr>
                <apex:variable value="{!1}" var="cnt2" />
                <apex:repeat value="{!t.detailList}" var="d">
                    <tr>
                        <td class="middle {!IF(!d.isRecord && cnt2 != 1, 'topClear', '')}">{!d.lineNo}</td>
                        <td class="{!IF(!d.isRecord && cnt2 != 1, 'topClear', '')}">
                            <table border="0" style="width:100%; table-layout: fixed;">
                                <tr>
                                    <td width="30%" style="text-align: right;">{!d.productNo}</td>
                                    <td width="1%">{!d.delimiter}</td>
                                    <td style="text-align: left;">{!d.productName}</td>
                                </tr>
                            </table>
                        </td>
                        <td class="middle {!IF(!d.isRecord && cnt2 != 1, 'topClear', '')}">{!d.serialNo}</td>
                        <!-- update by rentx 20210903 start 点检报告书上'维修合同'不为空 显示'是' 否则显示 '否' -->
                        <!-- <td class="middle {!IF(!d.isRecord && cnt2 != 1, 'topClear', '')}">{!d.rec.AssetId__r.Service_Agreement_formula__c}</td> -->
                        <td class="middle {!IF(!d.isRecord && cnt2 != 1, 'topClear', '')}">{!d.isHTsb}</td>
                        
                        <!-- update by rentx 20210903 end 点检报告书上'维修合同'不为空 显示'是' 否则显示 '否' -->
                        <td class="middle {!IF(!d.isRecord && cnt2 != 1, 'topClear', '')}"><apex:outputText value="{0,date,yyyy/MM/dd}"><apex:param value="{!d.lastRepair}" /></apex:outputText></td>
                        <td class="middle {!IF(!d.isRecord && cnt2 != 1, 'topClear', '')}">{!d.isNormal}</td>
                        <td class="{!IF(!d.isRecord && cnt2 != 1, 'topClear', '')}">{!d.diagnosis}</td>
                        <!-- add by rentx 20210831 start -->
                        <apex:outputText rendered="{!ir.Contract__c != null}">
                            <td class="middle {!IF(!d.isRecord && cnt2 != 1, 'topClear', '')}">{!d.isSongxiu}</td>
                        </apex:outputText>
                        <!-- add by rentx 20210831 end -->
                    </tr>
                    <apex:variable value="{!cnt2 + 1}" var="cnt2" />
                </apex:repeat>
            </table>
            
            <!-- 改ページ -->
            <apex:outputPanel layout="none" rendered="{!cnt < itemCount}">
                <div style="page-break-after: always;"></div>
                <br/>
            </apex:outputPanel>
 
            <apex:variable value="{!cnt + 1}" var="cnt" />
        </apex:repeat>
        
        <br/>
 
        <table style="font-family: Arial Unicode MS;" width="100%">
            <tr>
                <th style="text-align: right;" >清洗液</th>
                <th style="border:1px solid #000000; width: 15%;text-align: left;">{!ir.CleaningFluid__c}</th>
                <!-- add by rentx 20210927 start -->
                <th style="text-align: right;">方式</th>
                <th style="border:1px solid #000000; width: 15%;text-align: left;">{!ir.Mode__c}</th>
                <!-- add by rentx 20210927 end -->
                <th style="text-align: right;">灭菌方式</th>
                <th style="border:1px solid #000000; width: 15%;text-align: left;">{!ir.SterilizationMethod__c}</th>
                <th style="text-align: right;">其他备注</th>
                <th style="border:1px solid #000000; width: 15%;text-align: left;">{!ir.Remarks__c}</th>
            </tr>
            <tr>
                <th style="text-align: right;">消毒液</th>
                <th style="border:1px solid #000000; width: 15%;text-align: left;">{!ir.Disinfectant__c}</th>
                <th style="text-align: right;">使用机器</th>
                <th style="border:1px solid #000000; width: 15%;text-align: left;">{!ir.UsedMachine__c}</th>
                <th style="text-align: right;">使用ET</th>
                <th style="border:1px solid #000000; width: 15%;text-align: left;">{!ir.Used_ET__c}</th>
            </tr>
        </table>
        
        <!-- サイン -->
        <table border="0" width="100%">
            <tr><td style="text-align: right"><apex:image value="{!ir.SignUrl__c}" width="300px" height="150px" rendered="{!NOT(ISBLANK(ir.SignUrl__c))}" /></td></tr>
        </table>
    </body>
</html>
</apex:page>