liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
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
<apex:page controller="NewDBMCAgentPDFAdnMceConfigController"  showHeader="false" sidebar="false" action="{!init}" renderAs="pdf" applyHtmlTag="false" >
    <!-- lightningStylesheets="true" -->
    <html>
        <head>
            <style>
            @page {
                size: A4 portrait;
                margin: 12mm 12mm 5mm 12mm;
            }
            table { border-collapse: collapse; }
            td.detail { text-align: center; font-size: 8pt}
            /* } */
            body > .top-right {
                position: absolute;
                top: 10px;
                right: 10px;
                font-size: 12px;      
            }
            .text-wrap {
                overflow-wrap: break-word;
                word-wrap: break-word;
                word-break: break-word;
                hyphens: auto;
            }
            </style>
        </head>
        <body  style="font-family: Arial Unicode MS;">
            <!-- 合同编码 -->
        <div class="top-right">
            <div>合同管理编码: {!targetObj.MCD.Management_Code__c}</div>
            <apex:dataList styleClass="no-bullet-list"  value="{!targetObj.MCL}" var="mc">
                <div style="margin-left: 80px;">{!mc.Management_Code__c}</div>
            </apex:dataList>
        </div>
        <table width="100%" cellspacing="0" cellpadding="0" style="font-size:13pt;margin-top: 20%;">
            <!-- <tr><td style="text-align: center;font-size: 18pt"><span style="border-bottom:double 3px;">奥林巴斯维修服务合同</span></td></tr> -->
            <tr><td height="100px"></td></tr>
            <tr><td style="text-align: center;font-size: 30pt">
                <!--  -->
                <!-- <c:PDFWbr targetStr="{!targetObj.MC.Hospital__r.Name}"/> -->
                <c:PDFWbr targetStr="奥林巴斯维修服务合同"/>
                
                <!-- {!targetObj.year}年度服务合同 -->
            </td></tr>
            <tr><td height="250px"></td></tr>
        </table>
        <!-- 甲方乙方1 -->
        <table width="100%" cellspacing="0" cellpadding="0" style="font-size:13pt;">
            <tr><td height="10px"></td></tr>
            <tr>
                <td width="20px" style="font-size: 16pt;vertical-align: text-top;">甲方:&nbsp;
                </td>
                <td style="font-size: 16pt">
                    <u>&nbsp;<c:PDFWbr targetStr="{!IF(targetObj.MC.Dealer__r.Name == null,targetObj.MC.Hospital__r.Name,targetObj.MC.Dealer__r.Name)}" />&nbsp;</u>
                </td>
            </tr>
            <tr><td height="40px"></td></tr>
            <tr>
                <td width="20px" style="font-size: 16pt;vertical-align: text-top;">
                    乙方:&nbsp;
                </td>
                <td style="font-size: 16pt"> <c:PDFWbr targetStr="{!targetObj.BCompany}"/></td></tr>
    
                <!-- <tr><td height="250px"></td></tr> -->
        </table>
        <div style="page-break-after: always;"/>
        <div style="counter-increment: page -1"></div>
            <apex:variable value="{!1}" var="pageCnt" />
            <apex:variable value="{!1}" var="lineNo" />
 
            <apex:repeat value="{!targetObjList}" var="targetObj">
                <table width="100%" cellspacing="0" cellpadding="0" >
                    <tr>
                        <td width="10%" >附件</td>
                    </tr>
                    <tr><td height="15px"></td></tr>
                    <tr>
                        <td colspan="2" style="text-align: center;font-size: 20pt">
                            奥林巴斯维修服务合同设备清单
                        </td>
                    </tr>
                </table>
                <br/>
                <table width="100%" border="1" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
                    <tr style="font-size: 9pt">
                        <td width="5%" style="text-align: center;">编号</td>
                        <td width="18%" style="text-align: center;">合同号</td>
                        <td width="20%" style="text-align: center;">型号</td>
                        <td width="24%" style="text-align: center;">机器名称</td>
                        <td width="10%" style="text-align: center;">机身号</td>
                        <td width="5%" style="text-align: center;">备注</td>
                        <!-- <apex:outputPanel layout="none" rendered="{!IF(RecordTypeName = 'NewMaintenance_Quote' , true, false)}"> -->
                            <td width="10%" style="text-align: center;">备品确保<br/>提供</td>
                            <td width="8%" style="text-align: center;">约定点检<br/>设备对象</td>
                        <!-- </apex:outputPanel> -->
                    </tr>
                    
                    <apex:repeat value="{!targetObj.assetInfoList}" var="asset" id="asset">
                        <tr>
                            <td class="detail"><apex:outputText escape="false" value="{!asset.lineNo}"></apex:outputText></td>
                            <td class="detail"><apex:outputText escape="false" value="{!asset.Management_Code}"></apex:outputText></td>
                            <td class="detail"><apex:outputText escape="false" value="{!asset.assetModelNo}"></apex:outputText></td>
                            <td class="detail">
                                <apex:outputText escape="false" value="{!asset.assetName}" styleClass="text-wrap"></apex:outputText>
                            </td>
                            <td class="detail"><apex:outputText escape="false" value="{!asset.assetSerialNumber}"></apex:outputText></td>
                            <td class="detail"><apex:outputText escape="false" value="{!asset.assetComment}"></apex:outputText></td>
                            <!-- <apex:outputPanel layout="none" rendered="{!IF(RecordTypeName = 'NewMaintenance_Quote' , true, false)}"> -->
                                <td class="detail"><apex:outputText escape="false" value="{!asset.mcae.Characteristic__c}"></apex:outputText></td>
                            <!-- </apex:outputPanel> -->
                            <td class="detail"><apex:outputField value="{!asset.mcae.Check_Object__c}"/></td>
                        </tr>
                        <apex:variable value="{!lineNo + 1}" var="lineNo" />
                    </apex:repeat>
                </table>
                <apex:outputPanel rendered="{!pageCnt < targetObjSize}" layout="none">
                    <div style="page-break-after: always;"/>
                </apex:outputPanel>
                <apex:variable value="{!pageCnt + 1}" var="pageCnt" />
            </apex:repeat>
                
                    <div style="page-break-after: always;"/>
                    <div style="counter-increment: page -1"></div>
            
        </body>
    </html>
</apex:page>