高章伟
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
<apex:page applyHtmlTag="false" Controller="FixtureRentalPDFController" showHeader="false" sidebar="false" id="allPage" action="{!init}" renderAs="pdf" ><!-- renderAs="pdf" -->
<html>
    <head>
         <style type="text/css" media="print">
            @page {
                size: A4;
                margin: 1mm 2.5mm 0mm 2.5mm;
            }
 
            /*td{
                height: 23px;
            }*/
 
        </style>
    </head>
    
 
<body style="font-family: Arial Unicode MS; page-break-inside: auto;font-size: 14px">
 
<apex:variable value="{!1}" var="pcnt" />
<apex:repeat value="{!recordsIMGfist}" var="record">
    <table width="100%" class="ImgPage" style="{!IF(pageNum >= 1,'border-collapse:collapse;margin-top:0;padding-top:0;','')} margin-top: 9mm;">
        <colgroup>
            <col width="25%" />
            <col width="25%" />
            <col width="25%" />
            <col width="25%" />
        </colgroup>
        <apex:variable value="{!1}" var="cnt" />
             <tr>
                <td style="text-align:left;" colspan="3"><apex:outputText value="{!record.eSetName}" /></td>
               <!--  <td align="right" valign="top"><apex:outputField value="{!record.es.QRImg__c}" rendered="{!cnt == 1}"/></td> -->
            </tr>
        <apex:repeat value="{!record.lineListIMG}" var="line">
           
            <tr>
                <apex:repeat value="{!line.esdl}" var="e">
                    <td align="center">
                        <table border="1" style="border-collapse: collapse;table-layout: fixed;" cellspacing="0" cellpadding="0">
                            <colgroup>
                                <col width="170" />
                            </colgroup>
 
                            <tr>
                                <td style="text-align:center;font-size:{!IF(e.nameLength < 16, '10px', IF(e.nameLength < 43, '7px','4px'))}" height="20"><apex:outputText escape="false" value="{!e.ProductName}"></apex:outputText></td>
                            </tr>
                            <tr>
                                <td style="text-align:center;font-size:10px" height="13"><apex:outputField value="{!e.raesl.SerialNumber__c}" /></td>
                            </tr>
                            <tr><!-- <apex:outputField style="height: 150px;width: 140px;" value="{!e.Image__c}"/> -->
                                <td style="text-align:center;" height="124"><img src="/servlet/servlet.FileDownload?file={!e.raesl.Asset__r.Product2.Image_DocumentID__c}" style="display: {!IF(e.raesl.Asset__r.Product2.Image_DocumentID__c='','none','')}; height:123px;width:150px;" /></td>
                            </tr>
 
                        </table>
                    </td>
                </apex:repeat>
            </tr>
            <apex:variable value="{!cnt + 1}" var="cnt" />
        </apex:repeat>
    </table>
    
    <apex:outputPanel rendered="{!pcnt < pageCntIMG}" layout="none">
         <div style="page-break-after: always;"/>
    </apex:outputPanel>
    
    <apex:variable value="{!pcnt + 1}" var="pcnt" />
</apex:repeat>
</body>
</html>
</apex:page>