高章伟
2022-03-18 4bfe21c4b5ddc089ae5a95f4b10f6cff148b690d
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
<apex:page controller="PrintConsumblePDFController" showHeader="false" sidebar="false" renderAs="PDF" action="{!init}" applyBodyTag="false">
<!-- <apex:page controller="PrintConsumblePDFController" showHeader="false" sidebar="false" action="{!init}" applyBodyTag="false"> -->
<apex:stylesheet value="{!URLFOR($Resource.contractdetailpdf)}"/>
    <head>
        <style>
 
        tr.columuscolour {
            display: none;
        }
        </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}"/>
 
        <!-- 各ページのタイトル -->
        <div class="quoteTitle">订货单</div>
        <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>
                        <div style="height:25px;">{!$Label.Contract_Detail_Dealer_Name}</div>
                        <div style="height:25px;">{!$Label.Quote_AddressName}</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;{!coc.Name}</div>
                        <div style="height:25px;">&nbsp;{!GestName}</div>
                        <div style="height:25px;">&nbsp;{!GestName}</div>
                        <div style="height:25px;">&nbsp;{!addressName}</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;"></div>
                        <div style="height:25px;">{!$Label.Quote_Department}</div>
                        <div style="height:25px;"></div>
                        <div style="height:25px;"></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>
                        <div style="height:25px;">&nbsp;</div>
                        <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>
                        <!-- update by rentx 2020-11-11 CHAN-BV2677 start -->
                        <div style="height:25px;">电子签收ID号</div>
                        <!-- update by rentx 2020-11-11 CHAN-BV2677 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>
                        <!-- update by rentx 2020-11-11 CHAN-BV2677 start -->
                        <div style="height:25px;" align="right">{!idName}</div>
                        <!-- update by rentx 2020-11-11 CHAN-BV2677 end -->
                        <div style="height:25px;">&nbsp;<apex:outputText value="{0, date, yyyyMMdd}">
                    <apex:param value="{!TODAY()}" />
                    </apex:outputText></div>
                    </td>
                </tr>
            </table>
        </div>
 
        <br/>
 
        <div class="detailCanvas" style="font-size: 10px">
            <table cellspacing="0" cellpadding="0" class="detailTable">
                <tr class="detailTableHeader">
                    <th  class="detailTableHeader" scope="col" ></th>
                    <th  class="detailTableHeader" scope="col" >编码</th>
                    <th  class="detailTableHeader" scope="col" ></th>
                    <th  class="detailTableHeader" scope="col" >产品型号/名称</th>
                    <th  class="detailTableHeader" scope="col" >注册证号<br/>备案凭证编号</th>
                    <th  class="detailTableHeader" scope="col" width="25%" >生产企业</th>
                    <th  class="detailTableHeader" scope="col" >单位</th>
                    <th  class="detailTableHeader" scope="col" >包装规格</th>
                    <th  class="detailTableHeader" scope="col" >单价</th>
                    <th  class="detailTableHeader" scope="col" >数量</th>
                    <th  class="detailTableHeader" scope="col" >金额</th>
                </tr>
<apex:repeat value="{!items}" var="records">
                <tr >
                    <td class="detailTableCols detailRowNumber">
                        <apex:outputText value="{!records.lineNo}"/>
                    </td>
                    <td class="detailTableCols detailRowString">
                        <apex:outputField value="{!records.esd.Product_code__c}"/>
                    </td>
                    <td class="detailTableCols detailRowString">
                        <apex:outputText value="{!records.esd.Remarks__c}"/>
                    </td>
                    <td class="detailTableCols detailRowString">
                        <apex:outputField value="{!records.esd.Lose_reason__c}"/>
                    </td>
                    <td class="detailTableCols detailRowString">
                        
                    </td>
                    <td class="detailTableCols detailRowString">
                        <c:PDFWbr targetStr="{!records.esd.AgencyName_text1__c}"/>
                    </td>
                    <td class="detailTableCols detailRowString">
                        <apex:outputText value="{!records.unit}" />
                    </td>
                    <td class="detailTableCols detailRowString">
                        <apex:outputField value="{!records.esd.ProductPacking_list_manual__c}"/>
                        <apex:variable var="v" value="" rendered="{!records.esd.ProductPacking_list_manual__c!=null}">
                        Pcs
                        </apex:variable>
                    </td>
                    <td class="detailTableCols detailRowString">
                        
                    </td>
                    <td class="detailTableCols detailRowString">
                        <apex:outputField value="{!records.esd.Consumable_count__c}"/>
                    </td>
                    <td class="detailTableCols detailRowString">
                        
                    </td>
                </tr>
