<apex:page controller="BmeWorkController" showHeader="false" sidebar="false" id="allPage" action="{!init}">
|
<head>
|
<title>BME工作跟进</title>
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.BmeWorkJs)}"/>
|
|
<!-- 20220222 PI改造 by Bright--start -->
|
<apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
|
<script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
|
<!-- 20220222 PI改造 by Bright--end -->
|
|
<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:0%;
|
}
|
div#out_Div_L {
|
position:relative;
|
overflow:hidden;
|
float:left;
|
width:99%;
|
}
|
div#in_Div {/* tbodyが入っている。ここがスクロール対象*/
|
position:relative;
|
overflow: auto; /*スクロールバー*/
|
float:left;
|
width:0%;
|
height: 500px; /* tbodyを表示する高さ、後でjsにて調整 */
|
}
|
div#in_Div_L {
|
position:relative;
|
overflow:auto;
|
float:left;
|
width:100%;
|
height: 600px;
|
}
|
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:170px; }
|
table.list td select {width:95%;}
|
table.list td input {width:95%;}
|
table.list td textarea {
|
height:50px;
|
width:90%;
|
}
|
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;}
|
|
.decrypt{position: absolute;top: 0;left: 100%;display: none;text-align: left;
|
padding-left: 5px;}
|
a:hover .decrypt{display: block;width: 100px}
|
|
</style>
|
<script type="text/javascript">
|
var heightAjustment = 120;
|
var widthAjustment = 30;
|
function setChangeFlgRight(cnt) {
|
document.getElementById('allPage:allForm:oppBlock:oppTable:' + cnt + ':changeFlgRt').value = 1;
|
}
|
function setChangeFlg(cnt) {
|
document.getElementById('allPage:allForm:oppBlock:oppTable:' + cnt + ':changeFlg').value = 1;
|
}
|
</script>
|
</head>
|
<apex:form id="allForm">
|
<apex:actionFunction name="saveAndSearch" action="{!save}" rerender="allPanel" oncomplete="afterSaveAndSearch();">
|
<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="{!chick}" rerender="allPanel" oncomplete="afterSearchOpp();"/>
|
<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 onclick="blockme()" oncomplete="unblockUI();" action="{!save}" value="保存" style="height:30px;width:50px;"/>
|
<apex:commandButton value="检索" onclick="NewSearch();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="200px">
|
<font>数 据 字 段 </font>
|
<apex:selectList value="{!numtextA1}" size="1" style="width:110px"><apex:selectOptions value="{!textOpts}"/></apex:selectList>
|
</td>
|
<td width="130px">
|
<apex:selectList value="{!numtextA2}" size="1" style="width:110px"><apex:selectOptions value="{!firstOpts}"/></apex:selectList>
|
</td>
|
<td width="200px">
|
<apex:inputText style="width:150px" value="{!numtextA}"/>
|
</td>
|
<td width="200px">
|
<font>数 据 字 段 </font>
|
<apex:selectList value="{!numtextB1}" size="1" style="width:110px"><apex:selectOptions value="{!textOpts01}"/></apex:selectList>
|
</td>
|
<td width="130px">
|
<apex:selectList value="{!numtextB2}" size="1" style="width:110px"><apex:selectOptions value="{!equalOpts}"/></apex:selectList>
|
</td>
|
<td width="200px">
|
<apex:inputText style="width:150px" value="{!numtextB}"/>
|
</td>
|
</tr>
|
<tr>
|
<td width="200px">
|
<font>数 据 字 段 </font>
|
<apex:selectList value="{!numtextC1}" size="1" style="width:110px"><apex:selectOptions value="{!textOpts02}"/></apex:selectList>
|
</td>
|
<td width="130px">
|
<apex:selectList value="{!numtextC2}" size="1" style="width:110px"><apex:selectOptions value="{!equalOpts2}"/></apex:selectList>
|
</td>
|
<td width="200px">
|
<apex:inputHidden id="AwsDataIds" value="{!AwsDataIds}"/>
|
<apex:inputText id="numtextC" style="width:150px" value="{!numtextC}"/>
|
</td>
|
<td width="200px">
|
<font>数 据 字 段 </font>
|
<apex:selectList value="{!numtextD1}" size="1" style="width:110px"><apex:selectOptions value="{!textOpts03}"/></apex:selectList>
|
</td>
|
<td width="130px">
|
<apex:selectList value="{!numtextD2}" size="1" style="width:110px"><apex:selectOptions value="{!equalOpts}"/></apex:selectList>
|
</td>
|
<td width="200px">
|
<apex:inputText style="width:150px" value="{!numtextD}"/>
|
</td>
|
<td width="230px">显示
|
<apex:selectList value="{!limits}" size="1" onchange="NewSearch();return false;">
|
<apex:selectOptions value="{!limitOpts}"/></apex:selectList> 条数据
|
</td>
|
</tr>
|
</table>
|
</apex:pageBlock>
|
<apex:pageBlock id="oppBlock" tabStyle="Report">
|
<apex:outputPanel >
|
<apex:inputHidden id="oppCount" value="{!oppCount}"/>
|
<div id="out_Div_L">
|
<table class="list" style="border-bottom-width: 0px; width:2000px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
|
<tr class="headerRow" height="30px">
|
<td/>
|
<td/>
|
<td/>
|
<td/>
|
<apex:variable value="{!0}" var="cnt" />
|
<apex:repeat value="{!titleRight}" var="t">
|
|
<td style="background-color: antiquewhite; border-left-color: antiquewhite; border-right-color: antiquewhite;font-size: 18px;font-weight: 1000;">
|
<apex:outputPanel rendered="{!IF(cnt == 3, 'true', 'false')}">
|
每月填写
|
</apex:outputPanel>
|
</td>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
|
<apex:variable value="{!0}" var="cnt" />
|
<apex:repeat value="{!titleLeft}" var="t">
|
<td style="background-color: rgb(226,239,218); antiquewhite; border-left-color: rgb(226,239,218); border-right-color: rgb(226,239,218);font-size: 18px;font-weight: 1000;">
|
<apex:outputPanel rendered="{!IF(cnt == 1, 'true', 'false')}">
|
每年填写
|
</apex:outputPanel>
|
</td>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
</tr>
|
<tr class="headerRow" height="30px">
|
<!-- 客户人员表****联系人字段****不更改 -->
|
<td><a href="#" onclick="sortTableJs_Account('{!0}');return false;" style="text-decoration: underline;">培训名称</a></td>
|
<td><a href="#" onclick="sortTableJs_Account('{!1}');return false;" style="text-decoration: underline;">培训主担当</a></td>
|
<td><a href="#" onclick="sortTableJs_Account('{!2}');return false;" style="text-decoration: underline;">访问人名</a></td>
|
<td><a href="#" onclick="sortTableJs_Account('{!3}');return false;" style="text-decoration: underline;">医院科室</a></td>
|
<!-- 周会会议管理表****每月填写****字段集 -->
|
<apex:variable value="{!0}" var="cnt" />
|
<apex:repeat value="{!titleRight}" var="t">
|
<td style="background-color: antiquewhite;" >
|
<apex:outputText value="{!t}" style="background-color: antiquewhite;"/>
|
</td>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
<!-- 周会会议管理表****每年填写****字段集 -->
|
<apex:variable value="{!4}" var="cnt" />
|
<apex:repeat value="{!titleLeft}" var="t">
|
<td style="background-color: rgb(226,239,218);">
|
<a href="#" onclick="sortTableJs_Account('{!cnt}');return false;" style="text-decoration: underline;">
|
<apex:outputText value="{!t}" style="background-color: rgb(226,239,218);"/>
|
</a>
|
</td>
|
<apex:variable value="{!cnt + 1}" var="cnt" />
|
</apex:repeat>
|
</tr>
|
</table>
|
</div>
|
<div style="clear:both;height:0px;"></div>
|
<div id="in_Div_L">
|
<table class="list" bgcolor="#00FF00" style="border-bottom-width: 0px;width:2000px; font-size:11px;border-spacing:0;" border="" id="tableData_L">
|
<apex:variable value="{!1}" var="cntA00" />
|
<apex:repeat value="{!oppRecords}" var="or" id="oppTable">
|
<!-- <tr> -->
|
<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);}">
|
<!-- +++++++++++++++++客户人员表****联系人字段****不更改+++++++++++++++++ -->
|
<td>
|
<apex:outputField value="{!or.con.Campaign__c}"/>
|
</td>
|
<td align="center">
|
<apex:outputLink value="/{!or.con.CampaignOwnerID__c}" target="LINK_{!or.con.CampaignOwnerID__c}">
|
<apex:outputField value="{!or.con.CampaignOwnerName__c}" />
|
</apex:outputLink>
|
</td>
|
<td align="center" >
|
|
<a style="position: relative" href="/{!or.con.Id}" aws-data-id="{!or.con.AWS_Data_Id__c}" title=""><span>{!or.con.MedicalStaff_Full_name__c}</span><span class="decrypt"></span></a>
|
|
</td>
|
<td>
|
<apex:outputField value="{!or.con.Accountid}"/>
|
</td>
|
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
<apex:repeat value="{!columnsRightApi}" var="c">
|
<td style="background-color: antiquewhite;">
|
<apex:inputField id="A02" style="background-color: antiquewhite;" value="{!or.Agcmmc[c[0]]}" onchange="setChangeFlg('{!or.lineNo}')"/>
|
</td>
|
</apex:repeat>
|
<apex:repeat value="{!columnsLeftApi}" var="c">
|
<td style="background-color: rgb(226,239,218);" >
|
<apex:inputField id="A03" style="background-color: rgb(226,239,218);" value="{!or.con[c[0]]}" onchange="setChangeFlgRight('{!or.lineNo}')"/>
|
</td>
|
</apex:repeat>
|
<!-- =============================================================== -->
|
<td id="cell_Scroll" class="col_Scroll" >
|
<apex:inputHidden value="{!or.changeFlg}" id="changeFlg"/>
|
<apex:inputHidden value="{!or.changeFlgRt}" id="changeFlgRt"/>
|
<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="cntA00" />
|
</apex:repeat>
|
</table>
|
</div>
|
<div id="in_Div">
|
<table class="list" style="border-bottom-width: 0px;width:2000px; font-size:11px; border-spacing:0;" border="" id="tableData">
|
</table>
|
</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%";
|
}
|
}
|
|
AWSService.sfSessionId = '{!GETSESSIONID()}';
|
var staticResource = JSON.parse('{!staticResource}');
|
|
document.body.onload = function(){
|
NewSearch();
|
}
|
var awsdata_map={};
|
function NewSearch(){
|
|
// 如果有填写姓名,先去aws查询,再用awsdataid查询后台,如果没有填写直接查询后台
|
awsdata_map={};
|
let e = document.getElementById("allPage:allForm:searchBlock:numtextC");
|
if(e && e.value){
|
blockme();
|
AWSService.search(staticResource.searchUrl,JSON.stringify({
|
"contactName":e.value
|
}),function(data){
|
unblockUI();
|
if(data.object && data.object.length > 0){
|
let aws_data_ids = [];
|
for(let d of data.object){
|
if(d.dataId){
|
awsdata_map[d.dataId] = d;
|
aws_data_ids.push(d.dataId);
|
}
|
}
|
document.getElementById("allPage:allForm:searchBlock:AwsDataIds").value = aws_data_ids.join(";");
|
}else{
|
document.getElementById("allPage:allForm:searchBlock:AwsDataIds").value = new Date().getTime();
|
}
|
searchOppJs_Account_copy();
|
},staticResource.token);
|
}else{
|
searchOppJs_Account_copy();
|
}
|
|
}
|
|
function afterSearchOpp(){
|
DecryptContactName(()=>unblockUI());
|
}
|
|
function afterSaveAndSearch(){
|
DecryptContactName(()=>unblockUI());
|
}
|
|
function DecryptContactName(callback){
|
|
let no_in_ids = [];
|
j$("[aws-data-id]").each(function(i,e){
|
let id = e.getAttribute("aws-data-id");
|
if(!(id && awsdata_map.hasOwnProperty(id))){
|
no_in_ids.push(id);
|
}
|
});
|
if(no_in_ids.length>0){
|
AWSService.search(staticResource.searchUrl,JSON.stringify({
|
"dataIds":no_in_ids
|
}),function(data){
|
if(data.object && data.object.length > 0){
|
for(let d of data.object){
|
if(d.dataId){
|
awsdata_map[d.dataId] = d;
|
}
|
}
|
}
|
BindToTile();
|
if(callback)callback();
|
},staticResource.token);
|
}
|
else{
|
BindToTile();
|
if(callback)callback();
|
}
|
}
|
|
function BindToTile(){
|
j$("[aws-data-id]").each(function(i,e){
|
let id = e.getAttribute("aws-data-id");
|
if(id && awsdata_map.hasOwnProperty(id) && awsdata_map[id].medicalStaffFullName){
|
j$(e).find(".decrypt").html(awsdata_map[id].medicalStaffFullName);
|
}
|
});
|
}
|
|
</script>
|
</apex:outputPanel>
|
</apex:form>
|
</apex:page>
|