<apex:page Controller="summonsCreatController" showHeader="true" tabStyle="SaleAndDelivery__tab" sidebar="true" id="allPage" action="{!init}" title="出库单管理">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
<apex:includeScript value="{!URLFOR($Resource.summonsCreatJs)}"/>
<apex:stylesheet value="{!URLFOR($Resource.jquerysuggestcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquerysuggestjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
<script type="text/javascript">
function setFocusOnLoad() {}
function bodyOnLoad(){setFocusOnLoad();}
function searchsearchAgencyH(str){
    //update by rentx 2021-3-1 start
    //先判断当前经销商下是否有维护特价医院 如果没有维护特价医院 那么直接查询所有医院
    var flag = j$(escapeVfId('allPage:allForm:allBlock:Editable:OutPattern01')).value();
    j$(escapeVfId('allPage:allForm:allBlock:Editable:OEC')).attr('readonly',true);
    if ({!hasHos == false}) {
        openPopup('/customer/searchAgencyHospital?Ctype=' + str+'&ishos=', 'setsearch', 800, 600, 'width=800,height=600,scrollbars=yes', true);
    }else{
        var noOfRecords = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:consumableorderdetailsCount')).value();
        var ishosNum = 0;
        for (var i = 0; i < noOfRecords; i++) {
            var tempCheckVar = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:'+i+':variableinfo:consumablesCountproRowCheckbox')).value();
            var tempHosVar = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:'+i+':hosOffer')).value();
            var tempHosProVar = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:'+i+':hosPro')).value();
            console.log('tempHosProVar:'+tempHosProVar);
            if (((tempCheckVar == true || tempCheckVar == 'on') || {!Existarrive}) && (tempHosVar == true || tempHosVar == 'true') && (tempHosProVar == true || tempHosProVar == 'true')) {   
                ishosNum ++;   
            }

        }
        // alert({!Existarrive} + flag);
        console.log('34:'+ishosNum);
        if (ishosNum > 0 || ({!Existarrive} && flag == 'true')) {
        // if (ishosNum > 0) {
            openPopup('/customer/searchAgencyHospital?Ctype=' + str+'&ishos=true', 'setsearch', 800, 600, 'width=800,height=600,scrollbars=yes', true);
        }else{
            openPopup('/customer/searchAgencyHospital?Ctype=' + str+'&ishos=', 'setsearch', 800, 600, 'width=800,height=600,scrollbars=yes', true);
        }
    }
    //update by rentx 2021-01-29 start
    // j$(escapeVfId('allPage:allForm:allBlock:Editable:OEC')).attr('readonly',true);
    // openPopup('/customer/searchAgencyHospital?Ctype=' + str, 'setsearch', 800, 600, 'width=800,height=600,scrollbars=yes', true);
    // var flag = j$(escapeVfId('allPage:allForm:allBlock:Editable:OutPattern01')).value();
    // j$(escapeVfId('allPage:allForm:allBlock:Editable:OEC')).attr('readonly',true);
    // openPopup('/customer/searchAgencyHospital?Ctype=' + str+'&ishos='+flag, 'setsearch', 800, 600, 'width=800,height=600,scrollbars=yes', true);
    //update by rentx 2021-01-29 end
    //update by rentx 2021-3-1 end
}
function clearAgencyI(){
    var agencyname = j$(escapeVfId('allPage:allForm:allBlock:Editable:OEC')).value();
    if (agencyname == '' || agencyname == null) {
        document.getElementById('allPage:allForm:allBlock:Editable:OECId').value = "";
    }

    var accid = j$(escapeVfId('allPage:allForm:allBlock:Editable:OECId')).value();
    if (accid != null && accid != '') {
        checkOutPatternFn();
    }


}
// vivek update start
function saveConfirmJs(str){
    var msg = "出库价格仅可操作一次变更，保存后将无法修改。\n\n请确认！";
    if(str == '价格未定'){
        if(confirm(msg)==true){
            saveJs();
        }
    }else{
        saveJs();
    }
}
// vivek update end

function setVisitorPlace(){
    var x = j$(escapeVfId('allPage:allForm:allBlock:Editable:SummonsForDirction__c')).value();
    if (x == '互相调货') {
        try{
            var str = 'allPage:allForm:allBlock:Editable:Order_ForDealerText';
            var strPage = null;
            var options = {};
            var ros = j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).value();
            strPage = '/customer/apex/ConSearchAgencyPlace?r=' + encodeURI(ros);
            options = {minchars:3, minwords:1, resultsClass:'visitorplace_results'};
            jQuery(escapeVfId(str)).unbind();
            if (strPage != null) {
                jQuery(escapeVfId(str)).suggest(strPage,options);
            }
        }catch(e){
            alert(e);
        }
    }
    else{
        var agencytext = j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).value();
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerTextHidden')).val(agencytext);
        //alert('1' + agencytext);
        //alert('2' + j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerTextHidden')).value());
    }

}

function vpClear2_delay(){
    var x = j$(escapeVfId('allPage:allForm:allBlock:Editable:SummonsForDirction__c')).value();
    if (x == '互相调货') {
        var vp = 'allPage:allForm:allBlock:Editable:Order_ForDealerText';
        var vpHidden = 'allPage:allForm:allBlock:Editable:Order_ForDealerTextHidden';
        setTimeout(
            function() {
                if(j$(escapeVfId(vp)).attr("jquerysuggest_skip_flag") == "false") {
                    if (j$(escapeVfId(vp)).value() != j$(escapeVfId(vpHidden)).value()) {
                        vpClear2();
                    }
                }
            },
            200
        );
    }
    else{
        var agencytext = j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).value();
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerTextHidden')).val(agencytext);
    }
}
function vpClear2(){
  var vp = 'allPage:allForm:allBlock:Editable:Order_ForDealerText';
  var vpHidden = 'allPage:allForm:allBlock:Editable:Order_ForDealerTextHidden';
  // alert('vp=' + j$(escapeVfId(vp)).value());
  // alert('vpHidden=' + j$(escapeVfId(vpHidden)).value());
  // if (j$(escapeVfId(vp)).value() != j$(escapeVfId(vpHidden)).value()) {
  //   changeFlg = 'false';
  //   //alert('changeFlg+' +changeFlg);
  //   if(changeFlg == 'true'){
  //       vpBefore = j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerTextHidden')).value();
  //       j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).val(vpBefore);
  //       document.getElementById('allPage:allForm:allBlock:Editable:Order_ForDealerText').blur();
  //       return;
  //   }
  // }
  resetValue('allPage:allForm:allBlock:Editable:Order_ForDealerText');
}
function FilesUaplodJs(){
    //上传文件
    FilesUpload();
}

function refreshPageSizeJs() {
    refreshPageSize();
}

function CommitConsumable(){
    //确认提交
    approval();
    //openPDF();
}
function openPDF(){
    window.open("/customer/summonsPDF?ESetid="+'{!URLENCODE(IdCheck)}');
}

function openReportJs(){
    //打开报表
    var reportId = '{!IdCheck}';
    reportId = reportId.substring(0,15);
    window.open("/customer/" +'{!URLENCODE($Label.ConsumableOut_report)}'+ "?pv1="+ encodeURI(reportId));
}

function openToInvoiceJs(){
    //打开发票
    //upchangeorder();
    var invoiceId = j$(escapeVfId('allPage:allForm:allBlock:unEditable:ConInvoice_Code_lkid')).value();
    if (invoiceId.length > 0 && invoiceId != '000000000000000') {
        window.open("/customer/ConInvoiceView?deliveryId="+'{!URLENCODE(IdCheck)}' + "&invoiceId=" + encodeURI(invoiceId) + "&KeyWords=Redirect","_self");
    }else{
        window.open("/customer/ConInvoiceView?deliveryId="+'{!URLENCODE(IdCheck)}' + "&KeyWords=Redirect","_self");
    }
}

function PraseToPDFJs(){
    //打印成PDF
    PraseToPDF();
    window.open("/customer/summonsPDF?ESetid="+'{!URLENCODE(IdCheck)}');
}

