Commit 6b7d297c authored by abibave's avatar abibave

Changes for making fixed header and width of columns.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103707 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0a84d2f6
......@@ -21,8 +21,377 @@ pageEncoding="UTF-8"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="/ibase/dwh/GwtDashboardPage.css"/>
<style type="text/css">
table.mt {
border-width: 1px;
border-spacing: 0px;
border-style: solid;
border-color: #cfcfcf;
border-collapse: collapse;
line-height: 25px;
background-color: #FFF;
border-top: 2px solid #7bc6ff;
}
table.mt th {
border-width: 1px;
padding: 1px;
border-style: solid;
border-color: #cfcfcf;
white-space: normal;
text-rendering: optimizeLegibility;
}
table.mt td {
border-width: 1px;
padding: 1px;
border-style: solid;
border-color: #cfcfcf;
vertical-align: middle;
}
.cardHtmlTableBodyAlignRgt
{
text-align:right;
padding-right:3px;
}
.cardHtmlTableBodyAlignLft
{
text-align:left;
padding-right:3px;
}
.cardHtmlTableHeaderAlignLft
{
text-align:left;
padding-right:3px;
font-size: 14px;
}
</style>
<script type="text/javascript">
var flag=false;
var tid; //table id as defined on html page
var sheight;
var itmNum;
function ge$(d)
{
try
{
return window.opener.document.getElementById(d);
}
catch(e)
{
try
{
return document.getElementById(d);
}catch(e)
{
try
{
return window.document.getElementById(d);
}
catch(e)
{
//alert("ex");
}
}
}
}
function loadHeader()
{
fxheaderInitDocDet();
fxheaderInitchemDet();
fxheaderInitLoc();
/* fxheaderInit();
var pager = new Pager('doctor', 10);
pager.init();
pager.showPageNav('pager', 'pageNavPosition');
pager.showPage(1); */
}
function scrollHeaderNew(dscroll,hscroll)
{
if(flag)
{
return;
}
var fh=ge$(hscroll);
var sd=ge$(dscroll);
try
{
fh.style.left=(0-sd.scrollLeft)+'px';
}
catch(e)
{
}
}
function scrollHeader()
{
if(flag)
{
return;
}
var fh=ge$('Scroller:fx'+itmNum+'');
var sd=ge$(tid+':scroller');
fh.style.left=(0-sd.scrollLeft)+'px';
}
function addScrollerDivs()
{
//alert(ge$(tid+':scroller'));
if(ge$(tid+':scroller'))
{
return;
}
var tempDiv = document.createElement("div");
var sd=document.createElement("div");
//alert("tid"+tid);
var tb=ge$(tid);
//alert("tb"+tb);
sd.style.maxHeight=sheight+"px";
sd.style.minHeight="50px";
sd.style.overflow='scroll';
sd.style.overflowX='auto';
sd.style.overflowY='scroll';
sd.style.width=tb.width;
sd.id=tid+':scroller';
sd.className='second';
var hScroll = 'Scroller:fx'+itmNum;
var dScroll = tid+':scroller';
sd.setAttribute('onscroll', "scrollHeaderNew('"+dScroll+"','"+hScroll+"');");
//sd.onscroll = scrollHeader;
var tb2=tb.cloneNode(true);
sd.appendChild(tb2);
tb.parentNode.replaceChild(sd,tb);
var sd2=document.createElement("div");
sd2.id='Scroller:fx'+itmNum+':OuterDiv';
sd2.style.cssText='position:relative;width:100%;overflow:hidden;overflow-x:hidden;padding:0px;margin:0px;';
sd2.innerHTML='<div id="Scroller:fx'+itmNum+'" style="position:relative;width:9999px;padding:0px;margin-left:0px;"><font size="3" color="red">Please wait while loading the table..</font></div>';
sd.parentNode.insertBefore(sd2,sd);
}
function Pager(tableName, itemsPerPage)
{
var dummypageNumber;
this.tableName = tableName;
this.itemsPerPage = itemsPerPage;
this.currentPage = 1;
this.pages = 0;
this.inited = false;
this.showRecords = function(from, to) {
var rows = document.getElementById(tableName).rows;
// i starts from 1 to skip table header row
for (var i = 1; i < rows.length; i++)
{
if (i < from || i > to)
rows[i].style.display = 'none';
else
rows[i].style.display = '';
}
}
this.showPage = function(pageNumber) {
if (! this.inited)
{
alert("not inited");
return;
}
var oldPageAnchor = document.getElementById('pg'+this.currentPage);
oldPageAnchor.className = 'pg-number';
this.currentPage = pageNumber;
var newPageAnchor = document.getElementById('pg'+this.currentPage);
newPageAnchor.className = 'pg-selected';
if(dummypageNumber == 1)
{
document.getElementById("prevButtonSpan").style.background='#EBEBEB';
document.getElementById("prevButtonSpan").style.color='gray';
document.getElementById("prevButtonSpan").style.pointerEvents = 'none';
document.getElementById("nextButtonSpan").style.background='#EBEBEB';
document.getElementById("nextButtonSpan").style.color='gray';
document.getElementById("nextButtonSpan").style.pointerEvents = 'none';
}
else if(this.currentPage == 1)
{
document.getElementById("prevButtonSpan").style.background='#EBEBEB';
document.getElementById("prevButtonSpan").style.color='gray';
document.getElementById("prevButtonSpan").style.pointerEvents = 'none';
document.getElementById("nextButtonSpan").style.background='#e7e7e7';
document.getElementById("nextButtonSpan").style.color='#333';
document.getElementById("nextButtonSpan").style.pointerEvents = 'auto';
}
else if(dummypageNumber == this.currentPage)
{
document.getElementById("prevButtonSpan").style.background='#e7e7e7';
document.getElementById("prevButtonSpan").style.color='#333';
document.getElementById("prevButtonSpan").style.pointerEvents = 'auto';
document.getElementById("nextButtonSpan").style.background='#EBEBEB';
document.getElementById("nextButtonSpan").style.color='gray';
document.getElementById("nextButtonSpan").style.pointerEvents = 'none';
}
else
{
document.getElementById("prevButtonSpan").style.background='#e7e7e7';
document.getElementById("prevButtonSpan").style.color='#333';
document.getElementById("prevButtonSpan").style.pointerEvents = 'auto';
document.getElementById("nextButtonSpan").style.background='#e7e7e7';
document.getElementById("nextButtonSpan").style.color='#333';
document.getElementById("nextButtonSpan").style.pointerEvents = 'auto';
}
var from = (pageNumber - 1) * itemsPerPage + 1;
var to = from + itemsPerPage - 1;
this.showRecords(from, to);
}
this.prev = function() {
if (this.currentPage > 1)
this.showPage(this.currentPage - 1);
if(this.currentPage == 1)
{
document.getElementById("prevButtonSpan").style.background='#EBEBEB';
document.getElementById("prevButtonSpan").style.color='gray';
document.getElementById("prevButtonSpan").style.pointerEvents = 'none';
document.getElementById("nextButtonSpan").style.background='#e7e7e7';
document.getElementById("nextButtonSpan").style.color='#333';
document.getElementById("nextButtonSpan").style.pointerEvents = 'auto';
}
}
this.next = function() {
if (this.currentPage < this.pages)
{
this.showPage(this.currentPage + 1);
}
if(this.currentPage == dummypageNumber)
{
//alert("page=last");
document.getElementById("nextButtonSpan").style.background='#EBEBEB';
document.getElementById("nextButtonSpan").style.pointerEvents = 'none';
document.getElementById("nextButtonSpan").style.color='gray';
document.getElementById("prevButtonSpan").style.background='#e7e7e7';
document.getElementById("prevButtonSpan").style.color='#333';
document.getElementById("prevButtonSpan").style.pointerEvents = 'auto';
}
}
this.init = function() {
var rows = document.getElementById(tableName).rows;
var records = (rows.length - 1);
this.pages = Math.ceil(records / itemsPerPage);
this.inited = true;
}
this.showPageNav = function(pagerName, positionId) {
if (! this.inited)
{
alert("not inited");
return;
}
var element = document.getElementById(positionId);
var pagerHtml = '<span onclick="' + pagerName + '.prev();" class="pg-normal" style="margin-right: 5px;" id="prevButtonSpan"> « Prev </span> ';
for (var page = 1; page <= this.pages; page++)
pagerHtml += '<span id="pg' + page + '" class="pg-number" onclick="' + pagerName + '.showPage(' + page + ');">' + page + '</span> ';
pagerHtml += '<span onclick="'+pagerName+'.next();" class="pg-normal" id="nextButtonSpan"> Next »</span>';
element.innerHTML = pagerHtml;
//alert("page....."+page);
dummypageNumber = page-1;
}
}
function fxheader()
{
console.log("fixheader called.....");
if(flag) {return;}
flag=true;
var tbDiv=ge$(tid);
var twp=tbDiv.width;
var twi=parseInt(twp);
if(twp.indexOf("%") > 0)
{
twi=((ge$('Scroller:fx'+itmNum+':OuterDiv').offsetWidth * twi) / 100)-20;
twp=twi+'px';
tbDiv.style.width=twp;
}
var fh=ge$('Scroller:fx'+itmNum+'');
var cn=fh.childNodes;
for(var j=0;j<cn.length;j++)
{
fh.removeChild(cn[j]);
}
var t=tbDiv.cloneNode(false);
t.id=tid+'__cN';
t.style.width=tbDiv.offsetWidth+'px';
t.style.marginTop='0px';
var r=tbDiv.rows[0].cloneNode(true);
r.style.height=tbDiv.rows[0].offsetHeight+'px';
var th=document.createElement("thead");
th.appendChild(r);
t.appendChild(th);
fh.appendChild(t);
//adjusting widths
var c=ge$(tid+'__cN').rows[0].cells;
var oc=tbDiv.rows[0].cells;
for(var i=0;i<c.length;i++)
{
c[i].style.width=(oc[i].offsetWidth-3) + 'px';
}
ge$('Scroller:fx'+itmNum+':OuterDiv').style.height=oc[0].offsetHeight+'px';
tbDiv.style.marginTop = "-" + tbDiv.rows[0].offsetHeight + "px";
if(tbDiv.offsetHeight < sheight)
{
ge$(tid+':scroller').style.maxHeight=tbDiv.offsetHeight + 'px';
}
window.onload=fxheader;
window.onresize=fxheader;
flag=false;
scrollHeader();
}
function fxheaderInitDocDet()
{
tid='doctorCallDetail';
itmNum='doctorCallDetail';
sheight='200';
flag=false;
addScrollerDivs();
fxheader();
}
function fxheaderInitchemDet()
{
tid='chemistCallDetail';
itmNum='chemistCallDetail';
sheight='200';
flag=false;
addScrollerDivs();
fxheader();
}
function fxheaderInitLoc()
{
tid='localityDetail';
itmNum='localityDetail';
sheight='200';
flag=false;
addScrollerDivs();
fxheader();
}
</script>
</head>
<body style="margin: 0;">
<body style="margin: 0;" onload="loadHeader();">
<%
try
{
......@@ -44,24 +413,24 @@ pageEncoding="UTF-8"%>
</table>
<table border='0' width='100%'>
<tr>
<td class='cardHtmlTableHeader' style="text-align: right;">Event Date : </td>
<td class='cardHtmlTableBody' style="text-align: left;"><%=fetchRowVal.get("event_date").toString() %></td>
<td class='cardHtmlTableHeader' style="text-align: right;width: 50%;">Event Date : </td>
<td class='cardHtmlTableBody' style="text-align: left;width: 50%;"><%=fetchRowVal.get("event_date").toString() %></td>
</tr>
<tr>
<td class='cardHtmlTableHeader' style="text-align: right;">Last DCR Date : </td>
<td class='cardHtmlTableBody' style="text-align: left;"><%=fetchRowVal.get("last_dcr_date").toString() %></td>
<td class='cardHtmlTableHeader' style="text-align: right;width: 50%;">Last DCR Date : </td>
<td class='cardHtmlTableBody' style="text-align: left;width: 50%;"><%=fetchRowVal.get("last_dcr_date").toString() %></td>
</tr>
<tr>
<td class='cardHtmlTableHeader' style="text-align: right;">Other Participant : </td>
<td class='cardHtmlTableBody' style="text-align: left;"><%=fetchRowVal.get("oth_participant").toString()%></td>
<td class='cardHtmlTableHeader' style="text-align: right;width: 50%;">Other Participant : </td>
<td class='cardHtmlTableBody' style="text-align: left;width: 50%;"><%=fetchRowVal.get("oth_participant").toString()%></td>
</tr>
<tr>
<td class='cardHtmlTableHeader' style="text-align: right;">Activity : </td>
<td class='cardHtmlTableBody' style="text-align: left;"><%=fetchRowVal.get("activity_descr").toString() %></td>
<td class='cardHtmlTableHeader' style="text-align: right;width: 50%;">Activity : </td>
<td class='cardHtmlTableBody' style="text-align: left;width: 50%;"><%=fetchRowVal.get("activity_descr").toString() %></td>
</tr>
<tr>
<td class='cardHtmlTableHeader' style="text-align: right;">Remarks : </td>
<td class='cardHtmlTableBody' style="text-align: left;"><%=fetchRowVal.get("remarks").toString() %></td>
<td class='cardHtmlTableHeader' style="text-align: right;width: 50%;">Remarks : </td>
<td class='cardHtmlTableBody' style="text-align: left;width: 50%;"><%=fetchRowVal.get("remarks").toString() %></td>
</tr>
</table>
<%
......@@ -72,172 +441,186 @@ pageEncoding="UTF-8"%>
<td class='tableSubtileTD'> Locality Details:</td>
</tr>
</table>
<div style="overflow:scroll;max-height:150px;min-height:80px;width:100%;overflow:auto">
<table border='1' class='cardHtmlTable' width='100%' cellpadding='4'>
<tr>
<td class='cardHtmlTableHeader' width='5%'> Sr.No</td>
<td class='cardHtmlTableHeader' width='30%'> Place Of Work </td>
<td class='cardHtmlTableHeader' width='30%'> Journey From </td>
<td class='cardHtmlTableHeader' width='30%'> Mode of Travel </td>
</tr>
<%
fetchDataMainJson = new JSONObject();
fetchDataMainJson = (JSONObject) dayWiseJsonFinalObject.get("2");
for(int jsnCnt = 0; jsnCnt<fetchDataMainJson.size();jsnCnt++)
{
JSONObject fetchRowVal = (JSONObject) fetchDataMainJson.get(jsnCnt);
%>
<tr>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("sr_no").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("locality_descr").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("stan_code__from_descr").toString() %></td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("travel_mode").toString() %> </td>
</tr>
<!-- <div style="overflow:scroll;max-height:150px;min-height:80px;width:100%;overflow:auto">
<table border='1' class='cardHtmlTable' width='100%' cellpadding='4'> -->
<table id = "localityDetail" class = "mt" border='1' width='100%' cellpadding='4' name ="localityDetail">
<thead >
<tr>
<td class='cardHtmlTableHeaderAlignLft' width='5%'> Sr.No</td>
<td class='cardHtmlTableHeaderAlignLft' width='30%'> Place Of Work </td>
<td class='cardHtmlTableHeaderAlignLft' width='30%'> Journey From </td>
<td class='cardHtmlTableHeaderAlignLft' width='30%'> Mode of Travel </td>
</tr>
</thead>
<tbody style = " overflow-y: scroll; overflow-x: hidden; height: 150px;">
<%
}%>
fetchDataMainJson = new JSONObject();
fetchDataMainJson = (JSONObject) dayWiseJsonFinalObject.get("2");
for(int jsnCnt = 0; jsnCnt<fetchDataMainJson.size();jsnCnt++)
{
JSONObject fetchRowVal = (JSONObject) fetchDataMainJson.get(jsnCnt);
%>
<tr>
<td class='cardHtmlTableBodyAlignRgt'> <%=fetchRowVal.get("sr_no").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("locality_descr").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("stan_code__from_descr").toString() %></td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("travel_mode").toString() %> </td>
</tr>
<%
}%>
</tbody>
</table>
</div>
<!-- </div> -->
<table class='cardSalesPersonTitle' width='100%'>
<tr>
<td class='tableSubtileTD'> Doctor's Call Details:</td>
</tr>
</table>
<div style="overflow:scroll;max-height:150px;min-height:80px;width:100%;overflow:auto">
<table border='1' class='cardHtmlTable' width='100%' cellpadding='4'>
<tr>
<td class='cardHtmlTableHeader' width='5%'> Sr No. </td>
<td class='cardHtmlTableHeader' width='10%'> Class Description </td>
<td class='cardHtmlTableHeader' width='12%'> Doctor Name </td>
<td class='cardHtmlTableHeader' width='12%'> Work With </td>
<td class='cardHtmlTableHeader' width='10%'> Product Name </td>
<td class='cardHtmlTableHeader' width='5%'> Quantity </td>
<td class='cardHtmlTableHeader' width='10%'> Order Booked </td>
<td class='cardHtmlTableHeader' width='10%'> Meeting Summary </td>
<td class='cardHtmlTableHeader' width='12%'> Other Participant </td>
<td class='cardHtmlTableHeader' width='10%'> Team </td>
<td class='cardHtmlTableHeader' width='10%'> Remarks </td>
</tr>
<%
fetchDataMainJson = new JSONObject();
fetchDataMainJson = (JSONObject) dayWiseJsonFinalObject.get("3");
String prvStrgCodeDoc = "";
int docCount = 1;
System.out.print(" fetchDataMainJson.size() = "+fetchDataMainJson.size());
for(int jsnCnt = 0; jsnCnt<fetchDataMainJson.size();jsnCnt++)
{
JSONObject fetchRowVal = (JSONObject) fetchDataMainJson.get(jsnCnt);
String strgCodeDoc = fetchRowVal.get("strg_code_doctor").toString();
if(!prvStrgCodeDoc.equalsIgnoreCase(strgCodeDoc))
{
%>
<tr>
<td class='cardHtmlTableBody'> <%=docCount%> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("str_class_code_descr").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("doctor_name").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("work_with").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("product_name").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("quantity").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("ordered_booked").toString() %></td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("meeting_summ").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("other_parti_doctor").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("team_sale_name").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("remrks_doctor").toString() %> </td>
</tr>
<!-- <div style="overflow:scroll;max-height:150px;min-height:80px;width:100%;overflow:auto">
<table border='1' class='cardHtmlTable' width='100%' cellpadding='4'>-->
<table id = "doctorCallDetail" class = "mt" border='1' width='100%' cellpadding='4' name ="doctorCallDetail">
<thead >
<tr>
<td class='cardHtmlTableHeaderAlignLft' width='5%'> Sr No. </td>
<td class='cardHtmlTableHeaderAlignLft' width='10%'> Class Description </td>
<td class='cardHtmlTableHeaderAlignLft' width='12%'> Doctor Name </td>
<td class='cardHtmlTableHeaderAlignLft' width='12%'> Work With </td>
<td class='cardHtmlTableHeaderAlignLft' width='10%'> Product Name </td>
<td class='cardHtmlTableHeaderAlignLft' width='5%'> Quantity </td>
<td class='cardHtmlTableHeaderAlignLft' width='8%'> Order Booked </td>
<td class='cardHtmlTableHeaderAlignLft' width='10%'> Meeting Summary </td>
<td class='cardHtmlTableHeaderAlignLft' width='12%'> Other Participant </td>
<td class='cardHtmlTableHeaderAlignLft' width='10%'> Team </td>
<td class='cardHtmlTableHeaderAlignLft' width='12%'> Remarks </td>
</tr>
</thead>
<tbody style = "overflow-y: scroll; overflow-x: hidden; height: 150px;">
<%
docCount++;
}
else if(prvStrgCodeDoc.equalsIgnoreCase(strgCodeDoc))
{
fetchDataMainJson = new JSONObject();
fetchDataMainJson = (JSONObject) dayWiseJsonFinalObject.get("3");
String prvStrgCodeDoc = "";
int docCount = 1;
System.out.print(" fetchDataMainJson.size() = "+fetchDataMainJson.size());
for(int jsnCnt = 0; jsnCnt<fetchDataMainJson.size();jsnCnt++)
{
JSONObject fetchRowVal = (JSONObject) fetchDataMainJson.get(jsnCnt);
String strgCodeDoc = fetchRowVal.get("strg_code_doctor").toString();
if(!prvStrgCodeDoc.equalsIgnoreCase(strgCodeDoc))
{
%>
<tr>
<td class='cardHtmlTableBodyAlignRgt'> <%=docCount%> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("str_class_code_descr").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("doctor_name").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("work_with").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("product_name").toString() %> </td>
<td class='cardHtmlTableBodyAlignRgt'> <%=fetchRowVal.get("quantity").toString() %> </td>
<td class='cardHtmlTableBodyAlignRgt'> <%=fetchRowVal.get("ordered_booked").toString() %></td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("meeting_summ").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("other_parti_doctor").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("team_sale_name").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("remrks_doctor").toString() %> </td>
</tr>
<%
docCount++;
}
else if(prvStrgCodeDoc.equalsIgnoreCase(strgCodeDoc))
{
%>
<tr>
<td class='cardHtmlTableBodyAlignRgt'> </td>
<td class='cardHtmlTableBodyAlignLft'> </td>
<td class='cardHtmlTableBodyAlignLft'> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("work_with").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("product_name").toString() %> </td>
<td class='cardHtmlTableBodyAlignRgt'> <%=fetchRowVal.get("quantity").toString() %> </td>
<td class='cardHtmlTableBodyAlignRgt'> <%=fetchRowVal.get("ordered_booked").toString() %></td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("meeting_summ").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("other_parti_doctor").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("team_sale_name").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("remrks_doctor").toString() %> </td>
</tr>
<%
}
prvStrgCodeDoc = strgCodeDoc;
}
%>
<tr>
<td class='cardHtmlTableBody'> </td>
<td class='cardHtmlTableBody'> </td>
<td class='cardHtmlTableBody'> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("work_with").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("product_name").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("quantity").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("ordered_booked").toString() %></td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("meeting_summ").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("other_parti_doctor").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("team_sale_name").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("remrks_doctor").toString() %> </td>
</tr>
<%
}
prvStrgCodeDoc = strgCodeDoc;
}
%>
</tbody>
</table>
</div>
<!-- </div> -->
<table class='cardSalesPersonTitle' width='100%'>
<tr>
<td class='tableSubtileTD'> Chemists Call Details:</td>
</tr>
</table>
<div style="overflow:scroll;max-height:150px;min-height:80px;width:100%;overflow:auto">
<table border='1' class='cardHtmlTable' width='100%' cellpadding='4'>
<tr>
<td class='cardHtmlTableHeader' width='5%'> Sr No. </td>
<td class='cardHtmlTableHeader' width='10%'> Class Description </td>
<td class='cardHtmlTableHeader' width='12%'> Chemist Name </td>
<td class='cardHtmlTableHeader' width='5%'> Product Name </td>
<td class='cardHtmlTableHeader' width='5%'> Quantity </td>
<td class='cardHtmlTableHeader' width='10%'> POB (RS) </td>
<td class='cardHtmlTableHeader' width='12%'> Other Participant </td>
<td class='cardHtmlTableHeader' width='5%'> Team </td>
<td class='cardHtmlTableHeader' width='5%'> Remarks </td>
</tr>
<%
fetchDataMainJson = new JSONObject();
fetchDataMainJson = (JSONObject) dayWiseJsonFinalObject.get("4");
String prvStrgCodeChem = "";
int chemCount = 1;
for(int jsnCnt = 0; jsnCnt<fetchDataMainJson.size();jsnCnt++)
{
JSONObject fetchRowVal = (JSONObject) fetchDataMainJson.get(jsnCnt);
String strgCodeChem = fetchRowVal.get("strg_code_chemist").toString();
if(!prvStrgCodeChem.equalsIgnoreCase(strgCodeChem))
{
%>
<tr>
<td class='cardHtmlTableBody'> <%=chemCount%> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("strgclass_descr_chemist").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("chemist_name").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("prod_name").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("che_quantity").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("ord_book_chemist").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("oth_parti_chemist").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("saleteam_name_chemist").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("remk_chemist").toString() %> </td>
</tr>
<!-- <div style="overflow:scroll;max-height:150px;min-height:80px;width:100%;overflow:auto">
<table border='1' class='cardHtmlTable' width='100%' cellpadding='4'> -->
<table id = "chemistCallDetail" class = "mt" border='1' width='100%' cellpadding='4' name ="chemistCallDetail">
<thead>
<tr>
<td class='cardHtmlTableHeaderAlignLft' width='3.5%'> Sr No. </td>
<td class='cardHtmlTableHeaderAlignLft' width='10%'> Class Description </td>
<td class='cardHtmlTableHeaderAlignLft' width='12%'> Chemist Name </td>
<td class='cardHtmlTableHeaderAlignLft' width='10%'> Product Name </td>
<td class='cardHtmlTableHeaderAlignLft' width='5%'> Quantity </td>
<td class='cardHtmlTableHeaderAlignLft' width='5%'> POB (RS) </td>
<td class='cardHtmlTableHeaderAlignLft' width='12%'> Other Participant </td>
<td class='cardHtmlTableHeaderAlignLft' width='6.5%'> Team </td>
<td class='cardHtmlTableHeaderAlignLft' width='5%'> Remarks </td>
</tr>
</thead>
<tbody style = " overflow-y: scroll; overflow-x: hidden; height: 150px;">
<%
chemCount++;
}
else if(prvStrgCodeChem.equalsIgnoreCase(strgCodeChem))
{
fetchDataMainJson = new JSONObject();
fetchDataMainJson = (JSONObject) dayWiseJsonFinalObject.get("4");
String prvStrgCodeChem = "";
int chemCount = 1;
for(int jsnCnt = 0; jsnCnt<fetchDataMainJson.size();jsnCnt++)
{
JSONObject fetchRowVal = (JSONObject) fetchDataMainJson.get(jsnCnt);
String strgCodeChem = fetchRowVal.get("strg_code_chemist").toString();
if(!prvStrgCodeChem.equalsIgnoreCase(strgCodeChem))
{
%>
<tr>
<td class='cardHtmlTableBodyAlignRgt'> <%=chemCount%> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("strgclass_descr_chemist").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("chemist_name").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("prod_name").toString() %> </td>
<td class='cardHtmlTableBodyAlignRgt'> <%=fetchRowVal.get("che_quantity").toString() %> </td>
<td class='cardHtmlTableBodyAlignRgt'> <%=fetchRowVal.get("ord_book_chemist").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("oth_parti_chemist").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("saleteam_name_chemist").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("remk_chemist").toString() %> </td>
</tr>
<%
chemCount++;
}
else if(prvStrgCodeChem.equalsIgnoreCase(strgCodeChem))
{
%>
<tr>
<td class='cardHtmlTableBodyAlignRgt'> </td>
<td class='cardHtmlTableBodyAlignLft'> </td>
<td class='cardHtmlTableBodyAlignLft'></td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("prod_name").toString() %> </td>
<td class='cardHtmlTableBodyAlignRgt'> <%=fetchRowVal.get("che_quantity").toString() %> </td>
<td class='cardHtmlTableBodyAlignRgt'> <%=fetchRowVal.get("ord_book_chemist").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("oth_parti_chemist").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("saleteam_name_chemist").toString() %> </td>
<td class='cardHtmlTableBodyAlignLft'> <%=fetchRowVal.get("remk_chemist").toString() %> </td>
</tr>
<%
}
prvStrgCodeChem = strgCodeChem;
}
%>
<tr>
<td class='cardHtmlTableBody'> </td>
<td class='cardHtmlTableBody'> </td>
<td class='cardHtmlTableBody'></td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("prod_name").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("che_quantity").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("ord_book_chemist").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("oth_parti_chemist").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("saleteam_name_chemist").toString() %> </td>
<td class='cardHtmlTableBody'> <%=fetchRowVal.get("remk_chemist").toString() %> </td>
</tr>
<%
}
prvStrgCodeChem = strgCodeChem;
}
%>
</div>
<!-- </div> -->
</tbody>
</table>
</div>
<%
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment