| <apex:page Controller="ConsumEquipmentSetReturnController" showHeader="false" sidebar="false" id="allPage" action="{!init}"> | 
| <head> | 
|     <meta name="format-detection" content="telephone=no"/> | 
|     <meta name="viewport" content="width=device-width,initial-scale=1"/> | 
| </head> | 
| <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> | 
| <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> | 
| <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> | 
| <apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/> | 
| <style type="text/css"> | 
| div#out_Div_L { | 
|   position:relative; | 
|   overflow: hidden; | 
|   float:left; | 
|   width: 30px; | 
| } | 
| div#in_Div_L { | 
|   position:relative; | 
|   overflow: hidden; | 
|   float:left; | 
|   height: 100px; | 
|   width: 30px; | 
| } | 
| .apexp .bPageBlock .pbHeader .btn | 
| { | 
|     padding: 6px; | 
|     font-size: 110%; | 
|     margin-right: 20px; | 
| } | 
| /* add by yc 202202-17 **/ | 
| .col_EquipmentManagementCode_OldData__c {display: none;} | 
| .col_Scroll{display: none;} | 
| </style> | 
|   | 
| <apex:form id="allForm"> | 
|     <apex:inputHidden value="{!done_flg}" id="done_flg"/> | 
|     <apex:outputPanel id="pageallPanel"> | 
|         <apex:pageBlock id="searchBlock" tabStyle="Report"> | 
|             <apex:pageBlockButtons location="top"> | 
|                 <apex:commandButton onclick="blockme();" action="{!save}" value="保存" rerender="checEventFrame,allForm" oncomplete="unblockUI();checEventFrame()"/> | 
|                 <apex:commandButton onclick="blockme();" action="{!cancel}" value="取消" rerender="checEventFrame,allForm" oncomplete="unblockUI();checEventFrame()"/> | 
|             </apex:pageBlockButtons> | 
|              <table> | 
|                 <tr> | 
|                     <td width="20px"/> | 
|                     <td width="35%"> | 
|                       <apex:outputLabel for="slipNo" value="回寄-运输单号:" /> | 
|                       <apex:inputField id="slipNo" value="{!slip.Name}"/> | 
|                       <apex:commandButton style="padding: 6px;font-size: 110%;" action="{!searchSlip}" value="检索" rerender="allForm,checEventFrame"  oncomplete="checEventFrame()"/> | 
|                     </td> | 
|                     <td width="10px"></td> | 
|                     <td width="30%"> | 
|                       <apex:outputLabel for="deliveryType" value="回寄-运输单种类:" /> | 
|                       <apex:inputField required="false" id="deliveryType" value="{!slip.DeliveryType__c}"/> | 
|                     </td> | 
|                     <td width="10px"></td> | 
|                     <td width="30%"> | 
|                       <apex:outputLabel for="distributorMethod" value="回寄-运输方式:" /> | 
|                       <apex:inputField required="false" id="distributorMethod" value="{!slip.Distributor_method__c}"/> | 
|                     </td> | 
|                 </tr> | 
|                 <tr> | 
|                     <td width="20px"/> | 
|                     <td > | 
|                       <apex:outputLabel for="deliveryCompany" value="回寄-物流公司:" /> | 
|                       <apex:inputField required="false" id="deliveryCompany" value="{!slip.DeliveryCompany__c}"/> | 
|                     </td> | 
|                     <td width="10px"></td> | 
|                     <td > | 
|                       <apex:outputLabel for="whStaff" value="回寄-担当者:" style="float: left;"/> | 
|                       <apex:inputField required="false" id="whStaff" value="{!slip.Wh_Staff__c}" style="float: left;"/> | 
|                     </td> | 
|                     <td width="10px"></td> | 
|                     <td></td> | 
|                 </tr> | 
|             </table> | 
|              | 
|             <div style="clear:both;"></div> | 
|   | 
|         </apex:pageBlock> | 
|         <apex:pageMessages id="message"/> | 
|         <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true"/> | 
|     </apex:outputPanel> | 
| </apex:form> | 
| <apex:outputPanel id="checEventFrame"> | 
| <script type="text/javascript" > | 
|     function checEventFrame() { | 
|         // 运输单种类不可修改 | 
|         j$('select[name$="deliveryType"]').val('回寄'); | 
|         j$('select[name$="deliveryType"]').prop('disabled', true) | 
|          | 
|         // j$('select[name$="distributorMethod"]').children('option[value="空运"]').remove(); | 
|         j$('select[name$="deliveryCompany"]').children('option[value="莱比特"],option[value="嘉里大通"]').remove(); | 
|     } | 
|     checEventFrame(); | 
|   | 
|     // 【待消耗件数】随【回寄件数】变化 | 
|     j$("td.dataCellBorder1.col_Hui_Ji_Jia__c input").change(function(){ | 
|         var names = this.name.split(':'); | 
|         var i = names[names.length - 4]; | 
|         j$("input.rowchkcls")[i].checked = true; | 
|         refreshLine(i); | 
|     }); | 
|     checkMessage(); | 
|   | 
|     function refreshLine(i){ | 
|         var Dao_Huo_OK_Jia__c =parseInt( j$(j$("td.dataCellBorder1.col_Dao_Huo_OK_Jia__c span")[i]).text()); | 
|         var Dao_Huo_NG_Jia__c = parseInt(j$(j$("td.dataCellBorder1.col_Dao_Huo_NG_Jia__c span")[i]).text()); | 
|         var Yi_Xiao_Hao_Jia__c = parseInt(j$(j$("td.dataCellBorder1.col_Yi_Xiao_Hao_Jia__c span")[i]).text()); | 
|         var Hui_Ji_Jia__c = parseInt(j$(j$("td.dataCellBorder1.col_Hui_Ji_Jia__c input")[i]).val()); | 
|         if(isNaN(Hui_Ji_Jia__c)){ | 
|             Hui_Ji_Jia__c = 0; | 
|         } | 
|         var total = Dao_Huo_OK_Jia__c + Dao_Huo_NG_Jia__c - Yi_Xiao_Hao_Jia__c; | 
|         var Dai_Xiao_Hao_Jia__c = total - Hui_Ji_Jia__c; | 
|         if(Hui_Ji_Jia__c > total){ | 
|             alert("回寄件数不可超过 "+(total).toString()); | 
|             j$(j$("td.dataCellBorder1.col_Hui_Ji_Jia__c input")[i]).val(null); | 
|         } | 
|         else{ | 
|             j$(j$("td.dataCellBorder1.col_Dai_Xiao_Hao_Jia__c span")[i]).text(Dai_Xiao_Hao_Jia__c); | 
|         } | 
|         return; | 
|     } | 
|   | 
|     function checkMessage() { | 
|         if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') { | 
|             alert("保存成功"); | 
|             j$(escapeVfId('allPage:allForm:done_flg')).val('false'); | 
|             // 清除url里的save_flag (This can now be done in Chrome, Safari, Firefox 4+, and Internet Explorer 10pp4+!) | 
|             if (window.history.pushState) | 
|                 window.history.pushState({},"", window.location.href.replace('&save=1','')); | 
|         } | 
|     } | 
|     var inputBoxs = j$("td.dataCellBorder1.col_Hui_Ji_Jia__c input"); | 
|     for(var i = 0;i<inputBoxs.length;i++){ | 
|         refreshLine(i); | 
|     } | 
|   | 
| </script> | 
| </apex:outputPanel> | 
|   | 
| </apex:page> |