高章伟
2022-03-10 1312ba82d4c880bdb5357d28e0d4af5b285f610f
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
<apex:page standardController="Quote" extensions="QuotePDFExtensionController" showHeader="false" sidebar="false" action="{!startContract}" renderAs="pdf"><!-- renderAs="pdf" -->
<apex:stylesheet value="{!URLFOR($Resource.contractdetailpdf)}"/>
<head>
 
<style>
     
</style>
 
</head>
 
<body style="font-family: Arial Unicode MS;">
 
    <!-- ページ番号の定義 -->  
    <apex:variable var="count" value="{!0}"/>
    
    <!-- ページのリピート -->
    <apex:repeat value="{!printRecords}" var="items" id="thePage">
 
    <!-- ページキャンバス -->        
    <div class="pageCanvas">
    
        <!-- ページ番号インクリメント -->
        <apex:variable var="count" value="{!count + 1}"/>
        <!-- SWAG-C7S8QN 【委托】【重要】SI询价配置单没有抬头  lt  20211015 update    原<apex:outputpanel rendered="{!IF(params.trade == 'USD', true, false)}">附件2 </apex:outputpanel> -->
        <div  style="text-align: left;font-weight: bold;font-size: 18px;width: 100%;padding-bottom: 20px;"><apex:outputpanel >附件2 </apex:outputpanel></div>
        <!-- 各ページのタイトル -->
        <div class="quoteTitle"><apex:outputpanel rendered="{!IF(params.trade == 'USD', true, false)}">Commodity List </apex:outputpanel></div>
        <!-- WLIG-BYRD37  【委托】询价 打印配置单 字段修改 精琢技术 wql 2021/03/08 start -->
        <div class="quoteTitle">
            <!-- SWAG-C7S8QN 【委托】【重要】SI询价配置单没有抬头  lt  20211015 update -->
            <!-- 20211015  原<apex:outputpanel rendered="{!IF(params.PurchaseType == '一般引合' || params.PurchaseType == '  SI(手術室案件)', true, false)}"> -->
            <apex:outputpanel >
                 {!$Label.Contract_Detail_Title}
            </apex:outputpanel>
        </div>
        <div class="quoteTitle">
            <apex:outputpanel rendered="{!IF(params.PurchaseType == 'ET24時間販売',true , false)}">
                 订货单
            </apex:outputpanel>
        </div>
        <!-- //WLIG-BYRD37  【委托】询价 打印配置单 字段修改 精琢技术 wql 2021/03/08 end -->
