Commit 4240d74e authored by smestry's avatar smestry

W15ESUN005, Changed by Sneha. Updated the JSP for Location Stock Occupancy dashboard.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98596 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 320eba9f
...@@ -207,7 +207,7 @@ ...@@ -207,7 +207,7 @@
//newTable+="<td width='50%' class='white tdrghtalign'><span class='popunit'>Quantity:</span> <span class='popqty'> "+stockDtl[4].childNodes[0].nodeValue +" </span><span class='popunit'> "+stockDtl[10].childNodes[0].nodeValue+"</span></td> </tr> <tr> <td colspan='2' class='ttl'>Other Information</td> </tr> <tr> <td colspan='2'><table width='100%' border='0' cellspacing='0' cellpadding='0' class='otherdetails'>"; //newTable+="<td width='50%' class='white tdrghtalign'><span class='popunit'>Quantity:</span> <span class='popqty'> "+stockDtl[4].childNodes[0].nodeValue +" </span><span class='popunit'> "+stockDtl[10].childNodes[0].nodeValue+"</span></td> </tr> <tr> <td colspan='2' class='ttl'>Other Information</td> </tr> <tr> <td colspan='2'><table width='100%' border='0' cellspacing='0' cellpadding='0' class='otherdetails'>";
newTable+=" </tr> <tr> " newTable+=" </tr> <tr> "
+ " <td width='50%' height='31' class='popcode white'> <p><img src = '/ibase/dashboard/wms/images/item.png' height='30' width='30' style = 'margin-top: -28px; ' ></p> " + " <td width='50%' height='31' class='popcode white'> <br><p><img src = '/ibase/dashboard/wms/images/item.png' height='30' width='30' style = 'margin-top: -28px;'></p> "
+ " "+stockDtl[0].childNodes[0].nodeValue +"</td> "; + " "+stockDtl[0].childNodes[0].nodeValue +"</td> ";
newTable+="<td width='50%' class='white tdrghtalign'><span class='popunit'>Stock &nbsp;</span> <br> " newTable+="<td width='50%' class='white tdrghtalign'><span class='popunit'>Stock &nbsp;</span> <br> "
+" <span class='popqty'> "+stockDtl[4].childNodes[0].nodeValue +" </span> <br> " +" <span class='popqty'> "+stockDtl[4].childNodes[0].nodeValue +" </span> <br> "
...@@ -407,20 +407,42 @@ span.appendChild(document.createTextNode(location)); ...@@ -407,20 +407,42 @@ span.appendChild(document.createTextNode(location));
</head> </head>
<% <%
try { try {
//ibase.utility.UserInfoBean userInfo = (ibase.utility.UserInfoBean) session.getAttribute("USER_INFO");
//String user = userInfo.getLoginCode(); String abc = request.getParameter("siteCode");
//siteCode = userInfo.getSiteCode();
System.out.print("abc==nu ="+(abc==null));
System.out.print("Site code from session :::::::::: " + siteCode); System.out.print("abc== ="+(abc=="null"));
if (siteCode == null || siteCode.trim().length() == 0 ) // System.out.print("abc.equals( ="+(abc.equals("null")));
//System.out.print("abc.equals(null ="+(abc.equals(null));
//System.out.print("abc.equalsIgnoreCase(nu ="+abc.equalsIgnoreCase(null));
//System.out.print("abc.equalsIgnoreCas="+abc.equalsIgnoreCase("null"));
if (siteCode == null || siteCode.trim().length() == 0 )
{ {
//siteCode = "TA387";
//siteCode = "TA821"; //siteCode = "TA821";
// Changed by Sneha, added site code dropdown on 17-08-2015, Request ID: SMWMS00008 // Changed by Sneha, added site code dropdown on 17-08-2015, Request ID: SMWMS00008
siteCodeStr = scmdasBean.getSiteCode(); siteCodeStr = scmdasBean.getSiteCode();
System.out.print("Site code if null ::::::::: " + siteCode); System.out.print("Site code if null ::::::::: " + siteCodeStr);
// End by Sneha, added site code dropdown on 17-08-2015, Request ID: SMWMS00008 // End by Sneha, added site code dropdown on 17-08-2015, Request ID: SMWMS00008
} }
System.out.print("siteCode"+abc+"sachin");
if(abc==null)
{
ibase.utility.UserInfoBean userInfo = (ibase.utility.UserInfoBean) session.getAttribute("USER_INFO");
String user = userInfo.getLoginCode();
siteCode = userInfo.getSiteCode();
System.out.print("siteCode from session ::::::::: " + siteCode);
}
else
{
siteCode = request.getParameter("siteCode");
System.out.print("siteCode from URL ::::::::: " );
}
System.out.print("out side the else loop :::::::::: " );
// System.out.print("Site code from session UserInfoBean :::::::::: " + siteCode);
if(xmlString == "") if(xmlString == "")
{ {
xmlString = scmdasBean.getLocPhyArea(); xmlString = scmdasBean.getLocPhyArea();
...@@ -428,12 +450,12 @@ span.appendChild(document.createTextNode(location)); ...@@ -428,12 +450,12 @@ span.appendChild(document.createTextNode(location));
//add by Birendra Pandey on dated 21 Aug 2014 //add by Birendra Pandey on dated 21 Aug 2014
selectedArea = request.getParameter("area"); selectedArea = request.getParameter("area");
locationRange = request.getParameter("locationRange"); locationRange = request.getParameter("locationRange");
// Changed by Sneha, added site code dropdown on 17-08-2015, Request ID: SMWMS00008
//siteCode = request.getParameter("siteCode") == null ? "no" : request.getParameter("siteCode") ;
siteCode = request.getParameter("siteCode") == null ? "TA821" : request.getParameter("siteCode") ;
// End by Sneha, added site code dropdown on 17-08-2015, Request ID: SMWMS00008
// Changed by Sneha, added site code dropdown on 17-08-2015, Request ID: SMWMS00008
// siteCode = request.getParameter("siteCode") == null ? "no" : request.getParameter("siteCode") ;
// End by Sneha, added site code dropdown on 17-08-2015, Request ID: SMWMS00008
if(locationRange==null) if(locationRange==null)
{ {
locationRange =""; locationRange ="";
...@@ -441,12 +463,13 @@ span.appendChild(document.createTextNode(location)); ...@@ -441,12 +463,13 @@ span.appendChild(document.createTextNode(location));
// System.out.println("expStock = "+expStock + " occupiedRack ="+occupiedRack+" retestDate ="+retestDate); // System.out.println("expStock = "+expStock + " occupiedRack ="+occupiedRack+" retestDate ="+retestDate);
if(selectedArea!=null && selectedArea.trim().length() != 0 ) if(selectedArea!=null && selectedArea.trim().length() != 0 )
{ {
System.out.println("siteCode in selected area :::::::: " + siteCode);
areaStr = scmdasBean.getLocDtl(selectedArea.trim(), siteCode, locationRange); areaStr = scmdasBean.getLocDtl(selectedArea.trim(), siteCode, locationRange);
//areaStr = scmdasBean.getLocDtl(selectedArea, siteCode,locationRange); //areaStr = scmdasBean.getLocDtl(selectedArea, siteCode,locationRange);
} }
System.out.println("areaStr is = " + areaStr); System.out.println("areaStr is = " + areaStr);
System.out.println("siteCode is :::::::: "+siteCode); System.out.println("siteCode is :::::::: " + siteCode);
//end code on dated 21Aug2014 //end code on dated 21Aug2014
%> %>
...@@ -873,29 +896,42 @@ span.appendChild(document.createTextNode(location)); ...@@ -873,29 +896,42 @@ span.appendChild(document.createTextNode(location));
} }
%> %>
</form> </form>
<script> <script>
areaCode ="<%=this.selectedArea%>"; areaCode ="<%=request.getParameter("area")%>";
locRange ="<%=this.locationRange%>"; locRange ="<%=this.locationRange%>";
siteCode ="<%=this.siteCode%>";
document.getElementById("locationRange").value=locRange; document.getElementById("locationRange").value=locRange;
window.onload = new function() { window.onload = new function() {
// alert("areaCode :::::::: " + areaCode);
var currList = document.getElementById("area"); var currList = document.getElementById("area");
for (var m = 0; m < currList.options.length; m++) for (var m = 0; m < currList.options.length; m++)
{ {
var checkval = currList.options[m].value; var checkval = currList.options[m].value;
if(checkval==areaCode)
if(areaCode == checkval)
{ {
currList.options[m].selected = true; currList.options[m].selected = true;
} }
} }
var currListSiteCode = document.getElementById("siteCode");
for (var n = 0; n < currListSiteCode.options.length; n++)
{
var checkvalSC = currListSiteCode.options[n].value;
if(checkvalSC == siteCode)
{
//alert("SiteCode :::::::: " + siteCode);
currListSiteCode.options[n].selected = true;
}
}
}; };
</script> </script>
</body> </body>
</html> </html>
......
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