<apex:page standardController="Maintenance_Contract_Estimate__c" extensions="MaintenanceContractVMPDFController" showHeader="false" sidebar="false" renderAs="pdf" action="{!init}" applyHtmlTag="false" >
|
<!-- renderAs="pdf" -->
|
|
<html>
|
<head>
|
<style>
|
@page {
|
size: A4 landscape;
|
margin: 12mm 12mm 5mm 12mm;
|
|
@bottom-center {
|
content: counter(page) " / " counter(pages);
|
}
|
}
|
|
table { border-collapse: collapse; }
|
|
td.border-thick-title { border-width: 1pt 0pt 1pt 0pt; border-style: solid; border-color: black; text-align: center; font-size: 10pt;}
|
td.border-thick-bottom { border-width: 0pt 0pt 1pt 0pt; border-style: solid; border-color: black; text-align: center;}
|
td.detail { text-align: center; font-size: 10pt;}
|
|
</style>
|
</head>
|
<!-- TODO ラベル対応-->
|
<body style="font-family: Arial Unicode MS; page-break-inside: auto">
|
<apex:variable value="{!1}" var="pageCnt" />
|
<apex:variable value="{!0}" var="lineNo" />
|
<!-- 改ページループ -->
|
<apex:repeat value="{!targetObjList}" var="targetObj">
|
<table width="100%" cellspacing="0" cellpadding="0" >
|
<tr>
|
<td colspan="2" style="text-align: center;font-size: 20pt">服务合同报价单</td>
|
</tr>
|
<tr>
|
<td style="text-align: right;">报价编码:</td>
|
<td width="15%" style="text-align: right;">{!targetObj.estimate.Name}</td>
|
</tr>
|
<tr>
|
<td style="text-align: right;">报价提出日:</td>
|
<td width="15%" style="text-align: right;">{!SUBSTITUTE(TEXT(TODAY()), '-', '/')}</td>
|
</tr>
|
<tr>
|
<td style="text-align: right;">报价有效截止日:</td>
|
<td width="15%" style="text-align: right;">{!SUBSTITUTE(TEXT(estimateendDate), '-', '/')}</td>
|
</tr>
|
<!-- <tr>
|
<td colspan="2" style="text-align: right;">此报价单自报价作成日起三个月内有效</td>
|
</tr> -->
|
</table>
|
<table width="100%" cellspacing="0" cellpadding="0" >
|
<tr>
|
<td width="15%"> </td>
|
<td width="3%"> </td>
|
<td width="7%"> </td>
|
<td width="15%"> </td>
|
<td width="5%"> </td>
|
<td width="3%"> </td>
|
<td> </td>
|
</tr>
|
<tr>
|
<td>医院名</td>
|
<td>:</td>
|
<td colspan="2">{!targetObj.estimate.Maintenance_Contract__r.Hospital__r.Name}</td>
|
<td>科室</td>
|
<td>:</td>
|
<td>{!targetObj.estimate.Department__c}</td>
|
</tr>
|
<tr>
|
<td>合同类型</td>
|
<td>:</td>
|
<td colspan="2">{!targetObj.estimate.Maintenance_Contract__r.RecordType.Name}</td>
|
<td>是否续签</td>
|
<td>:</td>
|
<apex:outputPanel rendered="{!(targetObj.estimate.New_Contract_Type_TxT__c == '新品合同' || targetObj.estimate.New_Contract_Type_TxT__c == '首签合同')}" layout="none">
|
<td colspan="2">新签合同</td>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(targetObj.estimate.New_Contract_Type_TxT__c == '续签合同' || targetObj.estimate.New_Contract_Type_TxT__c == '非续签合同')}" layout="none">
|
<td colspan="2">续签合同</td>
|
</apex:outputPanel>
|
</tr>
|
<tr>
|
<td>合同预定开始日期</td>
|
<td>:</td>
|
<td colspan="2">{!SUBSTITUTE(TEXT(targetObj.estimate.Contract_Esti_Start_Date__c), '-', '/')}</td>
|
<td>合同月数</td>
|
<td>:</td>
|
<td><apex:outputText value="{0,number,#,###}">
|
<apex:param value="{!targetObj.estimate.Contract_Range__c}" />
|
</apex:outputText>个月</td>
|
</tr>
|
<tr>
|
<td>提交对象</td>
|
<td>:</td>
|
<td colspan="2">{!targetObj.estimate.Estimate_Target__c}</td>
|
<!-- <apex:outputPanel rendered="{!targetObj.estimate.Estimate_Target__c == '经销商'}" layout="none">
|
<td colspan="2">{!targetObj.estimate.Dealer__r.Name}</td>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!targetObj.estimate.Estimate_Target__c == '医院'}" layout="none">
|
<td colspan="2">{!targetObj.estimate.Maintenance_Contract__r.Hospital__r.Name}</td>
|
</apex:outputPanel> -->
|
<td>主担当者</td>
|
<td>:</td>
|
<td colspan="2">{!targetObj.estimate.Maintenance_Contract__r.Service_Contract_Staff__r.Name}</td>
|
</tr>
|
<tr>
|
<td colspan="7" style="text-align: right">单位:RMB</td>
|
</tr>
|
</table>
|
<table width="100%" cellspacing="0" cellpadding="0" >
|
<tr>
|
|
<td class="border-thick-title" >No.</td>
|
<td class="border-thick-title" >型号</td>
|
<td class="border-thick-title" >产品描述</td>
|
<td class="border-thick-title" >机身编码</td>
|
<td class="border-thick-title" >安装日期</td>
|
<td class="border-thick-title" >点检结果</td>
|
|
<apex:outputPanel rendered="{!(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c) }" layout="none">
|
<td class="border-thick-title" >最近一期<br/>合同编码</td>
|
</apex:outputPanel>
|
|
<apex:outputPanel rendered="{!(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c) }" layout="none">
|
<td class="border-thick-title" >最近一期<br/>合同金额</td>
|
</apex:outputPanel>
|
|
<!-- 消费率 打印服务合同报价单PDF -->
|
<apex:outputPanel rendered="{!(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c) }" layout="none">
|
<td class="border-thick-title" >消费率</td>
|
</apex:outputPanel>
|
|
<!-- 调整比例 打印服务合同报价单PDF -->
|
<apex:outputPanel rendered="{!(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c) }" layout="none">
|
<td class="border-thick-title" >调整比例</td>
|
</apex:outputPanel>
|
|
<!-- 基准价格 打印服务合同报价单PDF -->
|
<apex:outputPanel rendered="{!((targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_RepairPrice__c) || targetObj.estimate.Asset_Repair_Sum_Price__c > 0)}" layout="none">
|
<td class="border-thick-title" >基准价格</td>
|
</apex:outputPanel>
|
|
<!-- 参保价格 打印服务合同报价单PDF -->
|
<apex:outputPanel rendered="{!!((targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_RepairPrice__c) || targetObj.estimate.Asset_Repair_Sum_Price__c > 0)}" layout="none">
|
<td class="border-thick-title" >{!IF(!(targetObj.estimate.Asset_Repair_Sum_Price__c > 0), '参保价格', '')}</td>
|
</apex:outputPanel>
|
|
<!-- 修理金额 打印服务合同报价单PDF -->
|
<apex:outputPanel rendered="{!(targetObj.estimate.Asset_Repair_Sum_Price__c > 0) }" layout="none">
|
<td class="border-thick-title" >{!IF(targetObj.estimate.Asset_Repair_Sum_Price__c > 0, '修理金额', '')}</td>
|
</apex:outputPanel>
|
<td class="border-thick-title" >备注</td>
|
<!-- add 点检改善:约定点检设备对象 2021.6.10 fxk start-->
|
<!-- <td class="border-thick-title" >约定点检设备对象</td> -->
|
<!-- add 点检改善:约定点检设备对象 2021.6.10 fxk end-->
|
</tr>
|
<!-- 明細行ループ -->
|
<apex:repeat value="{!targetObj.assetInfoList}" var="asset" id="asset">
|
<tr>
|
<!-- No -->
|
<td class="detail"><c:PDFWbr targetStr="{!asset.lineNo}"/></td>
|
<!-- 型号 -->
|
<td class="detail"><c:PDFWbr targetStr="{!asset.assetModelNo}"/></td>
|
<!-- 机器名称 -->
|
<td class="detail"><c:PDFWbr targetStr="{!asset.assetName}"/></td>
|
<!-- 机身编码 -->
|
<td class="detail"><c:PDFWbr targetStr="{!asset.assetSerialNumber}"/></td>
|
<!-- 安装日期 -->
|
<td class="detail"><c:PDFWbr targetStr="{!asset.installDate}"/></td>
|
<!-- 点检结果 -->
|
<td class="detail"><c:PDFWbr targetStr="{!IF(ISNULL(asset.mcae), '-', asset.mcae.Check_Result_Formula__c)}"/></td>
|
<!-- 最近一期合同编码 -->
|
<apex:outputPanel rendered="{!(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c) }" layout="none">
|
<td class="detail"><c:PDFWbr targetStr="{!IF(ISNULL(asset.mcae), '-', asset.mcae.Asset__r.CurrentContract_F__r.Maintenance_Contract_No_F__c)}"/></td>
|
</apex:outputPanel>
|
|
<!-- 最近一期合同金额 -->
|
<apex:outputPanel rendered="{!(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c) }" layout="none">
|
<td class="detail">
|
<apex:outputText value="{0,number,#,##0}" rendered="{!IF(asset.assetSerialNumber == '新购入','false','true')}">
|
<apex:param value="{!IF(ISNULL(asset.mcae), '', asset.mcae.Asset__r.CurrentContract_F_asset__r.Estimate_Cost_formula__c)}" />
|
</apex:outputText>
|
<!--<c:PDFWbr targetStr="{!IF(ISNULL(asset.mcae), '-', asset.mcae.Asset__r.CurrentContract_F_asset__r.Estimate_Cost_formula__c)}" rendered="{!IF(asset.assetSerialNumber == '新购入','false','true')}"/>--></td>
|
</apex:outputPanel>
|
|
<!-- 消费率 -->
|
<apex:outputPanel rendered="{!(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c) }" layout="none">
|
<td class="detail">
|
<apex:outputText value="{0,number,#,##0.00%}">
|
<apex:param value="{!IF(ISNULL(asset.mcae), '', asset.mcae.Asset_Consumption_rate__c)}" />
|
</apex:outputText>
|
<!--<c:PDFWbr targetStr="{!IF(ISNULL(asset.mcae), '', asset.mcae.Asset_Consumption_rate__c)}"/>-->
|
</td>
|
</apex:outputPanel>
|
<!-- 调整比例 -->
|
<apex:outputPanel rendered="{!(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c) }" layout="none">
|
|
<td class="detail">
|
<!-- <apex:outputText value="{0,number,#,##0.00%}">
|
<apex:param value="{!IF(ISNULL(asset.mcae), '', asset.mcae.Maintenance_Contract_Estimate__r.Discount_Percentage__c)}" />
|
</apex:outputText> -->
|
<apex:outputText value="{0,number,#,##0.00%}" rendered="{!IF(asset.assetSerialNumber == '新购入','false','true')}">
|
<apex:param value="{!IF(targetObj.estimate.Estimate_Target__c == '医院',asset.mcae.Adjustment_ratio_Upper__c , asset.mcae.Adjustment_ratio_Lower__c)}" />
|
</apex:outputText>
|
</td>
|
</apex:outputPanel>
|
<!-- 基准价格 实绩连动规则计算出的标准金额。经销商/医院所有表不同,标准价格也不同。-->
|
<!-- 折扣前显示 或者折扣后 修理大于0 -->
|
<apex:outputPanel rendered="{!((targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_RepairPrice__c) || targetObj.estimate.Asset_Repair_Sum_Price__c > 0)}" layout="none">
|
<td class="detail">
|
<apex:outputText value="{0,number,#,##0}" rendered="{!targetObj.estimate.Estimate_Target__c == '经销商'}">
|
<apex:param value="{!IF(ISNULL(asset.mcae), '', asset.mcae.Adjustment_Lower_price__c)}" />
|
</apex:outputText>
|
<apex:outputText value="{0,number,#,##0}" rendered="{!targetObj.estimate.Estimate_Target__c == '医院'}">
|
<apex:param value="{!IF(ISNULL(asset.mcae), '', asset.mcae.Adjustment_Upper_price__c)}" />
|
</apex:outputText>
|
</td>
|
</apex:outputPanel>
|
<!-- 参保价格 -->
|
<apex:outputPanel rendered="{!!((targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_RepairPrice__c) || targetObj.estimate.Asset_Repair_Sum_Price__c > 0)}" layout="none">
|
<td class="detail">
|
<apex:outputText value="{0,number,#,##0}">
|
<apex:param value="{!IF(ISNULL(asset.mcae), '', asset.mcae.Benchmark_price__c)}" />
|
</apex:outputText>
|
</td>
|
</apex:outputPanel>
|
<!-- 修理价格 -->
|
<apex:outputPanel rendered="{!(targetObj.estimate.Asset_Repair_Sum_Price__c > 0)}" layout="none">
|
<td class="detail">
|
<apex:outputText value="{0,number,#,##0}">
|
<apex:param value="{!IF(ISNULL(asset.mcae), '', asset.mcae.Repair_Price__c)}" />
|
</apex:outputText>
|
</td>
|
</apex:outputPanel>
|
<!-- 备注 -->
|
<td class="detail" style="text-align: center;"><c:PDFWbr targetStr="{!asset.mcae.Comment__c}"/></td>
|
<!-- add 点检改善:约定点检设备对象 2021.6.10 fxk start-->
|
<!-- <td class="detail" style="text-align: center;"><c:PDFWbr targetStr="{!If((asset.mcae.Check_Object__c = true),'√','×')}"/></td> -->
|
<!-- add 点检改善:约定点检设备对象 2021.6.10 fxk end-->
|
</tr>
|
<apex:variable value="{!lineNo + 1}" var="lineNo" />
|
</apex:repeat>
|
|
<!-- 最後ページに合計金額だけが存在する場合のみ、描画しない -->
|
<apex:outputPanel rendered="{!NOT(pageCnt == targetObjSize && lineNo < pageCnt)}" layout="none">
|
|
<tr><td colspan="{!IF(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c, if(targetObj.estimate.Asset_Repair_Sum_Price__c > 0,'13','13'), if(targetObj.estimate.Asset_Repair_Sum_Price__c > 0,'9','8'))}" class="border-thick-bottom"></td></tr>
|
|
</apex:outputPanel>
|
|
|
<apex:outputPanel rendered="{!((targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_RepairPrice__c) || targetObj.estimate.Asset_Repair_Sum_Price__c > 0) && pageCnt == targetObjSize}" layout="none">
|
<tr>
|
<td colspan="{!IF(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c, if( targetObj.estimate.Asset_Repair_Sum_Price__c > 0,'11','11'), if(targetObj.estimate.Asset_Repair_Sum_Price__c > 0,'7','7'))}" style="text-align: right;">报价总额</td>
|
<td colspan="2" style="text-align: right;">
|
<apex:outputText value="{0,number,#,##0 }" rendered="{!(((targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_RepairPrice__c) || targetObj.estimate.Asset_Repair_Sum_Price__c > 0) &&targetObj.estimate.Estimate_Target__c == '医院')}">
|
<apex:param value="{!targetObj.estimate.GuidePrice_Up__c}" />
|
</apex:outputText>
|
<apex:outputText value="{0,number,#,##0 }" rendered="{!(((targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_RepairPrice__c) || targetObj.estimate.Asset_Repair_Sum_Price__c > 0) && targetObj.estimate.Estimate_Target__c == '经销商')}">
|
<apex:param value="{!targetObj.estimate.GuidePrice_Down__c}" />
|
</apex:outputText>
|
<apex:outputText value="{0,number,#,##0 }" rendered="{!!((targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_RepairPrice__c) || targetObj.estimate.Asset_Repair_Sum_Price__c > 0)}">
|
<apex:param value="{!benchmark_priceSum}" />
|
</apex:outputText>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!((targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_RepairPrice__c) || targetObj.estimate.Asset_Repair_Sum_Price__c > 0) &&pageCnt == targetObjSize }" layout="none">
|
<tr>
|
<td colspan="{!IF(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c, if( targetObj.estimate.Asset_Repair_Sum_Price__c > 0,'11','11'), if(targetObj.estimate.Asset_Repair_Sum_Price__c > 0,'7','7'))}" style="text-align: right;">优惠百分比</td>
|
<td colspan="2" style="text-align: right;">
|
<apex:outputField value="{!targetObj.estimate.Service_DiscountPercentage__c}"/>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!((targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_RepairPrice__c) && pageCnt == targetObjSize) }" layout="none">
|
<tr>
|
<td colspan="{!IF(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c, if( targetObj.estimate.Asset_Repair_Sum_Price__c > 0,'11','11'), if(targetObj.estimate.Asset_Repair_Sum_Price__c > 0,'7','7'))}" style="text-align: right;">优惠金额</td>
|
<td colspan="2" style="text-align: right;">
|
<apex:outputText value="{0,number,#,##0 }">
|
<apex:param value="{!targetObj.estimate.Service_Discount_Price__c}" />
|
</apex:outputText>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(targetObj.estimate.Asset_Repair_Sum_Price__c > 0) && pageCnt == targetObjSize }" layout="none">
|
<tr>
|
<td colspan="{!IF(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c, if( targetObj.estimate.Asset_Repair_Sum_Price__c > 0,'11','11'), if(targetObj.estimate.Asset_Repair_Sum_Price__c > 0,'7','7'))}" style="text-align: right;">维修金额总额</td>
|
<td colspan="2" style="text-align: right;">
|
<apex:outputText value="{0,number,#,##0 }">
|
<apex:param value="{!targetObj.estimate.Asset_Repair_Sum_Price__c}" />
|
</apex:outputText>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(pageCnt == targetObjSize)}" layout="none">
|
<tr>
|
<td colspan="{!IF(targetObj.estimate.Print_ListPrice__c || targetObj.estimate.Print_Simplify__c, if( targetObj.estimate.Asset_Repair_Sum_Price__c > 0,'11','11'), if(targetObj.estimate.Asset_Repair_Sum_Price__c > 0,'7','7'))}" style="text-align: right;">合同总价格</td>
|
<td colspan="2" style="text-align: right;">
|
<apex:outputText value="{0,number,#,##0 }">
|
<apex:param value="{!targetObj.estimate.Maintenance_Price__c}"/>
|
</apex:outputText>
|
</td>
|
</tr>
|
</apex:outputPanel>
|
</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>
|
</body>
|
</html>
|
</apex:page>
|