<apex:page standardcontroller="Asset" extensions="SelectAssetExtension" showHeader="true" id="allPage" lightningStylesheets="true">
|
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
|
<style>
|
div.pbHeader td.pbButton {
|
padding-left: 203px;
|
}
|
|
</style>
|
<script>
|
var productCount={!productCount};
|
function checkAll() {
|
|
if ( document.getElementById( 'checker').checked == true) {
|
for ( var i = 0; i < productCount; i++) {
|
outer = Math.floor(i / 1000);
|
document.getElementById( 'allPage:allForm:allBlock:assetSection:assetListTable:'+ outer + ':assetTable:' + (i-(1000*outer)) + ':assetRowCheckbox').checked = true;
|
}
|
}
|
else {
|
for ( var i = 0; i < productCount; i++) {
|
outer = Math.floor(i / 1000);
|
document.getElementById( 'allPage:allForm:allBlock:assetSection:assetListTable:'+ outer + ':assetTable:' + (i-(1000*outer)) + ':assetRowCheckbox').checked = false;
|
}
|
}
|
}
|
function sortTableJs(sortNum) {
|
sortTable(sortNum);
|
}
|
function afterSaveBtnJs() {
|
window.location.href = '/' + "{!contract.Id}";
|
}
|
function searchJs() {
|
blockme();
|
searchfunc();
|
}
|
function saveJs() {
|
blockme();
|
}
|
</script>
|
|
<apex:form id="allForm">
|
|
<apex:actionFunction name="sortTable" action="{!sortTable}" rerender="assetSection">
|
<apex:param name="firstParam" assignTo="{!sortKey}" value="" />
|
</apex:actionFunction>
|
<apex:actionFunction name="searchfunc" action="{!searchBtn}" rerender="Form,Block,assetSection2,pageMessages,allBlock" onComplete="unblockUI();"></apex:actionFunction>
|
<apex:actionFunction name="savefunc" action="{!save}" rerender="Form,Block,assetSection2,pageMessages,allBlock" onComplete="unblockUI();"></apex:actionFunction>
|
|
|
<apex:outputPanel id="allPanel">
|
<apex:pageBlock title="保有设备选择" id="allBlock">
|
|
<apex:pageBlockButtons >
|
<!-- <apex:commandButton onclick='saveJs();' action='{!save}' value="保存" onComplete="afterSaveBtnJs();"/> -->
|
<apex:commandButton onclick="saveJs();" action="{!save}" value="保存" onComplete="afterSaveBtnJs();" />
|
<apex:commandButton action="{!cancel}" value="取消"/>
|
</apex:pageBlockButtons>
|
|
<apex:pageblocksection title="维修合同">
|
|
<apex:outputField value="{!contract.Management_Code__c}" />
|
<apex:outputField value="{!contract.Contract_Start_Date__c}" />
|
<apex:outputField value="{!contract.Hospital__c}" />
|
<apex:outputField value="{!contract.Contract_End_Date__c}" />
|
|
</apex:pageblocksection>
|
|
<apex:pageblocksection columns="1" title="保有设备" id="assetSection">
|
<!-- zzm 230831增加检索条件解决数据超量报错的问题 start -->
|
<apex:outputPanel layout="block" styleClass="container2">
|
<apex:outputText value="选择条件"/>
|
<apex:selectList value="{!text1}" id="text1" size="1" style="width:150px">
|
<apex:selectOptions value="{!textOpts}"/>
|
</apex:selectList>
|
<apex:selectList value="{!cond1}" id="cond1" size="1" style="width:100px">
|
<apex:selectOptions value="{!equalOpts}"/>
|
</apex:selectList>
|
<apex:inputText value="{!val1}"
|
id="val1" style="width:150px; "/>
|
|
<!-- zzm 240109维修合同添加设备bug start -->
|
<apex:commandButton value="检索" onclick="searchJs();" action="{!searchBtn}" style="width:100px" rerender="dummy" onComplete="unblockUI();"/>
|
<!-- zzm 240109维修合同添加设备bug end -->
|
</apex:outputPanel>
|
<!-- zzm 230831增加检索条件解决数据超量报错的问题 end -->
|
<apex:outputPanel layout="block" styleClass="container2">
|
<table class="list" style="border-bottom-width: 0px; font-size:13px;" border="0" cellspacing="0" cellpadding="0">
|
<tr class="headerRow" height="30px" style="text-align: left;">
|
<th class="headerRow booleanColumn">
|
<input type="checkbox" onClick="checkAll()" id="checker"/>
|
</th>
|
<!-- <th class="headerRow booleanColumn">
|
<a href="#" onclick="sortTableJs( '0');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Name.label}</a> {!sortOrder[0]}
|
</th>
|
<th class="headerRow booleanColumn">
|
<a href="#" onclick="sortTableJs( '1');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.SerialNumber.label}</a> {!sortOrder[1]}
|
</th>
|
<th class="headerRow booleanColumn">
|
<a href="#" >点检对象</a> {!sortOrder[2]}
|
</th>
|
<th class="headerRow booleanColumn">
|
<a href="#" onclick="sortTableJs( '3');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Department_Name__c.label}</a> {!sortOrder[3]}
|
</th>
|
<th class="headerRow booleanColumn">
|
<a href="#" onclick="sortTableJs( '4');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Installation_Site__c.label}</a> {!sortOrder[4]}
|
</th>
|
<th class="headerRow booleanColumn">
|
<a href="#" onclick="sortTableJs( '5');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Posting_Date__c.label}</a> {!sortOrder[5]}
|
</th>
|
<th class="headerRow booleanColumn">
|
<a href="#" onclick="sortTableJs( '6');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Asset_Owner__c.label}</a> {!sortOrder[6]}
|
</th> -->
|
<th class="headerRow booleanColumn">
|
{!$ObjectType.Asset.fields.Name.label}
|
|
</th>
|
<th class="headerRow booleanColumn">
|
{!$ObjectType.Asset.fields.SerialNumber.label}
|
</th>
|
<th class="headerRow booleanColumn">
|
点检对象
|
|
</th>
|
<th class="headerRow booleanColumn">
|
{!$ObjectType.Asset.fields.Department_Name__c.label}
|
</th>
|
<th class="headerRow booleanColumn">
|
{!$ObjectType.Asset.fields.Installation_Site__c.label}
|
</th>
|
<th class="headerRow booleanColumn">
|
{!$ObjectType.Asset.fields.Posting_Date__c.label}
|
</th>
|
<th class="headerRow booleanColumn">
|
{!$ObjectType.Asset.fields.Asset_Owner__c.label}
|
</th>
|
|
|
</tr>
|
|
<apex:repeat value="{!assetLists}" var="assetList" id="assetListTable">
|
<apex:repeat value="{!assetList}" var="asset" id="assetTable">
|
<tr class="dataRow">
|
<td class="dataCell">
|
<apex:inputField value="{!asset.checkBox__c}" id="assetRowCheckbox"/>
|
</td>
|
<td class="dataCell">
|
<apex:outputField value="{!asset.name}"/>
|
</td>
|
<td class="dataCell">
|
<apex:outputField value="{!asset.SerialNumber}"/>
|
</td>
|
<td class="dataCell">
|
<apex:inputField value="{!asset.TransferToOther__c}"/>
|
</td>
|
<td class="dataCell">
|
<apex:outputField value="{!asset.Department_Name__c}"/>
|
</td>
|
<td class="dataCell">
|
<apex:outputField value="{!asset.Installation_Site__c}"/>
|
</td>
|
<td class="dataCell">
|
<apex:outputField value="{!asset.Posting_Date__c}"/>
|
</td>
|
<td class="dataCell">
|
<apex:outputField value="{!asset.Asset_Owner__c}"/>
|
</td>
|
</tr>
|
</apex:repeat>
|
</apex:repeat>
|
</table>
|
</apex:outputPanel>
|
|
|
<!-- <apex:pageblocktable value="{!assetRecords}" var="asset" id="assetTable">
|
|
<apex:column >
|
<apex:facet name="header"><input type='checkbox' onClick='checkAll()' id='checker'/></apex:facet>
|
<apex:inputField value="{!asset.checkBox__c}" id="assetRowCheckbox"/>
|
</apex:column>
|
<apex:column >
|
<apex:facet name="header"><a href="#" onclick="sortTable( '0');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Name.label}</a> {!sortOrder[0]}</apex:facet>
|
<apex:outputField value="{!asset.name}"/>
|
</apex:column>
|
<apex:column >
|
<apex:facet name="header"><a href="#" onclick="sortTable( '1');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.SerialNumber.label}</a> {!sortOrder[1]}</apex:facet>
|
<apex:outputField value="{!asset.SerialNumber}"/>
|
</apex:column>
|
<apex:column >
|
<apex:facet name="header"><a href="#" onclick="sortTable( '2');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Department_Name__c.label}</a> {!sortOrder[2]}</apex:facet>
|
<apex:outputField value="{!asset.Department_Name__c}"/>
|
</apex:column>
|
<apex:column >
|
<apex:facet name="header"><a href="#" onclick="sortTable( '3');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Installation_Site__c.label}</a> {!sortOrder[3]}</apex:facet>
|
<apex:outputField value="{!asset.Installation_Site__c}"/>
|
</apex:column>
|
<apex:column >
|
<apex:facet name="header"><a href="#" onclick="sortTable( '4');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Posting_Date__c.label}</a> {!sortOrder[4]}</apex:facet>
|
<apex:outputField value="{!asset.Posting_Date__c}"/>
|
</apex:column>
|
<apex:column >
|
<apex:facet name="header"><a href="#" onclick="sortTable( '5');return false;" style="text-decoration: underline;">{!$ObjectType.Asset.fields.Asset_Owner__c.label}</a> {!sortOrder[5]}</apex:facet>
|
<apex:outputField value="{!asset.Asset_Owner__c}"/>
|
</apex:column>
|
|
</apex:pageblocktable> -->
|
|
</apex:pageblocksection>
|
|
</apex:pageBlock>
|
</apex:outputPanel>
|
</apex:form>
|
|
</apex:page>
|