<apex:page standardController="eSignForm__c" extensions="HpConfirmPageController"  showHeader="false" sidebar="false"   
           id="allPage" title="验收确认(医院)"  action="{!init}" docType="html-5.0" lightningStylesheets="true"> 
           <apex:stylesheet value="{!URLFOR($Resource.StyleUtilColorCss)}"/>
           <apex:outputPanel id="reloadForm">
        <script type="text/javascript">
        function reload(){
            var disableInput = {!disableInput};
            console.log(disableInput);
            if(disableInput = true){
                window.opener.location.href="/"+"{!eSignForm}";
            }
        }
        </script>
    </apex:outputPanel>
    <apex:form id="allForm">
        <apex:pageBlock id="allBlock" title="签收单确认" mode="edit">
            <!-- 2023-11-05 WYL  update -->
            <!-- <apex:outputPanel id="Messages" style="color:red"> -->
            <apex:outputPanel id="Messages">
            <apex:pageMessages />
        </apex:outputPanel>
            <apex:pageBlockButtons >
                <apex:commandButton action="{!directSalesConfirm}" disabled="{!disableInput}"
                                    oncomplete="reload(); "
                                    id="ConfirmButton"  value="确认" reRender="allForm,reloadForm"/>
            </apex:pageBlockButtons>
             <apex:pageBlockSection title="审批状态">
                 <apex:pageBlockSectionItem >
                    <apex:outputLabel value="医院审批状态: " for="HPSignUpStatus"/>
                    
                    <apex:outputField label="医院审批状态: " 
                                      value="{!eSignForm.HPSignUpStatus__c}"  id="HPSignUpStatus"/>
                </apex:pageBlockSectionItem>
                 <apex:pageBlockSectionItem >
                    <apex:outputLabel value="验收结果（医院）: " for="HPAcceptResult"/>
                    
                    <apex:outputField label="验收结果（医院）: " 
                                      value="{!eSignForm.HPAcceptResult__c}"  id="HPAcceptResult"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
            <apex:outputPanel rendered="{!not(disableInput)}">
                <apex:pageBlockSection title="审批录入信息">
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="附件合格(医院) : " for="HPAccessoriesQualified"/>
                        <apex:inputField label="附件合格(医院) : " 
                                         value="{!eSignForm.HPAccessoriesQualified__c}"  id="HPAccessoriesQualified"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="驳回理由(医院) :" for="HPDenyReason"/>
                        <apex:inputField label="驳回理由(医院) ：" 
                                         value="{!eSignForm.HPDenyReason__c}"  id="HPDenyReason"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="营业管理部担当处理意见（医院） :" for="handleHPOpinionHP"/>
                        <apex:inputField label="营业管理部担当处理意见（医院） ：" 
                                         value="{!eSignForm.handleOpinionHP__c}"  id="handleHPOpinionHP"/>
                    </apex:pageBlockSectionItem>
                </apex:pageBlockSection>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!disableInput}">
                <apex:pageBlockSection title="审批录入信息">
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="附件合格(医院) : " for="HPAccessoriesQualifiedout"/>
                        <apex:outputField label="附件合格(医院) : " 
                                         value="{!eSignForm.HPAccessoriesQualified__c}"  id="HPAccessoriesQualifiedout"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="驳回理由(医院) :" for="HPDenyReasonout"/>
                        <apex:outputField label="驳回理由(医院) ：" 
                                         value="{!eSignForm.HPDenyReason__c}"  id="HPDenyReasonout"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="营业管理部担当处理意见（医院） :" for="handleOpinionHPout"/>
                        <apex:outputField label="营业管理部担当处理意见（医院） ：" 
                                         value="{!eSignForm.handleOpinionHP__c}"  id="handleOpinionHPout"/>
                    </apex:pageBlockSectionItem>
                </apex:pageBlockSection>
            </apex:outputPanel>
        </apex:pageBlock>
    </apex:form>

</apex:page>