</apex:repeat>
            </table>
 
            <!--<apex:dataTable value="{!items}" var="records" id="dataTable" styleClass="detailTable" headerClass="detailTableHeader" columnClasses="detailTableCols">
                <apex:column styleClass="detailRowNumber">
                        <apex:facet name="header"></apex:facet>
                        <apex:outputText value="{!records.lineNo}"/>
                </apex:column>
                <apex:column styleClass="detailRowString">
                        <apex:facet name="header">编码</apex:facet>
                        <apex:outputField value="{!records.esd.Product_code__c}"/>
                </apex:column>
                <apex:column styleClass="detailRowString">
                        <apex:facet name="header">  </apex:facet>
                        <apex:outputText value="{!records.esd.Remarks__c}"/>
                </apex:column>
                <apex:column styleClass="detailRowString" style="width: 150PX;">
                        <apex:facet name="header">产品型号/名称</apex:facet>
                        <apex:outputField value="{!records.esd.Lose_reason__c}"/>
                </apex:column>
                <apex:column styleClass="detailRowString">
                        <apex:facet name="header">注册证号<br/>备案凭证编号</apex:facet>
                </apex:column>
                <apex:column styleClass="detailRowString">
                        <apex:facet name="header">生产企业</apex:facet>
                        <apex:outputField value="{!records.esd.AgencyName_text1__c}" />
                </apex:column>
                <apex:column styleClass="detailRowString">
                        <apex:facet name="header">单位</apex:facet>
                        <apex:outputText value="{!records.unit}" />
                </apex:column>
                <apex:column styleClass="detailRowString">
                        <apex:facet name="header">包装规格</apex:facet>
                        <apex:outputField value="{!records.esd.ProductPacking_list_manual__c}"/>
                        <apex:variable var="v" value="" rendered="{!records.esd.ProductPacking_list_manual__c!=null}">
                        Pcs
                        </apex:variable>
                </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:outputField value="{!records.esd.Consumable_count__c}"/>
                </apex:column>
                <apex:column styleClass="detailRowString">
                        <apex:facet name="header">金额</apex:facet>
                        
                </apex:column>
            </apex:dataTable>-->
        </div>
 
        <apex:outputpanel rendered="{!count==maxPageNumber}">
            <div>
                <table>
                    <!-- 20181016 XHL UpdateSTART CHAN-B5L538 -->
                    <tr class="headerRow">
                        <td style="text-align: left;" >备注:上述产品注册证号/备案凭证编号以收到实物中文标签中的注册证信息为准</td>
                    </tr>
                    <!-- 20181016 XHL UpdateEND CHAN-B5L538 -->
                    <tr class="headerRow">
                        <td width="500px"></td>
                        <td>订货总金额:</td>
                        <td style="text-align: right;">{!coc.Total_amount__c}元</td>
                    </tr>
                    <tr class="{!IF(coc.Offers_Price__c ==null || coc.Offers_Price__c == 0,'columuscolour','headerRow')}">
                        <td width="500px"></td>
                        <td>特价总金额:</td>
                        <td style="text-align: right;">{!coc.Offers_Price__c}元</td>
                    </tr>
                </table>
            </div>
        </apex:outputpanel>
 
        <br/>
        <br/>
 
        <div class="footerCanvasContract">
            <div class="footerSignContract">
                (买方盖章)<br />
                <br />
                年  月  日<br />
            </div>
        </div>
    </div>
        <!-- 各ページを区切る改ページ、最終ページには出さないようにしている -->
        <apex:outputpanel rendered="{!count<maxPageNumber}">
        <div style="page-break-after: always;"/>
        </apex:outputpanel>
        
    </apex:repeat>
    </body>
</apex:page>