高章伟
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
<apex:page Controller="QuotePDFController" showHeader="false" sidebar="false" id="allPage" action="{!init}" renderAs="pdf">
<head>
    <style>
        @page {
            size: A4;
            margin: 1mm 1mm 1mm 1mm;
        }
    </style>
</head>
<body style="font-family: Arial Unicode MS; page-break-inside: auto">
    <table border="0" width="100%" style="border-collapse: collapse;">
        <tr>
            <td style="text-align:right;">{!quoteInfo.quoteDate}</td>
        </tr>
        <tr>
            <td style="text-align:right;">{!$ObjectType.Quote.label}#{!quoteInfo.quoteNo}</td>
        </tr>
        <tr>
            <td style="text-align:right;">{!$Label.Label_Total_pages}:{!pageCnt}</td>
        </tr>
        <tr>
            <td style="text-align:left;">{!$Label.Label_From}:{!quoteInfo.dealerName}</td>
        </tr>
        <tr>
            <td style="text-align:left;">{!$ObjectType.Contact.label}:{!quoteInfo.dealerContactName}&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Contact.fields.MobilePhone.label}:{!quoteInfo.dealerContactPhone}</td>
        </tr>
        <tr>
            <td style="text-align:left;">{!$ObjectType.Account.fields.Address1__c.label}:{!quoteInfo.dealerAddress}</td>
        </tr>
        <tr>
            <td style="text-align:left;">{!$ObjectType.Contact.fields.Phone.label}:{!quoteInfo.dealerPhone}&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Contact.fields.Fax.label}:{!quoteInfo.dealerFax}</td>
        </tr>
        <tr>
            <td style="text-align:left;">{!$ObjectType.Contact.fields.Email.label}:{!quoteInfo.dealerEmail}</td>
        </tr>
        <tr>
            <td style="text-align:left;">&nbsp;</td>
        </tr>
        <tr>
            <td style="text-align:left;">{!$Label.Label_To}:{!quoteInfo.accountName}</td>
        </tr>
        <tr>
            <td style="text-align:left;">{!quoteInfo.accountContactName}</td>
        </tr>
        <tr>
            <td style="text-align:left;">{!$ObjectType.Contact.fields.Phone.label}:{!quoteInfo.accountContactPhone}&nbsp;&nbsp;&nbsp;&nbsp;{!$ObjectType.Contact.fields.Email.label}:{!quoteInfo.accountContactEmail}</td>
        </tr>
    </table>
 
    <br/>
    Quotation Sheet(Quotation #{!quoteInfo.quoteNo})<br/>
 
    <table border="1" width="100%" style="border-collapse: collapse;table-layout: fixed;">
        <colgroup>
            <col width="10%" />
            <col width="60%" />
            <col width="10%" />
            <col width="20%" />
        </colgroup>
        <tr style="text-align: center;">
            <th>{!$Label.Label_Units}</th>
            <th>{!$Label.Label_Description}</th>
            <th>{!$ObjectType.QuoteLineItem.fields.Quantity.label}</th>
            <th>{!$ObjectType.QuoteLineItem.fields.TotalPrice.label}{!currencyIsoCode}</th>
        </tr>
        <apex:repeat value="{!printRecords}" var="set">
        <tr>
            <td style="text-align: center;"><apex:outputText value="{!set.units}" /></td>
            <td><apex:outputText value="{!set.description}" /></td>
            <td style="text-align: right;"><apex:outputText value="{!set.qty}" /></td>
            <td style="text-align: right;"><apex:outputText value="{!set.total}" /></td>
        </tr>
        </apex:repeat>
    </table>
 
    <br/>
 
    Note:<br/>
<!--     1)  The payment terms are {!quoteInfo.note1} .<br/>
    付款方式 {!quoteInfo.note2} 。<br/>
    2)  Quoation valid until {!quoteInfo.note3} .<br/>
    报价有效期到 {!quoteInfo.note3} 。<br/>
    3)  All the commodoties come with {!quoteInfo.note4} year's manufacturer warranty.<br/>
    所有商品含 {!quoteInfo.note4} 年厂家保修。<br/>
    4)  The above quotations are {!quoteInfo.note5} prices, Commodoties shipped to the clien's requirements.<br/>
    上述报价为 {!quoteInfo.note5} 价,商品送至客户指定地点。<br/>
    5)  The above quotations are all {!quoteInfo.note6}.<br/>
    上述报价均为 {!quoteInfo.note7} 价。<br/>
    6)  Configuration as per attached.<br/>
    配置清单详见附件。<br/> -->
    <apex:outputText value="{!quoteInfo.comment}" escape="false"/>
