高章伟
2022-03-18 4bfe21c4b5ddc089ae5a95f4b10f6cff148b690d
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
<apex:page controller="ConsumApplySplitController" action="{!init}" showHeader="false">
    <head>
      <title>备品借出申请分单</title>
      <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
      <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
      <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    </head>
    <apex:form id="allForm">
        <script type="text/javascript">
            function back() {
                window.opener.parent.location.href = "/{!ra.Id}";
                top.window.close();
            }
 
            function checkSaveStatus() {
                var saveStatus = document.getElementById('{!$Component.allForm.saveStatus}').value;
                if (saveStatus == 'ok') {
                    window.open("/{!cloneRas.Id}");
                    top.window.close();
                }
            }
 
        </script>
        <apex:pageMessages />
        <apex:inputHidden value="{!saveStatus}" id="saveStatus"/>
        <apex:pageBlock id="searchBlock" tabStyle="Report">
            <apex:pageBlockSection title="耗材申请分单" collapsible="false">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Name.label}" for="Name"/>
                    <apex:outputField value="{!ra.Name}" id="Name"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="{!$ObjectType.Rental_Apply__c.fields.Split_Apply_Reason__c.label}" for="Split_Apply_Reason"/>
                    <apex:inputField value="{!cloneRas.Split_Apply_Reason__c}" id="Split_Apply_Reason" required="true"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
            
            <apex:dataTable value="{!raesList}" var="raes" id="raesLists" border="1" cellpadding="5">
              <apex:column >
                <apex:facet name="header">耗材一览No.</apex:facet>
                <apex:outputText value="{!raes.Name}" />
              </apex:column>
              <apex:column >
                <apex:facet name="header">型号</apex:facet>
                <apex:outputText value="{!raes.Model_No__c}" />
              </apex:column>
              <apex:column >
                <apex:facet name="header">耗材一览状态</apex:facet>
                <apex:outputText value="{!raes.RAES_Status__c}" />
              </apex:column>
            </apex:dataTable>
            <div style="height: 15px"></div>
            <apex:commandButton value="确认分单" action="{!saveSplit}" oncomplete="checkSaveStatus();unblockUI();" onclick="blockme();" rerender="allForm" />
            <apex:commandButton value="返回" onclick="back(); return false;" rerender="allForm" oncomplete="unblockUI();" />
          </apex:pageBlock>
        </apex:form>
</apex:page>