Commit 731d0fb3 authored by smestry's avatar smestry

Updated js for Product wizard new look and feel. Added new field customer item...

Updated js for Product wizard new look and feel. Added new field customer item reference, active, product wizard edit according to size and color selection, functionality to attach images for item.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103872 ce508802-f39f-4f6c-b175-0d175dae99d5
parent af615fd0
...@@ -21,12 +21,6 @@ ...@@ -21,12 +21,6 @@
{ {
global_date_format = "dd-M-y"; global_date_format = "dd-M-y";
} }
//Added by Santosh on 22-07-16 [Start]
else if ( global_date_format == "MM/dd/yy" )
{
global_date_format = "mm/dd/y";
}
//Added by Santosh on 22-07-16 [End]
} }
// Added by parikshit kumbhar on 09/07/15 [to set date format] end // Added by parikshit kumbhar on 09/07/15 [to set date format] end
var currDate = new Date(); var currDate = new Date();
...@@ -198,14 +192,25 @@ ...@@ -198,14 +192,25 @@
{ {
var parser = new DOMParser(); var parser = new DOMParser();
xmldoc = httpRequest.responseText; xmldoc = httpRequest.responseText;
//alert("xmldoc=========>>"+xmldoc);
} }
catch(e) catch(e)
{ {
alert("inside catch:"+e.message); alert("inside catch:"+e.message);
} }
} }
// Changed by Sneha on 25-10-2016, for customer item reference [Start]
if(setColumnValues == "custItemRef")
{
setCustItemRefVal(xmldoc); // from prodWiz_Form_I.js
}
else
{
setColumnValues( xmldoc ); setColumnValues( xmldoc );
}
//setColumnValues( xmldoc );
// Changed by Sneha on 25-10-2016, for customer item reference [End]
isServerBusy = false; isServerBusy = false;
} }
...@@ -273,7 +278,7 @@ ...@@ -273,7 +278,7 @@
{ {
sizesValue.push(y[0].childNodes[0].nodeValue + ":" + y[1].childNodes[0].nodeValue);// Added by parikshit sizesValue.push(y[0].childNodes[0].nodeValue + ":" + y[1].childNodes[0].nodeValue);// Added by parikshit
tr = tr + "<td><input type='checkbox' value='' id=chkid"+count+" onClick='sizeValues()' /></td>"; tr = tr + "<td class = 'td_centAlign' style = 'width:2% !important;'><input type='checkbox' value='' id=chkid"+count+" onClick='sizeValues()' /></td>";
count++; count++;
} }
...@@ -404,8 +409,9 @@ ...@@ -404,8 +409,9 @@
{ {
popupWindow = window.createPopup (); popupWindow = window.createPopup ();
var popupBody = popupWindow.document.body; var popupBody = popupWindow.document.body;
popupBody.style.backgroundColor = "lightblue"; popupBody.style.backgroundColor = "white";
popupBody.style.border = "solid black 1px"; //popupBody.style.border = "solid black 1px";
popupBody.style.border = "solid lightgray 1px";
popupBody.innerHTML = ""; popupBody.innerHTML = "";
} }
popupWindow.show (100, 100, 150, 25, document.body); popupWindow.show (100, 100, 150, 25, document.body);
...@@ -418,8 +424,8 @@ ...@@ -418,8 +424,8 @@
{ {
popupWindow = document.createElement ("div"); popupWindow = document.createElement ("div");
popupWindow.id = "someID"; popupWindow.id = "someID";
popupWindow.style.backgroundColor = "lightblue"; popupWindow.style.backgroundColor = "white";
popupWindow.style.border = "solid black 1px"; popupWindow.style.border = "solid lightgray 1px";
popupWindow.style.position = "absolute"; popupWindow.style.position = "absolute";
popupWindow.style.zIndex = "9999"; popupWindow.style.zIndex = "9999";
/*popupWindow.style.width = "400px";*/ /*popupWindow.style.width = "400px";*/
...@@ -527,3 +533,38 @@ ...@@ -527,3 +533,38 @@
} }
// Changed by Sneha on 08-07-2016, for special character [End] // Changed by Sneha on 08-07-2016, for special character [End]
// Changed by Sneha on 25-10-2016, for customer item reference [Start]
function setCustItemRef()
{
action = "CUST_ITEM_REF"
var url = "/ibase/ProdWizItemChangeServlet?ACTION="+action;
makeRequest( url, "custItemRef");
}
function setCustItemRefVal(xmldoc)
{
document.getElementById("cust_item_ref_status").value = xmldoc;
var maxId = $('#SKUItemId tbody tr').length;
//alert("--------- Inside setCustItemRefVal 22222222 ------------ "+maxId);
if(xmldoc == "Y")
{
if(maxId <= 0)
{
var itemParent = document.getElementById("Detail1.1.item_parnt").value;
document.getElementById("Detail1.1.phy_attrib_4").value = itemParent;
document.getElementById("Detail1.1.phy_attrib_4").readOnly = "true";
}
else if(maxId > 0)
{
for( dbID = 1; dbID <= maxId; dbID++)
{
document.getElementById("Detail2."+dbID+".phy_attrib_4").readOnly = "true";
}
}
}
}
// Changed by Sneha on 25-10-2016, for customer item reference [End]
\ No newline at end of file
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
$("#sizeDtlDiv").append( $("#sizeDtlDiv").append(
"<table class='tableClass' id='sizeDtl' width='99%' style='text-align: center;'>" + //"<table class='tableClass' id='sizeDtl' width='99%' style='text-align: center;'>" +
"<table id='sizeDtl' class='headertableClass' style='border-top-style: none; text-align: left;'>" +
"</table>" "</table>"
); );
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
var tr = ""; var tr = "";
tr = tr + "<thead><tr class='thClass'><th>Color/Size</th>"; tr = tr + "<thead><tr><th class = 'tHeader'>Color/Size</th>";
for (var i = 0; i < size.length-1; i++) for (var i = 0; i < size.length-1; i++)
{ {
tr = tr + "<th>"+size[i]+"</th>"; tr = tr + "<th class = 'tHeader'>"+size[i]+"</th>";
} }
tr = tr + "</thead></tr><tbody class='table-body'></tbody>"; tr = tr + "</thead></tr><tbody class='table-body'></tbody>";
...@@ -32,11 +32,11 @@ ...@@ -32,11 +32,11 @@
for (var i = 0; i < color.length; i++) for (var i = 0; i < color.length; i++)
{ {
tr = tr + "<tr><td>"+color[i]+"</td>"; tr = tr + "<tr><td class = 'td_leftAlign'>"+color[i]+"</td>";
for (var j = 1; j < size.length; j++) for (var j = 1; j < size.length; j++)
{ {
tr = tr + "<td>Y</td>"; tr = tr + "<td class = 'td_leftAlign'>Y</td>";
} }
tr = tr + "</tr>"; tr = tr + "</tr>";
...@@ -130,13 +130,13 @@ ...@@ -130,13 +130,13 @@
"<tr>"+ "<tr>"+
"<td><input type='checkbox' checked='checked' id=chksite"+no+" onclick='checkPriceList(this)' /></td>"+ "<td class='td_leftAlign'><input type='checkbox' checked='checked' id=chksite"+no+" onclick='checkPriceList(this)' /></td>"+
"<td onclick=chkPriceRows('chksite"+no+"')><input type='hidden' id=prodSite"+no+" value="+ site +" /><lable id=lblSites"+no+">"+ site +"</lable></td>"+ "<td class='td_leftAlign' onclick=chkPriceRows('chksite"+no+"')><input type='hidden' id=prodSite"+no+" value="+ site +" /><lable id=lblSites"+no+">"+ site +"</lable></td>"+
"<td>" + "<td class='td_leftAlign'>" +
"<div style='position:relative; width: 100%;'>" + "<div style='position:relative; width: 100%;'>" +
"<input type='hidden' id=prodPriceList"+no+" class='editInputClass' style='width: 90%;' readonly='1' />" + "<input type='hidden' id=prodPriceList"+no+" class='input_editable' style='width: 90%;' readonly='1' />" +
" <lable id=lblPrices"+no+"></lable> "+//Changed by Parikshit Kumbhar on 08/07/15 [added lable] " <lable id=lblPrices"+no+"></lable> "+//Changed by Parikshit Kumbhar on 08/07/15 [added lable]
/*"<div style='width:2%; float: right'>" + /*"<div style='width:2%; float: right'>" +
"<img src='/ibase/webitm/images/DD/popup1.png' id=priceList"+no+" style='margin-left: -5px;' />" + "<img src='/ibase/webitm/images/DD/popup1.png' id=priceList"+no+" style='margin-left: -5px;' />" +
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
"</td>"+ "</td>"+
"<td><input type='hidden' id=prodsCurr"+no+" value='' /><lable id=lblcurrcode"+no+"></lable></td>"+ "<td><input type='hidden' id=prodsCurr"+no+" value='' /><lable id=lblcurrcode"+no+"></lable></td>"+
"<td>" + "<td>" +
"<input type='text' id=prodRate"+no+" class='editInputClass' size='10' maxlength='11' style='text-align: right;' onchange='return isNumeric2(this)' />" + "<input type='text' id=prodRate"+no+" class='input_editable' size='10' maxlength='11' style='text-align: right;' onchange='return isNumeric2(this)' />" +
"</td>"+ // Added by parikshit Kumbhar on 27/06/2015 [Maxlength added] [D15CKAT031] "</td>"+ // Added by parikshit Kumbhar on 27/06/2015 [Maxlength added] [D15CKAT031]
/*"<td>" + /*"<td>" +
...@@ -153,11 +153,11 @@ ...@@ -153,11 +153,11 @@
"</td>"+*/ "</td>"+*/
"<td>" + "<td>" +
"<input type='text' id=dtFrom"+no+" class='editInputClass' size='8' style='text-align: left;' readonly='1' />" + "<input type='text' id=dtFrom"+no+" class='input_editable' size='8' style='text-align: left;' readonly='1' />" +
"</td>"+ "</td>"+
"<td>" + "<td>" +
"<input type='text' id=dtTo"+no+" class='editInputClass' size='8' style='text-align: left;' readonly='1' />" + "<input type='text' id=dtTo"+no+" class='input_editable' size='8' style='text-align: left;' readonly='1' />" +
"</td>"+ "</td>"+
"</tr>" "</tr>"
...@@ -422,27 +422,27 @@ ...@@ -422,27 +422,27 @@
{ {
$("#SKUSuppListId tbody").append( $("#SKUSuppListId tbody").append(
"<tr >"+ "<tr class='trClass'>"+
"<td><input type='checkbox' checked='checked' id=chkSupp"+num+" onclick='checkSuppList(this)' /></td>"+ "<td class='td_centAlign'><input type='checkbox' checked='checked' id=chkSupp"+num+" onclick='checkSuppList(this)' /></td>"+
"<td onclick=chkSuppRows('chkSupp"+num+"')><input type='hidden' id=Supp"+num+" value='' /><lable id=lblSupp"+num+">"+ supplier +"</lable></td>"+ "<td class='td_leftAlign' onclick=chkSuppRows('chkSupp"+num+"')><input type='hidden' id=Supp"+num+" value='' /><lable id=lblSupp"+num+">"+ supplier +"</lable></td>"+
"<td onclick=chkSuppRows('chkSupp"+num+"')>" + "<td class='td_leftAlign' onclick=chkSuppRows('chkSupp"+num+"')>" +
"<input type='hidden' class='editInputClass' id=SuppPriceList"+num+" value='"+ price +"' /><lable id=lblSuppPriceList"+num+">"+ price +"</lable>" + "<input type='hidden' class='input_editable' id=SuppPriceList"+num+" value='"+ price +"' /><lable id=lblSuppPriceList"+num+">"+ price +"</lable>" +
"</td>"+ "</td>"+
"<td><input type='hidden' id=prodsCurr"+num+" value="+ currcode +" /><lable id=lblcurr"+num+">"+ currcode +"</lable></td>"+ "<td class='td_leftAlign'><input type='hidden' id=prodsCurr"+num+" value="+ currcode +" /><lable id=lblcurr"+num+">"+ currcode +"</lable></td>"+
"<td>" + "<td class='td_leftAlign'>" +
"<input type='text' class='editInputClass' id=SuppProdCost"+num+" size='10' value='0.00' maxlength='11' style='text-align: right;' " + "<input type='text' class='input_editable' id=SuppProdCost"+num+" size='10' value='0.00' maxlength='11' style='text-align: right;' " +
" onchange='return isNumeric2(this)' />" +// Added by parikshit Kumbhar on 27/06/2015 [Maxlength added] [D15CKAT031] " onchange='return isNumeric2(this)' />" +// Added by parikshit Kumbhar on 27/06/2015 [Maxlength added] [D15CKAT031]
"</td>" + "</td>" +
"<td>" + "<td class='td_leftAlign'>" +
"<input type='text' class='editInputClass' id=SuppDtFrom"+num+" size='8' style='text-align: left;' readonly='1' />" + "<input type='text' class='input_editable' id=SuppDtFrom"+num+" size='8' style='text-align: left;' readonly='1' />" +
"</td>"+ "</td class='td_leftAlign'>"+
"<td>" + "<td class='td_leftAlign'>" +
"<input type='text' class='editInputClass' id=SuppDtTo"+num+" size='8' style='text-align: left;' readonly='1' />" + "<input type='text' class='input_editable' id=SuppDtTo"+num+" size='8' style='text-align: left;' readonly='1' />" +
"</td>"+ "</td>"+
"</tr>" "</tr>"
...@@ -734,6 +734,31 @@ ...@@ -734,6 +734,31 @@
document.getElementById("Detail2."+dbID+".item_gross_wt").focus(); document.getElementById("Detail2."+dbID+".item_gross_wt").focus();
return false; return false;
} }
// Changed by Sneha on 25-10-2016, for customer item reference [Start]
else if (document.getElementById("Detail2."+dbID+".phy_attrib_4").value == "")
{
alert("Please Enter value for Customer Item Reference'"+ document.getElementById("Detail2."+dbID+".phy_attrib_4").value +"'.");
document.getElementById("Detail2."+dbID+".phy_attrib_4").focus();
return false;
}
else if (!document.getElementById("Detail2."+dbID+".phy_attrib_4").value == "")
{
var curBarCode = document.getElementById("Detail2."+dbID+".phy_attrib_4").value;
for (var i = 0; i < barCodes.length; i++)
{
if(barCodes[i]==curBarCode)
{
alert("Duplicate Customer Item Reference found. Please Enter Different Customer Item Reference for the Product '"+ document.getElementById("Detail2."+dbID+".item_descr").value +"' '"+ document.getElementById("Detail2."+dbID+".phy_attrib_4").value +"'.");
document.getElementById("Detail2."+dbID+".phy_attrib_4").focus();
return false;
}
}
barCodes.push(document.getElementById("Detail2."+dbID+".phy_attrib_4").value);
}
// Changed by Sneha on 25-10-2016, for customer item reference [End]
else if (document.getElementById("Detail2."+dbID+".item_barcode").value == "") else if (document.getElementById("Detail2."+dbID+".item_barcode").value == "")
{ {
alert("Please Enter Barcode for Product '"+ document.getElementById("Detail2."+dbID+".item_descr").value +"'."); alert("Please Enter Barcode for Product '"+ document.getElementById("Detail2."+dbID+".item_descr").value +"'.");
...@@ -767,6 +792,9 @@ ...@@ -767,6 +792,9 @@
barCodes.push(document.getElementById("Detail2."+dbID+".item_barcode").value); barCodes.push(document.getElementById("Detail2."+dbID+".item_barcode").value);
} }
// Added by Samadhan on 28/12/2015 for check duplicate barcodes end // Added by Samadhan on 28/12/2015 for check duplicate barcodes end
} }
} }
if (check == 0) if (check == 0)
...@@ -805,7 +833,7 @@ ...@@ -805,7 +833,7 @@
xmlString = xmlString + "</Detail1></Root>"; xmlString = xmlString + "</Detail1></Root>";
document.getElementById("PRE_FORM_VAL").value = xmlString; document.getElementById("PRE_FORM_VAL").value = xmlString;
console.log("xmlString========>>"+xmlString);
setActionVal( "previous" ); setActionVal( "previous" );
document.getElementById("prev").style.pointerEvents = 'none'; document.getElementById("prev").style.pointerEvents = 'none';
...@@ -813,3 +841,4 @@ ...@@ -813,3 +841,4 @@
document.getElementById("prodWizFormII").action = "/ibase/ProdWizHandlerServlet"; document.getElementById("prodWizFormII").action = "/ibase/ProdWizHandlerServlet";
document.getElementById("prodWizFormII").submit(); document.getElementById("prodWizFormII").submit();
} }
\ No newline at end of file
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