<apex:page controller="EquipmentRentalLostReportController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="欠品中一览">
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
|
<script type="text/javascript">
|
function savejs() {
|
if (confirm('是否保存遗失报告?')) {
|
blockme();
|
saveBtn();
|
}
|
}
|
function returnjs() {
|
var rentalApplyId = j$(escapeVfId('allPage:allForm:allBlock:rentalApplyId')).text();
|
if (rentalApplyId == null || rentalApplyId == '') {
|
var transferApplyId = j$(escapeVfId('allPage:allForm:allBlock:transferApplyId')).text();
|
var url = "/" + transferApplyId;
|
window.location.href = url;
|
}else{
|
var url = "/" + rentalApplyId;
|
window.location.href = url;
|
}
|
}
|
function return1js() {
|
var rentalApplyId = j$(escapeVfId('allPage:allForm:allBlock:rentalApplyId')).text();
|
if (rentalApplyId == null || rentalApplyId == '') {
|
var transferApplyId = j$(escapeVfId('allPage:allForm:allBlock:transferApplyId')).text();
|
var url = "/apex/EquipmentRentalLostReport?tid=" + transferApplyId;
|
window.location.href = url;
|
}else{
|
var url = "/apex/EquipmentRentalLostReport?raid=" + rentalApplyId;
|
window.location.href = url;
|
|
}
|
}
|
function refresh() {
|
var hasError = j$(escapeVfId('allPage:allForm:allBlock:hasError')).text();
|
if (hasError == 'false') {
|
return1js();
|
}
|
}
|
|
function checkAll(selfid, checkId) {
|
var recCount = document.getElementById('allPage:allForm:EquipmentSetCnt').value;
|
|
if (j$(escapeVfId(selfid)).attr('checked') == 'checked') {
|
for (var i = 0; i < recCount; i++) {
|
var disabled = j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':' + checkId)).prop('disabled');
|
var disabled = j$(escapeVfId('allPage:allForm:allBlock:records1:' + i + ':' + checkId)).prop('disabled');
|
if (disabled == false) {
|
j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':' + checkId)).attr('checked',true);
|
j$(escapeVfId('allPage:allForm:allBlock:records1:' + i + ':' + checkId)).attr('checked',true);
|
}
|
}
|
} else {
|
for (var i = 0; i < recCount; i++) {
|
var disabled = j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':' + checkId)).prop('disabled');
|
var disabled = j$(escapeVfId('allPage:allForm:allBlock:records1:' + i + ':' + checkId)).prop('disabled');
|
if (disabled == false) {
|
j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':' + checkId)).attr('checked',false);
|
j$(escapeVfId('allPage:allForm:allBlock:records1:' + i + ':' + checkId)).attr('checked',false);
|
}
|
}
|
}
|
}
|
|
function sortTableJs(key) {
|
sortTablefunc(key);
|
}
|
</script>
|
|
<apex:form id="allForm">
|
<apex:inputHidden id="EquipmentSetCnt" value="{!EquipmentSetCnt}"/>
|
<apex:actionFunction name="saveBtn1" action="{!saveBtn1}" rerender="allBlock" onComplete="unblockUI();refresh();"/>
|
<apex:actionFunction name="saveBtn" action="{!saveBtn}" rerender="allBlock" onComplete="unblockUI();refresh();"/>
|
<apex:actionFunction name="sortTablefunc" action="{!sortTable}" rerender="allBlock" status="statusPreload" onComplete="unblockUI();">
|
<apex:param name="psortKey" value="" />
|
</apex:actionFunction>
|
<apex:outputPanel id="allPanel">
|
<apex:pageBlock title="欠品中一览" id="allBlock">
|
<apex:pageBlockButtons >
|
<apex:commandButton onclick="returnjs(); return false;" value="返回" rerender="dummy"/>
|
<apex:commandButton onclick="savejs(); return false;" rerender="allBlock" value="保存遗失报告" oncomplete="unblockUI();refresh();"/>
|
<apex:commandButton onclick="blockme();" value="保存确认遗失" rerender="allBlock" action="{!saveBtn1}" oncomplete="unblockUI();refresh();"/>
|
</apex:pageBlockButtons>
|
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
<apex:outputText id="rentalApplyId" value="{!rentalApplyId}" style="display:none"/>
|
<apex:outputText id="hasError" value="{!hasError}" style="display:none"/>
|
<apex:outputText id="transferApplyId" value="{!transferApplyId}" style="display:none"/>
|
<!-- <apex:pageBlockSectionItem >
|
<apex:outputLabel style="font-size: 15px;" value="{!$ObjectType.Rental_Apply__c.fields.Name.label}" for="Name"/>
|
<apex:outputLink style="font-size: 15px;" value="/{!rentalApply.Id}" id="Name">{!rentalApply.Name}</apex:outputLink>
|
</apex:pageBlockSectionItem> -->
|
|
<apex:pageBlockSection rendered="{!IF(rentalApplyId == null ,false, true)}" >
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel style="font-size: 15px;" value="{!$ObjectType.Rental_Apply__c.fields.Name.label}" for="Name"/>
|
<apex:outputLink style="font-size: 15px;" value="/{!rentalApply.Id}" id="Name">{!rentalApply.Name}</apex:outputLink>
|
</apex:pageBlockSectionItem>
|
</apex:pageBlockSection>
|
|
<apex:pageBlockSection rendered="{!IF(rentalApplyId == null || rentalApplyId == '' ,true, false)}" >
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel style="font-size: 15px;" value="{!$ObjectType.TransferApply__c.fields.Name.label}" for="Name"/>
|
<apex:outputLink style="font-size: 15px;" value="/{!TransferApply.Id}" id="Name">{!TransferApply.Name}</apex:outputLink>
|
</apex:pageBlockSectionItem>
|
</apex:pageBlockSection>
|
<!-- update by rentx 2021-04-10 end -->
|
|
<apex:outputPanel rendered="{!IF(rentalApplyId == null ,false, true)}">
|
<table class="linetable" border="1" style="border-collapse: collapse;">
|
<colgroup>
|
<col width="25"/>
|
<col width="25"/>
|
<col width="110"/>
|
<col width="50"/>
|
<col width="50"/>
|
<col width="110"/>
|
<col width="110"/>
|
<col width="110"/>
|
<col width="110"/>
|
<col width="110"/>
|
<col width="110"/>
|
</colgroup>
|
<tr style="background-color:#DCDCDC;">
|
<th style="text-align:center">报告对象<input type='checkbox' onClick='checkAll("checker","rowCheck")' id='checker'/></th>
|
<apex:variable value="{!0}" var="index"/>
|
<apex:repeat value="{!titleList}" var="title">
|
|
<th style="text-align:center">
|
<a href="#" name="out_Div_a" onclick="sortTableJs('{!index}');return false;" style="text-decoration: underline;">
|
{!sortOrder[index]}{!title}
|
</a>
|
</th>
|
<apex:variable var="index" value="{!index + 1}"/>
|
</apex:repeat>
|
<th style="text-align:center">确认遗失<input type='checkbox' onClick='checkAll("checker1", "rowCheck1")' id='checker1'/></th>
|
</tr>
|
<apex:repeat value="{!lineInfoList}" var="info" id="records">
|
<tr>
|
<td align="center"><apex:inputCheckbox disabled="{!info.checkBoxdisabled}" value="{!info.isSelect}" id="rowCheck"/></td>
|
<apex:repeat value="{!columnsApi}" var="c">
|
<td align="left">
|
<apex:outputPanel rendered="{!(c.size==2 && info.raesd[c[0]] != null)}" layout="none">
|
<apex:outputField value="{!info.raesd[c[0]][c[1]]}"/>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c.size==1 && info.raesd[c[0]] != null && (c[0] != 'DeleteLostReport_Detail_Reason__c' || info.checkBoxdisabled == true))}" layout="none">
|
<apex:outputField value="{!info.raesd[c[0]]}"/>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c.size==1 && c[0] == 'DeleteLostReport_Detail_Reason__c' && info.checkBoxdisabled == false)}" layout="none">
|
<apex:inputField value="{!info.raesd[c[0]]}"/>
|
</apex:outputPanel>
|
</td>
|
</apex:repeat>
|
<td align="center"><apex:inputCheckbox value="{!info.haveConfirm_Lost_Date}" disabled="{!info.lrdApprovaled}" id="rowCheck1"/></td>
|
</tr>
|
</apex:repeat>
|
</table>
|
</apex:outputPanel>
|
|
<!-- //update by rentx 2021-05-13 start 1635 -->
|
<apex:outputPanel rendered="{!IF(rentalApplyId == null ,true, false)}">
|
<table class="linetable" border="1" style="border-collapse: collapse;">
|
<colgroup>
|
<col width="25"/>
|
<col width="25"/>
|
<col width="110"/>
|
<col width="50"/>
|
<col width="50"/>
|
<col width="110"/>
|
<col width="110"/>
|
<col width="110"/>
|
<col width="110"/>
|
<col width="110"/>
|
<col width="110"/>
|
</colgroup>
|
<tr style="background-color:#DCDCDC;">
|
<th style="text-align:center">报告对象<input type='checkbox' onClick='checkAll("checker","rowCheck")' id='checker'/></th>
|
<apex:variable value="{!0}" var="index"/>
|
<apex:repeat value="{!titleList}" var="title">
|
|
<th style="text-align:center">
|
<a href="#" name="out_Div_a" onclick="sortTableJs('{!index}');return false;" style="text-decoration: underline;">
|
{!sortOrder[index]}{!title}
|
</a>
|
</th>
|
<apex:variable var="index" value="{!index + 1}"/>
|
</apex:repeat>
|
<th style="text-align:center">确认遗失<input type='checkbox' onClick='checkAll("checker1", "rowCheck1")' id='checker1'/></th>
|
</tr>
|
<apex:repeat value="{!lineInfoList}" var="info" id="records1">
|
<tr>
|
<td align="center"><apex:inputCheckbox disabled="{!info.checkBoxdisabled}" value="{!info.isSelect}" id="rowCheck"/></td>
|
<apex:repeat value="{!columnsApi}" var="c">
|
<td align="left">
|
<apex:outputPanel rendered="{!(c.size==2 && info.raesd1[c[0]] != null)}" layout="none">
|
<apex:outputField value="{!info.raesd1[c[0]][c[1]]}"/>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c.size==1 && info.raesd1[c[0]] != null && (c[0] != 'DeleteLostReport_Detail_Reason__c' || info.checkBoxdisabled == true))}" layout="none">
|
<apex:outputField value="{!info.raesd1[c[0]]}"/>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c.size==1 && c[0] == 'DeleteLostReport_Detail_Reason__c' && info.checkBoxdisabled == false)}" layout="none">
|
<apex:inputField value="{!info.raesd1[c[0]]}"/>
|
</apex:outputPanel>
|
</td>
|
</apex:repeat>
|
<td align="center"><apex:inputCheckbox value="{!info.haveConfirm_Lost_Date}" disabled="{!info.lrdApprovaled}" id="rowCheck1"/></td>
|
</tr>
|
</apex:repeat>
|
</table>
|
</apex:outputPanel>
|
<!-- //update by rentx 2021-05-13 end 1635 -->
|
</apex:pageBlock>
|
</apex:outputPanel>
|
</apex:form>
|
|
</apex:page>
|