高章伟
2022-02-18 650847118307a1c9ae0ada15b7c69bbf5792c54c
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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<apex:page controller="DeliveryConfirmPDFController" showHeader="false" sidebar="false"  id="allPage" action="{!init}" renderAs="pdf">  <!-- renderAs="pdf" -->
<html>
<head>
    <style>
         @page {
            margin: 1mm 1mm 1mm 1mm;   
        }
 
    </style>
</head>
<body style="font-family: Arial Unicode MS; page-break-inside: auto;font-size: 10px;">
    <apex:image value="{!URLFOR($Resource.pdfSign)}" width="80"  style="position:absolute; left:300px; top:100px;"/>
    <p style="text-align: center; display: block;font-size: 25px;">仪景通样机借用单</p>
    <table style="border: 2px solid black; width: 100%;border-collapse:collapse;" border="solid">
        <tr>
            <td align="right" width="100px"><apex:outputText value="申请日期:" /></td>
            <td width="600"><apex:outputField value="{!la.Approval_Date__c}"/></td>
            <td align="right" width="100"><apex:outputText value="借用编号:"/></td>
            <td width="300"><apex:outputText value="{!la.loaner_request_number__c}"/></td>
        </tr>
        <tr>
        
            <td align="right">借用方:</td>
 
            <apex:outputPanel rendered="{!IF(la.CreatorUserType__c == 'PowerPartner', 'true', 'false')}" layout="none">
                <td><apex:outputText value="{!agentName}"/></td>
            </apex:outputPanel>
 
            <apex:outputPanel rendered="{!IF(la.CreatorUserType__c != 'PowerPartner', 'true', 'false')}" layout="none">
                <td><apex:outputText value="{!la.Applicant_department__c}"/></td>
            </apex:outputPanel>
            
            <td align="right">借用担当:</td>
            <td><apex:outputText value="{!la.Loaner_Ser__c}"/></td>
        </tr>
        <tr>
            <td align="right">借用日期:</td>
            <td><apex:outputText value="{!lab.ladate}"/></td>
            <td align="right">借用期限:</td>
            <td><apex:outputText value="{!lab.ladateNumS}"/></td>
        </tr>
        <tr>
            <td align="right">借用目的:</td>
            <td ><apex:outputText value="{!la.Demo_purpose__c}"/></td>
            <td align="right">样机库存地:</td>
            <td><apex:outputText value="{!la.loaner_place__c}"/></td>
            
        </tr>
        <tr>
             
            
            <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', false , true)}" layout="none">
                <td align="right">备注:</td>
                <td colspan="3"><apex:outputText value="{!la.loaner_Remark__c}"/></td>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', true , false)}" layout="none">
                <td align="right">备注:</td>
                <td ><apex:outputText value="{!la.loaner_Remark__c}"/></td>
                <td align="right">CRM编号:</td>
                <td ><apex:outputText value="{!OCM_Number}"/></td>
            </apex:outputPanel>
        </tr>
    </table>
    <br style="height: 0.5em;" />
 
 
    <table style="border: 2px solid black; width: 100%;border-collapse:collapse;" border="solid">
        <tr>
            <td align="right" width="90">寄送方式:</td>
            <td colspan="3">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <apex:outputPanel rendered="{!isSelf}" layout="none"> <img src="/img/checkbox_checked.gif"/></apex:outputPanel>
                <apex:outputPanel rendered="{!IF(isSelf,'false','true')}" layout="none"> <img src="/img/checkbox_unchecked.gif"/></apex:outputPanel>
                自提 
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <apex:outputPanel rendered="{!isExpress}" layout="none"> <img src="/img/checkbox_checked.gif"/></apex:outputPanel>
                <apex:outputPanel rendered="{!IF(isExpress,'false','true')}" layout="none"> <img src="/img/checkbox_unchecked.gif"/></apex:outputPanel> 
                快递
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <apex:outputPanel rendered="{!isRenew}" layout="none"> <img src="/img/checkbox_checked.gif"/></apex:outputPanel>
                <apex:outputPanel rendered="{!IF(isRenew,'false','true')}" layout="none"> <img src="/img/checkbox_unchecked.gif"/></apex:outputPanel>
                续借
            </td>
        </tr>
 
        <tr>
            
            <td width="90">&nbsp;&nbsp;</td>
            <td colspan="3">&nbsp;&nbsp;</td>
 
        </tr>
 
        <tr>
            
            <td align="right" width="90">寄送地址:</td>
            <td colspan="3"><apex:outputField value="{!la.direct_shippment_address__c}"/></td>
        </tr>
 
        <tr>
            
            <td align="right" width="90">联系人:</td>
            <td><apex:outputField value="{!la.Loaner_receive_staff__c}"/></td>
            <td align="right" width="90">联系电话:</td>
            <td width="200"><apex:outputField value="{!la.Loaner_receive_staff_phone__c}"/></td>
 
        </tr>
 
    </table>
    <br/>
    <table style="border: 2px solid black; width: 100%;border-collapse:collapse;" border="solid">
        
        <caption style="text-align: left;font-size: 15px;">用户信息:</caption>
 
        <colgroup>
            <col width="50%" />
            <col width="20%" />
            <col width="10%" />
            <col width="20%" />
        </colgroup>
        <tr>
            <th style="text-align: center; border-bottom-style: ridge;">客户名称</th>
            <th style="text-align: center; border-bottom-style: ridge;">客户部门</th>
            <th style="text-align: center; border-bottom-style: ridge;">联系人</th>
            <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', true , false)}" layout="none">
                <th style="text-align: center; border-bottom-style: ridge;">联系电话</th>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', false , true)}" layout="none">
                <th style="text-align: center; border-bottom-style: ridge;">借用时间</th>
            </apex:outputPanel>
        </tr>
        <apex:repeat value="{!luData}" var="luLine" id="lus">
        <tr>
            <td class="dataCell" style="text-align: center;">
                <apex:outputText value="{!luLine.lu.Customer__r.Name}"/>
            </td>
            <td class="dataCell" style="text-align: center;">
                <apex:outputText value="{!luLine.lu.Customer__r.DivisionName__c}"/>
            </td>
            <td class="dataCell" style="text-align: center;">
                <apex:outputText value="{!luLine.lu.Contact__r.Name}"/>
            </td>
            <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', true , false)}" layout="none">
                <td class="dataCell" style="text-align: center;">
                    <apex:outputText value="{!luLine.lu.Contact__r.Phone}"/>
                </td>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', false , true)}" layout="none">
                <td class="dataCell" style="text-align: center;">
                    <apex:outputText value="{!luLine.borrowDate}"/>
                </td>
            </apex:outputPanel>
            
        </tr>
        </apex:repeat>
 
    </table>
    <br/>
    <table style="border:2px solid black; width: 100%;border-collapse: collapse; " border="solid">
        <caption style="text-align: left;font-size: 15px;" >配置清单:</caption>
 
        <tr>
            
            <th style="text-align: center; border-bottom-style: ridge;">序号</th>
            <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'NDT' || la.Equipment_Type__c == 'ANI', true , false)}" layout="none">
                <th style="text-align: center; border-bottom-style: ridge;">样机名称</th>
            </apex:outputPanel>
            <th style="text-align: center; border-bottom-style: ridge;">EC Code</th>
            <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', true , false)}" layout="none">
                <th style="text-align: center; border-bottom-style: ridge;">描述</th>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', false , true)}" layout="none">
                <th style="text-align: center; border-bottom-style: ridge;">序列号</th>
            </apex:outputPanel>
            <th style="text-align: center; border-bottom-style: ridge;">数量</th>
            <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', true , false)}" layout="none">
                <th style="text-align: center; border-bottom-style: ridge;">机身号</th>
                <th style="text-align: center; border-bottom-style: ridge;">机身号1</th>
                <th style="text-align: center; border-bottom-style: ridge;">资产编号</th>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'IE' || la.Equipment_Type__c == 'RVI', true , false)}" layout="none">
                <th style="text-align: center; border-bottom-style: ridge;">样机库位</th>
            </apex:outputPanel>
   
            
            <th style="text-align: center; border-bottom-style: ridge;">备注</th>
        </tr>
        <apex:variable value="{!1}" var="cnt" />
        <apex:repeat value="{!dataLines}" var="line" id="lines">
       
            <tr>
                <td class="dataCell" style="text-align: center;">
                    <apex:outputText value="{!cnt}"/>
                </td>
                <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'NDT' || la.Equipment_Type__c == 'ANI', true , false)}" layout="none">
                    <td class="dataCell" style="text-align: center;">
                        <apex:outputText value="{!line.lad.LOANER__r.Name}"/>
                    </td>
                </apex:outputPanel> 
                <td class="dataCell" style="text-align: center;">
                    <apex:outputText value="{!line.lad.ECCode__c}"/>
                </td>
                <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', true , false)}" layout="none">
                    <td class="dataCell" style="text-align: center;">
                        <apex:outputText value="{!line.lad.LOANER__r.Description}"/>
                    </td>
                </apex:outputPanel>
                <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', false , true)}" layout="none">
                    <td class="dataCell" style="text-align: center;">
                        <apex:outputText value="{!line.lad.SerialNumber__c}"/>
                    </td>
                </apex:outputPanel>
                <td class="dataCell" style="text-align: center;">
                    <apex:outputText value="{!line.num}"/>
                </td>
                <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', true , false)}" layout="none">
                     <td class="dataCell" style="text-align: center;">
                        <apex:outputText value="{!line.lad.LOANER__r.SerialNumber}"/>
                    </td>
                     <td class="dataCell" style="text-align: center;">
                        <apex:outputText value="{!line.lad.LOANER__r.SerialNumber1__c}"/>
                    </td>
                     <td class="dataCell" style="text-align: center;">
                        <apex:outputText value="{!line.lad.LOANER__r.Internal_Asset_number__c}"/>
                    </td>
                </apex:outputPanel>
                <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'IE' || la.Equipment_Type__c == 'RVI', true , false)}" layout="none">
                    <td class="dataCell" style="text-align: center;">
                        <apex:outputText value="{!line.lad.LOANER__r.Description}"/>
                    </td>
                </apex:outputPanel>
                <td class="dataCell" style="text-align: center;">
                    <apex:outputText value="{!line.lad.Remark__c}"/>
                </td>
                
            </tr>
 
            <!-- <apex:outputPanel rendered="{!cnt == 32}" layout="none">
                <div style="page-break-after: always;"/> 
                
            </apex:outputPanel>  -->
        <apex:variable value="{!cnt + 1}" var="cnt" />
        
        </apex:repeat>
 
 
    </table>
    <br/>
 
     <apex:outputPanel rendered="{!IF((rowNum > 26 && rowNum <34) || (rowNum > 80 && rowNum < 87),'true','false')}" layout="none">
         <div style="page-break-after: always;"/>
     </apex:outputPanel>
 
    <table style="border: 2px solid black;width: 100%;">
        <caption style="text-align: left;font-size: 15px;" >样机(备品)借用须知:</caption>
        <tr><td>1.请清点及验收样机(备品)后在此协议书上签字或盖章。</td></tr>
        <tr><td>2.请将样机(备品)于贵方确认之期限内归还。</td></tr>
        <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', true , false)}" layout="none"> 
            <tr><td>3.如借用之样机(备品)在借用期间损坏(含私拆零部件),我方有权要求贵方按相应金额赔偿或承担维修费用。</td></tr>
        </apex:outputPanel>
        <apex:outputPanel rendered="{!IF(la.Equipment_Type__c == 'BS', false, true)}" layout="none"> 
            <tr><td>3.如借用之样机(备品)在借用期间损坏,我方有权要求贵方按相应金额赔偿或承担维修费用。</td></tr>
        </apex:outputPanel>
        <tr><td>4.借出样机在未征得我方的许可,贵方不得转借第三方使用,否则将中止借用并追究责任。</td></tr>
        <tr><td>5.仪景通有权根据需要随时收回借出的样机。</td></tr>
    </table>
 
</body>
</html>
</apex:page>