<apex:page controller="MaintenanceContractPCLController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
|
<head>
|
<title>周会-维修合同</title>
|
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<!-- TODO 目前除了markOpp()方法,其他方法通用,js改名为周会共通js,各个画面个别js再自己创建js -->
|
<apex:includeScript value="{!URLFOR($Resource.OpportunityPCLJs)}"/>
|
|
<style>
|
td .dateFormat {
|
display: none;
|
}
|
|
div.inline { float:left; }
|
.clearBoth { clear:both; }
|
div.reportBlock table.list {
|
width:auto;
|
}
|
div#out_Div { /* ここにヘッダを格納 */
|
position:relative;
|
overflow: hidden;
|
float:left;
|
width:32768px;
|
}
|
div#out_Div_L {
|
position:relative;
|
overflow: hidden;
|
float:left;
|
}
|
div#in_Div {/* tbodyが入っている。ここがスクロール対象*/
|
position:relative;
|
overflow: auto; /*スクロールバー*/
|
float:left;
|
width:32768px;
|
height: 100px; /* tbodyを表示する高さ、後でjsにて調整 */
|
}
|
div#in_Div_L {
|
position:relative;
|
overflow: hidden;
|
float:left;
|
height: 100px;
|
}
|
|
body .pbBody table.list tr.headerRow td {
|
box-sizing: border-box;
|
text-align:center;font-weight:normal;
|
padding:0px 0px 0px 1px;
|
}
|
body .pbBody table.list tr.headerRow td.header1 {
|
text-align:center;font-weight:normal;
|
padding:0px 0px 0px 0px;
|
}
|
body .pbBody table.list tr.dataRow td {
|
box-sizing: border-box;
|
padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all;
|
}
|
body .pbBody table.list tr.dataRow td.dataCellBorder {
|
/* いらない、使っていない */
|
padding:0px 0px 0px 1px; border-width: 0px 0px 1px 0px; vertical-align: middle; word-break:break-all;
|
}
|
body .pbBody table.list tr.dataRow td.dataCellBorder1 {
|
padding:0px 0px 0px 1px;
|
border-width: 0px 0px 1px 1px; vertical-align: middle; word-break:break-all;
|
}
|
@-moz-document url-prefix() {
|
body .pbBody table.list tr.dataRow td.dataCellBorder1 {padding:0px 0px 0px 0px; border-width: 0px 0px 1px 1px; vertical-align: middle; word-break:break-all;}
|
}
|
|
table.list td {width:100px;}
|
|
table.list td select {width:95%;}
|
table.list td input {width:95%;}
|
table.list td textarea {
|
height:50px;
|
width:90%;
|
}
|
|
table.list .col_Management_Code__c {width:109px;}
|
table.list .col_Hospital__c {width:129px;}
|
table.list .col_Department__c {width:129px;}
|
|
table.list .col_Name {width:118px;}
|
table.list .col_Hospital__r_Salesdepartment_HP__c {width:88px;}
|
table.list .col_State_Hospital__c {width:58px;}
|
table.list .col_Status__c {width:88px;}
|
table.list .col_Service_Contract_Staff__c {width:118px;}
|
table.list .col_Service_contract_number__c {width:118px;}
|
table.list .col_Estimate_Trial_Money__c {width:118px;}
|
table.list .col_Status2__c {width:88px;}
|
table.list .col_CreatedDate {width:98px;}
|
table.list .col_Contract_Start_Date__c {width:88px;}
|
table.list .col_Contract_End_Date__c {width:88px;}
|
table.list .col_Service_contract_target_number__c {width:78px;}
|
|
body .pbBody table.list tr.headerRow td.colViewing {
|
/* デフォルト値、最小化アイコンを表示 */
|
background-image:url('{!URLFOR($Resource.IconResizeMinus_5)}') ;
|
background-repeat:no-repeat;
|
}
|
body .pbBody table.list tr.headerRow td.colUnHideIcon {
|
/* 最大化アイコンを表示 */
|
background-image:url('{!URLFOR($Resource.IconResizePlus_5)}');
|
background-repeat:no-repeat;
|
}
|
body .pbBody table.list tr.headerRow td.col_Scroll {width:0px; padding:0px; border-width:0px;}
|
body .pbBody table.list tr.dataRow td.col_Scroll {width:0px; padding:0px; border-width:0px;}
|
</style>
|
<script type="text/javascript">
|
var heightAjustment = 120;
|
var widthAjustment = 30;
|
</script>
|
</head>
|
<apex:form id="allForm">
|
|
<apex:actionFunction name="saveAndSearch" action="{!save}" rerender="allPanel" oncomplete="unblockUI();">
|
<apex:param name="firstParam" assignTo="{!saveType}" value="" />
|
</apex:actionFunction>
|
<apex:actionFunction name="saveAndSort" action="{!save}" rerender="allPanel" oncomplete="unblockUI();">
|
<apex:param name="firstParam" assignTo="{!saveType}" value="" />
|
<apex:param name="secondParam" assignTo="{!sortKey}" value="" />
|
</apex:actionFunction>
|
<apex:actionFunction name="searchOpp" action="{!searchOpp}" rerender="allPanel" oncomplete="unblockUI();"/>
|
<apex:actionFunction name="sortTable" action="{!sortTable}" rerender="allPanel" oncomplete="unblockUI();">
|
<apex:param name="firstParam" assignTo="{!sortKey}" value="" />
|
</apex:actionFunction>
|
|
<apex:outputPanel id="allPanel">
|
<apex:pageBlock id="searchBlock" tabStyle="Report">
|
<table style="border-bottom-width: 0px; font-size:12px;">
|
<tr>
|
<td width="150px">
|
<apex:commandButton action="{!save}" value="保存" rerender="allPanel" onclick="blockme();" oncomplete="unblockUI();" style="height:30px;width:50px;"/>
|
<apex:commandButton value="检索" onclick="searchOppJs();return false;" style="height:30px;width:70px;"/>
|
</td>
|
<td width="1000px">
|
<apex:pageMessages />
|
</td>
|
</tr>
|
</table>
|
<table style="border-bottom-width: 0px; font-size:12px;">
|
<tr>
|
<td width="250px">医院 <apex:inputText value="{!accSearch}" style="width:150px"/> </td>
|
<td width="40px">创建人</td>
|
<td width="150px"><span><apex:inputText value="{!ownerSearch}" style="width:100px;" /></span></td>
|
<td width="400px">
|
<font>日期</font>
|
<apex:selectList value="{!dateField}" size="1" style="width:110px" id="dateFieldId"><apex:selectOptions value="{!dateOpts}" id="dateOptsId"/></apex:selectList>
|
从 <apex:inputField value="{!con1.BirthDate}" id="fromDateId"/>
|
到 <apex:inputField value="{!con2.BirthDate}" id="toDateId"/>
|
</td>
|
<!-- <td width="30px"><apex:commandButton value="标记" onclick="markOpp('{!$Label.BackgroundColor}');return false;" rerender="allPanel"/></td> -->
|
<!-- <td width="10px"></td> -->
|
<!-- <td width="80px">只询价 <apex:inputCheckbox value="{!onlyOpp}" /></td> -->
|
<td>显示 <apex:selectList value="{!limits}" size="1" onchange="searchOppJs();return false;"><apex:selectOptions value="{!limitOpts}"/></apex:selectList> 条数据</td>
|
<td width="10px"></td>
|
<td width="70px"><a href="#" onclick="expandAll();return false;" style="text-decoration: underline;">全部展开</a></td>
|
</tr>
|
</table>
|
<table style="border-bottom-width: 0px; font-size:12px;">
|
<tr>
|
<td width="400px">
|
<font>数据字段</font>
|
<apex:selectList value="{!text}" size="1" style="width:110px"><apex:selectOptions value="{!textOpts}"/></apex:selectList>
|
<apex:selectList value="{!condition}" size="1"><apex:selectOptions value="{!equalOpts}"/></apex:selectList>
|
<apex:inputText value="{!value}" style="width:100px"/>
|
</td>
|
<td width="10px"></td>
|
<td width="400px">
|
<font>AND </font>
|
<apex:selectList value="{!text2}" size="1" style="width:110px"><apex:selectOptions value="{!textOpts2}"/></apex:selectList>
|
<apex:selectList value="{!condition2}" size="1"><apex:selectOptions value="{!equalOpts2}"/></apex:selectList>
|
<apex:inputText value="{!value2}" style="width:100px"/>
|
</td>
|
<td width="10px"></td>
|
<td width="400px">
|
<font>AND </font>
|
<apex:selectList value="{!text3}" size="1" style="width:110px"><apex:selectOptions value="{!textOpts3}"/></apex:selectList>
|
<apex:selectList value="{!condition3}" size="1"><apex:selectOptions value="{!equalOpts3}"/></apex:selectList>
|
<apex:inputText value="{!value3}" style="width:100px"/>
|
</td>
|
<td></td>
|
</tr>
|
</table>
|
</apex:pageBlock>
|
|
<apex:pageBlock id="oppBlock" tabStyle="Report">
|
<!-- <apex:pageblocksection columns="1" id="oppSection">-->
|
<apex:outputPanel >
|
<apex:inputHidden id="oppCount" value="{!oppCount}"/>
|
<div id="out_Div_L">
|
<table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
|
<tr class="dataRow" height="1px">
|
<apex:variable value="{!0}" var="cnt" />
|
<apex:repeat value="{!titleLeft}" var="t">
|
<td class="col_{!columnLeftCss[cnt]}"></td>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
</tr>
|
<tr class="headerRow" height="30px">
|
<apex:variable value="{!0}" var="cnt" />
|
<apex:repeat value="{!titleLeft}" var="t">
|
<td class="col_{!columnLeftCss[cnt]}">
|
<a href="#" onclick="sortTableJs('{!cnt + 1}');return false;" style="text-decoration: underline;"><apex:outputText value="{!t}"/></a>{!sortOrder[cnt + 1]}
|
</td>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
</tr>
|
</table>
|
</div>
|
<div id="out_Div">
|
<table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader">
|
<tr class="dataRow" height="1px">
|
<apex:variable value="{!0}" var="cnt" />
|
<apex:repeat value="{!titleRight}" var="t">
|
<td class="col_{!columnRightCss[cnt]}"></td>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
<td id="cell_Scroll" class="col_Scroll"></td>
|
</tr>
|
<tr class="headerRow" height="30px">
|
<apex:variable value="{!0}" var="cnt" />
|
<apex:repeat value="{!titleRight}" var="t">
|
<td class="col_{!columnRightCss[cnt]}">
|
<a href="#" onclick="sortTableJs('{!cnt + 1 + titleLeft.size}');return false;" style="text-decoration: underline;"><apex:outputText value="{!t}"/></a>{!sortOrder[cnt + 1 + titleLeft.size]}
|
</td>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
<td id="cell_Scroll" class="col_Scroll"></td>
|
</tr>
|
</table>
|
</div> <!-- out_Div -->
|
<div style="clear:both;height:0px;"></div>
|
<div id="in_Div_L">
|
<table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData_L">
|
<apex:variable value="{!1}" var="cnt" />
|
<apex:repeat value="{!oppRecords}" var="or" id="oppTable_L">
|
<tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
|
<apex:variable value="{!0}" var="cnt_2" />
|
<apex:repeat value="{!columnsLeftApi}" var="c">
|
<td class="dataCellBorder1 col_{!columnLeftCss[cnt_2]}">
|
<apex:outputPanel rendered="{!(c.size==1 && columnLeftRW[c[0]]=='r')}" layout="none">
|
<!-- in_Div_LのAccount名は特殊対応、リンクにする -->
|
<apex:outputPanel rendered="{!c[0]=='Name'}" layout="none">
|
<apex:outputLink value="/{!or.mc.Id}" target="LINK_{!or.mc.Id}"><apex:outputField value="{!or.mc[c[0]]}" /></apex:outputLink>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!c[0]<>'Name'}" layout="none">
|
<apex:inputField value="{!or.mc[c[0]]}" onchange="setChangeFlg('{!or.lineNo}')"/>
|
</apex:outputPanel>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c.size==2)}" layout="none">
|
<apex:outputField value="{!or.mc[c[0]][c[1]]}"/>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c.size==1 && columnLeftRW[c[0]]=='w')}" layout="none">
|
<apex:inputField value="{!or.mc[c[0]]}" onchange="setChangeFlg('{!or.lineNo}')"/>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c.size==1 && columnLeftRW[c[0]]=='wm')}" layout="none">
|
<div class="requiredInput"><div class="requiredBlock"></div><apex:inputField value="{!or.mc[c[0]]}" onchange="setChangeFlg('{!or.lineNo}')"/></div>
|
</apex:outputPanel>
|
</td>
|
<apex:variable value="{!cnt_2 + 1}" var="cnt_2" />
|
</apex:repeat>
|
</tr>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
</table>
|
</div>
|
<div id="in_Div">
|
<table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData">
|
<apex:variable value="{!1}" var="cnt" />
|
<apex:repeat value="{!oppRecords}" var="or" id="oppTable">
|
<tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
|
<apex:variable value="{!0}" var="cnt_3" />
|
<apex:repeat value="{!columnsRightApi}" var="c">
|
<td class="dataCellBorder1 col_{!columnRightCss[cnt_3]} {!cnt}_col_{!columnRightCss[cnt_3]}">
|
<apex:outputPanel rendered="{!(c.size==1 && columnRightRW[c[0]]=='r')}" layout="none">
|
<apex:outputField value="{!or.mc[c[0]]}"/>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c.size==2)}" layout="none">
|
<apex:outputField value="{!or.mc[c[0]][c[1]]}"/>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c.size==1 && columnRightRW[c[0]]=='w')}" layout="none">
|
<apex:inputField value="{!or.mc[c[0]]}" onchange="setChangeFlg('{!or.lineNo}')"/>
|
</apex:outputPanel>
|
<apex:outputPanel rendered="{!(c.size==1 && columnRightRW[c[0]]=='wm')}" layout="none">
|
<div class="requiredInput"><div class="requiredBlock"></div><apex:inputField value="{!or.mc[c[0]]}" onchange="setChangeFlg('{!or.lineNo}')"/></div>
|
</apex:outputPanel>
|
<apex:variable value="{!cnt_3 + 1}" var="cnt_3" />
|
</td>
|
</apex:repeat>
|
<td id="cell_Scroll" class="col_Scroll">
|
<apex:inputHidden value="{!or.changeFlg}" id="changeFlg"/>
|
<script type="text/javascript">
|
if ("{!or.canEdit}" == "false") {
|
var right = j$("#tableData").find("tr").eq({!cnt-1});
|
var rightline = j$(right).find("td");
|
for (var i=0; i<rightline.length; i++) {
|
j$(rightline[i]).find("input").each(function(){
|
j$(this).attr("disabled",true);
|
});
|
j$(rightline[i]).find("a").each(function(){
|
j$(this).attr("href","#");
|
});
|
}
|
}
|
if ("{!or.hasError}" == "true") {
|
var left = j$("#tableData_L").find("tr").eq({!cnt-1});
|
var leftFirst = j$(left).find("td").eq(1);
|
j$(leftFirst).css("background-color", "gray");
|
}
|
if ("{!or.hasFieldError}" == "true") {
|
var left = j$("#tableData_L").find("tr").eq({!cnt-1});
|
var leftFirst = j$(left).find("td").eq(1);
|
j$(leftFirst).css("background-color", "red");
|
}
|
</script>
|
</td>
|
</tr>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
</table>
|
</div><!-- /in_Div -->
|
</apex:outputPanel>
|
</apex:pageBlock>
|
<script type="text/javascript">
|
j$(function() {
|
var tableWidth = 0;
|
j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
|
var colClass = getColClassName(this);
|
if (colClass != 'col_Scroll') {
|
var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
|
tableWidth += headerCol.width();
|
}
|
});
|
j$('table#tableData').css('width', (tableWidth + 2) + 'px');
|
j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
|
|
// list の headerRow の tdに toggleWidth() を追加
|
bindTdToggleWidth();
|
});
|
var elements = document.getElementsByTagName("select");
|
for (i = 0; i < elements.length; i++) {
|
var id = elements[i].id;
|
if (id.length > 5 && id.substring(id.length - 5, id.length) == 'mlktp') {
|
elements[i].style.display = "none";
|
}
|
}
|
var tbl_l = document.getElementById("tableData_L");
|
var input_l = tbl_l.getElementsByTagName("input");
|
for (i = 0; i < input_l.length; i++) {
|
var id = input_l[i].id + '_lkid';
|
if (document.getElementById(id) != null) {
|
input_l[i].style.width = "75%";
|
}
|
}
|
var tbl = document.getElementById("tableData");
|
var input = tbl.getElementsByTagName("input");
|
for (i = 0; i < input.length; i++) {
|
var id = input[i].id + '_lkid';
|
if (document.getElementById(id) != null) {
|
input[i].style.width = "75%";
|
}
|
}
|
</script>
|
</apex:outputPanel>
|
</apex:form>
|
</apex:page>
|