<apex:page Controller="InventoryLostReportController" 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 lhId = j$(escapeVfId('allPage:allForm:allBlock:lhId')).text();
|
var url = "/" + lhId;
|
window.location.href = url;
|
}
|
function return1js() {
|
var lhId = j$(escapeVfId('allPage:allForm:allBlock:lrId')).text();
|
var url = "/" + lhId;
|
window.open(url);
|
window.location.href = "/apex/InventoryLostReport?lhid={!lhId}&alertInfo="+encodeURI(j$(escapeVfId('allPage:allForm:allBlock:alertInfo')).text());
|
}
|
function refresh() {
|
var hasError = j$(escapeVfId('allPage:allForm:allBlock:hasError')).text();
|
if (hasError == 'false') {
|
return1js();
|
}
|
}
|
function checkAll() {
|
var recCount = document.getElementById('allPage:allForm:EquipmentSetCnt').value;
|
if (j$(escapeVfId('checker')).attr('checked') == 'checked') {
|
for (var i = 0; i < recCount; i++) {
|
var disabled = j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':rowCheck')).prop('disabled');
|
if (disabled == false) {
|
j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':rowCheck')).attr('checked',true);
|
}
|
}
|
} else {
|
for (var i = 0; i < recCount; i++) {
|
var disabled = j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':rowCheck')).prop('disabled');
|
if (disabled == false) {
|
j$(escapeVfId('allPage:allForm:allBlock:records:' + i + ':rowCheck')).attr('checked',false);
|
}
|
}
|
}
|
}
|
function sortTableJs(key) {
|
// blockme();
|
sortTablefunc(key);
|
}
|
</script>
|
<apex:form id="allForm">
|
<!-- <apex:actionFunction name="saveBtn1" action="{!saveBtn1}" rerender="allBlock" onComplete="unblockUI();refresh();">
|
<apex:param name="raesdId" value=""/>
|
</apex:actionFunction> -->
|
<apex:actionFunction name="sortTablefunc" action="{!sortTable}" rerender="allBlock" status="statusPreload" onComplete="unblockUI();">
|
<apex:param name="psortKey" value="" />
|
</apex:actionFunction>
|
<apex:inputHidden id="EquipmentSetCnt" value="{!EquipmentSetCnt}"/>
|
<apex:outputPanel id="allPanel">
|
<apex:pageBlock title="盘亏一览" id="allBlock">
|
<apex:pageBlockButtons >
|
<!-- <apex:commandButton onclick="savejs(); return false;" value="保存" disabled="{!saveBtn}" rerender="dummy"/> -->
|
<apex:actionFunction name="saveBtn" action="{!saveBtn}" rerender="allBlock" onComplete="unblockUI();refresh();"/>
|
<apex:commandButton onclick="returnjs(); return false;" value="返回" rerender="dummy"/>
|
<apex:commandButton onclick="savejs(); return false;" disabled="{!canSave == false}" rerender="allBlock" value="保存遗失报告" oncomplete="unblockUI();refresh();"/>
|
</apex:pageBlockButtons>
|
<apex:outputPanel id="message">
|
<apex:pageMessages />
|
</apex:outputPanel>
|
<apex:outputText id="hasError" value="{!hasError}" style="display:none"/>
|
<apex:outputText id="lhId" value="{!lhId}" style="display:none"/>
|
<apex:outputText id="lrId" value="{!lrId}" style="display:none"/>
|
<apex:outputText id="alertInfo" value="{!alertInfo}" style="display:none"/>
|
<apex:pageBlockSection >
|
<apex:pageBlockSectionItem >
|
<apex:outputLabel style="font-size: 15px;" value="{!$ObjectType.Inventory_Header__c.fields.Name.label}" for="Name"/>
|
<apex:outputField style="font-size: 15px;" value="{!lh.Name}" id="Name"/>
|
</apex:pageBlockSectionItem>
|
</apex:pageBlockSection>
|
<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"/>
|
<!-- <col width="175"/> -->
|
</colgroup>
|
<tr style="background-color:#DCDCDC;">
|
<!-- <th style="text-align:center"> </th> -->
|
<th style="text-align:center"> <input type='checkbox' onClick='checkAll()' 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">
|
<a href="#" name="out_Div_a" onclick="sortTableJs('0');return false;" style="text-decoration: underline;">
|
{!sortOrder[0] + $ObjectType.Inventory_Detail__c.fields.Name.label}
|
</a>
|
</th>
|
<th style="text-align:center">
|
<a href="#" name="out_Div_a" onclick="sortTableJs('1');return false;" style="text-decoration: underline;">
|
{!sortOrder[1] + $ObjectType.Inventory_Detail__c.fields.LostReport_Detail__c.label}
|
</a>
|
</th>
|
<th style="text-align:center">
|
<a href="#" name="out_Div_a" onclick="sortTableJs('2');return false;" style="text-decoration: underline;">
|
{!sortOrder[2] + $ObjectType.Inventory_Detail__c.fields.Fixture_Model_No__c.label}
|
</a>
|
</th>
|
<th style="text-align:center">
|
<a href="#" name="out_Div_a" onclick="sortTableJs('3');return false;" style="text-decoration: underline;">
|
{!sortOrder[3] + $ObjectType.Inventory_Detail__c.fields.Amount__c.label}
|
</a>
|
</th>
|
<th style="text-align:center">
|
<a href="#" name="out_Div_a" onclick="sortTableJs('4');return false;" style="text-decoration: underline;">
|
{!sortOrder[4] + $ObjectType.Inventory_Detail__c.fields.Inventory_Count__c.label}
|
</a>
|
</th>
|
<th style="text-align:center">
|
<a href="#" name="out_Div_a" onclick="sortTableJs('5');return false;" style="text-decoration: underline;">
|
{!sortOrder[5] + $ObjectType.Inventory_Detail__c.fields.Inventory_Deviation__c.label}
|
</a>
|
</th> -->
|
<!-- <th style="text-align:center">{!$ObjectType.LostReport__c.label}{!$ObjectType.LostReport__c.fields.Report_Type__c.label}</th> --> <!-- 遗失报告审批状态 -->
|
<!-- <th style="text-align:center">确认丢失</th> -->
|
</tr>
|
<apex:repeat value="{!lineInfoList}" var="info" id="records">
|
<tr>
|
<td align="center"><apex:inputCheckbox disabled="{!info.checkboxDis}" value="{!info.isSelect}" id="rowCheck"/></td>
|
<apex:repeat value="{!columnsApi}" var="c">
|
<td align="left">
|
<apex:outputPanel rendered="{!(c.size==2 && info.ldObject[c[0]] != null)}" layout="none">
|
<apex:outputField value="{!info.ldObject[c[0]][c[1]]}"/>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c.size==1 && info.ldObject[c[0]] != null && (c[0] != 'DeleteLostReport_Detail_Reason__c' || info.checkboxDis == true))}" layout="none">
|
<apex:outputField value="{!info.ldObject[c[0]]}"/>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c.size==1 && c[0] == 'DeleteLostReport_Detail_Reason__c' && info.checkboxDis == false)}" layout="none">
|
<apex:inputField value="{!info.ldObject[c[0]]}"/>
|
</apex:outputPanel>
|
</td>
|
</apex:repeat>
|
<!-- <td align="left"><apex:outputText value="{!info.ldObject.Name}"></apex:outputText></td>
|
<td align="center"><apex:outputField value="{!info.ldObject.LostReport_Detail__c}"></apex:outputField></td>
|
<td align="center"><apex:outputField value="{!info.ldObject.Fixture_Model_No__c}"></apex:outputField></td>
|
<td align="center"><apex:outputField value="{!info.ldObject.Amount__c}"></apex:outputField></td>
|
<td align="center"><apex:outputField value="{!info.ldObject.Inventory_Count__c}"></apex:outputField></td>
|
<td align="center"><apex:outputField value="{!info.ldObject.Inventory_Deviation__c}"></apex:outputField></td> -->
|
<!-- <td align="center"><apex:outputField value="{!info.raesd.LostReport_Detail__r.LostReport__r.Report_Type__c}"></apex:outputField></td> -->
|
<!-- <td align="center"><apex:commandButton onclick="savejs('{!info.raesd.Id}');" value="确认丢失" disabled="{!info.haveConfirm_Lost_Date}" rerender="dummy"/></td> -->
|
</tr>
|
</apex:repeat>
|
</table>
|
</apex:pageBlock>
|
</apex:outputPanel>
|
</apex:form>
|
</apex:page>
|