<apex:component controller="RentalEquipmentCreateController" id="RentalEquipmentCreate" layout="block" allowDML="true"> 
 | 
    <apex:attribute name="targetcampaignId" assignTo="{!campaignId}" description="" type="String" required="false" /> 
 | 
    <apex:attribute name="targetOPDId" assignTo="{!opdId}" description="" type="String" required="false" /> 
 | 
    <apex:form > 
 | 
        <script> 
 | 
            function comp(){ 
 | 
                if ('{!campaignId}') { 
 | 
                    window.top.location = '/{!campaignId}'; 
 | 
                } 
 | 
                if ('{!opdId}') { 
 | 
                    window.top.location = '/{!opdId}'; 
 | 
                } 
 | 
                 
 | 
            } 
 | 
        </script> 
 | 
        <apex:outputPanel layout="block" style="overflow:auto; height:185px;" rendered="{!IF(isEdit,true,false)}"> 
 | 
            <div style="margin-left: 33%;"> 
 | 
                <apex:commandButton value="保存" action="{!save}" oncomplete="comp()" /> 
 | 
            </div> 
 | 
            <table style="margin-left: 18%;"> 
 | 
                <tr> 
 | 
                    <td align="right"><b>计划出借的备品</b></td> 
 | 
                    <td width="20px"></td> 
 | 
                    <td><b>出借套数</b></td> 
 | 
                </tr> 
 | 
                <apex:repeat value="{!prods}" var="prod"> 
 | 
                    <tr> 
 | 
                        <td align="right"> {!prod.Name} </td> 
 | 
                        <th width="10px"></th> 
 | 
                        <td>  
 | 
                            <apex:inputText style="width: 60px;" id="rentalQuantity" value="{!planProductMap[prod.Name]}" />  
 | 
                        </td> 
 | 
                    </tr> 
 | 
                </apex:repeat> 
 | 
            </table> 
 | 
            <div style="margin-left: 33%;"> 
 | 
                <apex:commandButton value="保存" action="{!save}" oncomplete="comp()"  /> 
 | 
            </div> 
 | 
             
 | 
        </apex:outputPanel> 
 | 
        <apex:outputPanel layout="block" style="overflow:auto; height:185px;" rendered="{!IF(isEdit,false,true)}"> 
 | 
            <table style="margin-left: 18%;"> 
 | 
                <tr> 
 | 
                    <td align="right"><b>计划出借的备品</b></td> 
 | 
                    <td width="20px"></td> 
 | 
                    <td><b>出借套数</b></td> 
 | 
                </tr> 
 | 
                <apex:repeat value="{!prods}" var="prod"> 
 | 
                    <tr> 
 | 
                        <td align="right"> {!prod.Name} </td> 
 | 
                        <th width="10px"></th> 
 | 
                        <td>  
 | 
                            <apex:outputText style="width: 60px;" id="rentalQuantity" value="{!planProductMap[prod.Name]}" />  
 | 
                        </td> 
 | 
                    </tr> 
 | 
                </apex:repeat> 
 | 
            </table> 
 | 
        </apex:outputPanel> 
 | 
    </apex:form> 
 | 
</apex:component> 
 |