<apex:page lightningStylesheets="true" controller="ConsumTrialConfirmController" showHeader="false" action="{!init}" id="allPage">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilColorCss)}"/><!-- 20230907 ljh lightning  -->
    <script type="text/javascript">
        function allConsumedConfirm(){
            blockme();
            var yes = confirm("是否确定全部消耗？");
            if (yes){
                allConsumed();
            }
            else {
                unblockUI();
            }
        }
        function startLoading() {
            document.getElementById("el_loading").style = 'display:block';
        }

        function endLoading() {
            document.getElementById("el_loading").style = 'display:none';
        }
    </script>
    <style>
        textarea{width: 100%;}

        .waitingSearchDiv {
            background-color: rgba(255, 255, 255, 0.65);
            height: 100%;
            width:100%;
        }
    </style>
    <apex:form id="allForm">
        <apex:pageMessages id="message"/>
        <apex:actionFunction action="{!allConsumed}" oncomplete="unblockUI();" name="allConsumed" reRender="message"/>
        <apex:pageBlock id="allBlock">
            <div class="waitingSearchDiv" id="el_loading" style="width: 100%; overflow:auto; display: none;" onclick="endLoading();">
                <div style="zoom: 200%;" >
                    <apex:outputField id="HP_received_sign_rich"  value="{!ca.HP_received_sign_rich__c}"/>
                </div>
            </div>
            <table width="700px;">
                <tr>
                    <td colspan="4">
                        <apex:pageBlockSection columns="1">
                            <apex:inputField rendered="{!applyerCanEdit}" value="{!ca.HP_received_sign_rich__c}"/>
                            <apex:outputField id="HP_received_sign_rich" rendered="{!NOT(applyerCanEdit)}" value="{!ca.HP_received_sign_rich__c}">
                                <!-- <button style="float: right;" onclick="startLoading();return false;">预览</button> -->
                                    <apex:commandButton style="float: left;" onclick="startLoading();return false;" value="预览" reRender="message"/>
                            </apex:outputField>
                        </apex:pageBlockSection>
                    </td>
                </tr>
                <tr>
                    <!-- width="264px;"  -->
                    <td width="260px;" colspan="1" align="right"> <label class="labelCol">确认耗材使用情况</label></td>
                    <!-- <td width="120px;" colspan="1"/> -->
                    <td colspan="1">
                        <apex:commandButton disabled="{!NOT(applyerCanEdit)}" value="全部消耗"
                        onclick="allConsumedConfirm(); return false;"
                        oncomplete="unblockUI();"
                        reRender="message"/>
                    </td>
                    <td colspan="1">
                        <apex:commandButton disabled="{!NOT(applyerCanEdit)}" value="部分寄回"
                        onclick="blockme();"
                        action="{!partSendback}"
                        oncomplete="unblockUI();"
                        reRender="message"/>
                    </td>
                    <td width="120px;" colspan="1"/>
                </tr>
                <tr>
                    <td colspan="4">
                        <apex:pageBlockSection columns="1" rendered="{!centerCanEdit}">
                            <apex:inputField value="{!ca.HP_received_sign_NG__c}"/>
                            <apex:inputField value="{!ca.HP_received_sign_NG_Reason__c}"/>
                            <apex:inputField value="{!ca.AssetManageConfirm__c}"/>
                        </apex:pageBlockSection>
                        <apex:pageBlockSection columns="1" rendered="{!NOT(centerCanEdit)}">
                            <apex:outputField value="{!ca.HP_received_sign_NG__c}"/>
                            <apex:outputField value="{!ca.HP_received_sign_NG_Reason__c}"/>
                            <apex:outputField value="{!ca.AssetManageConfirm__c}"/>
                        </apex:pageBlockSection>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" align="center">
                        <apex:commandButton disabled="{!NOT(centerCanEdit)}" value="保存"
                        onclick="blockme();"
                        action="{!save}"
                        oncomplete="unblockUI();"
                        reRender="message"/>
                    </td>
                </tr>
            </table>
        </apex:pageBlock>
    </apex:form>
</apex:page>