buli
2023-06-05 e9b970ea36eea5dcf93fd5b965bf13d7010ce0ad
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
<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>