<!-- CHAN-B2L4NY 外贸询价的合同配置单格式恢复 -->
<apex:outputpanel rendered="{!IF(params.trade == 'RMB', true, false)}">
        <!-- 各ページのヘッダキャンバス -->
        <div class="headerCanvas">
            <table style="height:100%;">
                <tr>
                    <td>
                        <div style="height:25px;">{!$Label.Contract_Detail_System_Code}</div>
                        <div style="height:25px;">{!$Label.Quote_Client_Name}</div>
                        <apex:outputpanel layout="none" rendered="{!IF(params.salesRoot == '販売店', true, false)}">
                        <div style="height:25px;">{!$Label.Contract_Detail_Dealer_Name}</div>
                        </apex:outputpanel>
                        <div style="height:25px;">{!$Label.Quote_AddressName}</div>
                    </td>
                    <td>
                        <div style="height:25px;">:&nbsp;</div>
                        <div style="height:25px;">:&nbsp;</div>
                        <apex:outputpanel layout="none" rendered="{!IF(params.salesRoot == '販売店', true, false)}">
                        <div style="height:25px;">:&nbsp;</div>
                        </apex:outputpanel>
                        <div style="height:25px;">:&nbsp;</div>
                    </td>
                    <td>
                        <div style="height:25px;">&nbsp;{!params.quoteNo}</div>
                        <div style="height:25px;">&nbsp;{!params.clientName}</div>
                        <apex:outputpanel layout="none" rendered="{!IF(params.salesRoot == '販売店', true, false)}">
                        <div style="height:25px;">&nbsp;{!params.agentNameForContract}</div>
                        </apex:outputpanel>
                        <div style="height:25px;">&nbsp;{!params.addressName}</div>
                    </td>
                    <td>
                        <div style="height:25px;">&nbsp;</div>
                        <div style="height:25px;">&nbsp;</div>
                        <apex:outputpanel layout="none" rendered="{!IF(params.salesRoot == '販売店', true, false)}">
                        <div style="height:25px;">&nbsp;</div>
                        </apex:outputpanel>
                        <div style="height:25px;">&nbsp;</div>
                    </td>
                    <td>
                        <div style="height:25px;">&nbsp;</div>
                        <div style="height:25px;">{!$Label.Quote_Department}</div>
                        <apex:outputpanel layout="none" rendered="{!IF(params.salesRoot == '販売店', true, false)}">
                        <div style="height:25px;">&nbsp;</div>
                        </apex:outputpanel>
                        <div style="height:25px;">&nbsp;</div>
                    </td>
                    <td>
                        <div style="height:25px;">&nbsp;</div>
                        <div style="height:25px;">:&nbsp;</div>
                        <apex:outputpanel layout="none" rendered="{!IF(params.salesRoot == '販売店', true, false)}">
                        <div style="height:25px;">&nbsp;</div>
                        </apex:outputpanel>
                        <div style="height:25px;">&nbsp;</div>
                    </td>
                    <td>
                        <div style="height:25px;">&nbsp;</div>
                        <div style="height:25px;">&nbsp;{!params.departmentName}</div>
                        <apex:outputpanel layout="none" rendered="{!IF(params.salesRoot == '販売店', true, false)}">
                        <div style="height:25px;">&nbsp;</div>
                        </apex:outputpanel>
                        <div style="height:25px;">&nbsp;</div>
                    </td>
                </tr>
            </table>
            <table style="top:0px; right:0px; position:absolute; height:100%;">
                <tr>
                    <td>
                        <div style="height:25px;">&nbsp;</div>
                        <div style="height:25px;">&nbsp;</div>
                        <!-- 电子签收ID号 wql 精琢技术 2020/11/20 start -->
                        <apex:outputpanel layout="none" rendered="{!IF(params.salesRoot == '販売店', true, false)}">
                        <div style="height:25px;">{!$Label.eSignAgencyNum}</div>
                        </apex:outputpanel>
                        <apex:outputpanel layout="none" rendered="{!IF(params.salesRoot == '販売店', false, true)}">
                        <div style="height:25px;">&nbsp;</div>
                        </apex:outputpanel>
                        <!-- 电子签收ID号 wql 精琢技术 2020/11/20 end -->
                        <div style="height:25px;">{!$Label.Contract_Detail_Print_Date}</div>
                    </td>
                    <td>
                        <div style="height:25px;">&nbsp;</div>
                        <div style="height:25px;">&nbsp;</div>
                        <div style="height:25px;">:&nbsp;</div>
                        <div style="height:25px;">:&nbsp;</div>
                    </td>
                    <td>
                        <div style="height:25px;">&nbsp;</div>
                        <div style="height:25px;">&nbsp;</div>
                        <!-- 电子签收ID号 wql 精琢技术 2020/11/20 start -->
                        <apex:outputpanel layout="none" rendered="{!IF(params.salesRoot == '販売店', true, false)}">
                        <div style="height:25px;">{!params.eSignAgencyNum}</div>
                        </apex:outputpanel>
                        <apex:outputpanel layout="none" rendered="{!IF(params.salesRoot == '販売店', false, true)}">
                        <div style="height:25px;">&nbsp;</div>
                        </apex:outputpanel>
                        <!-- 电子签收ID号 wql 精琢技术 2020/11/20 end -->
                        <div style="height:25px;">&nbsp;{!params.offerPrintDateStringContract}</div>
                    </td>
                </tr>
            </table>
        </div>
 
        <br/>
 
        <!-- ページ内の詳細のREPEAT -->
        <div class="detailCanvas" style="font-size: 10px">
            <apex:dataTable value="{!items}" var="item" id="dataTable" styleClass="detailTable" headerClass="detailTableHeader" columnClasses="detailTableCols">
                <apex:column styleClass="detailRowNumber" style="vertical-align:text-top;">
                        <apex:facet name="header">{!$Label.Quote_Product_Code}</apex:facet>
                        <apex:outputText value="{!item.qli.Item_Order__c}"/>
                </apex:column>
                <apex:column styleClass="detailRowString" style="vertical-align:text-top;width: 111px">
                        <apex:facet name="header"></apex:facet>
                        <!-- <apex:outputText value="{!item.qli.Asset_Model_No_forPrint__c}"/> -->
                        <c:PDFWbr targetStr="{!item.qli.Asset_Model_No_forPrint__c}"/>
                </apex:column>
                <apex:column styleClass="detailRowString" style="vertical-align:text-top;">
                        <apex:facet name="header"></apex:facet>
                        <apex:outputText value="{!item.qli.NameForPrintDelimiter__c}"/>
                </apex:column>
                <apex:column styleClass="detailRowString" style="vertical-align:text-top;width: 131px">
                        <apex:facet name="header">{!$Label.Quote_Product_Name}</apex:facet>
                        <!-- <apex:outputText value="{!item.qli.NameForPrint__c}"/> -->
                         <c:PDFWbr targetStr="{!item.qli.NameForPrint__c}"/>
                </apex:column>
                <apex:column styleClass="detailRowString" style="vertical-align:text-top;width: 80px">
                        <!-- lt 20220223 CHAN-CBW9FX 特殊交货期影响的对应 -->
                        <!-- <apex:facet name="header">{!$Label.Quote_SFDA_Approbation_No}</apex:facet>  </br>-->
                        <apex:facet name="header">注册证号/ 备案凭证 <br/>编号</apex:facet>
                        <apex:outputText value="{!item.ApprobationNo_c}"/>
                </apex:column>
                <apex:column styleClass="detailRowString" style="vertical-align:text-top;width: 160px">
                        <apex:facet name="header">{!$Label.Quote_ProduceCompany}</apex:facet>
                        <!-- <apex:outputText value="{!item.ProduceCompany_c}"/> -->
                        <c:PDFWbr targetStr="{!item.ProduceCompany_c}"/>
                </apex:column>
                <apex:column styleClass="detailRowString" style="vertical-align:text-top;">
                        <apex:facet name="header">{!$Label.Quote_SalesPackagingUnit}</apex:facet>
                        <apex:outputText value="{!item.SalesPackagingUnit_c}"/>
                </apex:column>
                <apex:column styleClass="detailRowNumeric" style="vertical-align:text-top;">
                        <apex:facet name="header">{!$Label.Quote_PackingListManual}</apex:facet>
                        <apex:outputText value="{0, number, ###,###}">
                            <apex:param value="{!item.PackingListManual_c}" />
                        </apex:outputText>
                        {!item.PackingListManual2_c}
                </apex:column>
                <apex:column styleClass="detailRowString" style="vertical-align:text-top;" >
                        <apex:facet name="header">{!$Label.Quote_UnitPrice}</apex:facet>
                        <apex:outputText value=""/>
                </apex:column>
                <apex:column styleClass="detailRowNumeric" style="vertical-align:text-top;">
                        <apex:facet name="header">{!$Label.Quantity}</apex:facet>
                        <apex:outputText value="{0, number, ###,###}">
                            <apex:param value="{!item.qli.Quantity}" />
                        </apex:outputText>
                </apex:column>
                <apex:column styleClass="detailRowString" style="vertical-align:text-top;">
                        <apex:facet name="header">{!$Label.Quote_Amount}</apex:facet>
                        <apex:outputText value="  "/>
                </apex:column>
                <apex:column styleClass="detailRowString" style="vertical-align:text-top; text-align: center;">
                        <apex:facet name="header">特殊保修 年限</apex:facet>
                        <apex:outputText value="{!item.qli.GuaranteePeriod__c}"/>
                </apex:column>
                
                <!-- lt 20220223 CHAN-CBW9FX 特殊交货期影响的对应  start -->
                <apex:column styleClass="detailRowNumeric">
                        <apex:facet name="header">交货期</apex:facet>
                        <apex:outputText value="{!item.qli.DeliveryDate__c}"/>
                </apex:column>
                <!-- lt 20220223 CHAN-CBW9FX 特殊交货期影响的对应  end -->
                
            </apex:dataTable>
        </div>
 
        <apex:outputpanel rendered="{!count=maxPageNumber}">
        <div>
            <table style="width:100%;">
                 <tr>
                    <!-- 2018/10/11 CHAN-B5F35C 内贸时不显示 注册证号/备案凭证编号备注 start -->
                    <td style="text-align: left;">
                        <div style="height:25px;">备注:上述产品注册证号/备案凭证号以收到实物中文标签中的注册证信息为准。</div>
                    </td>
                    <!-- 2018/10/11 CHAN-B5F35C 内贸时不显示 注册证号/备案凭证编号备注 end -->
                </tr>
                <tr>
                    <td style="width: 85%;text-align: right;">
                        <div style="height:25px;">{!$Label.Quote_TotalPrice}</div>
                    </td>
                    <td>
                        <div style="height:25px;">:&nbsp;</div>
                    </td>
                    <td>
                        <div style="height:25px;">&nbsp;
                            <apex:outputText value="{0, number, ###,##0.00}">
                                <apex:param value="{!params.newTotalPrice}" />
                            </apex:outputText>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        </apex:outputpanel>