function ChangeDirction(j){
    var a = j.id;
    var x = j$(escapeVfId(a)).value();
    var productCount = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:consumableorderdetailsCount')).value();
    if(x == '直接销售给医院'){
        //医院
        j$(escapeVfId('allPage:allForm:allBlock:Editable:OEC')).prop('disabled',false);
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForCustomer')).prop('disabled',false);
        //二级经销商
        j$(escapeVfId('allPage:allForm:allBlock:Editable:province')).prop('disabled',true);
        document.getElementById('allPage:allForm:allBlock:Editable:province').value = "";
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).prop('disabled',true);
        document.getElementById('allPage:allForm:allBlock:Editable:Order_ForDealerText').value = "";
        // for (var i = 0; i < productCount; i++) {
        //     j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency')).prop('disabled',true);
        //     document.getElementById('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency').value = "";
        // }
    }else if(x == '医院试用'){
        //医院
        j$(escapeVfId('allPage:allForm:allBlock:Editable:OEC')).prop('disabled',false);
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForCustomer')).prop('disabled',false);
        //二级经销商
        j$(escapeVfId('allPage:allForm:allBlock:Editable:province')).prop('disabled',false);
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).prop('disabled',false);
        // for (var i = 0; i < productCount; i++) {
        //     j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency')).prop('disabled',true);
        //     document.getElementById('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency').value = "";
        // }
    }else if(x == '销售给二级经销商'){
        //医院
        j$(escapeVfId('allPage:allForm:allBlock:Editable:OEC')).prop('disabled',false);
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForCustomer')).prop('disabled',false);
        //二级经销商
        j$(escapeVfId('allPage:allForm:allBlock:Editable:province')).prop('disabled',false);
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).prop('disabled',false);
        // for (var i = 0; i < productCount; i++) {
        //     j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency')).prop('disabled',false);
        // }
    }else if(x == '互相调货'){
        //医院
        j$(escapeVfId('allPage:allForm:allBlock:Editable:OEC')).prop('disabled',true);
        document.getElementById('allPage:allForm:allBlock:Editable:OEC').value = "";
        document.getElementById('allPage:allForm:allBlock:Editable:OECId').value = "";
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForCustomer')).prop('disabled',true);
        document.getElementById('allPage:allForm:allBlock:Editable:Order_ForCustomer').value = "";
        //二级经销商
        j$(escapeVfId('allPage:allForm:allBlock:Editable:province')).prop('disabled',false);
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).prop('disabled',false);
        // for (var i = 0; i < productCount; i++) {
        //     j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency')).prop('disabled',true);
        //     document.getElementById('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency').value = "";
        // }
    }else{
        //医院
        j$(escapeVfId('allPage:allForm:allBlock:Editable:OEC')).prop('disabled',false);
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForCustomer')).prop('disabled',false);
        //二级经销商
        j$(escapeVfId('allPage:allForm:allBlock:Editable:province')).prop('disabled',false);
        //document.getElementById('allPage:allForm:allBlock:Editable:province').value = "";
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).prop('disabled',false);
        //document.getElementById('allPage:allForm:allBlock:Editable:Order_ForDealerText').value = "";
        // for (var i = 0; i < productCount; i++) {
        //     j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency')).prop('disabled',false);
        //     //document.getElementById('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency').value = "";
        // }
    }
}
//页面刷新重新计算金额
function CountCounttestPrice(){
    var numberDetails =j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:consumableorderdetailsCount')).value();
    for(var i = 0; i < numberDetails ; i++){
        var ckeck = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableinfo' + ':consumablesCountproRowCheckbox')).value();

        if (ckeck == 'on') {
            var a=document.getElementById ("allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:" + i +":variableAllprice:consumablesCounttestPrice");
            if ({!Existarrive}) {
                z  =  parseFloat(j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i +':consumablesCount_UnEditout:consumablesCount_UnEditin')).value());
            }else{
                z  =  parseFloat(j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i+':variable:consumablesCount')).value());
            }
            //z= z.replace(/,/g,'');
            if(isNaN(z)){z=0.00;}
            //alert(z);
            x = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i +':variableMoneyinfo:productOrderMoneyinfo')).value().replace(/,/g,'');
            c = parseFloat(z * x).toFixed(2);
            //c = number_format_common (c,2,'.',',');
            a.innerHTML = c;
            SumCompute();
        }
    }
}

function ComputePriceCheck(j){ // FIXME lineNo にしてください
    var z,x,c;
    var a = j.id;
    var i=a.substring(0,a.lastIndexOf(':'));// <apex:variable value="{!1}" var="lineNo" />
    i=i.substring(0,i.lastIndexOf(':'));
    var a=document.getElementById (i+":variableAllprice:consumablesCounttestPrice");
    if ({!Existarrive}) {
        z  =  parseFloat(j$(escapeVfId(i+':consumablesCount_UnEditout:consumablesCount_UnEditin')).value());
    }else{
        z  =  parseFloat(j$(escapeVfId(i+':variable:consumablesCount')).value());
    }
    //z= z.replace(/,/g,'');
    if(isNaN(z)){z=0.00;}
    //alert(z);
    x = j$(escapeVfId(i +':variableMoneyinfo:productOrderMoneyinfo')).value().replace(/,/g,'');
    c = parseFloat(z * x).toFixed(2);
    //c = number_format_common (c,2,'.',',');
    a.innerHTML = c;
    SumCompute();
}

function showCate() {
    //var productCount = j$(escapeVfId('allPage:allForm:allBlock:searchBlock:category3Search')).value();
    categoryload();
}

function showAllCate() {
    categoryAllload();
}

//页面加载 项目初始化
function onLoadDirction(){
    var x = j$(escapeVfId('allPage:allForm:allBlock:Editable:SummonsForDirction__c')).value();
    var productCount = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:consumableorderdetailsCount')).value();

    if(x == '直接销售给医院'){
        //医院
        j$(escapeVfId('allPage:allForm:allBlock:Editable:OEC')).prop('disabled',false);
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForCustomer')).prop('disabled',false);
        //二级经销商
        j$(escapeVfId('allPage:allForm:allBlock:Editable:province')).prop('disabled',true);
        document.getElementById('allPage:allForm:allBlock:Editable:province').value = "";
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).prop('disabled',true);
        document.getElementById('allPage:allForm:allBlock:Editable:Order_ForDealerText').value = "";
        // for (var i = 0; i < productCount; i++) {
        //     j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency')).prop('disabled',true);
        //     document.getElementById('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency').value = "";
        // }
    }else if(x == '医院试用'){
        //医院
        j$(escapeVfId('allPage:allForm:allBlock:Editable:OEC')).prop('disabled',false);
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForCustomer')).prop('disabled',false);
        //二级经销商
        j$(escapeVfId('allPage:allForm:allBlock:Editable:province')).prop('disabled',false);
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).prop('disabled',false);
        // for (var i = 0; i < productCount; i++) {
        //     j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency')).prop('disabled',true);
        //     document.getElementById('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency').value = "";
        // }
    }else if(x == '销售给二级经销商'){
        //医院
        j$(escapeVfId('allPage:allForm:allBlock:Editable:OEC')).prop('disabled',false);
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForCustomer')).prop('disabled',false);
        //二级经销商
        j$(escapeVfId('allPage:allForm:allBlock:Editable:province')).prop('disabled',false);
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).prop('disabled',false);
        // for (var i = 0; i < productCount; i++) {
        //     j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency')).prop('disabled',false);
        // }
    }else if(x == '互相调货'){
        //医院
        j$(escapeVfId('allPage:allForm:allBlock:Editable:OEC')).prop('disabled',true);
        document.getElementById('allPage:allForm:allBlock:Editable:OEC').value = "";
        document.getElementById('allPage:allForm:allBlock:Editable:OECId').value = "";
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForCustomer')).prop('disabled',true);
        document.getElementById('allPage:allForm:allBlock:Editable:Order_ForCustomer').value = "";
        //二级经销商
        j$(escapeVfId('allPage:allForm:allBlock:Editable:province')).prop('disabled',false);
        j$(escapeVfId('allPage:allForm:allBlock:Editable:Order_ForDealerText')).prop('disabled',false);

        // for (var i = 0; i < productCount; i++) {
        //     j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency')).prop('disabled',true);
        //     document.getElementById('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableMoneyinfo:Unitpriceagency').value = "";
        // }
    }
}

window.sfdcPage.appendToOnloadQueue(function() { onLoadDirction(); });

