| <apex:page Controller="ConsumableController" showHeader="true" tabStyle="ConsumableOrderManage__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)}"/> | 
| <script> | 
| //add by rentx 2020-11-17 start 失去焦点 | 
| function setFocusOnLoad() {} | 
| function bodyOnLoad(){setFocusOnLoad();} | 
| //add by rentx 2020-11-17 end 失去焦点 | 
| function searchContract(str){ | 
|     // alert('123'); | 
|     j$(escapeVfId('allPage:allForm:allBlock:searchBlock:OEC')).attr('readonly',true); | 
|     openPopup('/customer/searchContract?Ctype=' + str, 'setsearch', 800, 600, 'width=900,height=600,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true); | 
| } | 
| //add by rentx 2020-11-24 start | 
| function searchHospital(){ | 
|     j$(escapeVfId('allPage:allForm:allBlock:searchBlock:HOS')).attr('readonly',true); | 
|     openPopup('/customer/searchHospital', 'setsearch', 800, 600, 'width=900,height=600,scrollbars=yes,toolbar=no,status=no,directories=no,menubar=no,resizable=1', true); | 
| } | 
| //add by rentx 2020-11-24 end | 
|   | 
|   | 
| function ClearJs(){ | 
|     blockme(); | 
|     document.getElementById("allPage:allForm:allBlock:searchBlock:OrderDateSearch").value = ""; | 
|     document.getElementById("allPage:allForm:allBlock:searchBlock:category3Search").value = ""; | 
|     document.getElementById("allPage:allForm:allBlock:searchBlock:category4Search").value = ""; | 
|     document.getElementById("allPage:allForm:allBlock:searchBlock:category5Search").value = ""; | 
|     j$(escapeVfId('allPage:allForm:allBlock:searchBlock:SpecialCampaign')).attr('checked',false); | 
|     searchConsumableorderdetails(); | 
| } | 
| var selectedSize = 0; | 
| var pageLimit = {!pageLimit}; | 
| function checkAll() { | 
|     selectedSize = 0; | 
|     var productCount = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsCount')).value(); | 
|     if (j$(escapeVfId('checker')).attr('checked') == 'checked') { | 
|         //console.log(productCount); | 
|         //var outer = 0; | 
|         for (var i = 0; i < productCount; i++) { | 
|             //outer = Math.floor(i / 1000); | 
|             if(selectedSize >= pageLimit){ | 
|                 window.alert("页面所选数据不能超过500条"); | 
|                 return; | 
|             } | 
|             j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableinfo' + ':consumablesCountproRowCheckbox')).attr('checked',true); | 
|             selectedSize ++; | 
|             //alert(selectedSize); | 
|         } | 
|     } else { | 
|         //var outer = 0; | 
|         for (var i = 0; i < productCount; i++) { | 
|             //outer = Math.floor(i / 1000); | 
|             j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':variableinfo' + ':consumablesCountproRowCheckbox')).attr('checked',false); | 
|             //selectedSize --; | 
|         } | 
|     } | 
| } | 
|   | 
| function CheckSize(j){ | 
|     var a = j.id; | 
|     var productCount = j$(escapeVfId(a)).attr('checked'); | 
|     if (productCount == 'checked') { | 
|         if(selectedSize >= pageLimit){ | 
|             window.alert("页面所选数据不能超过500条"); | 
|             j$(escapeVfId(a)).attr('checked',false); | 
|             return; | 
|         } | 
|         selectedSize ++; | 
|     } else { | 
|         selectedSize --; | 
|     } | 
|     //alert(selectedSize); | 
| } | 
|   | 
| //正常排序 | 
| function ordrCopyJs(){ | 
|     blockme(); | 
|     ordrCopy(); | 
| } | 
|   | 
| //正常排序 | 
| function SortLimitedJs(key){ | 
|     blockme(); | 
|     SortLimited(key); | 
| } | 
| //库存排序 | 
| function SortStoreJs(key){ | 
|     blockme(); | 
|     SortStore(key); | 
| } | 
|   | 
| //特价编辑 | 
| function OffersPriceJs(){ | 
|     blockme(); | 
|     OffersPrice(); | 
| } | 
| function EditConsumable(){ | 
|     //解除不可写状态 | 
|     blockme(); | 
|     setEditAble(); | 
|     //alert("statusEdit"+'{!statusEdit}'); | 
| } | 
|   | 
| function backOrderJs(){ | 
|     //解除不可写状态 | 
|     blockme(); | 
|     backOrder(); | 
|     //alert("statusEdit"+'{!statusEdit}'); | 
| } | 
| function DeleteConsumable(){ | 
|     //删除这一单 | 
|     if(window.confirm('删除是不可恢复的,你确认要删除吗?')){ | 
|         DelConsumable(); | 
|     } | 
| } | 
|   | 
| function FilesUploadJs(){ | 
|     //上传文件 | 
|     FilesUpload(); | 
| } | 
|   | 
| function saveJs() { | 
|     blockme(); | 
|     beforeSaveJs(); | 
|     save(); | 
| } | 
|   | 
| function beforeSaveJs() { | 
|     var OffersPrice = j$(escapeVfId('allPage:allForm:allBlock:unEditable:sumPrice_buttom2')).value(); | 
|     j$(escapeVfId('allPage:allForm:allBlock:unEditable:theHiddenInput')).val(OffersPrice.replace(/,/g,"")); | 
| } | 
| function getParagram(){ | 
|     //获取url参数 | 
|     var url = location.search; //获取url中"?"符后的字串 | 
|     var theRequest = new Object(); | 
|     if (url.indexOf("?") != -1) { | 
|         var str = url.substr(1); | 
|         strs = str.split("&"); | 
|         for(var i = 0; i < strs.length; i ++) { | 
|             theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]); | 
|             } | 
|         } | 
|     return theRequest; | 
| } | 
| //打印订单 | 
| function printConsumableJs(){ | 
|     window.open("/customer/PrintConsumblePDF?ESetid="+'{!URLENCODE(ESetId)}'); | 
| } | 
| function SorderJs() { | 
|     blockme(); | 
|     Sorder(); | 
| } | 
|   | 
| function searchProductJs() { | 
|     blockme(); | 
|     var productCount = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsCount')).value(); | 
|     var isChanged = false; | 
|     for (var i = 0; i < productCount; i++) { | 
|         var nowChk = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':sumablesCountproRowCheckbox')).attr('checked'); | 
|         var oldChk = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':proRowOldCheckbox')).attr('checked'); | 
|         var consumablesCount= j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':consumablesCount')).value(); | 
|         var oldConsumableCount= j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':oldConsumableCount')).value(); | 
|         if (nowChk != oldChk || (nowChk == 'checked' && consumablesCount != oldConsumableCount)) { | 
|             isChanged = true; | 
|             break; | 
|         } | 
|     } | 
|   | 
|         searchConsumableorderdetails(); | 
| } | 
|   | 
| function searchHProductJs() { | 
|     blockme(); | 
|     searchorderdetails(); | 
|     j$(escapeVfId("allPage:allForm:allBlock:searchBlock:HOSIds")).val('tempId'); | 
| } | 
| function searchPProductJs() { | 
|     blockme(); | 
|     searchorderdetails(); | 
|     j$(escapeVfId("allPage:allForm:allBlock:searchBlock:tempidPp")).val('tempId'); | 
|   | 
| } | 
|   | 
| function setDisabled() { | 
|     var productCount = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsCount')).value(); | 
|     for (var i = 0; i < productCount; i++) { | 
|         var canselect = j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':canSelect')).value(); | 
|         if (canselect == 'false') { | 
|             j$(escapeVfId('allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsTable:' + i + ':shelfnumber')).attr('disabled',true); | 
|         } | 
|     } | 
| } | 
|   | 
| function ComputePrice(j) { | 
|     var z,x,c,v; | 
|     var a = j.id; | 
|     var i=a.substring(0,a.lastIndexOf(':')); | 
|     z  =  parseFloat(j$(escapeVfId(i+':consumablesCount')).value()); | 
|     x  =  parseFloat(j$(escapeVfId(i+'allnumber:consumablesallnumber')).value()); | 
|     v  =  parseFloat(j$(escapeVfId(i+'in:consumablesinCount')).value()); | 
|     c  =  parseFloat(j$(escapeVfId(i+'low:consumablesinCountlow')).value()); | 
|     //z= z.replace(/,/g,'');; | 
|     if(isNaN(z)){z=0.00;} | 
|     if(z!=null&&z!=0&&z!=''){ | 
|     j$(escapeVfId(i+'info:consumablesCountproRowCheckbox')).attr('checked',true); | 
|     }else{ | 
|     j$(escapeVfId(i+'info:consumablesCountproRowCheckbox')).attr('checked',false); | 
|     } | 
|     if (z + x > v){ | 
|         window.alert("该产品订购数量超出库存上限!"); | 
|     } | 
|     if (z + x < c) { | 
|         window.alert("该产品订购数量低于库存下限!"); | 
|     } | 
| } | 
|   | 
| function calonLoad() { | 
| } | 
|   | 
| function showCate() { | 
|     //var productCount = j$(escapeVfId('allPage:allForm:allBlock:searchBlock:category3Search')).value(); | 
|     categoryload(); | 
| } | 
|   | 
| function showAllCate() { | 
|     //var productCount = j$(escapeVfId('allPage:allForm:allBlock:searchBlock:category3Search')).value(); | 
|     categoryAllload(); | 
| } | 
| function refreshPageSizeJs() { | 
|     refreshPageSize(); | 
| } | 
| window.sfdcPage.appendToOnloadQueue(function() { calonLoad() }); | 
| </script> | 
| <style> | 
|     .dateFormat  { | 
|         display: none; | 
|     } | 
|     td.columuslowercolour { | 
|         background-color:red; | 
|         text-align: right; | 
|     } | 
|         td.columuscuperolour { | 
|         background-color: yellow; | 
|         text-align: right; | 
|     } | 
| </style> | 
|     <apex:form id="allForm"> | 
|         <apex:actionFunction name="refreshPageSize" action="{!refreshPageSize}" reRender="ConsumableorderdetailsSection"/> | 
|         <apex:actionFunction name="ordrCopy" action="{!ordrCopy}" rerender="editAble,ConsumableorderdetailsSection, message,editAble" onComplete="unblockUI();CheckStatusAfter()"> | 
|         </apex:actionFunction> | 
|          <apex:actionFunction name="categoryAllload" action="{!categoryAllload}" rerender="searchBlock" onComplete="unblockUI();"> | 
|         </apex:actionFunction> | 
|         <apex:actionFunction name="categoryload" action="{!categoryload}" rerender="searchBlock" onComplete="unblockUI();"> | 
|         </apex:actionFunction> | 
|         <apex:actionFunction name="save" action="{!save}" rerender="editAble,ConsumableorderdetailsSection, message,editAble" onComplete="unblockUI();CheckStatusAfter();"> | 
|         </apex:actionFunction> | 
|          <apex:actionFunction name="printConsumable" action="{!printConsumable}"> | 
|         </apex:actionFunction> | 
|         <apex:actionFunction name="Sorder" action="{!Sorder}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter();init();"> | 
|         </apex:actionFunction> | 
|         <apex:actionFunction name="searchConsumableorderdetails" action="{!searchConsumableorderdetails}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter();SumCompute()"> | 
|         </apex:actionFunction> | 
|         <!-- add by rentx 2020-12-03  --> | 
|         <apex:actionFunction name="searchorderdetails" action="{!searchorderdetails}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter();SumCompute()"> | 
|         </apex:actionFunction> | 
|         <!-- add by rentx 2020-12-03  --> | 
|   | 
|         <apex:actionFunction name="setEditAble" action="{!setEditAble}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()"> | 
|         </apex:actionFunction> | 
|          <apex:actionFunction name="DelConsumable" action="{!DelConsumable}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()"> | 
|         </apex:actionFunction> | 
|         <apex:actionFunction name="OffersPrice" action="{!OffersPrice}" rerender="EDCline_1,unEditable, message" onComplete="unblockUI();CheckStatusAfter()"> | 
|         </apex:actionFunction> | 
|         <apex:actionFunction name="backOrder" action="{!backOrder}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()"> | 
|         </apex:actionFunction> | 
|         <apex:actionFunction name="FilesUpload" action="{!FilesUpload}" rerender="ConsumableorderdetailsSection, message" onComplete="unblockUI();CheckStatusAfter()"> | 
|         </apex:actionFunction> | 
|         <apex:actionFunction name="SortLimited" action="{!SortLimited}" rerender="ConsumableorderdetailsSection" onComplete="unblockUI();CheckStatusAfter();SumCompute()"> | 
|             <apex:param name="firstParam" assignTo="{!sortKey}" value="" /> | 
|         </apex:actionFunction> | 
|        <apex:actionFunction name="SortStore" action="{!SortStore}" rerender="ConsumableorderdetailsSection" onComplete="unblockUI();CheckStatusAfter();SumCompute()"> | 
|             <apex:param name="firstParam" assignTo="{!sortKey}" value="" /> | 
|         </apex:actionFunction> | 
|         <apex:outputPanel id="allPanel"> | 
|             <apex:pageBlock id="allBlock" > | 
| <!--==============20160314====INSERT_CODE_START=======================================--> | 
|                 <apex:pageBlock id="EDCline_1" > | 
|                     <apex:commandButton onclick="EditConsumable();"   value="编辑" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!!(editAble || edoffersPrice)}" disabled="{!IF(coc.Order_status__c='已提交'||coc.Order_status__c='批准'||coc.Order_status__c='驳回',true,false)}"/> | 
|                     <apex:commandButton onclick="printConsumableJs();"           value="打印配置单" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!!(EditDelCommitBtnDisabled||editAble ||edoffersPrice)}" /> | 
|                     <apex:commandButton onclick="FilesUploadJs();"         value="上传配置单" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!!(EditDelCommitBtnDisabled||editAble ||edoffersPrice)}" disabled="{!IF(coc.Order_status__c='已提交'||coc.Order_status__c='批准'||coc.Order_status__c='驳回',true,false)}"/> | 
|                     <apex:commandButton onclick="SorderJs();"         value="提交订单" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!!(EditDelCommitBtnDisabled||editAble ||edoffersPrice)}" disabled="{!IF(coc.Order_status__c='已提交'||coc.Order_status__c='批准'||coc.Order_status__c='驳回',true,false)}"/> | 
|                     <apex:commandButton onclick="saveJs();"           value="保存订单" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!IF((EditDelCommitBtnDisabled||editAble ||edoffersPrice) && coc.Order_status__c !='驳回',true,false)}" /> | 
|                     <apex:commandButton onclick="ordrCopyJs();"           value="保存订单" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!IF(coc.Order_status__c='驳回' && editAble,true,false)}" /> | 
|                     <apex:commandButton onclick="DeleteConsumable();" value="删除" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!!(EditDelCommitBtnDisabled||editAble ||edoffersPrice)}" disabled="{!IF(coc.Order_status__c='已提交'||coc.Order_status__c='批准'||coc.Order_status__c='驳回',true,false)}"/> | 
|                     <apex:commandButton onclick="OffersPriceJs();"   value="特价金额录入" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!!(editAble ||edoffersPrice)}" disabled="{!IF(coc.Order_status__c='已提交'||coc.Order_status__c='批准'||coc.Order_status__c='驳回',true,false)}"/> | 
|                     <apex:commandButton onclick="backOrderJs();"   value="再申请" style="margin-left:30px;width:180px" rerender="dummy" rendered="{!IF(coc.Order_status__c='驳回' && !editAble,true,false)}"/> | 
|                 </apex:pageBlock> | 
| <!--==============20160314====INSERT_CODE_END=======================================--> | 
|                  | 
|                 <!--<apex:pageBlock title="订单信息" id="Editabletable" rendered="{!(editAble && ESetId != null && returnOrder)}"> | 
|                     <table> | 
|                         <colgroup> | 
|                             <col width="160px"/> | 
|                             <col width="200px"/> | 
|                             <col width="40px"/> | 
|                             <col width="150px"/> | 
|                             <col width="140px"/> | 
|                             <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" style="visibility:hidden"><apex:outputtext id="OrderCode1" rendered="false" value="订单编码" style="width:100px"/></td> | 
|                             <td align="right" style="visibility:hidden"><apex:outputField id="OrderCode" rendered="false" value="{!coc.Name}" style="width:300px" /></td> | 
|                             <td align="right" style="visibility:hidden">状 态</td> | 
|                             <td align="right" style="visibility:hidden"><apex:inputField id="OrderStatus" rendered="false" value="{!coc.Order_status__c}" style="width:100px"/></td> | 
|                             <td style="visibility:hidden"><input id="buffForSorder"/></td> | 
|                         </tr> | 
|                         <tr> | 
|                             <td align="right" ><apex:outputText id="PruductSumPrice1" value="总金额 :"/></td> | 
|                             <td align="left"><apex:outputText id="sumPrice_buttom" value="{!sumPrice}"/></td> | 
|                         </tr> | 
|                         <tr> | 
|                             <td align="right" ><apex:outputText value="特价金额:" /></td> | 
|                             <td align="left"><apex:outputField id="OffersPrice" value="{!coc.Offers_Price__c}"  style="width:100px"/></td> | 
|                            <td/> | 
|                         </tr> | 
|                     </table> | 
|                 </apex:pageBlock>--> | 
|   | 
| <!--==============20160314====INSERT_CODE_START=======================================--> | 
|                  <apex:pageBlock title="订单信息" id="unEditable" rendered="{!!(editAble)}"> | 
|                     <table> | 
|                         <colgroup> | 
|                             <col width="160px"/> | 
|                             <col width="300px"/> | 
|                             <col width="10px"/> | 
|                             <col width="300px"/> | 
|                             <col width="300px"/> | 
|                         </colgroup> | 
|                         <tr> | 
|                             <td align="right" >订单编码:</td> | 
|                             <td align="left" ><apex:outputField id="OrderCode_out"  value="{!coc.Name}" style="width:300px"/></td> | 
|                             <td/> | 
|                             <td align="right" >状 态:</td> | 
|                             <td align="left" ><apex:outputField id="OrderStatus_out" value="{!coc.Order_status__c}" style="width:100px"/></td> | 
|                             <td/> | 
|                         </tr> | 
|                         <tr> | 
|                             <td align="right" ><apex:outputText id="PruductSumPrice" value="总金额 :" rendered="{!(!editAble)}"/></td> | 
|                             <td align="left"><apex:outputField id="sumPrice_buttom" value="{!coc.Total_amount__c}" rendered="{!(!editAble)}"/></td> | 
|                            <td/> | 
|                             <td align="right" >合 同:</td> | 
|                             <td align="left" ><apex:outputField value="{!coc.Order_effective_contact__r.Name}"/></td> | 
|                             <td/> | 
|                         </tr>  | 
|                         <tr> | 
|                             <td align="right" ><apex:outputText id="PruductSumPrice1" value="特价金额:" rendered="{!!edoffersPrice}"/></td> | 
|                             <td align="left"><apex:outputField id="sumPrice_buttom1" value="{!coc.Offers_Price__c}" rendered="{!!edoffersPrice}"/></td> | 
|                            <td/> | 
|                         </tr> | 
|                         <tr> | 
|                             <td align="right" ><apex:outputText id="pruductSumPrice2" value="特价金额:" rendered="{!edoffersPrice}"/></td> | 
|                             <td align="left"><apex:inputField id="sumPrice_buttom2" value="{!coc.Offers_Price__c}" rendered="{!edoffersPrice}"/> | 
|                             <apex:inputHidden value="{!bargainPrice}" id="theHiddenInput"/></td> | 
|                            <td/> | 
|                         </tr> | 
|                         <tr> | 
|                             <td align="right" ><apex:outputText rendered="{!IF(coc.Consumable_pdf_insert_day__c=null,false,true)}" value="附件上传日期:" id="upLoadDateTitle"/></td> | 
|                             <td align="left"><apex:outputField id="upLoadDate" rendered="{!IF(coc.Consumable_pdf_insert_day__c=null,false,true)}"  value="{!coc.Consumable_pdf_insert_day__c}" style="width:300px;"/></td> | 
|                         </tr> | 
|                         <tr> | 
|                             <td align="right" ><apex:outputText rendered="{!IF(coc.Order_status__c='已提交'||coc.Order_status__c='批准',true,false)}" value="订单日期:" id="Date"/></td> | 
|                             <td align="left" ><apex:outputField rendered="{!IF(coc.Order_status__c='已提交'||coc.Order_status__c='批准',true,false)}" id="OrderDate_out" value="{!coc.Order_date__c}" style="width:100px"/></td> | 
|                             <td><apex:inputHidden id="decisionCode" value="{!decisionCode}"/></td> | 
|                             <td style="visibility:hidden"><input id="buffForSorder"/></td> | 
|                         </tr> | 
|                     </table> | 
|                 </apex:pageBlock> | 
| <!--==============20160314====INSERT_CODE_END=======================================--> | 
|                 <apex:pageBlock id="searchBlock" rendered="{!editAble}"> | 
|                     <table> | 
|                         <colgroup> | 
|                             <col width="10px"/> | 
|                             <col width="10px"/> | 
|                             <col width="60px"/> | 
|                             <col width="220px"/> | 
|                             <col width="60px"/> | 
|                             <col width="60px"/> | 
|                             <col width="180px"/> | 
|                             <col width="60px"/> | 
|                             <col width="60px"/> | 
|                             <col width="180px"/> | 
|                             <col width="60px"/> | 
|                             <col width="60px"/> | 
|                             <col width="180px"/> | 
|                             <col width="60px"/> | 
|                             <col width="80px"/> | 
|                             <col width="80px"/> | 
|                             <col width="80px"/> | 
|                             <col width="35px"/> | 
|                             <col width="90px"/> | 
|                             <col width="100px"/> | 
|                             <col width="10px"/> | 
|                             <col width="85px"/> | 
|                         </colgroup> | 
|                         <!-- //add by rentx 2020-11-23 start --> | 
|                         <tr> | 
|                             <td align="right"></td> | 
|                             <td></td> | 
|                             <td/> | 
|                             <td align="right"> | 
|                                 <apex:detail rendered="{!methodType == 'hospitalorder' && agencyProType != 'ET'}"> | 
|                                     <apex:outputText value="医 院: "  ></apex:outputText> | 
|                                 </apex:detail> | 
|                             </td> | 
|                             <td width="100px"><apex:inputText id="HOS" value="{!hospitalName}" rendered="{!methodType == 'hospitalorder' && agencyProType != 'ET'}" style="width:100px" onclick="searchHospital()" onfocus="if (j$(escapeVfId('allPage:allForm:allBlock:searchBlock:HOSIds')).value() != 'tempId' && j$(escapeVfId('allPage:allForm:allBlock:searchBlock:HOSIds')).value() != ''){searchHProductJs('0');return false;}"/> | 
|                                 <apex:inputHidden id="HOSIds" value="{!tempidHp}" /> | 
|                                 <apex:inputHidden id="HOSId" value="{!hospitalId}" /></td> | 
|                             <td colspan="17" /> | 
|                         </tr> | 
|                         <!-- //add by rentx 2020-11-23 end --> | 
|   | 
|                         <tr> | 
|                             <td align="right"></td> | 
|                             <td></td> | 
|                             <td/> | 
|                             <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/> | 
|                             <td></td> | 
|                             <td></td> | 
|                             <td/> | 
|                             <!--<td align="right">促销</td> | 
|                             <td  align="left"> | 
|                                 <apex:inputCheckbox value="{!specialCampaign}" id="SpecialCampaign"  style="width:20px"/> | 
|                             </td> | 
|                             <td/>--> | 
|                             <td align="right"></td> | 
|                             <td><apex:commandButton value="消耗品搜索" style="width: 100px;" onclick="searchProductJs('0');return false;" /></td> | 
|                             <td><input type="button" value="清空" style="width: 100px;" onclick="ClearJs();return false;" class="btn"/></td> | 
|                             <td/> | 
|                         </tr> | 
|                         <tr> | 
|                             <td colspan="22"></td> | 
|                         </tr> | 
|                         <tr> | 
|                             <td colspan="17"></td> | 
|                             <td colspan="2">合 同:</td> | 
|                             <td colspan="2"> | 
|                                 <div style="width:2px;height:20px;background-color:red; position:absolute;margin-right:5px;"></div> | 
|                                 <apex:inputText id="OEC" value="{!contractName}" onclick="searchContract('{!agencyProType}')" style="width:200px" onfocus="if (j$(escapeVfId('allPage:allForm:allBlock:searchBlock:tempidPp')).value() != 'tempId' && j$(escapeVfId('allPage:allForm:allBlock:searchBlock:tempidPp')).value() != '' && j$(escapeVfId('allPage:allForm:allBlock:searchBlock:OECid')).value() != '' && '{!methodType}' == 'promotionorder'){searchPProductJs('0');return false;}"/> | 
|                                 <apex:inputHidden id="OECid" value="{!contractId}" /> | 
|                                 <apex:inputHidden id="tempidPp" value="{!tempidPp}" /> | 
|                             </td> | 
|                             <td/> | 
|                         </tr> | 
|                     </table> | 
|                 </apex:pageBlock> | 
|                 <apex:outputPanel id="message"> | 
|                     <apex:pageMessages /> | 
|                  </apex:outputPanel> | 
|                 <apex:pageBlock title="消耗品明细" id="ConsumableorderdetailsSection"> | 
|                 <input type="hidden" id="allPage:allForm:allBlock:ConsumableorderdetailsSection:ConsumableorderdetailsCount" value="{!ConsumableorderdetailsviewCount}" /> | 
|                     <table class="list" border="0" cellpadding="0" cellspacing="0"> | 
|                         <tr class="headerRow"> | 
|                             <apex:variable var="v" value="" rendered="{!editAble}"> | 
|                                 <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>--> | 
|                             <th>规格</th> | 
|                             <th>CFDA状态</th> | 
|                             <th>注册证编码号</th> | 
|                             <th>注册证效期</th> | 
|                             <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> | 
|                             <!--20170925 促销暂时不上线 | 
|                             <th>促销单价</th> | 
|                             <th>促销结束日</th>--> | 
|                             <apex:variable var="v" value="" rendered="{!cansee}"> | 
|                                 <th><a href="#" onclick="SortLimitedJs('2');return false;" style="text-decoration: underline;"><apex:outputText value="标准单价    (元)" rendered="{!cansee}"/></a>{!sortOrder[2]}</th> | 
|                             </apex:variable> | 
|                             <!--<apex:variable var="v" value="" rendered="false" > | 
|                                 <th>经销商定价    (元)</th> | 
|                             </apex:variable> | 
|                             <apex:variable var="v" value="" rendered="false"> | 
|                                 <th>经销商定价    (元)</th> | 
|                             </apex:variable>--> | 
|                             <apex:variable var="v" value="" rendered="{!editAble}"> | 
|                                 <th>{!$ObjectType.Consumable_Orderdetails__c.fields.Consumable_count__c.label}</th> | 
|                             </apex:variable> | 
|                             <apex:variable var="v" value="" rendered="{!!editAble}"> | 
|                             <th>{!$ObjectType.Consumable_Orderdetails__c.fields.Consumable_count__c.label}</th> | 
|                             </apex:variable> | 
|                             <apex:variable var="v" value="" > | 
|                                 <th>在库数下限</th> | 
|                             </apex:variable> | 
|                             <apex:variable var="v" value="" > | 
|                                 <th>在库数上限</th> | 
|                             </apex:variable> | 
|                             <apex:variable var="v" value="" rendered="false"> | 
|                                 <th>实际金额    (元)</th> | 
|                             </apex:variable> | 
|                             <th><a href="#" onclick="SortStoreJs('3');return false;" style="text-decoration: underline;">有效期库存(盒)</a>{!sortOrder[3]}</th> | 
|                             <th>有效期库存(个)</th> | 
|   | 
|                         </tr> | 
|                         <!-- <apex:repeat value="{!ConsumableorderdetailsRecordsview}" var="Recordsview" id="ConsumableorderdetailsTableOuter"> --> | 
|                             <apex:repeat value="{!consumableorderdetailsRecordsview}" var="records" id="ConsumableorderdetailsTable"> | 
|                             <tr class="dataRow"> | 
|                                 <apex:variable var="v" value="" rendered="{!editAble}" id="variableinfo"> | 
|                                     <td> | 
|                                     <apex:inputCheckbox value="{!records.check}" onclick="CheckSize(this);" id="consumablesCountproRowCheckbox" disabled="{!!records.canSelect}"/> | 
|                                      <apex:inputCheckbox value="{!records.oldCheck}" id="proRowOldCheckbox" style="display:none"/></td> | 
|                                  </apex:variable> | 
|                                 <td class="dataCell"> | 
|                                     <apex:outputText value="{!IF(records.oldCheck=false,records.Prod.Name__c,records.esd.Consumable_Product__r.Name__c)}"/> | 
|                                 </td> | 
|                             <!--    <td>{!records.Prod.Asset_Model_No__c}</td>--> | 
|                                 <td class="dataCell" style="text-align: right;">{!records.packing_list}</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> | 
|                                 <td class="dataCell">{!records.Prod.Category3__c}</td> | 
|                                 <td class="dataCell">{!records.Prod.Category4__c}</td> | 
|                                 <td class="dataCell">{!records.Prod.Category5__c}</td> | 
|                                 <!--<td class="dataCell" style="text-align: right;">{!records.SpecialCampaignPrice}</td> | 
|                                 <td class="dataCell"> | 
|                                     <apex:outputText value="{0, date, yyyy/MM/dd}"> | 
|                                         <apex:param value="{!records.Campaign_EndDate}" /> | 
|                                     </apex:outputText> | 
|                                 </td>--> | 
|                                 <apex:variable var="v" value="" rendered="{!cansee}"> | 
|                                     <td>{!records.Prod.Intra_Trade_List_RMB__c}</td> | 
|                                 </apex:variable> | 
|                                 <!--<apex:variable var="v" value="" rendered="{false}" id="DealerCustomPrice"> | 
|                                     <td class="dataCell" ><apex:inputField id="consumablesCoun"  onblur="ComputePriceCheck(this)" value="{!records.esd.Dealer_Custom_Price__c}"/></td> | 
|                                 </apex:variable> | 
|                                 <apex:variable var="v" value="" rendered="false"> | 
|                                     <td class="dataCell">{!records.esd.Dealer_Custom_Price__c}</td> | 
|                                 </apex:variable>--> | 
|                                 <apex:variable var="v" value="" rendered="{!editAble}" id="variable"> | 
|                                 <td class="dataCell"> | 
|                                     <apex:inputField onblur="ComputePrice(this)"  value="{!records.esd.Consumable_count__c}" id="consumablesCount" style="width: 100px;"/> | 
|                                     <apex:inputHidden id="oldConsumableCount" value="{!records.oldConsumableCount}"/></td>   | 
|                                  </apex:variable> | 
|                                 <apex:variable var="v" value="" rendered="{!!editAble}"> | 
|                                 <td class="dataCell" style="text-align: right;">{!records.esd.Consumable_count__c}</td> | 
|                                 </apex:variable> | 
|                                 <apex:variable var="v" value=""  id="variablelow"> | 
|                                     <td class="dataCell" style="text-align: right;"><apex:outputText id="consumablesinCountlow" value="{!records.lowerlimit}"/></td> | 
|                                 </apex:variable> | 
|                                 <apex:variable var="v" value=""  id="variablein"> | 
|                                     <td class="dataCell" style="text-align: right;"><apex:outputText id="consumablesinCount" value="{!records.upperlimit}"/></td> | 
|                                 </apex:variable> | 
|                                 <apex:variable var="v" value="" rendered="false"> | 
|                                     <td class="dataCell">{!records.esd.Sum_of_money__c}</td> | 
|                                 </apex:variable> | 
|                                 <apex:variable var="v" value="" id="variableallnumber"> | 
|                                     <td Class="{!IF(records.upperlimit != null && records.upperlimit != null,IF(records.allnumber > records.upperlimit,'columuscuperolour', IF(records.allnumber < records.lowerlimit,'columuslowercolour', 'dataCell')), 'dataCell')}" style="text-align: right;"><apex:outputText id="consumablesallnumber"  value="{!records.allnumber}"/></td>  | 
|                                 </apex:variable> | 
|                                 <apex:variable var="v" value=""  id="variableallnumber_piece"> | 
|                                     <td class="dataCell" style="text-align: right;"><apex:outputText id="consumablesallnumber_piece" value="{!records.allnumber_piece}"/></td> | 
|                                 </apex:variable> | 
|                             </tr> | 
|                             </apex:repeat> | 
|                         <!-- </apex:repeat> --> | 
|                     </table> | 
|   | 
|                     <div class="paginator line1"> | 
|                         <span class ="left"> | 
|                             <apex:outputText >{!(con.pageNumber * size)+1-size}-{!IF((con.pageNumber * size)>noOfRecords, noOfRecords, | 
|                                 (con.pageNumber * size))} 共 {!noOfRecords}个 | 
|                             </apex:outputText> | 
|                         </span> | 
|                          | 
|                         <span class="prevNextLinks"> | 
|                             <!-- 有上一页--> | 
|                             <apex:outputPanel rendered="{!con.hasPrevious}"> | 
|                             <span class="prevNext"> | 
|                                 <apex:commandLink reRender="ConsumableorderdetailsSection" action="{!con.first}" oncomplete="refreshPageSizeJs();" title="首页"> | 
|                                     <img src="/s.gif" title="首页" alt="首页" class="{!IF(con.hasPrevious,'first', 'firstoff')}"/> | 
|                                 </apex:commandLink> | 
|                             </span> | 
|                             <span class="prevNext"> | 
|                                 <apex:commandLink reRender="ConsumableorderdetailsSection" action="{!con.previous}" oncomplete="refreshPageSizeJs();" title="上一页"> | 
|                                     <img src="/s.gif" title="上一页" alt="上一页" class="{!IF(con.hasPrevious,'prev', 'prevoff')}"/>上一页 | 
|                                 </apex:commandLink> | 
|                             </span> | 
|                             </apex:outputPanel> | 
|                              | 
|                             <!-- 无上一页--> | 
|                             <apex:outputPanel rendered="{!!con.hasPrevious}"> | 
|                             <span class="prevNext"> | 
|                                 <apex:commandLink reRender="ConsumableorderdetailsSection" title="首页"> | 
|                                     <img src="/s.gif" title="首页" alt="首页" class="firstoff"/> | 
|                                 </apex:commandLink> | 
|                             </span> | 
|                             <span class="prevNext"> | 
|                                 <apex:commandLink reRender="ConsumableorderdetailsSection" title="上一页"> | 
|                                     <img src="/s.gif" title="上一页" alt="上一页" class="prevoff"/>上一页 | 
|                                 </apex:commandLink> | 
|                             </span> | 
|                             </apex:outputPanel> | 
|                             <!-- 有下一页--> | 
|                             <apex:outputPanel rendered="{!con.hasNext}"> | 
|                             <span class="prevNext"> | 
|                                 <apex:commandLink reRender="ConsumableorderdetailsSection" action="{!con.next}" oncomplete="refreshPageSizeJs();" title="下一页">下一页 | 
|                                     <img src="/s.gif" title="下一页" alt="下一页" class="{!IF(con.hasNext,'next', 'nextoff')}"/> | 
|                                 </apex:commandLink> | 
|                             </span> | 
|                             <span class="prevNext"> | 
|                                 <apex:commandLink reRender="ConsumableorderdetailsSection" action="{!con.last}" oncomplete="refreshPageSizeJs();" title="尾页"> | 
|                                     <img src="/s.gif" title="尾页" alt="尾页" class="{!IF(con.hasNext,'last', 'lastoff')}"/> | 
|                                 </apex:commandLink> | 
|                             </span> | 
|                             </apex:outputPanel> | 
|   | 
|                             <!-- 无下一页--> | 
|                             <apex:outputPanel rendered="{!!con.hasNext}"> | 
|                             <span class="prevNext"> | 
|                                 <apex:commandLink reRender="ConsumableorderdetailsSection" title="下一页">下一页 | 
|                                     <img src="/s.gif" title="下一页" alt="下一页" class="nextoff"/> | 
|                                 </apex:commandLink> | 
|                             </span> | 
|                             <span class="prevNext"> | 
|                                 <apex:commandLink reRender="ConsumableorderdetailsSection" title="尾页"> | 
|                                     <img src="/s.gif" title="尾页" alt="尾页" class="lastoff"/> | 
|                                 </apex:commandLink> | 
|                             </span> | 
|                             </apex:outputPanel> | 
|                         </span> | 
|                     </div> | 
|                 </apex:pageBlock> | 
|             </apex:pageBlock> | 
|         </apex:outputPanel> | 
|     </apex:form> | 
|     <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}?retURL={!URLENCODE('/Consumable?ESetId='+ESetId)}" target="_self"> | 
|             {!a.Concc.name} | 
|         </apex:outputLink> | 
|         </apex:column> | 
|         <apex:column headerValue="创建人"> | 
|             <apex:outputField value="{!a.Concc.OwnerId}"/> | 
|         </apex:column> | 
|         </apex:pageBlockTable> | 
|     </apex:pageBlock> | 
| <script> | 
| </script> | 
| </apex:page> |