<!-- <apex:page Controller="CampaignMeetingcostController" id="CampaignMeetingcostPage" action="{!init}" title="会议费用情况" showHeader="false"
 sidebar="false"> -->

<!-- SWAG-BBG8AK 添加批准列表 start-->
<apex:page standardcontroller="Campaign" extensions="CampaignMeetingcostController" id="CampaignMeetingcostPage" action="{!init}" title="会议费用情况" showHeader="false" sidebar="false" lightningStylesheets="true" >
<!-- SWAG-BBG8AK 添加批准列表 end-->
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}" />
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}" />
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}" />
    <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}" />
    <apex:stylesheet value="{!URLFOR($Resource.StyleUtilColorCss)}"/>

    <apex:outputPanel id="checkboxInit">
    <style>
body td.actionColumn:before, .slds-vf-scope td.actionColumn:before {
    content: normal;
    position: absolute;
    left: 1rem;
    color: #54698d;
}
    body .pbHeader .pbTitle, .slds-vf-scope .pbHeader .pbTitle {
     width: auto;
}
body .detailList .dataCol input[type="text"], body .detailList .dataCol input[type="date"], body .detailList .dataCol input[type="password"], body .detailList .dataCol textarea, body .detailList .dataCol select, .slds-vf-scope .detailList .dataCol input[type="text"], .slds-vf-scope .detailList .dataCol input[type="date"], .slds-vf-scope .detailList .dataCol input[type="password"], .slds-vf-scope .detailList .dataCol textarea, .slds-vf-scope .detailList .dataCol select {
    min-width: auto;
}
    body .bPageBlock .pbSubheader h3{
        font-size: 13px;
    }
    body .pbTitle .mainTitle{
        font-weight: 700;
        font-size: 16px;
    }
    body .bPageBlock .detailList .dataCol input[type="checkbox"]:first-child{
        margin-top: -0.35rem;
    }

    </style>
    <script>
        function init() {
            checkboxInit();
            totalPriceSum();
        }
        function checkboxInit(){
            if(document.getElementById('isStand') !=null){
                document.getElementById('isStand').checked = {!CampaignCostMain.isStand__c};
            }
            if(document.getElementById('IsSatelliteMeeting')!=null){
                document.getElementById('IsSatelliteMeeting').checked = {!CampaignCostMain.IsSatelliteMeeting__c};
            }
            if(document.getElementById('isTitle')!=null){
                document.getElementById('isTitle').checked = {!CampaignCostMain.isTitle__c};
            }
            if(document.getElementById('IsDocLOGO')!=null){
                document.getElementById('IsDocLOGO').checked = {!CampaignCostMain.IsDocLOGO__c};
            }
            if(document.getElementById('IsShowingEquipment')!=null){
               document.getElementById('IsShowingEquipment').checked = {!CampaignCostMain.IsShowingEquipment__c};
        }
            if(document.getElementById('IsAnimalExperience')!=null){
                document.getElementById('IsAnimalExperience').checked = {!CampaignCostMain.IsAnimalExperience__c};
            }
            if(document.getElementById('isOther')!=null){
                document.getElementById('isOther').checked = {!CampaignCostMain.isOther__c};
            }
            if(document.getElementById('travelByAir')!=null){
                document.getElementById('travelByAir').checked = {!CampaignCostMain.travelByAir__c};
            }
            if(document.getElementById('travelByTrain')!=null){
                document.getElementById('travelByTrain').checked = {!CampaignCostMain.travelByTrain__c};
            }
            if(document.getElementById('travelByCar')!=null){
                document.getElementById('travelByCar').checked = {!CampaignCostMain.travelByCar__c};
            }
            totalPriceSum();
        }
        function totalPriceSum(){
            
            var sum = 0;
            var medicalInsitituteCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:sponsoritems:medicalInsitituteCost:medicalInsitituteCost:medicalInsitituteCost');
            if(medicalInsitituteCost !=null && medicalInsitituteCost!= undefined && medicalInsitituteCost !=''){
                sum += localParseFloat(medicalInsitituteCost.value);
            }
            
            var nonMedicalInstituteCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:sponsoritems:nonMedicalInstituteCost:nonMedicalInstituteCost:nonMedicalInstituteCost');
            if(nonMedicalInstituteCost !=null && nonMedicalInstituteCost!= undefined && nonMedicalInstituteCost !=''){
                sum += localParseFloat(nonMedicalInstituteCost.value);
            }

            var StandFittingComCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:sponsoritems:StandFittingComCost:StandFittingComCost:StandFittingComCost');
            if(StandFittingComCost !=null && StandFittingComCost!= undefined && StandFittingComCost !=''){
                sum += localParseFloat(StandFittingComCost.value);
            }

            var broadcastingCompanyCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:sponsoritems:broadcastingCompanyCost:broadcastingCompanyCost:broadcastingCompanyCost');
            if(broadcastingCompanyCost !=null && broadcastingCompanyCost!= undefined && broadcastingCompanyCost !=''){
                sum += localParseFloat(broadcastingCompanyCost.value);
            }

            var animalExperienceCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:sponsoritems:animalExperienceCost:animalExperienceCost:animalExperienceCost');
            if(animalExperienceCost !=null && animalExperienceCost!= undefined && animalExperienceCost !=''){
                sum += localParseFloat(animalExperienceCost.value);
            }

            var OtherSponsorCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:sponsoritems:OtherSponsorCost:OtherSponsorCost:OtherSponsorCost');
            if(OtherSponsorCost !=null && OtherSponsorCost!= undefined && OtherSponsorCost !=''){
                sum += localParseFloat(OtherSponsorCost.value);
            }
             var paymentFromCompany = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:hostCampaignLineItems:paymentFromCompany:paymentFromCompany:paymentFromCompany');
            if(paymentFromCompany !=null && paymentFromCompany!= undefined && paymentFromCompany !=''){
                sum += localParseFloat(paymentFromCompany.value);
            }

            var paymentFromCooperator = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:hostCampaignLineItems:paymentFromCooperator:paymentFromCooperator:paymentFromCooperator');
            if(paymentFromCooperator !=null && paymentFromCooperator!= undefined && paymentFromCooperator !=''){
                sum += localParseFloat(paymentFromCooperator.value);
            }

            var tansportCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:hostCampaignLineItems:tansportCost:tansportCost:tansportCost');
            if(tansportCost !=null && tansportCost!= undefined && tansportCost !=''){
                sum += localParseFloat(tansportCost.value);
            }

            var livingCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:hostCampaignLineItems:livingCost:livingCost:livingCost');
            if(livingCost !=null && livingCost!= undefined && livingCost !=''){
                sum += localParseFloat(livingCost.value);
            }

            var banquetCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:hostCampaignLineItems:banquetCost:banquetCost:banquetCost');
            if(banquetCost !=null && banquetCost!= undefined && banquetCost !=''){
                sum += localParseFloat(banquetCost.value);
            }

            var lunchCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:hostCampaignLineItems:lunchCost:lunchCost:lunchCost');

            if(lunchCost !=null && lunchCost!= undefined && lunchCost !=''){
                sum += localParseFloat(lunchCost.value);
            }

            var teaBreakCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:hostCampaignLineItems:teaBreakCost:teaBreakCost:teaBreakCost');
            if(teaBreakCost !=null && teaBreakCost!= undefined && teaBreakCost !=''){
                sum += localParseFloat(teaBreakCost.value);
            }

            var broadcastingCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:hostCampaignLineItems:broadcastingCost:broadcastingCost:broadcastingCost');
            if(broadcastingCost !=null && broadcastingCost!= undefined && broadcastingCost !=''){
                sum += localParseFloat(broadcastingCost.value);
            }

            var publicityCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:hostCampaignLineItems:publicityCost:publicityCost:publicityCost');
            if(publicityCost !=null && publicityCost!= undefined && publicityCost !=''){
                sum += localParseFloat(publicityCost.value);
            }

            var sundriesCost = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:hostCampaignLineItems:sundriesCost:sundriesCost:sundriesCost');
            if(sundriesCost !=null && sundriesCost!= undefined && sundriesCost !=''){
                sum += localParseFloat(sundriesCost.value);
            }
             var hostCompanyCostAndTax = document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:hostCampaignLineItems:hostCompanyCostAndTax:hostCompanyCostAndTax:hostCompanyCostAndTax');
            if(hostCompanyCostAndTax !=null && hostCompanyCostAndTax!= undefined && hostCompanyCostAndTax !=''){
                sum += localParseFloat(hostCompanyCostAndTax.value);
            }
            document.getElementById('CampaignMeetingcostPage:allForm:allBlock:Editable:totalAmount:totalAmount:totalMeetingCost:totalMeetingCost').innerText = toNumComma(sum);

            //
        }
    </script>
    </apex:outputPanel>
    <style>
    </style>
    <body onload="init()" class="campaignTab">
       <apex:form id="allForm">
        
            <apex:outputPanel id="attribute" >
                <apex:inputHidden value="{!CampaignCostMain.isStand__c}" id="isStand__c"/>
                <apex:inputHidden value="{!CampaignCostMain.IsSatelliteMeeting__c}" id="IsSatelliteMeeting__c"/>
                <apex:inputHidden value="{!CampaignCostMain.isTitle__c}" id="isTitle__c"/>
                <apex:inputHidden value="{!CampaignCostMain.IsDocLOGO__c}" id="IsDocLOGO__c"/>
                <apex:inputHidden value="{!CampaignCostMain.IsShowingEquipment__c}" id="IsShowingEquipment__c"/>
                <apex:inputHidden value="{!CampaignCostMain.IsAnimalExperience__c}" id="IsAnimalExperience__c"/>
                <apex:inputHidden value="{!CampaignCostMain.isOther__c}" id="isOther__c"/>
                <apex:inputHidden value="{!CampaignCostMain.travelByAir__c}" id="travelByAir__c"/>
                <apex:inputHidden value="{!CampaignCostMain.travelByTrain__c}" id="travelByTrain__c"/>
                <apex:inputHidden value="{!CampaignCostMain.travelByCar__c}" id="travelByCar__c"/>
                <apex:actionFunction name="refreshPage" action="{!dummy}" 
                reRender="considerationLineItem,hostCampaign,attribute" />
            </apex:outputPanel>
            <apex:outputPanel rendered="{!errorflg}">
                <table width="100%">
                    <tr>
                        <td align="left">
                            <div style="font-size:22px" class="errorMsg">{!errorMessage}</div>
                        </td>
                    </tr>
                </table>
            </apex:outputPanel>
            <apex:pageBlock id="allBlock" rendered="{!canseePage}">
                <!-- 显示用 -->
                <apex:outputPanel id="message">
                    <apex:pageMessages />
                </apex:outputPanel>

                <apex:pageBlock title="会议费用情况（大会所有费用，不分成本中心）" id="unEditable" rendered="{!!(status)}">
                    <apex:pageblocksection id="totalAmount_out" columns="1" title="会议费用总计">
                        <apex:pageBlockSectionItem id="totalAmount">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.totalMeetingCost__c.label}" for="totalMeetingCostlabel" />
                            <apex:variable var="v" value="" id="totalMeetingCost">
                                <apex:outputtext id="totalMeetingCost" value="{!CampaignCostMain.totalMeetingCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>
                    </apex:pageblocksection>
                    <apex:pageblocksection id="sponsoritems_out" columns="2" title="赞助会费用明细" rendered="{!showSponsor}" >

                        <apex:outputtext id="medicalInsititute" value="{!CampaignCostMain.medicalInsititute__c}" />
                        <apex:pageBlockSectionItem id="medicalInsitituteCost">
                            <apex:outputLabel value="{!$ObjectType.Campaign.fields.medicalInsitituteCost__c.label}" for="medicalInsitituteCost" />
                            <apex:variable var="v" value="" id="medicalInsitituteCost">
                                <apex:outputtext id="medicalInsitituteCost" value="{!CampaignCostMain.medicalInsitituteCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>

                        <apex:outputtext id="nonMedicalInstitute" value="{!CampaignCostMain.nonMedicalInstitute__c}" />
                        <apex:pageBlockSectionItem id="nonMedicalInstituteCost">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.nonMedicalInstituteCost__c.label}" for="medicalInsitituteCost" />
                            <apex:variable var="v" value="" id="nonMedicalInstituteCost">
                                <apex:outputtext id="nonMedicalInstituteCost" value="{!CampaignCostMain.nonMedicalInstituteCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>

                        <apex:outputtext id="standFittingCompany__c" value="{!CampaignCostMain.standFittingCompany__c}" />
                        <apex:pageBlockSectionItem id="StandFittingComCost" >
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.StandFittingComCost__c.label}" for="StandFittingComCost" />
                            <apex:variable var="v" value="" id="StandFittingComCost">
                                <apex:outputtext id="StandFittingComCost" value="{!CampaignCostMain.StandFittingComCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>

                        <apex:outputtext id="broadcastingCompany" value="{!CampaignCostMain.broadcastingCompany__c}" />
                        <apex:pageBlockSectionItem id="broadcastingCompanyCost" >
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.broadcastingCompanyCost__c.label}" for="broadcastingCompanyCost" />
                            <apex:variable var="v" value="" id="broadcastingCompanyCost">
                                <apex:outputtext id="broadcastingCompanyCost" value="{!CampaignCostMain.broadcastingCompanyCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>




                        <apex:pageBlockSectionItem id="animalExperienceCost">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.animalExperienceCost__c.label}" for="animalExperienceCost" />
                            <apex:variable var="v" value="" id="animalExperienceCost">
                                <apex:outputtext id="animalExperienceCost" value="{!CampaignCostMain.animalExperienceCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem id="OtherSponsorCost">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.OtherSponsorCost__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="OtherSponsorCost">
                                <apex:outputtext id="OtherSponsorCost" value="{!CampaignCostMain.OtherSponsorCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>
                    </apex:pageblocksection>
                    
                    <apex:pageblocksection columns="1" id="consideration_out" title="对价内容：（勾选）" rendered="{!showSponsor}">
                        <apex:pageBlockSectionItem >
                            <input type="checkbox" disabled = 'true' name="chk_group1" id = "isStand"
                             />
                            {!$ObjectType.Campaign_Cost__c.fields.isStand__c.label}
                            <input type="checkbox" disabled = 'true' name="chk_group2" id = "IsSatelliteMeeting"
                             />
                            {!$ObjectType.Campaign_Cost__c.fields.IsSatelliteMeeting__c.label}
                            <input type="checkbox" disabled = 'true' name="chk_group3"  id = "isTitle"
                            />
                            {!$ObjectType.Campaign_Cost__c.fields.isTitle__c.label}

                            <input type="checkbox" disabled = 'true' name="chk_group4"  id = "IsDocLOGO"
                             />
                            {!$ObjectType.Campaign_Cost__c.fields.IsDocLOGO__c.label}
                            <input type="checkbox" disabled = 'true' name="chk_group5" id = "IsShowingEquipment"
                             />
                            {!$ObjectType.Campaign_Cost__c.fields.IsShowingEquipment__c.label}
                            <input type="checkbox" disabled = 'true' name="chk_group6" id = "IsAnimalExperience"
                             />
                            {!$ObjectType.Campaign_Cost__c.fields.IsAnimalExperience__c.label}
                            <input type="checkbox" disabled = 'true' name="chk_group7" id = "isOther"
                             />
                            {!$ObjectType.Campaign_Cost__c.fields.isOther__c.label}
                            <br />
                        </apex:pageBlockSectionItem>
                    </apex:pageblocksection>

                    <apex:pageblocksection columns="2" id="considerationLineItem_out" title="对价明细:" rendered="{!showSponsor}">
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.isStand__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.standArea__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="standArea">
                                <apex:outputtext value="{!CampaignCostMain.standArea__c}" />&nbsp;m²</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.IsAnimalExperience__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.AnimalExperienceNumber__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="AnimalExperienceNumber">
                                <apex:outputtext value="{!CampaignCostMain.AnimalExperienceNumber__c }" />&nbsp;台</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.IsSatelliteMeeting__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.satelliteMeetingHours__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="satelliteMeetingHours">
                                <apex:outputtext value="{!CampaignCostMain.satelliteMeetingHours__c}" />&nbsp;分钟</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.IsShowingEquipment__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.showingEquipmentNumber__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="showingEquipmentNumber">
                                <apex:outputtext value="{!CampaignCostMain.showingEquipmentNumber__c}" />&nbsp;台</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.isTitle__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.titleArea__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="titleArea">
                                <apex:outputtext value="{!CampaignCostMain.titleArea__c}" />&nbsp;</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.isOther__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.otherWords__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="otherWords">
                                <apex:outputtext value="{!CampaignCostMain.otherWords__c}" />&nbsp;</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.IsDocLOGO__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.DocLOGOcontent__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="DocLOGOcontent">
                                <apex:outputtext value="{!CampaignCostMain.DocLOGOcontent__c}" />&nbsp;</apex:variable>
                        </apex:pageBlockSectionItem>
                    </apex:pageblocksection>

                    <apex:outputPanel id="hostCampaign_out">
                        <apex:pageblocksection id="hostCampaignLineItems" columns="2" title="自办/共办会费用明细" rendered="{!showHost}">
                            <apex:pageBlockSectionItem id="paymentFromCompany">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.paymentFromCompany__c.label}" for="paymentFromCompany" />
                                <apex:variable var="v" value="" id="paymentFromCompany">
                                    <apex:outputtext id="paymentFromCompany" value="{!CampaignCostMain.paymentFromCompany__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="paymentFromCooperator">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.paymentFromCooperator__c.label}" for="paymentFromCooperator" />
                                <apex:variable var="v" value="" id="paymentFromCooperator">
                                    <apex:outputtext id="paymentFromCooperator" value="{!CampaignCostMain.paymentFromCooperator__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem >
                                <apex:outputLabel value="交通内容" />
                                <input type="checkbox" id="travelByAir" name="chk_group_travel1" 
                                disabled="true"/> 飞机
                                <input type="checkbox" id="travelByTrain" name="chk_group_travel2" 
                                disabled="true" /> 火车
                                <input type="checkbox" id = "travelByCar" name="chk_group_travel3" 
                                disabled="true" /> 汽车
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="tansportCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.tansportCost__c.label}" for="tansportCost" />
                                <apex:variable var="v" value="" id="tansportCost">
                                    <apex:outputtext id="tansportCost" value="{!CampaignCostMain.tansportCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="livingCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.livingCost__c.label}" for="livingCost" />
                                <apex:variable var="v" value="" id="livingCost">
                                    <apex:outputtext id="livingCost" value="{!CampaignCostMain.livingCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="banquetCost" >
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.banquetCost__c.label}" for="banquetCost" />
                                <apex:variable var="v" value="" id="banquetCost">
                                    <apex:outputtext id="banquetCost" value="{!CampaignCostMain.banquetCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="lunchCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.lunchCost__c.label}" for="tansportCost" />
                                <apex:variable var="v" value="" id="lunchCost">
                                    <apex:outputtext id="lunchCost" value="{!CampaignCostMain.lunchCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="teaBreakCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.teaBreakCost__c.label}" for="teaBreakCost" />
                                <apex:variable var="v" value="" id="teaBreakCost">
                                    <apex:outputtext id="teaBreakCost" value="{!CampaignCostMain.teaBreakCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="broadcastingCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.broadcastingCost__c.label}" for="broadcastingCost" />
                                <apex:variable var="v" value="" id="broadcastingCost">
                                    <apex:outputtext id="broadcastingCost" value="{!CampaignCostMain.broadcastingCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="publicityCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.publicityCost__c.label}" for="publicityCost" />
                                <apex:variable var="v" value="" id="publicityCost">
                                    <apex:outputtext id="publicityCost" value="{!CampaignCostMain.publicityCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                             <apex:outputtext id="sundryContent" value="{!CampaignCostMain.sundryContent__c}" />
                            <apex:pageBlockSectionItem id="sundriesCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.sundriesCost__c.label}" for="sundriesCost" />
                                <apex:variable var="v" value="" id="sundriesCost">
                                    <apex:outputtext id="sundriesCost" value="{!CampaignCostMain.sundriesCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>

                            <apex:outputtext id="hostCompany" value="{!CampaignCostMain.hostCompany__c}" />
                            <apex:pageBlockSectionItem id="hostCompanyCostAndTax">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.hostCompanyCostAndTax__c.label}" for="hostCompanyCostAndTax" />
                                <apex:variable var="v" value="" id="hostCompanyCostAndTax">
                                    <apex:outputtext id="hostCompanyCostAndTax" value="{!CampaignCostMain.hostCompanyCostAndTax__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                        </apex:pageblocksection>
                    </apex:outputPanel>
                </apex:pageBlock>

                <!-- 编辑用 -->
                <apex:pageBlock title="会议费用情况（大会所有费用，不分成本中心）" id="Editable" rendered="{!status}">
                    <apex:pageBlockButtons location="top">
                        <apex:commandButton value="保 存" action="{!save}" onclick="blockme();" rerender="Editable,message,checkboxInit" oncomplete="unblockUI(); checkboxInit();"
                         style="width: 70px;" />
                         <apex:commandButton value="提交审批" action="{!submit}" onclick="blockme();" rerender="allBlock,unEditable,message,checkboxInit,ApprovalHistory" oncomplete="unblockUI(); checkboxInit();"
                        />
                        <apex:commandButton value="取 消" onclick="window.close();"  />
                    </apex:pageBlockButtons>
                    <apex:pageblocksection id="totalAmount" columns="1" title="会议费用总计">
                        <apex:pageBlockSectionItem id="totalAmount">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.totalMeetingCost__c.label}" for="totalMeetingCostlabel" />
                            <apex:variable var="v" value="" id="totalMeetingCost">
                                <apex:outputtext id="totalMeetingCost" value="{!CampaignCostMain.totalMeetingCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>
                    </apex:pageblocksection>
                    <apex:pageblocksection id="sponsoritems" columns="2" title="赞助会费用明细" rendered="{!showSponsor}" >

                        <apex:inputField id="medicalInsititute" value="{!CampaignCostMain.medicalInsititute__c}" />
                        <apex:pageBlockSectionItem id="medicalInsitituteCost">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.medicalInsitituteCost__c.label}" for="medicalInsitituteCost" />
                            <apex:variable var="v" value="" id="medicalInsitituteCost">
                                <apex:inputField onchange="totalPriceSum();" id="medicalInsitituteCost" value="{!CampaignCostMain.medicalInsitituteCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>

                        <apex:inputField id="nonMedicalInstitute" value="{!CampaignCostMain.nonMedicalInstitute__c}" />
                        <apex:pageBlockSectionItem id="nonMedicalInstituteCost">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.nonMedicalInstituteCost__c.label}" for="medicalInsitituteCost" />
                            <apex:variable var="v" value="" id="nonMedicalInstituteCost">
                                <apex:inputField onchange="totalPriceSum()" id="nonMedicalInstituteCost" value="{!CampaignCostMain.nonMedicalInstituteCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>

                        <apex:inputField id="standFittingCompany__c" value="{!CampaignCostMain.standFittingCompany__c}" />
                        <apex:pageBlockSectionItem id="StandFittingComCost" >
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.StandFittingComCost__c.label}" for="StandFittingComCost" />
                            <apex:variable var="v" value="" id="StandFittingComCost">
                                <apex:inputField onchange="totalPriceSum()" id="StandFittingComCost" value="{!CampaignCostMain.StandFittingComCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>

                        <apex:inputField id="broadcastingCompany" value="{!CampaignCostMain.broadcastingCompany__c}" />
                        <apex:pageBlockSectionItem id="broadcastingCompanyCost" >
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.broadcastingCompanyCost__c.label}" for="broadcastingCompanyCost" />
                            <apex:variable var="v" value="" id="broadcastingCompanyCost">
                                <apex:inputField onchange="totalPriceSum()" id="broadcastingCompanyCost" value="{!CampaignCostMain.broadcastingCompanyCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>




                        <apex:pageBlockSectionItem id="animalExperienceCost">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.animalExperienceCost__c.label}" for="animalExperienceCost" />
                            <apex:variable var="v" value="" id="animalExperienceCost">
                                <apex:inputField onchange="totalPriceSum()" id="animalExperienceCost" value="{!CampaignCostMain.animalExperienceCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem id="OtherSponsorCost">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.OtherSponsorCost__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="OtherSponsorCost">
                                <apex:inputField onchange="totalPriceSum()" id="OtherSponsorCost" value="{!CampaignCostMain.OtherSponsorCost__c}" />元/RMB</apex:variable>
                        </apex:pageBlockSectionItem>
                    </apex:pageblocksection>

                    <apex:pageblocksection columns="1" id="consideration" title="对价内容：（勾选）" rendered="{!showSponsor}">
                        <apex:pageBlockSectionItem >
                            <input type="checkbox" name="chk_group1" id = "isStand"
                            onchange="document.getElementById('{!$Component.isStand__c}').value 
                            = this.checked;refreshPage();"/>
                            {!$ObjectType.Campaign_Cost__c.fields.isStand__c.label}
                            <input type="checkbox" name="chk_group2" id = "IsSatelliteMeeting"
                            onchange="document.getElementById('{!$Component.IsSatelliteMeeting__c}').value 
                            = this.checked;refreshPage();"/>
                            {!$ObjectType.Campaign_Cost__c.fields.IsSatelliteMeeting__c.label}
                            <input type="checkbox" name="chk_group3"  id = "isTitle"
                            onchange="document.getElementById('{!$Component.isTitle__c}').value 
                            = this.checked;refreshPage();"/>
                            {!$ObjectType.Campaign_Cost__c.fields.isTitle__c.label}

                            <input type="checkbox" name="chk_group4"  id = "IsDocLOGO"
                            onchange="document.getElementById('{!$Component.IsDocLOGO__c}').value 
                            = this.checked;refreshPage();"/>
                            {!$ObjectType.Campaign_Cost__c.fields.IsDocLOGO__c.label}
                            <input type="checkbox" name="chk_group5" id = "IsShowingEquipment"
                            onchange="document.getElementById('{!$Component.IsShowingEquipment__c}').value 
                            = this.checked;refreshPage();"/>
                            {!$ObjectType.Campaign_Cost__c.fields.IsShowingEquipment__c.label}
                            <input type="checkbox" name="chk_group6" id = "IsAnimalExperience"
                            onchange="document.getElementById('{!$Component.IsAnimalExperience__c}').value 
                            = this.checked;refreshPage();"/>
                            {!$ObjectType.Campaign_Cost__c.fields.IsAnimalExperience__c.label}
                            <input type="checkbox" name="chk_group7" id = "isOther"
                            onchange="document.getElementById('{!$Component.isOther__c}').value 
                            = this.checked;refreshPage();" />
                            {!$ObjectType.Campaign_Cost__c.fields.isOther__c.label}
                            <br />
                        </apex:pageBlockSectionItem>
                    </apex:pageblocksection>
                    <apex:pageblocksection columns="2" id="considerationLineItem" title="对价明细:" rendered="{!showSponsor}">
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.isStand__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.standArea__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="standArea">
                                <apex:inputField value="{!CampaignCostMain.standArea__c}" />&nbsp;m²</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.IsAnimalExperience__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.AnimalExperienceNumber__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="AnimalExperienceNumber">
                                <apex:inputField value="{!CampaignCostMain.AnimalExperienceNumber__c }" />&nbsp;台</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.IsSatelliteMeeting__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.satelliteMeetingHours__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="satelliteMeetingHours">
                                <apex:inputField value="{!CampaignCostMain.satelliteMeetingHours__c}" />&nbsp;分钟</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.IsShowingEquipment__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.showingEquipmentNumber__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="showingEquipmentNumber">
                                <apex:inputField value="{!CampaignCostMain.showingEquipmentNumber__c}" />&nbsp;台</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.isTitle__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.titleArea__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="titleArea">
                                <apex:inputField value="{!CampaignCostMain.titleArea__c}" />&nbsp;</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.isOther__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.otherWords__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="otherWords">
                                <apex:inputField value="{!CampaignCostMain.otherWords__c}" />&nbsp;</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.IsDocLOGO__c}">
                            <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.DocLOGOcontent__c.label}" for="OtherSponsorCost" />
                            <apex:variable var="v" value="" id="DocLOGOcontent">
                                <apex:inputField value="{!CampaignCostMain.DocLOGOcontent__c}" />&nbsp;</apex:variable>
                        </apex:pageBlockSectionItem>
                        <apex:pageBlockSectionItem rendered="{!CampaignCostMain.IsDocLOGO__c}">
                        </apex:pageBlockSectionItem>
                        <apex:outputtext value="填写具体项目：本/笔/证件卡带logo" style=" color: blue; font-weight: bold; text-align: center; margin-left:20%" rendered="{!CampaignCostMain.IsDocLOGO__c}"/>
                    </apex:pageblocksection>
                    <apex:outputPanel id="hostCampaign">
                        <apex:pageblocksection id="hostCampaignLineItems" columns="2" title="自办/共办会费用明细" rendered="{!showHost}">
                            <apex:pageBlockSectionItem id="paymentFromCompany">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.paymentFromCompany__c.label}" for="paymentFromCompany" />
                                <apex:variable var="v" value="" id="paymentFromCompany">
                                    <apex:inputField onchange="totalPriceSum()" id="paymentFromCompany" value="{!CampaignCostMain.paymentFromCompany__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="paymentFromCooperator">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.paymentFromCooperator__c.label}" for="paymentFromCooperator" />
                                <apex:variable var="v" value="" id="paymentFromCooperator">
                                    <apex:inputField onchange="totalPriceSum()" id="paymentFromCooperator" value="{!CampaignCostMain.paymentFromCooperator__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem >
                                <apex:outputLabel value="交通内容" />
                                <input type="checkbox" id="travelByAir" name="chk_group_travel1" 
                                onchange="document.getElementById('{!$Component.travelByAir__c}').value 
                                = this.checked;"/> 飞机
                                <input type="checkbox" id="travelByTrain" name="chk_group_travel2" 
                                onchange="document.getElementById('{!$Component.travelByTrain__c}').value 
                                = this.checked;"/> 火车
                                <input type="checkbox" id = "travelByCar" name="chk_group_travel3" 
                                onchange="document.getElementById('{!$Component.travelByCar__c}').value 
                                = this.checked;"/> 汽车
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="tansportCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.tansportCost__c.label}" for="tansportCost" />
                                <apex:variable var="v" value="" id="tansportCost">
                                    <apex:inputField onchange="totalPriceSum()" id="tansportCost" value="{!CampaignCostMain.tansportCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="livingCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.livingCost__c.label}" for="livingCost" />
                                <apex:variable var="v" value="" id="livingCost">
                                    <apex:inputField onchange="totalPriceSum()" id="livingCost" value="{!CampaignCostMain.livingCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="banquetCost" >
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.banquetCost__c.label}" for="banquetCost" />
                                <apex:variable var="v" value="" id="banquetCost">
                                    <apex:inputField onchange="totalPriceSum()" id="banquetCost" value="{!CampaignCostMain.banquetCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="lunchCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.lunchCost__c.label}" for="tansportCost" />
                                <apex:variable var="v" value="" id="lunchCost">
                                    <apex:inputField onchange="totalPriceSum()" id="lunchCost" value="{!CampaignCostMain.lunchCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="teaBreakCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.teaBreakCost__c.label}" for="teaBreakCost" />
                                <apex:variable var="v" value="" id="teaBreakCost">
                                    <apex:inputField onchange="totalPriceSum()" id="teaBreakCost" value="{!CampaignCostMain.teaBreakCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="broadcastingCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.broadcastingCost__c.label}" for="broadcastingCost" />
                                <apex:variable var="v" value="" id="broadcastingCost">
                                    <apex:inputField onchange="totalPriceSum()" id="broadcastingCost" value="{!CampaignCostMain.broadcastingCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                            <apex:pageBlockSectionItem id="publicityCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.publicityCost__c.label}" for="publicityCost" />
                                <apex:variable var="v" value="" id="publicityCost">
                                    <apex:inputField onchange="totalPriceSum()" id="publicityCost" value="{!CampaignCostMain.publicityCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                             <apex:inputField id="sundryContent" value="{!CampaignCostMain.sundryContent__c}" />
                            <apex:pageBlockSectionItem id="sundriesCost">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.sundriesCost__c.label}" for="sundriesCost" />
                                <apex:variable var="v" value="" id="sundriesCost">
                                    <apex:inputField onchange="totalPriceSum()" id="sundriesCost" value="{!CampaignCostMain.sundriesCost__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>

                            <apex:inputField id="hostCompany" value="{!CampaignCostMain.hostCompany__c}" />
                            <apex:pageBlockSectionItem id="hostCompanyCostAndTax">
                                <apex:outputLabel value="{!$ObjectType.Campaign_Cost__c.fields.hostCompanyCostAndTax__c.label}" for="hostCompanyCostAndTax" />
                                <apex:variable var="v" value="" id="hostCompanyCostAndTax">
                                    <apex:inputField onchange="totalPriceSum()" id="hostCompanyCostAndTax" value="{!CampaignCostMain.hostCompanyCostAndTax__c}" />元/RMB</apex:variable>
                            </apex:pageBlockSectionItem>
                        </apex:pageblocksection>
                    </apex:outputPanel>
                </apex:pageBlock>
            </apex:pageBlock>

       </apex:form>
       <!-- SWAG-BBG8AK 添加批准列表 start-->
<!--     <apex:outputPanel id="ApprovalHistory" rendered="{!canseePage}">
        <apex:relatedList list="ProcessSteps"/>
    </apex:outputPanel> -->
    <!-- SWAG-BBG8AK 添加批准列表 end-->
    <apex:includeLightning />    
    <div id="LightningComponentid" />    
    <script>

      function getUrlParam(name, url) {
        let qs = arguments[1] || loaction.search.length > 0 ? location.search.substring(1) : '',
            args = {};
        for(let item of qs.split("&").map(val => val.split("="))) {
            return name == item[0] ? item[1] : '';
        };
    };

    var url =window.location.href;
    var PageRecordId=getUrlParam('id',url);
    $Lightning.use("c:lwcApproavalHistory", function() {
        $Lightning.createComponent("c:lwcApprovalHistalty",
          { 
             "recordId" : PageRecordId,
          },
          "LightningComponentid",
          function(cmp) {
             console.log('LWC Componenet added in VF page');
          });
    });
    </script>
    </body>
</apex:page>