</script>
<style>
    .visitorplace_results {
        border: 1px solid gray;
        background-color: white;
        padding: 0;
        margin: 0;
        list-style: none;
        position: absolute;
        z-index: 10000;
        display: none;
        overflow:auto;
        white-space:nowrap;
        width:400px;
        height:250px;
    }
    .visitorplace_results li {
        padding: 2px 5px 2px 0px;
        margin-left : 2px;
        color: #101010;
        text-align: left;
    }
    .panelGridCenter td,.panelGridCenter tr {
        text-align: center;
    }
    .dateFormat  {
        display: none;
    }
    tr.dataRow {
        background-color:white;
    }
    td.columus {
        background-color:white;
        text-align: right;
    }
    tr.dataRow:hover {
        background-color: #e3f3ff;
    }
</style>
    <apex:form id="allForm">
    <!-- //add  by rentx 2021-2-26 -->
        <apex:actionFunction name="checkOutPatternFn" action="{!checkOutPattern}" status="fetchStatus" reRender="ConsumableorderdetailsSection,message,OutPattern01" onComplete="CountCounttestPrice();onLoadDirction();"/>
    <!-- //add by rentx 2021-2-26 -->
        <apex:actionFunction name="refreshPageSize" action="{!refreshPageSize}" status="fetchStatus" reRender="ConsumableorderdetailsSection,message" onComplete="CountCounttestPrice();onLoadDirction();"/>
        <apex:actionFunction name="save" action="{!save}" rerender=" message,Editable,ConsumableorderdetailsSection" onComplete="unblockUI();CountCounttestPrice();onLoadDirction();">
        </apex:actionFunction>
        <apex:actionFunction name="categoryload" action="{!categoryload}" rerender="searchBlock" onComplete="unblockUI();">
        </apex:actionFunction>
         <apex:actionFunction name="categoryAllload" action="{!categoryAllload}" rerender="searchBlock" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction name="searchConsumableorderdetails" action="{!searchConsumableorderdetails}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CountCounttestPrice();onLoadDirction();">
        </apex:actionFunction>
        <apex:actionFunction name="setEditAble" action="{!setEditAble}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction name="approval" action="{!approval}" rerender="allForm" onComplete="unblockUI();openPDF();">
        </apex:actionFunction>
         <apex:actionFunction name="DelConsumable" action="{!DelConsumable}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction name="PraseToPDF" action="{!PraseToPDF}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction name="GoodsDelivery" action="{!GoodsDelivery}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction name="SortLimited" action="{!SortLimited}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CountCounttestPrice();onLoadDirction();">
            <apex:param name="firstParam" assignTo="{!sortKey}" value="" />
        </apex:actionFunction>
        <!--<apex:actionFunction name="SortStore" action="{!SortStore}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();">
            <apex:param name="firstParam" assignTo="{!sortKey}" value="" />
        </apex:actionFunction>-->
        <apex:actionFunction name="FilesUpload" action="{!FilesUpload}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();">
        </apex:actionFunction>

        <apex:outputPanel id="allPanel">
        <input type="hidden" id="userState" value="{!localuser.State_Hospital__c}"/>
            <apex:pageBlock id="allBlock" >
                <table>
                    <colgroup>
                        <col width="150px"/>
                        <col width="200px"/>
                        <col width="200px"/>
                        <col width="200px"/>
                        <col width="200px"/>
                        <col width="200px"/>
                        <col width="90px"/>
                        <col width="100px"/>
                        <col width="10px"/>
                        <col width="85px"/>
                        <col width="100px"/>
                        <col width="10px"/>
                        <col width="70px"/>
                        <col width="100px"/>
                    </colgroup>
                    <tr>
                        <td></td>
                        <td  colspan="4"><apex:commandButton onclick="saveConfirmJs('{!coc.SummonsStatus_c__c}');" value="保存" style="width:150px" rerender="dummy" rendered="{!(EditDelCommitBtnDisabled||EditAble)}"/></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td ><apex:commandButton onclick="EditConsumable();"   value="编辑出库单" style="width:150px" rerender="dummy" rendered="{!!(EditDelCommitBtnDisabled||EditAble)}" disabled="{!IF(coc.SummonsStatus_c__c='已完成',true,false)}"/></td>
                        <!--CHAN-B65CAZ 20181105 UpdateStart-->
                        <!-- <td ><apex:commandButton onclick="CommitConsumable();" value="提交出库单" style="width:150px" rerender="dummy" rendered="{!!(EditDelCommitBtnDisabled||EditAble)}" disabled="{!IF(coc.SummonsStatus_c__c='批准'||coc.SummonsStatus_c__c='已销售待上传纳品书'||coc.SummonsStatus_c__c='出库单已打印'||coc.SummonsStatus_c__c='已完成',true,false)}"/></td> -->
                        <td ><apex:commandButton onclick="GoodsDeliveryJs();"  value="出货/销售"     style="width:150px" rerender="dummy" rendered="{!!(EditDelCommitBtnDisabled||EditAble)}" disabled="{!IF(coc.SummonsStatus_c__c='已销售待上传纳品书'||coc.SummonsStatus_c__c='已完成'||coc.SummonsStatus_c__c='价格未定',true,false)}"/></td>
                        <!-- CHAN-B65CAZ 20181105 UpdateEnd-->
                        <td ><apex:commandButton onclick="openToInvoiceJs();return false;" value="开票" style="width:150px" rerender="dummy" rendered="{!!(EditDelCommitBtnDisabled||EditAble)}" disabled="{!IF(((coc.Billed_Status__c !='全部开票' &&coc.SummonsStatus_c__c='已完成') || coc.Onchange_order__c = true) && coc.SummonsForDirction__c!='互相调货',false,true)}"/></td>
                    </tr>
                    <tr>
                        <td></td>
                        <!--CHAN-B65CAZ 20181105 UpdateStart-->
                        <td ><apex:commandButton onclick="PraseToPDFJs();" value="打印指示单" style="width:150px" rerender="dummy" rendered="{!!(EditDelCommitBtnDisabled||EditAble)}" disabled="{!IF(coc.SummonsStatus_c__c='已销售待上传纳品书'||coc.SummonsStatus_c__c='批准'||coc.SummonsStatus_c__c='出库单已打印'||coc.SummonsStatus_c__c='草案中',false,true)}"/></td>
                        <!-- CHAN-B65CAZ 20181105 UpdateEnd-->
                        <td ><apex:commandButton onclick="openReportJs(); return false;" value="显示明细" style="width:150px" rerender="dummy" rendered="{!!(EditDelCommitBtnDisabled||EditAble)}" disabled="{!IF(coc.Billed_Status__c !='还没开票' || coc.SummonsStatus_c__c='已完成',false,true)}"/></td>
                        <td ><apex:commandButton onclick="DeleteConsumable();" value="删除" style="width:150px" rerender="dummy" rendered="{!!(EditDelCommitBtnDisabled||EditAble)}" disabled="{!IF(coc.SummonsStatus_c__c='已销售待上传纳品书'||coc.SummonsStatus_c__c='价格未定'||coc.SummonsStatus_c__c='批准'||coc.SummonsStatus_c__c='出库单已打印'||coc.SummonsStatus_c__c='已完成',true,false)}"/></td>
                        <td >
                        </td>
                    </tr>
                </table>
                <apex:outputPanel id="message">
                    <apex:pageMessages />
                 </apex:outputPanel>