</apex:outputpanel>
<!-- CHAN-B2L4NY 外贸询价的合同配置单格式恢复 -->
<apex:outputpanel rendered="{!IF(params.trade == 'RMB', false, true)}">
        <!-- 各ページのヘッダキャンバス -->
        <div class="headerCanvas">
            <table style="height:100%;">
                <tr>
                    <td>
                        <div style="height:25px;">
                        Prospect Code&nbsp;{!$Label.Contract_Detail_System_Code}</div>
                        <div style="height:25px;">End user&nbsp;{!$Label.Quote_Client_Name}</div>
                        <div style="height:25px;">Department&nbsp;{!$Label.Quote_Department}</div>
                        <div style="height:25px;">The Buyer&nbsp;{!$Label.Contract_Detail_Dealer_Name}</div>
                    </td>
                    <td>
                        <div style="height:25px;">:&nbsp;</div>
                        <div style="height:25px;">:&nbsp;</div>
                        <div style="height:25px;">:&nbsp;</div>
                        <div style="height:25px;">:&nbsp;</div>
                    </td>
                    <td>
                        <div style="height:25px;">&nbsp;{!params.quoteNo}</div>
                        <div style="height:25px;">&nbsp;{!params.clientName}</div>
                        <div style="height:25px;">&nbsp;{!params.departmentName}</div>
                        <apex:outputPanel rendered="{!IF(params.agentNameForContract != null && params.lenAgentName >= 40, true, false)}">
                            <div style="height:22px; padding-top:3px; font-size:10px;">&nbsp;{!params.agentNameForContract}</div>
                        </apex:outputPanel>
                        <apex:outputPanel rendered="{!IF(params.agentNameForContract != null && params.lenAgentName < 40, true, false)}">
                            <div style="height:25px;">&nbsp;{!params.agentNameForContract}</div>
                        </apex:outputPanel>
                    </td>
                </tr>
            </table>
            <table style="top:0px; right:0px; position:absolute; height:100%;">
                <tr>
                    <td>
                        <div style="height:25px;">&nbsp;</div>
                        <div style="height:25px;">&nbsp;</div>
                       <!--   -->
                        <div style="height:25px;">Print date&nbsp;{!$Label.Contract_Detail_Print_Date}</div>
                        <div style="height:25px;"> ID Code</div>
                    </td>
                    <td>
                        <div style="height:25px;">&nbsp;</div>
                        <div style="height:25px;">&nbsp;</div>
                        <!-- <div style="height:25px;">&nbsp;</div> -->
                        <div style="height:25px;">:&nbsp;</div>
                        <div style="height:25px;">:&nbsp;</div>
                    </td>
                    <td>
                        <div style="height:25px;">&nbsp;</div>
                        <div style="height:25px;">&nbsp;</div>
                        <div style="height:25px;">&nbsp;{!params.offerPrintDateStringContract}</div>
                        <div style="height:25px;">&nbsp;</div>
                    </td>
                </tr>
               
            </table>
        </div>
 
        <br/>
 
        <!-- ページ内の詳細のREPEAT -->
        <div class="detailCanvas">
            <!-- 2021/01/15 liying start -->
            <!-- 多表头 第一列表头 -->
            <apex:dataTable value="{!items}" var="item" id="dataTableUSD" styleClass="detailTableUSD" headerClass="detailTableHeaderUSD" columnClasses="detailTableCols">
                <apex:column styleClass="detailRowNumber">
                        <apex:facet name="header">Commodity Type</apex:facet>
                </apex:column>
                <apex:column styleClass="detailRowString">
                        <apex:facet name="header"></apex:facet>
                </apex:column>
                <apex:column styleClass="detailRowString">
                        <apex:facet name="header"></apex:facet>
                </apex:column>
                <apex:column styleClass="detailRowString">
                        <apex:facet name="header">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    Description</apex:facet>
                </apex:column>
                <apex:column styleClass="detailRowNumeric">
                        <apex:facet name="header">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Quantity</apex:facet>
                </apex:column>
                <apex:column styleClass="detailRowNumeric">
                        <apex:facet name="header">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Special Warranty &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Period(year) </apex:facet>
                </apex:column>
 
                <!-- lt 20220223 CHAN-CBW9FX 特殊交货期影响的对应  start -->
                <apex:column styleClass="detailRowNumeric">
                        <apex:facet name="header"> Delivery Date </apex:facet>
                </apex:column>
                <!-- lt 20220223 CHAN-CBW9FX 特殊交货期影响的对应  end -->
 
            </apex:dataTable>
                  <!-- 2021/01/15 liying end -->
            <!-- 多表头 第二列表头 -->
            <apex:dataTable value="{!items}" var="item" id="dataTable2" styleClass="detailTable" headerClass="detailTableHeader" columnClasses="detailTableCols">
                <apex:column styleClass="detailRowNumber">
                        <apex:facet name="header">{!$Label.Quote_Product_Code}</apex:facet>
                        <apex:outputText value="{!item.qli.Item_Order__c}"/>
                </apex:column>
                <apex:column styleClass="detailRowString">
                        <apex:facet name="header"></apex:facet>
                        <apex:outputText value="{!item.qli.Asset_Model_No_forPrint__c}"/>
                </apex:column>
                <apex:column styleClass="detailRowString">
                        <apex:facet name="header">  </apex:facet>
                        <apex:outputText value="{!item.qli.NameForPrintDelimiter__c}"/>
                </apex:column>
                <apex:column styleClass="detailRowString">
                        <apex:facet name="header">{!$Label.Quote_Product_Name}</apex:facet>
                        <apex:outputText value="{!item.qli.NameForPrint__c}"/>
                </apex:column>
                <apex:column styleClass="detailRowNumeric">
                        <apex:facet name="header">{!$Label.Quantity}</apex:facet>
                        <apex:outputText value="{0, number, ###,###}">
                            <apex:param value="{!item.qli.Quantity}" />
                        </apex:outputText>
                </apex:column>
 
                <apex:column styleClass="detailRowNumeric">
                        <apex:facet name="header">特殊保修年限</apex:facet>
                        <apex:outputText value="{!item.qli.GuaranteePeriod__c}"/>
                </apex:column>
 
                <!-- lt 20220223 CHAN-CBW9FX 特殊交货期影响的对应  start -->
                <!-- <apex:column styleClass="detailRowNumeric">
                        <apex:facet name="header">交货期</apex:facet>
                        <apex:outputText value="{!item.qli.DeliveryDate__c}"/>
                </apex:column> -->
                <!-- lt 20220223 CHAN-CBW9FX 特殊交货期影响的对应  end -->
 
            </apex:dataTable>
        </div>
</apex:outputpanel>
 
        <br />
        
        <!-- 各ページのフッタキャンバス -->
        <div class="footerCanvasContract">
            <div class="footerSignContract">
                ({!$Label.Contract_Detail_Buyer_Stamp})<br />
                <br />
                年  月  日<br />
            </div>
        </div>
     
     </div>
        
        <!-- 各ページを区切る改ページ、最終ページには出さないようにしている -->
        <apex:outputpanel rendered="{!count<maxPageNumber}">
        <div style="page-break-after: always;"/>
        </apex:outputpanel>
        
    </apex:repeat>
 
</body>
 
</apex:page>