<!--     1)  The above quotations are CIP prices, Commodities shipped to the client’s requirements.<br/>
    2)  The above quotations are all tax {!quoteInfo.note2}.<br/>
    3)  The payment terms are {!quoteInfo.note3}.<br/>
    4)  Quotation valid until {!quoteInfo.note4}.<br/>
    5)  All the commodities come with {!quoteInfo.note5} year’s manufacturer warranty.<br/>
    6)  Configuration as per attached.<br/>
    7)  Delivery lead time is {!quoteInfo.note7} days after receipt of payment.<br/> -->
 
    <apex:outputPanel rendered="{!pageCnt > 1}" layout="none">
        <div style="page-break-after: always;"/>
    </apex:outputPanel>
 
<apex:variable value="{!1}" var="cnt1" />
<apex:repeat value="{!printRecords}" var="set">
    <!-- <apex:variable value="{!1}" var="cnt2" /> -->
    <apex:repeat value="{!set.setPage}" var="sp">
    <table border="1" width="100%" style="border-collapse: collapse;table-layout: fixed; font-size: 12px;">
        <colgroup>
            <col width="3%" />
            <col width="10%" />
            <col width="15%" />
            <col width="{!IF(isPrintPrice=='true', 23, 33)}%" />
            <col width="{!IF(isPrintPrice=='true', 20, 33)}%" />
            <col width="5%" />
            <apex:outputPanel rendered="{!isPrintPrice=='true'}" layout="none">
            <col width="12%" />
            <col width="12%" />
            </apex:outputPanel>
        </colgroup>
        <!-- <apex:outputPanel rendered="{!cnt2 == 1}" layout="none"> -->
        <tr style="text-align: center;">
            <td colspan="{!IF(isPrintPrice=='true', 8, 6)}">{!set.description}{!$Label.Label_Set_detail}</td>
        </tr>
        <!-- </apex:outputPanel> -->
        <tr style="text-align: center;">
            <td>{!$Label.Label_No}</td>
            <td>{!$ObjectType.Product2.fields.ProductCode.label}</td>
            <td>{!$ObjectType.Product2.fields.Product_ECCode__c.label}</td>
            <td>{!$ObjectType.Product2.fields.Description.label}</td>
            <td>{!$ObjectType.QuoteLineItem.fields.Description.label}</td>
            <td>{!$ObjectType.QuoteLineItem.fields.Quantity.label}</td>
            <apex:outputPanel rendered="{!isPrintPrice=='true'}" layout="none">
            <td>{!$ObjectType.QuoteLineItem.fields.UnitPrice.label}{!currencyIsoCode}</td>
            <td>{!$ObjectType.QuoteLineItem.fields.TotalPrice.label}{!currencyIsoCode}</td>
            </apex:outputPanel>
        </tr>
        <apex:repeat value="{!sp}" var="line">
        <tr>
            <td style="text-align: center;"><apex:outputText value="{!line.lineNo}" /></td>
            <td><apex:outputText escape="false" value="{!line.productCode}" /></td>
            <td><apex:outputText escape="false" value="{!line.productEC}" /></td>
            <td><apex:outputText escape="false" value="{!line.description}" /></td>
            <td><apex:outputText escape="false" value="{!line.comment}" /></td>
            <td style="text-align: right;"><apex:outputText value="{!line.quantity}" /></td>
            <apex:outputPanel rendered="{!isPrintPrice=='true'}" layout="none">
            <td style="text-align: right;"><apex:outputText value="{!line.price}" /></td>
            <td style="text-align: right;"><apex:outputText value="{!line.totalPrice}" /></td>
            </apex:outputPanel>
        </tr>
        </apex:repeat>
    </table>
 
    <apex:outputPanel rendered="{!cnt1 < pageCnt - 1}" layout="none">
        <div style="page-break-after: always;"/>
    </apex:outputPanel>
 
    <!-- <apex:variable value="{!cnt2 + 1}" var="cnt2" /> -->
    <apex:variable value="{!cnt1 + 1}" var="cnt1" />
    </apex:repeat>
</apex:repeat>
</body>
</apex:page>