<!--==============20160314====INSERT_CODE_END=======================================-->
                <apex:pageBlock title="出库单信息" id="Editable" rendered="{!EditAble}">
                <!-- update start by vivek 2019-7-15 -->
                    <!-- <table>
                        <colgroup>
                            <col width="150px"/>
                            <col width="300px"/>
                            <col width="150px"/>
                            <col width="300px"/>
                            <col width="80px"/>
                            <col width="10px"/>
                            <col width="90px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="85px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="70px"/>
                            <col width="100px"/>
                        </colgroup> -->
                <!-- update end by vivek 2019-7-15 -->
                        <!-- update start by vivek 2019-7-15 -->
                        <apex:outputPanel rendered="{! If(coc.SummonsStatus_c__c == '价格未定',true,false) }">
                        <table>
                        <colgroup>
                            <col width="150px"/>
                            <col width="300px"/>
                            <col width="150px"/>
                            <col width="300px"/>
                            <col width="80px"/>
                            <col width="10px"/>
                            <col width="90px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="85px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="70px"/>
                            <col width="100px"/>
                        </colgroup>
                                <tr>
                                <td align="right">出库单号：</td>
                                <td align="left"><apex:outputField id="OrderCode_out2"  value="{!coc.Name}" style="width:300px"/></td>
                                <td align="right">出库单状态：</td>
                                <td align="left"><apex:outputField id="OrderStatus_out2" value="{!coc.SummonsStatus_c__c}" style="width:300px"/></td>
                            </tr>
                            <tr>
                                <td align="right">目的：</td>
                                <td align="left"><apex:outputField id="OrderDirction_out2"  value="{!coc.SummonsForDirction__c}" style="width:300px"/></td>
                                <td align="right">开票状态：</td>
                                <td align="left">
                                <apex:outputField id="SecondDealer_level22" value="{!coc.Billed_Status__c}" style="width:300px"/>
                                </td>

                            </tr>
                            <tr style="{!IF(coc.SummonsForDirction__c='销售给二级经销商','','display:none')}">
                                <td align="right">二级经销商：</td>
                                <td align="left"><apex:outputField id="SecondDealer_out2" value="{!coc.Order_Dealer_Info__c}" style="width:300px"/></td>
                                <td align="right"></td>
                                <td align="left"></td>
                            </tr>
                            <tr>
                                <td align="right">客户名：</td>
                                <td align="left"><apex:outputField id="OrderForHospital_out2" value="{!coc.ShipmentAccount__c}" style="width:300px"/></td>
                                <td align="right"><apex:outputText value="发票：" rendered="{!IF(coc.SummonsStatus_c__c='已完成' && coc.SummonsForDirction__c!='互相调货',true,false)}"/></td>
                                <td align="left"><apex:inputField value="{!coc.ConInvoice_Code__c}" rendered="{!IF(coc.SummonsStatus_c__c='已完成' && coc.SummonsForDirction__c!='互相调货',true,false)}" id="ConInvoice_Code2"/>
                                <c:helpicon helpText="已开票的换货的时候，选择已开票的发票。" rendered="{!IF(coc.SummonsStatus_c__c='已完成' && coc.SummonsForDirction__c!='互相调货',true,false)}"/>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">科室：</td>
                                <td align="left">
                                    <apex:outputField id="Order_ForDealerText2" value="{!coc.Order_ForCustomerText__c}" style="width:170px"/>
                                </td>
                                <td align="right">出库金额：</td>
                                <td align="left"><apex:outputField id="sumPrice_buttom2" value="{!coc.Shipment_total_amount__c}" style="width:300px"/> 元</td>
                            </tr>
                            <tr>
                                <td align="right">没有确定价格：</td>
                                <td align="left">
                                    <apex:inputCheckbox id="NoConfirmedPrice_out2" value="{!coc.NoConfirmedPrice__c}" disabled="true" />
                                </td>

                                <!-- ===add by rentx 2020-12-04 start -->
                                <!-- <apex:detail rendered="{!agencyProType == 'ENG'}"> -->
                                    <!-- <td align="right">是否医院特价出库 : </td> -->
                                    <!-- <td align="left"> -->
                                        <apex:inputHidden id="OutPattern02" value="{!coc.OutPattern__c}"  />
                                        <!-- <apex:outputField id="OutPattern02" value="{!coc.OutPattern__c}"  /> -->
                                        <!-- <apex:inputCheckbox id="OutPattern02" value="{!coc.OutPattern__c}" disabled="true"  /> -->

                                        <!-- <apex:inputField id="OutPattern" value="{!coc.DeliveryMode__c}" style="width:160px"/> -->
                                    <!-- </td> -->
                                <!-- </apex:detail> -->
                                <!-- ===add by rentx 2020-12-04 end -->
                            </tr>
                        </table>
                            </apex:outputPanel>
                        <apex:outputPanel rendered="{! If(coc.SummonsStatus_c__c != '价格未定',true,false) }">
                        <table>
                        <colgroup>
                            <col width="150px"/>
                            <col width="300px"/>
                            <col width="150px"/>
                            <col width="300px"/>
                            <col width="80px"/>
                            <col width="10px"/>
                            <col width="90px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="85px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="70px"/>
                            <col width="100px"/>
                        </colgroup>
                            <tr id = "SummonsFlag" style="visibility:{!SummonsFlag}">
                                <td align="right">出库单号：</td>
                                <td align="left"><apex:outputField id="OrderCode"  value="{!coc.Name}" style="width:100px"/></td>
                                <td align="right">出库单状态：</td>
                                <td align="left"><apex:outputField id="SummonsStatus_c__c" value="{!coc.SummonsStatus_c__c}" style="width:100px"/></td>
                            </tr>
                            <tr>
                                <td align="right">目的：</td>
                                <td align="left"><div style="width:3px;height:20px;background-color:red; position:absolute;margin-right:5px;"></div>
                                <apex:inputField onchange="ChangeDirction(this)" id="SummonsForDirction__c" value="{!coc.SummonsForDirction__c}" style="width:160px"/></td>
                                <td align="right">二级经销商：</td>
                                <td align="left">
                                <apex:selectList id="province" value="{!SecondDealer}" style="width:160px" size="1" >
                                    <apex:selectOptions value="{!provinceOpts}"/>
                                </apex:selectList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">客户名：</td>
                                <td align="left">
                                    <apex:inputText id="OEC" value="{!HospitalName}" onclick="searchsearchAgencyH('{!agencyProType}'); return false;" onblur="clearAgencyI();return false;" style="width:155px"  />
                                    <apex:inputHidden value="{!HospitalInfo}" id="OECId" />
                                </td>
                                <td align="right">经销商(录入)：</td>
                                <td align="left">
                                    <apex:inputField id="Order_ForDealerText" value="{!coc.Order_ForDealerText__c}" onfocus="setVisitorPlace();" style="width:155px" onblur="if (j$(escapeVfId('allPage:allForm:allBlock:Editable:SummonsForDirction__c')).value() == '互相调货'){vpClear2_delay();}"/>
<!--                                    <apex:inputField id="Order_ForDealerText" value="{!coc.Order_ForDealerText__c}"  style="width:155px" onblur="if (j$(escapeVfId('allPage:allForm:allBlock:Editable:SummonsForDirction__c')).value() == '互相调货'){vpClear2_delay();}"/>-->
                                    <apex:inputHidden id="Order_ForDealerTextHidden" value="{!coc.Order_ForDealerText__c}" />
                                    <apex:inputHidden id="Order_ForDealerTextId" value="{!coc.Order_ForDealerTextID__c}" />
                                    <apex:inputHidden id="Order_ForDealerTextHiddenId" value="{!coc.Order_ForDealerTextID__c}" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right">科室：</td>
                                <td align="left">
                                    <apex:inputField id="Order_ForCustomer" value="{!coc.Order_ForCustomerText__c}" style="width:155px"/>
                                </td>
                                <td align="right">总金额：</td>
                                <td align="left"><apex:outputText id="sumPrice_buttom" value="{!sumPrice}"/> 元</td>
                            </tr>
                            <tr>
                                <td align="right">没有确定价格：</td>
                                <td align="left">
                                    <apex:inputCheckbox id="NoConfirmedPrice" value="{!coc.NoConfirmedPrice__c}" />
                                </td>

                                <!-- ===add by rentx 2020-12-04 start 因为目前维护了特价产品的医院都是ENG医院,所以只有ENG的时候展示 是否医院特价出库 即可-->
                                <!-- <apex:detail rendered="{!agencyProType == 'ENG'}"> -->
                                    <!-- <td align="right" >是否医院特价出库 : </td> -->
                                    <!-- <td align="left"> -->
                                        <!-- <apex:outputField id="OutPattern01" value="{!coc.OutPattern__c}" /> -->
                                        <apex:inputHidden id="OutPattern01" value="{!coc.OutPattern__c}" />

                                    <!-- </td> -->
                                <!-- </apex:detail> -->
                                <!-- ===add by rentx 2020-12-04 end -->

                            </tr>
                        </table>
                        </apex:outputPanel>

                    <!-- <tr id = "SummonsFlag" style="visibility:{!SummonsFlag}">
                            <td align="right">出库单号：</td>
                            <td align="left"><apex:outputField id="OrderCode"  value="{!coc.Name}" style="width:100px"/></td>
                            <td align="right">出库单状态：</td>
                            <td align="left"><apex:outputField id="SummonsStatus_c__c" value="{!coc.SummonsStatus_c__c}" style="width:100px"/></td>
                        </tr>
                        <tr>
                            <td align="right">目的：</td>
                            <td align="left"><div style="width:3px;height:20px;background-color:red; position:absolute;margin-right:5px;"></div>
                            <apex:inputField onchange="ChangeDirction(this)" id="SummonsForDirction__c" value="{!coc.SummonsForDirction__c}" style="width:160px"/></td>
                            <td align="right">二级经销商：</td>
                            <td align="left">
                            <apex:selectList id="province" value="{!SecondDealer}" style="width:160px" size="1" >
                                <apex:selectOptions value="{!provinceOpts}"/>
                            </apex:selectList>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">客户名：</td>
                            <td align="left">
                                <apex:inputText id="OEC" value="{!HospitalName}" onclick="searchsearchAgencyH('{!agencyProType}'); return false;" onblur="clearAgencyI();return false;" style="width:155px"/>
                                <apex:inputHidden value="{!HospitalInfo}" id="OECId"/>
                            </td>
                            <td align="right">经销商(录入)：</td>
                            <td align="left">
                                <apex:inputField id="Order_ForDealerText" value="{!coc.Order_ForDealerText__c}" onfocus="setVisitorPlace();" style="width:155px" onblur="if (j$(escapeVfId('allPage:allForm:allBlock:Editable:SummonsForDirction__c')).value() == '互相调货'){vpClear2_delay();}"/>
                                <apex:inputHidden id="Order_ForDealerTextHidden" value="{!coc.Order_ForDealerText__c}" />
                                <apex:inputHidden id="Order_ForDealerTextId" value="{!coc.Order_ForDealerTextID__c}" />
                                <apex:inputHidden id="Order_ForDealerTextHiddenId" value="{!coc.Order_ForDealerTextID__c}" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right">科室：</td>
                            <td align="left">
                                <apex:inputField id="Order_ForCustomer" value="{!coc.Order_ForCustomerText__c}" style="width:155px"/>
                            </td>
                            <td align="right">总金额：</td>
                            <td align="left"><apex:outputText id="sumPrice_buttom" value="{!sumPrice}"/> 元</td>

                           <td align="right" style="visibility:hidden">出库单日期</td>
                            <td align="right" style="visibility:hidden"><apex:inputField rendered="false" id="OrderDate" value="{!coc.Order_date__c}" style="width:100px"/></td>
                        </tr>

                    </table> -->
                    <!-- update end by vivek2019-7-12 -->
                </apex:pageBlock>
