function chkcost() { var paper_code =document.orderform.paper_code; memo1_change(); if(paper_code.value == "ppkjz") { document.orderform.qty_code.options[0].value = "100"; document.orderform.qty_code.options[0].text = "100¸Å"; document.orderform.qty_code.options[1].value = "200"; document.orderform.qty_code.options[1].text = "200¸Å"; document.orderform.qty_code.options[2].value = "400"; document.orderform.qty_code.options[2].text = "400¸Å"; document.orderform.qty_code.options[3].value = "600"; document.orderform.qty_code.options[3].text = "600¸Å"; document.orderform.qty_code.options[4].value = "800"; document.orderform.qty_code.options[4].text = "800¸Å"; document.orderform.qty_code.options[5].value = "1000"; document.orderform.qty_code.options[5].text = "1000¸Å"; document.orderform.qty_code.options[6].value = "2000"; document.orderform.qty_code.options[6].text = "2000¸Å"; document.orderform.qty_code.options[7].value = "3000"; document.orderform.qty_code.options[7].text = "3000¸Å"; document.orderform.qty_code.options[8].value = "4000"; document.orderform.qty_code.options[8].text = "4000¸Å"; document.orderform.qty_code.options[9].value = "5000"; document.orderform.qty_code.options[9].text = "5000¸Å"; document.orderform.qty_code.options[10].value = "6000"; document.orderform.qty_code.options[10].text = "6000¸Å"; document.orderform.qty_code.options[11].value = "7000"; document.orderform.qty_code.options[11].text = "7000¸Å"; document.orderform.qty_code.options[12].value = "8000"; document.orderform.qty_code.options[12].text = "8000¸Å"; document.orderform.qty_code.options[13].value = "9000"; document.orderform.qty_code.options[13].text = "9000¸Å"; document.orderform.qty_code.options[14].value = "10000"; document.orderform.qty_code.options[14].text = "10000¸Å"; } if(document.orderform.size_code.value != "extra") { if(document.orderform.size_code.value == "pss02"){ document.getElementById("size_span").innerHTML = "ÀÛ¾÷»çÀÌÁî : 92mm x 52mm" } else{ document.getElementById("size_span").innerHTML = "ÀÛ¾÷»çÀÌÁî : 88mm x 54mm" } document.getElementById("span_cut_width").innerHTML = 0; document.getElementById("span_cut_height").innerHTML = 0; document.orderform.size01.disabled = true; document.orderform.size02.disabled = true; document.orderform.size01.value = ""; document.orderform.size02.value = ""; document.orderform.cut1.value = "1"; document.orderform.cut2.value = ""; document.orderform.wsize.value = ""; costchange(); } else if(document.orderform.size_code.value == "extra") { document.orderform.after_emb.value=""; emb_change(); document.orderform.size01.disabled = false; document.orderform.size02.disabled = false; document.getElementById("size_span").innerHTML = "¾Æ·¡ÀÇ ºñ±Ô°Ý »çÀÌÁ ÀÔ·ÂÇϼ¼¿ä."; if(document.orderform.size01.value != "" && document.orderform.size02.value != ""){chkexsize();} else{ document.orderform.pay.value = 0; document.all.span_price.innerHTML = 0; return false; } } } function chkexsize() { var size01 = document.orderform.size01.value; var size02 = document.orderform.size02.value; size01=Number(size01); size02=Number(size02); if(size01 >= 50 && size01 <= 182) { //182*102 // 422*299 if(size02 < 40 || size02 > 102){ alert("ÃÖ¼Ò »çÀÌÁî´Â 50x40 ÀÌ»óÀ̸ç.\n\nÃÖ´ë »çÀÌÁî´Â 182x102 ÀÔ´Ï´Ù. \n\n±× ¿ÜÀÇ »çÀÌÁî´Â ÃÊ´ëÀåÀ» ÀÌ¿ëÇϽðųª º°µµ ¹®ÀÇ ¹Ù¶ø´Ï´Ù."); document.orderform.size01.value = ""; document.orderform.size02.value = ""; document.orderform.pay.value = "0"; document.getElementById("span_cut_width").innerHTML = 0; document.getElementById("span_cut_height").innerHTML = 0; document.orderform.size01.focus(); } else {excostchange();} } else if(size02 >= 40 && size02 <= 102) { if(size01 < 50 || size01 > 182){ alert("ÃÖ¼Ò »çÀÌÁî´Â 50x40 ÀÌ»óÀ̸ç.\n\nÃÖ´ë »çÀÌÁî´Â 182x102 ÀÔ´Ï´Ù. \n\n±× ¿ÜÀÇ »çÀÌÁî´Â ÃÊ´ëÀåÀ» ÀÌ¿ëÇϽðųª º°µµ ¹®ÀÇ ¹Ù¶ø´Ï´Ù."); document.orderform.size01.value = ""; document.orderform.size02.value = ""; document.orderform.pay.value = "0"; document.getElementById("span_cut_width").innerHTML = 0; document.getElementById("span_cut_height").innerHTML = 0; document.orderform.size01.focus(); } else {excostchange();} } else if(size01 < 50 && size02 < 40) { alert("ÃÖ¼Ò »çÀÌÁî´Â 50x40 ÀÌ»óÀ̸ç.\n\nÃÖ´ë »çÀÌÁî´Â 182x102 ÀÔ´Ï´Ù. \n\n±× ¿ÜÀÇ »çÀÌÁî´Â ÃÊ´ëÀåÀ» ÀÌ¿ëÇϽðųª º°µµ ¹®ÀÇ ¹Ù¶ø´Ï´Ù."); document.orderform.size01.value = ""; document.orderform.size02.value = ""; document.orderform.pay.value = "0"; document.getElementById("span_cut_width").innerHTML = 0; document.getElementById("span_cut_height").innerHTML = 0; document.orderform.size01.focus(); } else if(size01 > 182 && size02 > 102) { alert("ÃÖ¼Ò »çÀÌÁî´Â 50x40 ÀÌ»óÀ̸ç.\n\nÃÖ´ë »çÀÌÁî´Â 182x102 ÀÔ´Ï´Ù. \n\n±× ¿ÜÀÇ »çÀÌÁî´Â ÃÊ´ëÀåÀ» ÀÌ¿ëÇϽðųª º°µµ ¹®ÀÇ ¹Ù¶ø´Ï´Ù."); document.orderform.size01.value = ""; document.orderform.size02.value = ""; document.orderform.pay.value = "0"; document.getElementById("span_cut_width").innerHTML = 0; document.getElementById("span_cut_height").innerHTML = 0; document.orderform.size01.focus(); } } function costchange() { var kind_code =document.orderform.kind_code; var paper_code =document.orderform.paper_code; var color_code =document.orderform.color_code; var coating_code =document.orderform.coating_code; var size_code =document.orderform.size_code; var qty_code =document.orderform.qty_code; var price =document.orderform.pay; var subtitle = document.orderform.product_num.value; var frm = document.orderform; //·¯¹ö½º ¼ÛÁø¿¥º¸ ¸·À½ if (frm.paper_code.value != "ppkc9"){ document.all.after_chk[4].disabled = false; } else{ frm.after_emb.value=""; document.all.after_chk[4].checked = false; document.all.after_chk[4].disabled = true; document.all.after_view[4].style.display = "none"; document.all.break_after_emb.style.display="none"; document.all.span_price_after_emb.innerHTML="0"; frm.after_price_emb.value="0"; } if(paper_code.value == "ppkjz") { if(color_code.value == "cld04") { if(qty_code.value == 100){price.value = 7000*subtitle} else if(qty_code.value == 200){price.value = 8100*subtitle} else if(qty_code.value == 400){price.value = 16000*subtitle} else if(qty_code.value == 600){price.value = 24000*subtitle} else if(qty_code.value == 800){price.value = 32000*subtitle} else if(qty_code.value == 1000){price.value = 40000*subtitle} else if(qty_code.value == 2000){price.value = 80000*subtitle} else if(qty_code.value == 3000){price.value = 120000*subtitle} else if(qty_code.value == 4000){price.value = 160000*subtitle} else if(qty_code.value == 5000){price.value = 200000*subtitle} else if(qty_code.value == 6000){price.value = 240000*subtitle} else if(qty_code.value == 7000){price.value = 280000*subtitle} else if(qty_code.value == 8000){price.value = 320000*subtitle} else if(qty_code.value == 9000){price.value = 360000*subtitle} else if(qty_code.value == 10000){price.value = 400000*subtitle} else {price.value = 0} } else if(color_code.value == "cld08") { if(qty_code.value == 100){price.value = 9000*subtitle} else if(qty_code.value == 200){price.value = 10900*subtitle} else if(qty_code.value == 400){price.value = 20000*subtitle} else if(qty_code.value == 600){price.value = 30000*subtitle} else if(qty_code.value == 800){price.value = 40000*subtitle} else if(qty_code.value == 1000){price.value = 50000*subtitle} else if(qty_code.value == 2000){price.value = 100000*subtitle} else if(qty_code.value == 3000){price.value = 150000*subtitle} else if(qty_code.value == 4000){price.value = 200000*subtitle} else if(qty_code.value == 5000){price.value = 250000*subtitle} else if(qty_code.value == 6000){price.value = 300000*subtitle} else if(qty_code.value == 7000){price.value = 350000*subtitle} else if(qty_code.value == 8000){price.value = 400000*subtitle} else if(qty_code.value == 9000){price.value = 450000*subtitle} else if(qty_code.value == 10000){price.value = 500000*subtitle} else {price.value = 0} } } price01_change(); } function excostchange() { var kind_code =document.orderform.kind_code; var paper_code =document.orderform.paper_code; var color_code =document.orderform.color_code; var coating_code =document.orderform.coating_code; var size_code =document.orderform.size_code; var qty_code =document.orderform.qty_code; var price =document.orderform.pay; var subtitle = document.orderform.product_num.value; var size01 = document.orderform.size01.value; var size02 = document.orderform.size02.value; size01=Number(size01); size02=Number(size02); document.orderform.cut1.value = size01+2; document.orderform.cut2.value = size02+2; document.getElementById("span_cut_width").innerHTML = size01+2; document.getElementById("span_cut_height").innerHTML = size02+2; //ÀÛ¾÷»çÀÌÁî ±âÁØÀ¸·Î º¯°æ 120502 size01=Number(size01+2); size02=Number(size02+2); size1 = Math.ceil(parseFloat(size01 / 92)) * Math.ceil(parseFloat(size02 / 52)); size2 = Math.ceil(parseFloat(size01 / 52)) * Math.ceil(parseFloat(size02 / 92)); if(size_code.value != "extra") { return false; } if(size1>size2){size = size2;} else{size=size1;} //Àӽà size = 1; document.orderform.wsize.value = size; if(paper_code.value == "ppkjz") { if(color_code.value == "cld04") { if(qty_code.value == 100){price.value = 7000*size} else if(qty_code.value == 200){price.value = 8100*size} else if(qty_code.value == 400){price.value = 16300*size} else if(qty_code.value == 600){price.value = 24500*size} else if(qty_code.value == 800){price.value = 32700*size} else if(qty_code.value == 1000){price.value = 40900*size} else if(qty_code.value == 2000){price.value = 81800*size} else if(qty_code.value == 3000){price.value = 122700*size} else if(qty_code.value == 4000){price.value = 163600*size} else if(qty_code.value == 5000){price.value = 204500*size} else if(qty_code.value == 6000){price.value = 245400*size} else if(qty_code.value == 7000){price.value = 286300*size} else if(qty_code.value == 8000){price.value = 327200*size} else if(qty_code.value == 9000){price.value = 368100*size} else if(qty_code.value == 10000){price.value = 409000*size} else {price.value = 0} } else if(color_code.value == "cld08") { if(qty_code.value == 100){price.value = 9000*size} else if(qty_code.value == 200){price.value = 10900*size} else if(qty_code.value == 400){price.value = 20000*size} else if(qty_code.value == 600){price.value = 30000*size} else if(qty_code.value == 800){price.value = 40000*size} else if(qty_code.value == 1000){price.value = 50000*size} else if(qty_code.value == 2000){price.value = 100000*size} else if(qty_code.value == 3000){price.value = 150000*size} else if(qty_code.value == 4000){price.value = 200000*size} else if(qty_code.value == 5000){price.value = 250000*size} else if(qty_code.value == 6000){price.value = 300000*size} else if(qty_code.value == 7000){price.value = 350000*size} else if(qty_code.value == 8000){price.value = 400000*size} else if(qty_code.value == 9000){price.value = 450000*size} else if(qty_code.value == 10000){price.value = 500000*size} else {price.value = 0} } } //¼¼·Î°¡ ´õ Å©´Ù¸é °¡·Î¼¼·Î¸¦ ¹Ù²ãÁØ´Ù. if(size01 < size02){ size = size01; size01 = size02; size02 = size; //size º¯¼ö´Â ÃʱâÈ­ size = 1; } var size01_over; var size02_over; //°¡·Î Ãʰú % **size01 ÆíÁý»çÀÌÁîÀÓ (¿¹: °¡·Î±æÀ̰¡ 138(92+46)À̸é 150% Áï Ãʰú 50% size01_over = ((size01-92)/92)*100 // alert(size01_over); //¼¼·Î Ãʰú % size02_over = ((size02-52)/52)*100 //Àû¿ë¹èÀ² ±¸ÇÏ´Â °ø½Ä var size01_per=0; var size02_per=0; if(size01_over==0){size01_per = 0} else if(size01_over > 0 && size01_over <= 40){size01_per = Math.ceil(size01_over)*0.01+1.01} else if(size01_over > 40 && size01_over <= 46){size01_per = Math.ceil(size01_over)*0.01+1} else if(size01_over > 46 && size01_over <= 50){size01_per = Math.ceil(size01_over)*0.01+0.99} else if(size01_over > 50 && size01_over <= 55){size01_per = Math.ceil(size01_over)*0.01+0.98} else if(size01_over > 55 && size01_over <= 60){size01_per = Math.ceil(size01_over)*0.01+0.97} else if(size01_over > 60 && size01_over <= 65){size01_per = Math.ceil(size01_over)*0.01+0.96} else if(size01_over > 65 && size01_over <= 71){size01_per = Math.ceil(size01_over)*0.01+0.95} else if(size01_over > 71 && size01_over <= 95){size01_per = Math.ceil(size01_over)*0.01+0.94} else if(size01_over > 95 && size01_over <= 100){size01_per = 2} if(size02_over==0){size02_per = 0} else if(size02_over > 0 && size02_over <= 40){size02_per = Math.ceil(size02_over)*0.01+1.01} else if(size02_over > 40 && size02_over <= 46){size02_per = Math.ceil(size02_over)*0.01+1} else if(size02_over > 46 && size02_over <= 50){size02_per = Math.ceil(size02_over)*0.01+0.99} else if(size02_over > 50 && size02_over <= 55){size02_per = Math.ceil(size02_over)*0.01+0.98} else if(size02_over > 55 && size02_over <= 60){size02_per = Math.ceil(size02_over)*0.01+0.97} else if(size02_over > 60 && size02_over <= 65){size02_per = Math.ceil(size02_over)*0.01+0.96} else if(size02_over > 65 && size02_over <= 71){size02_per = Math.ceil(size02_over)*0.01+0.95} else if(size02_over > 71 && size02_over <= 95){size02_per = Math.ceil(size02_over)*0.01+0.94} else if(size02_over > 95 && size02_over <= 100){size02_per = 2} // alert("*size01:"+size01+" *size01_over:"+size01_over+" *size01_per:"+size01_per+" *size02:"+size02+" *size02_over:"+size02_over+" *size02_per:"+size02_per); if ((size01 <= 88 && size02 <= 54) || (size01 <= 54 && size02 <= 88) || (size01 <= 92 && size02 <= 52) || (size01 <= 52 && size02 <= 92)){ price.value = eval(price.value)*subtitle; } else{ var price_value=0; var size01_over_price; var size02_over_price; //Àû¿ëºñÀ² size01_over_price = (size01_over*size01_per)/100; //¿ø·¡ 92_52¸íÇÔ°¡°Ý * Àû¿ëºñÀ² °ªÀÇ 100´ÜÀ§ ¿Ã¸² size01_over_price = Math.ceil((eval(price.value)*size01_over_price)/100)*100; size02_over_price = (size02_over*size02_per)/100; size02_over_price = Math.ceil((eval(price.value)*size02_over_price)/100)*100; //¿ø·¡°¡°Ý + ±âº»1500 + Àû¿ëºñÀ²°¡·ÎÃß°¡ºñ + Àû¿ëºñÀ²¿¡ ´ëÇÑ ¼¼·ÎÃß°¡ºñ price_value = eval(price.value) + 1500 + size01_over_price + size02_over_price; price.value = (Math.ceil(price_value/100)*100)*subtitle; } price01_change(); //¿ø°¡¿Í ¼¼±ÝÀ¸·Î ³ª´® } function memo1_change() { var kind_code =document.orderform.kind_code; var paper_code =document.orderform.paper_code; var color_code =document.orderform.color_code; var size_code =document.orderform.size_code; var qty_code =document.orderform.qty_code; var price =document.orderform.pay; var subtitle = document.orderform.product_num; document.all.memo1.innerHTML = paper_code.options[paper_code.selectedIndex].innerText + " / " + color_code.options[color_code.selectedIndex].innerText + " / " + size_code.options[size_code.selectedIndex].innerText+" / "+ qty_code.options[qty_code.selectedIndex].innerText + " / " + subtitle.options[subtitle.selectedIndex].innerText; } function price01_change() { var frm = document.orderform; //Èİ¡°ø_¹Ì½Ì if(frm.after_mis.value!=""){ after_mis_cost(); } //Èİ¡°ø_Ÿ°ø if(frm.after_tar.value!=""){ after_tar_cost(); } //Èİ¡°ø_±Íµµ¸® if(frm.after_gui.value!=""){ after_gui_cost(); } //Èİ¡°ø_¿¥º¸ if(frm.after_emb.value!=""){ after_emb_cost(); } //Èİ¡°ø_Çü¾Ð if(frm.after_hyung.value!=""){ after_hyung_cost(); } //Èİ¡°ø_¹Ú if(frm.after_bak.value!=""){ after_bak_cost(); } if ($("select[name=after_bak_1]").length > 0){if ($("select[name=after_bak_1]").val()!=""){after_bak_cost_1();}}//¹Ú 2 if ($("select[name=after_bak_2]").length > 0){if ($("select[name=after_bak_2]").val()!=""){after_bak_cost_2();}}//¹Ú 3 //Èİ¡°ø_³Ñ¹ö¸µ if(frm.after_num.value!=""){ after_num_cost(); } //Èİ¡°øÃÑÇÕ total_after(); var price = frm.pay; if (document.orderform.paper_code.value == "" ){price.value =0;} var after_price = frm.after_total_price_plus.value; var price_01 = frm.price_01; price_01.value = Math.round(price.value); document.all.span_price.innerHTML = comma(Math.round(price.value)); document.all.break_pro_price_plus.innerHTML = comma(Math.round(price.value)); //Á¦Ç° ÃÑ¾× //document.all.view_price.innerHTML = comma(Math.round(price.value)); //Á¦Ç° ÃѾ×(»ó´Ü)20111226 Ãß°¡ document.all.span_total_estimate_prie.innerHTML = comma(Math.round(eval(price.value)+eval(after_price))); //Á¦Ç° + Èİ¡°ø ÃÑ¾× //alert(frm.after_total_price.value); //ºÎ°¡¼¼ tax_price = (eval(price.value)+eval(after_price))/10 frm.tax_price.value = tax_price; document.all.span_tax_price.innerHTML = comma(tax_price); //°ßÀûÃÑ¾× estimate_price = eval(price.value)+eval(after_price)+eval(tax_price) frm.estimate_price_end.value = estimate_price; document.all.span_estimate_price_end.innerHTML = comma(estimate_price); //ÁÖ¹® ¹Ù·Î¹Ø¿¡ Á¦Ç°±Ý¾×, ºÎ°¡¼¼, °ßÀûÃÑ¾× # ±Ý¾× view_price display:none 2017-12-15 if ($("#span_total_estimate_prie_sub").length > 0){ var span_total_estimate_prie_val = $("#span_total_estimate_prie").text(); $("#span_total_estimate_prie_sub").text(span_total_estimate_prie_val); } if ($("#span_tax_price_sub").length > 0){ var span_tax_price_val = $("#span_tax_price").text(); $("#span_tax_price_sub").text(span_tax_price_val); } if ($("#span_estimate_price_end_sub").length > 0){ var span_estimate_price_end_val = $("#span_estimate_price_end").text(); $("#span_estimate_price_end_sub").text(span_estimate_price_end_val); } } function comma(x){ var txtNumber = '' + x; var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])'); var arrNumber = txtNumber.split('.'); arrNumber[0] += '.'; do{ arrNumber[0] = arrNumber[0].replace(rxSplit, '$1,$2'); } while (rxSplit.test(arrNumber[0])); if (arrNumber.length > 1) { return arrNumber.join(''); }else{ return arrNumber[0].split('.')[0]; } }