高章伟
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
<apex:page controller="ConsumApplyCancelController" 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)}"/>
      <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') {
                  back();
              }
          }
      </script>
    </head>
    <apex:form id="allForm">
        <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.Consum_Apply__c.fields.Name.label}" for="Name"/>
                    <apex:outputField value="{!ra.Name}" id="Name"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="{!$ObjectType.Consum_Apply__c.fields.RA_Status__c.label}" for="RA_Status"/>
                    <apex:outputField value="{!ra.RA_Status__c}" id="RA_Status"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="{!$ObjectType.Consum_Apply__c.fields.Cancel_Reason__c.label}" for="Cancel_Reason"/>
                    <apex:inputField value="{!ra.Cancel_Reason__c}" id="Cancel_Reason"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="{!$ObjectType.Consum_Apply__c.fields.Loaner_cancel_request__c.label}" for="Loaner_cancel_request"/>
                    <apex:inputField value="{!ra.Loaner_cancel_request__c}" id="Loaner_cancel_request"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
            <apex:commandButton value="取消" action="{!saveCancel}" oncomplete="checkSaveStatus();unblockUI();" onclick="blockme();" rerender="allForm" />
            <apex:commandButton value="返回" onclick="back();" rerender="allForm" oncomplete="unblockUI();" />
          </apex:pageBlock>
        </apex:form>
</apex:page>