<!--==============20160314====INSERT_CODE_START=======================================-->
                 <apex:pageBlock title="出库单信息" id="unEditable" rendered="{!!EditAble}">
                    <table>
                        <colgroup>
                            <col width="150px"/>
                            <col width="300px"/>
                            <col width="150px"/>
                            <col width="300px"/>
                            <col width="100px"/>
                            <col width="70px"/>
                            <col width="90px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="85px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="70px"/>
                            <col width="100px"/>
                        </colgroup>
                        <tr>
                            <td align="right">出库单号：</td>
                            <td align="left"><apex:outputField id="OrderCode_out"  value="{!coc.Name}" style="width:300px"/></td>
                            <td align="right">出库单状态：</td>
                            <td align="left"><apex:outputField id="OrderStatus_out" value="{!coc.SummonsStatus_c__c}" style="width:300px"/></td>
                        </tr>
                        <tr>
                            <td align="right">目的：</td>
                            <td align="left"><apex:outputField id="OrderDirction_out"  value="{!coc.SummonsForDirction__c}" style="width:300px"/></td>
                            <td align="right">开票状态：</td>
                            <td align="left">
                            <apex:outputField id="SecondDealer_level2" value="{!coc.Billed_Status__c}" style="width:300px"/>
                            </td>

                        </tr>
                        <tr style="{!IF(coc.SummonsForDirction__c='销售给二级经销商','','display:none')}">
                            <td align="right">二级经销商：</td>
                            <td align="left"><apex:outputField id="SecondDealer_out" value="{!coc.Order_Dealer_Info__c}" style="width:300px"/></td>
                            <td align="right"></td>
                            <td align="left"></td>
                        </tr>
                        <tr>
                            <td align="right">客户名：</td>
                            <td align="left"><apex:outputField id="OrderForHospital_out" value="{!coc.ShipmentAccount__c}" style="width:300px"/></td>
                            <td align="right"><apex:outputText value="发票：" rendered="{!IF(coc.SummonsStatus_c__c='已完成' && coc.SummonsForDirction__c!='互相调货',true,false)}"/></td>
                            <td align="left"><apex:inputField value="{!coc.ConInvoice_Code__c}" rendered="{!IF(coc.SummonsStatus_c__c='已完成' && coc.SummonsForDirction__c!='互相调货',true,false)}" id="ConInvoice_Code"/>
                            <c:helpicon helpText="已开票的换货的时候，选择已开票的发票。" rendered="{!IF(coc.SummonsStatus_c__c='已完成' && coc.SummonsForDirction__c!='互相调货',true,false)}"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">科室：</td>
                            <td align="left">
                                <apex:outputField id="Order_ForDealerText" value="{!coc.Order_ForCustomerText__c}" style="width:170px"/>
                            </td>
                            <td align="right">出库金额：</td>
                            <td align="left"><apex:outputField id="sumPrice_buttom" value="{!coc.Shipment_total_amount__c}" style="width:300px"/> 元</td>
                        <!--    <td/>

                            <td align="right" style="visibility:hidden">出库单日期:</td>
                            <td align="right" style="visibility:hidden"><apex:outputField id="OrderDate_out" value="{!coc.Order_date__c}" style="width:300px"/></td> -->

                        </tr>
                        <!-- update start by vivek2019-7-12 -->
                        <tr>
                            <td align="right">没有确定价格：</td>
                            <td align="left">
                                <apex:inputCheckbox id="NoConfirmedPrice_out" value="{!coc.NoConfirmedPrice__c}" disabled="true" />
                            </td>

                            <!-- ===add by rentx 2020-12-04 start -->
                            <!-- <apex:detail rendered="{!agencyProType == 'ENG'}"> -->
                                <!-- <td align="right">是否医院特价出库 : </td> -->
                                <!-- <td align="left"> -->
                                    <!-- <apex:outputField id="OutPattern" value="{!coc.OutPattern__c}"/> -->
                                    <apex:inputHidden id="OutPattern" value="{!coc.OutPattern__c}"/>
                                <!-- </td> -->
                            <!-- </apex:detail> -->
                            <!-- ===add by rentx 2020-12-04 end -->
                        </tr>
                        <!-- update end by vivek2019-7-12 -->
                    </table>
                </apex:pageBlock>
<!--==============20160314====INSERT_CODE_END=======================================-->

<!--==============20160310====到货联动时不需要检索====================================-->
                <!-- update start by vivek 2019-7-15 -->
                <apex:pageBlock id="searchBlock" rendered="{!IF(!Existarrive && EditAble && coc.SummonsStatus_c__c != '价格未定',true,false)}">
                <!-- apex:pageBlock id="searchBlock" rendered="{!IF(!Existarrive && EditAble,true,false)}"> -->
                <!-- update end by vivek 2019-7-15 -->
                    <table>
                        <colgroup>
                            <col width="160px"/>
                            <col width="200"/>
                            <col width="15px"/>
                            <col width="120px"/>
                            <col width="200px"/>
                            <col width="20px"/>
                            <col width="120px"/>
                            <col width="200px"/>
                            <col width="20px"/>
                            <col width="120px"/>
                            <col width="200px"/>
                            <col width="20px"/>
                            <col width="90px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="85px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="70px"/>
                            <col width="100px"/>
                        </colgroup>
                        <tr>
                            <td align="right">消耗品名称</td>
                            <td><apex:inputText id="OrderDateSearch" value="{!category1}" style="width:100px"/></td>
                            <td/>
                            <td align="right">第3分类</td>
                            <td>
                             <apex:selectList id="category3Search" value="{!category3}" style="width:100px" size="1" onchange="showAllCate();">
                                <apex:selectOptions value="{!categoryOptionList}"/>
                            </apex:selectList>
                            </td>
                            <td/>
                             <td align="right">第4分类</td>
                            <td>
                             <apex:selectList id="category4Search" value="{!category4}" style="width:100px" size="1" onchange="showCate();">
                                <apex:selectOptions value="{!category4OptionList}"/>
                            </apex:selectList>
                            </td>
                            <td/>
                             <td align="right">第5分类</td>
                             <td>
                             <apex:selectList id="category5Search" value="{!category5}" style="width:100px" size="1">
                                <apex:selectOptions value="{!category5OptionList}"/>
                            </apex:selectList>
                            </td>
                            <td/>
                            <!-- //add by rentx start -->
                            <apex:detail rendered="{!hasHosPro}">
                                <td align="right" width="120px">医院特价</td>
                                 <td>
                                 <apex:selectList id="outOutPattern" value="{!outOutPattern}" style="width:100px" size="1">
                                    <apex:selectOptions value="{!outOutPatternOptionList}"/>
                                </apex:selectList>
                                </td>
                                </apex:detail>
                            <td/>
                            <!-- //add by rentx end -->

                            <!-- <td align="right">产品型号</td>
                            <td><apex:inputText id="OrderCodeSearch" value="{!category_Goods}" style="width:100px"/></td> -->
                            <td align="right"></td>
                            <td><apex:commandButton value="检索" style="width: 100px;" onclick="searchProductJs(); return false;" /></td>
                            <td><input type="button" value="清空" style="width: 100px;" onclick="ClearJs()" class="btn"/></td>
                            <td/>
                        </tr>
                        <tr>
                            <td></td>
                        </tr>
                    </table>
                </apex:pageBlock>
                <div id="ErrorName" style="color: red;font-weight: bold;">{!alertMessage}</div>
                <apex:pageBlock title="出库单明细" id="ConsumableorderdetailsSection">
                    <!--<apex:inputHidden id="consumableorderdetailsCnt" value="{!consumableorderdetailsCount}"/>-->
                    <input type="hidden" id="allPage:allForm:allBlock:ConsumableorderdetailsSection:consumableorderdetailsCount" value="{!consumableorderdetailsCount}" />
                    <table class="list" border="0" cellpadding="0" cellspacing="0" id="ConsumableorderdetailsTable">
                         <tr class="headerRow">
                            <!-- update start by vivek 2019-7-15 -->
                            <apex:variable var="v" value="" rendered="{!IF(!Existarrive && EditAble && coc.SummonsStatus_c__c != '价格未定',true,false)}">
                            <!-- <apex:variable var="v" value="" rendered="{!IF(!Existarrive && EditAble,true,false)}"> -->
                            <!-- update start by vivek 2019-7-15 -->
                                <th><input type='checkbox' onClick='checkAll()' id='checker'/>选择</th>
                            </apex:variable>
                            <th><a href="#" onclick="SortLimitedJs('0');return false;" style="text-decoration: underline;">消耗品名称</a>{!sortOrder[0]}</th>
                        <!--    <th><a href="#" onclick="SortLimitedJs('1');return false;" style="text-decoration: underline;">产品型号</a>{!sortOrder[1]}</th>-->

                            <!-- TODO 本番暂不显示 -->
                            <apex:variable var="v" value="">
                            <th style="width: 80px;text-align:center;">规格</th>
                            </apex:variable>
                            <th>CFDA状态</th>
                            <th>注册证编码号</th>
                            <th>注册证效期</th>

                            <apex:variable var="v" value="" rendered="{!IF(arriveorder ='' && Existarrive = false && EditAble,true,false)}">
                             <th><a href="#" onclick="SortLimitedJs('5');return false;" style="text-decoration: underline;">第3分类</a>{!sortOrder[5]}</th>
                            <th><a href="#" onclick="SortLimitedJs('6');return false;" style="text-decoration: underline;">第4分类</a>{!sortOrder[6]}</th>
                            <th><a href="#" onclick="SortLimitedJs('7');return false;" style="text-decoration: underline;">第5分类</a>{!sortOrder[7]}</th>
                            </apex:variable>
                            <th>单位</th>
                            <th>出货数量</th>

                            <th>出货单价(元)</th>
                            <!-- <th>二级经销商给客户单价</th> -->
                            <!--<apex:variable var="v" value="" rendered="{!NOT(IF(arriveorder ='' && Existarrive = false && EditAble,true,false))}">
                                <th>单位</th>
                                <th>出货数量</th>
                            </apex:variable>
                             <apex:variable var="v" value="" rendered="{!!EditAble}">
                                <th>二级经销商给客户单价</th>
                                <th>出货单价(元)</th>
                            </apex:variable>-->

                            <apex:variable var="v" value="" rendered="{!NOT(IF(arriveorder ='' && Existarrive = false && EditAble,true,false))}" id="BoxPiece_UnEditout">
                            </apex:variable>
                            <apex:variable var="v" value="" rendered="{!if(EditAble,true,false)}">
                            <th>出货金额(元)</th>
                            <!--<th><a href="#" onclick="SortStoreJs('3');return false;" style="text-decoration: underline;width: 100px;text-align: center;">有效期内库存</a>{!sortOrder[3]}</th>-->
                            <th>有效期内库存(盒)</th>
                            <th>有效期内库存(个)</th>
                            </apex:variable>

                            <apex:variable var="v" value="" rendered="{!!EditAble}">
                                <th>{!$ObjectType.Consumable_Orderdetails__c.fields.InvoiceProNot_count__c.label}</th>
                            </apex:variable>
                            <apex:variable var="v" value="" rendered="{!!EditAble}">
                                <th>{!$ObjectType.Consumable_Orderdetails__c.fields.RrturnPro_count__c.label}</th>
                            </apex:variable>
                            <apex:variable var="v" value="" rendered="{!!EditAble}">
                                <th>{!$ObjectType.Consumable_Orderdetails__c.fields.Invoiced_Procount__c.label}</th>
                            </apex:variable>

                            <!-- //add by rentx 2020-11-27 start -->
                            <apex:detail rendered="{!hasHosPro}">
                                <th>医院特价</th>
                            </apex:detail>
                            <!-- //add by rentx 2020-11-27 end -->
                        </tr>
                        <apex:repeat value="{!pageRecords}" var="records" id="ConsumableorderdetailsTable">
                            <tr class="dataRow">
                                <!-- update start by vivek 2019-7-15 -->
                                <!-- <apex:variable var="v" value="" rendered="{!IF(!Existarrive && EditAble,true,false)}" id="variableinfo"> -->
                                <apex:variable var="v" value="" rendered="{!IF(!Existarrive && EditAble && coc.SummonsStatus_c__c != '价格未定',true,false)}" id="variableinfo">
                                <!-- update end by vivek 2019-7-15 -->
                                    <td>
                                    <apex:inputCheckbox value="{!records.check}" id="consumablesCountproRowCheckbox" disabled="{!!records.canSelect}"/>
                                     <apex:inputCheckbox value="{!records.oldCheck}" id="proRowOldCheckbox" style="display:none"/></td>
                                 </apex:variable>
                                <td class="dataCell">
                                    <apex:outputText id="ProductName" value="{!IF(records.oldCheck=false,records.Prod.Name__c,records.orderdetails1.Consumable_Product__r.Name__c)}"/>
                                </td>
                            <!--    <td>{!records.Prod.Asset_Model_No__c}</td>
                                 -->
                                <td style="width: 80px;text-align:center;">{!records.packinglist}</td>
                                <td class="dataCell">{!records.Prod.SFDA_Status__c}</td>
                                <td class="dataCell">{!records.approbation_No}</td>
                                <td class="dataCell">
                                    <apex:outputText value="{0, date, yyyy/MM/dd}">
                                        <apex:param value="{!records.expiration_Date}" />
                                    </apex:outputText>
                                </td>
                                <apex:variable var="v" value="" rendered="{!IF(arriveorder ='' && Existarrive = false && EditAble,true,false)}" id="variableCategory3">
                                 <td class="dataCell">{!records.Prod.Category3__c}</td>
                                 <td class="dataCell">{!records.Prod.Category4__c}</td>
                                 <td class="dataCell">{!records.Prod.Category5__c}</td>
                                <!-- update start by vivek 2019-7-15 -->
                                <apex:variable var="v" value="" rendered="{!IF(arriveorder ='' && Existarrive = false && EditAble && coc.SummonsStatus_c__c != '价格未定',true,false)}" id="BoxPiece_UnEditout1">
                                 <td class="dataCell">
                                    <apex:selectList value="{!records.orderdetails1.Box_Piece__c}" size="1" style="width:60px;" id="BoxPiece">
                                    <apex:selectOptions value="{!records.boxorpiece}"/>
                                    </apex:selectList>
                                </td>
                                </apex:variable>
                                <!-- update end by vivek 2019-7-15 -->
                                 </apex:variable>

                                <!-- update start by vivek 2019-7-15 -->
                                <apex:variable var="v" value="" rendered="{!NOT(IF(arriveorder ='' && Existarrive = false && EditAble && coc.SummonsStatus_c__c != '价格未定',true,false))}" id="BoxPiece_UnEditout1">
                                <!-- <apex:variable var="v" value="" rendered="{!NOT(IF(arriveorder ='' && Existarrive = false && EditAble,true,false))}" id="BoxPiece_UnEditout"> -->
                                <!-- update end by vivek 2019-7-15 -->
                                <td><apex:outputField id="BoxPiece_UnEditin" value="{!records.orderdetails1.Box_Piece__c}"/></td>
                                </apex:variable>
                                <!-- update start by vivek 2019-7-15 -->
                                <apex:variable var="v" value="" rendered="{!NOT(IF(arriveorder ='' && Existarrive = false && EditAble && coc.SummonsStatus_c__c != '价格未定',true,false))}" id="consumablesCount_UnEditout">
                                <!-- <apex:variable var="v" value="" rendered="{!NOT(IF(arriveorder ='' && Existarrive = false && EditAble,true,false))}" id="consumablesCount_UnEditout"> -->
                                <!-- update start by vivek 2019-7-15 -->
                                <!--<td style="text-align:right;"><apex:outputField id="consumablesCount_Unagency" value="{!records.orderdetails1.Unitprice_To_agency__c}"/></td>-->
                                <td style="text-align:center;"><apex:outputField id="consumablesCount_UnEditin" value="{!records.orderdetails1.Shipment_Count__c}"/></td>
                                </apex:variable>
                                <!-- update start by vivek 2019-7-15 -->
                                <apex:variable var="v" value="" rendered="{!IF(arriveorder ='' && Existarrive = false && EditAble && coc.SummonsStatus_c__c != '价格未定',true,false)}" id="variable">
                                 <!-- <apex:variable var="v" value="" rendered="{!IF(arriveorder ='' && Existarrive = false && EditAble,true,false)}" id="variable"> -->
                                <!-- update end by vivek 2019-7-15 -->
                                <td class="dataCell">
                                    <div style="width:2px;height:20px;background-color:red; position:absolute;margin-right:5px;"></div>
                                    <apex:inputField onblur="ComputePrice(this)" id="consumablesCount" value="{!records.orderdetails1.Shipment_Count__c}" style="width: 100px;" /></td>
                                 </apex:variable>
                                <apex:variable var="v" value="" rendered="{!EditAble}" id="variableMoneyinfo">
                                    <td class="dataCell">
                                    <div style="width:2px;height:20px;background-color:red; position:absolute;margin-right:5px;"></div>
                                    <apex:inputField onblur="ComputePriceCheck(this)" value="{!records.orderdetails1.Delivery_List_RMB__c}" style="width: 100px;" id="productOrderMoneyinfo"/>
                                    </td>
                                    <!-- <td class="dataCell">
                                    <apex:inputField id="Unitpriceagency" value="{!records.orderdetails1.Unitprice_To_agency__c}"  style="width: 100px;"/>
                                    </td> -->
                                </apex:variable>
                                <apex:variable var="v" value="" rendered="{!!EditAble}">
                                    <td class="dataCell" style="text-align:center;">
                                    <apex:outputText id="consumablesCountDealerPrice_Unedit" value="{!IF(records.orderdetails1.Delivery_List_RMB__c==null,0.00,records.orderdetails1.Delivery_List_RMB__c)}"/>
                                    </td>
                                    <!-- <td style="text-align:center;"><apex:outputField id="consumablesCount_Unagency" value="{!records.orderdetails1.Unitprice_To_agency__c}"/></td> -->
                                </apex:variable>

                                <apex:variable var="v" value="" id="variableAllprice" rendered="{!EditAble}">
                                <td class="dataCell" style="text-align:center;">
                                    <apex:outputField id="consumablesCounttestPrice" value="{!records.orderdetails1.Shipment_amount__c}"/>
                                </td>
                                <!--<td class="dataCell" style="text-align:right;width: 50px;">{!records.allnumber}</td>-->
                                <td class="dataCell" style="text-align:center;width: 50px;">{!records.Boxnumber}</td>
                                <td class="dataCell" style="text-align:center;width: 50px;">{!records.Piecenumber}</td>
                                </apex:variable>
                                <apex:variable var="v" value="" rendered="{!!EditAble}">
                                    <td class="dataCell" style="text-align:center;"><apex:outputField value="{!records.orderdetails1.InvoiceProNot_count__c}"/></td>
                                    <td class="dataCell" style="text-align:center;"><apex:outputField value="{!records.orderdetails1.RrturnPro_count__c}"/></td>
                                    <td class="dataCell" style="text-align:center;"><apex:outputField value="{!records.orderdetails1.Invoiced_Procount__c}"/></td>
                                </apex:variable>
                                    <!-- add by rentx 2020-11-26 start -->
                                <apex:detail rendered="{!hasHosPro}" >
                                    <td>
                                        <!-- <apex:outputField value="{!records.orderdetails2.hospitalSpecialOffer__c}"/> -->
                                        <apex:detail rendered="{!records.hospitalSpecialOffer}" >
                                            <apex:inputHidden value="{!records.hospitalSpecialOffer}"  id="hosOffer"/>
                                            <apex:inputHidden value="{!records.hosPro}"  id="hosPro"/>
                                            √
                                        </apex:detail>
                                    </td>
                                </apex:detail>
                            <!-- add by rentx 2020-11-26 end -->
                            </tr>
                        </apex:repeat>
                    </table>
                    <table style="width: 100%">
                         <tr>
                            <td>
                                <!-- Page X of Y -->
                                <!-- PageNumber：当前页面所在位置，ResultSize：记录总条数，PageSize：每页记录条数 -->
                                <apex:outputText value="{!(setCon.pageNumber * size)+1-size}-{!IF((setCon.pageNumber * size)>noOfRecords, noOfRecords,
                                 (setCon.pageNumber * size))} 共 {!noOfRecords} 个" />
                                 <!--<apex:outputPanel >
                                    <apex:actionStatus id="fetchStatus" >
                                        <apex:facet name="start" >
                                          <img src="/img/loading.gif" />
                                        </apex:facet>
                                    </apex:actionStatus>
                                </apex:outputPanel>-->
                            </td>
                            <td align="center">
                                <div class="paginator line1">
                                <span class="prevNextLinks">
                                <!-- 有连接 -->
                                <apex:outputPanel rendered="{!setCon.hasPrevious}">
                                <span class="prevNext">
                                <apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!setCon.first}" oncomplete="refreshPageSizeJs();" title="首页" >
                                <img src="/s.gif" title="首页" alt="首页" class="{!if((setCon.hasPrevious),'first','firstoff')}"/>
                                </apex:commandLink>
                                </span>
                                <span class="prevNext">
                                <apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection"  action="{!setCon.previous}" oncomplete="refreshPageSizeJs();"  title="上一页">
                                <img src="/s.gif" title="上一页" alt="上一页" class="{!if((setCon.hasPrevious),'prev','prevoff')}"/>上一页
                                </apex:commandLink>
                                </span>
                                </apex:outputPanel>
                                <!-- 无连接 -->
                                <apex:outputPanel rendered="{!!setCon.hasPrevious}">
                                <span class="prevNext">
                                <apex:commandLink status="fetchStatus" oncomplete="onLoadDirction();" reRender="ConsumableorderdetailsSection" title="首页" >
                                <img src="/s.gif" title="首页" alt="首页" class="{!if((setCon.hasPrevious),'first','firstoff')}"/>
                                </apex:commandLink>
                                </span>
                                <span class="prevNext">
                                <apex:commandLink status="fetchStatus" oncomplete="onLoadDirction();" reRender="ConsumableorderdetailsSection"  title="上一页">
                                <img src="/s.gif" title="上一页" alt="上一页" class="{!if((setCon.hasPrevious),'prev','prevoff')}"/>上一页
                                </apex:commandLink>
                                </span>
                                </apex:outputPanel>
                                <!-- 有连接 -->
                                <apex:outputPanel rendered="{!setCon.hasNext}">
                                <span class="prevNext" rendered = "{!!setCon.hasNext}">
                                <apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!setCon.next}" oncomplete="refreshPageSizeJs();" title="下一页" rendered="{!setCon.hasNext}">下一页
                                <img src="/s.gif" title="下一页" alt="下一页" class="{!if((setCon.hasNext),'next','nextoff')}" />
                                </apex:commandLink>
                                </span>
                                <span class="prevNext">
                                <apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!setCon.last}"  oncomplete="refreshPageSizeJs();" title="尾页">
                                <img src="/s.gif" title="尾页" alt="尾页" class="{!if((setCon.hasNext),'last','lastoff')}"/>
                                </apex:commandLink>
                                </span>
                                </apex:outputPanel>
                                <!-- 无连接 -->
                                <apex:outputPanel rendered="{!!setCon.hasNext}">
                                <span class="prevNext" rendered = "{!setCon.hasNext}">
                                <apex:commandLink status="fetchStatus" oncomplete="onLoadDirction();" reRender="ConsumableorderdetailsSection"  title="下一页">下一页
                                <img src="/s.gif" title="下一页" alt="下一页" class="{!if((setCon.hasNext),'next','nextoff')}" />
                                </apex:commandLink>
                                </span>
                                <span class="prevNext">
                                <apex:commandLink status="fetchStatus" oncomplete="onLoadDirction();" reRender="ConsumableorderdetailsSection" title="尾页">
                                <img src="/s.gif" title="尾页" alt="尾页" class="{!if((setCon.hasNext),'last','lastoff')}"/>
                                </apex:commandLink>
                                </span>
                                </apex:outputPanel>
                                </span>
                                </div>
                             </td>
                             <td align="right" width="20%">
                            </td>
                        </tr>
                    </table>
                    <!--
                    <div class="paginator line1">
                        <span class="prevNextLinks"><span class="prevNext"><apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!setCon.first}" oncomplete="refreshPageSizeJs();" title="首页" rendered="{!!setCon.hasPrevious}"><img src="/s.gif" title="首页" alt="首页" class="first"/></apex:commandLink></span>
                        <span class="prevNext"><apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection"  action="{!setCon.previous}" oncomplete="refreshPageSizeJs();"  title="上一页"><img src="/s.gif" title="上一页" alt="上一页" class="prev"/>上一页</apex:commandLink></span>
                        <span class="prevNext"><apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!setCon.next}" oncomplete="refreshPageSizeJs();" title="下一页">下一页<img src="/s.gif" title="下一页" alt="下一页" class="next"/></apex:commandLink></span>
                        <span class="prevNext"><apex:commandLink status="fetchStatus" reRender="ConsumableorderdetailsSection" action="{!setCon.last}"  oncomplete="refreshPageSizeJs();" title="尾页"><img src="/s.gif" title="尾页" alt="尾页" class="last"/></apex:commandLink></span></span>
                    </div>
                    <apex:panelGrid columns="8" styleClass="panelGridCenter">
                <apex:commandButton status="fetchStatus" reRender="ConsumableorderdetailsSection" value="首页" action="{!setCon.first}" oncomplete="refreshPageSizeJs();" disabled="{!!setCon.hasPrevious}" title="首页"/>
                <apex:commandButton status="fetchStatus" reRender="ConsumableorderdetailsSection" value="上一页" action="{!setCon.previous}" oncomplete="refreshPageSizeJs();"  disabled="{!!setCon.hasPrevious}" title="上一页"/>

                <apex:commandButton status="fetchStatus" reRender="ConsumableorderdetailsSection" value="下一页" action="{!setCon.next}" disabled="{!!setCon.hasNext}" oncomplete="refreshPageSizeJs();" title="下一页"/>
                <apex:commandButton status="fetchStatus" reRender="ConsumableorderdetailsSection" value="尾页" action="{!setCon.last}" disabled="{!!setCon.hasNext}" oncomplete="refreshPageSizeJs();" title="尾页"/>
                <apex:outputText >{!(setCon.pageNumber * size)+1-size}-{!IF((setCon.pageNumber * size)>noOfRecords, noOfRecords,
                     (setCon.pageNumber * size))} 共 {!noOfRecords} 个
                </apex:outputText>
                <apex:outputPanel >
                    <apex:actionStatus id="fetchStatus" >
                        <apex:facet name="start" >
                          <img src="/img/loading.gif" />
                        </apex:facet>
                    </apex:actionStatus>
                </apex:outputPanel>

            </apex:panelGrid>-->
                </apex:pageBlock>

                <apex:pageBlock title="发票明细" rendered="{!IF((coc.Billed_Status__c !='还没开票') && IdCheck != null,true,false)}">
                     <apex:pageblocksection columns="1" id="consumableInvoiceRecordsSection">
                        <apex:pageblocktable value="{!consumableInvoiceRecords}" var="records" id="consumableInvoiceRecordsTable">
                             <apex:column width="80">
                                 <apex:facet name="header">发票号</apex:facet>
                                 <apex:outputField value="{!records.Name}"/>
                             </apex:column>
                              <apex:column width="80">
                                 <apex:facet name="header">发票日</apex:facet>
                                 <apex:outputField value="{!records.Invoice_Date__c}"/>
                             </apex:column>
                             <apex:column width="80" style="text-align: center;">
                                 <apex:facet name="header">发票票面金额(元)</apex:facet>
                                 <apex:outputField value="{!records.Invoice_total_amount__c}"/>
                             </apex:column>
                             <apex:column width="80">
                                 <apex:facet name="header">发票状态</apex:facet>
                                 <apex:outputField value="{!records.Invoice_status__c}"/>
                             </apex:column>
                        </apex:pageblocktable>
                    </apex:pageblocksection>
                </apex:pageBlock>

                <apex:pageBlock title="出库产品明细" rendered="{!IF(consumableorderdetails2Count > 0,true,false)}">
                <apex:pageblocksection columns="1" id="Consumableorderdetails2Section">
                    <apex:pageblocktable value="{!consumableorderdetails2Records}" var="records" id="Consumableorderdetails2Table">
                         <apex:column width="80">
                             <apex:facet name="header">消耗品名称</apex:facet>
                             <apex:outputField value="{!records.Prod.name}"/>
                         </apex:column>
                          <apex:column width="80">
                             <apex:facet name="header">批次号</apex:facet>
                             <apex:outputField value="{!records.orderdetails2.SerialLotNo__c}" />
                         </apex:column>
                          <apex:column width="80">
                             <apex:facet name="header">管理编码</apex:facet>
                             <apex:outputField value="{!records.orderdetails2.TracingCode__c}"/>
                         </apex:column>
                          <apex:column width="80">
                             <apex:facet name="header">使用期限</apex:facet>
                             <apex:outputField value="{!records.orderdetails2.Sterilization_limit__c}"/>
                         </apex:column>
                        <!-- <apex:column width="80">
                             <apex:facet name="header">开票日</apex:facet>
                             <apex:outputField value="{!records.orderdetails2.Invoice_Date__c}" />
                         </apex:column>
                          <apex:column width="80">
                             <apex:facet name="header">发票号</apex:facet>
                             <apex:outputLink value="/ConInvoiceView?invoiceId={!records.orderdetails2.Invoice_No__c}" target="_blank">
                                <apex:outputText value="{!records.orderdetails2.Invoice_No__r.Name}" />
                             </apex:outputLink>
                         </apex:column> -->
                    </apex:pageblocktable>
                </apex:pageblocksection>
            </apex:pageBlock>
            </apex:pageBlock>
        </apex:outputPanel>
        <apex:pageBlock title="附件" id="ConsumableConsumeSection" rendered="{!!editAble}">
        <apex:pageBlockTable value="{!AttachmentRecoeds}" var="a" >
        <apex:column headerValue="标题" style="width: 33%">
        <apex:outputLink value="{!a.Concc.Id}" target="LINK_{!a.Concc.Id}">
            {!a.Concc.name}
        </apex:outputLink>
        </apex:column>
        <apex:column headerValue="创建人">
            <apex:outputField value="{!a.Concc.OwnerId}"/>
        </apex:column>
        </apex:pageBlockTable>
        <apex:pageBlockButtons location="top" >
            <apex:commandButton onclick="FilesUaplodJs();" value="上传附件" style="margin-left:30px;width:100px" rerender="dummy" rendered="{!!(EditDelCommitBtnDisabled||EditAble)}"/>
        </apex:pageBlockButtons>
    </apex:pageBlock>
    </apex:form>
<script>

</script>
</apex:page>