function chkcost(){ memo1_change(); costchange(); } 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; if(kind_code.value == "pdkb3") { //´çÀÏÆÇ // if(document.orderform.now_date[0].checked && (paper_code.value == "ppk79" || paper_code.value == "ppk78") ){ // alert('ÄÁ¼Á, ½ºÅ¸°ñµåÀçÁúÀº ´çÀÏÆÇÀÌ ºÒ°¡´ÉÇÕ´Ï´Ù.'); // document.orderform.now_date[1].checked=true; // } //´çÀÏÆÇ // if(document.orderform.now_date[0].checked == true && qty_code.value > 200){ // alert('¼öÀÔÁö¸íÇÔÀÇ ´çÀÏÆÇÀº 200¸Å±îÁö¸¸ °¡´ÉÇÕ´Ï´Ù.\n\n200¸Å ÃÊ°ú ÁÖ¹®À» ¿øÇÏ½Ç °æ¿ì ´çÀÏÆÇÀ» ¾Æ´Ï¿À·Î ¼±ÅÃÇϽŠÈÄ ÁÖ¹®ÇϽñ⠹ٶø´Ï´Ù.'); // qty_code.value = 200; // } if(paper_code.value == "ppkgr"){price.value = 60000*eval(qty_code.value)} else if(paper_code.value == "ppkgs"){price.value = 30000*eval(qty_code.value)} else if(paper_code.value == "ppkgt"){price.value = 45000*eval(qty_code.value)} else if(paper_code.value == "ppkgu"){price.value = 14000*eval(qty_code.value)} else if(paper_code.value == "ppkjt"){price.value = 5000*eval(qty_code.value)} else if(paper_code.value == "ppkgv"){price.value = 10000*eval(qty_code.value)} else {price.value = 0} } // //¹Ú½ººñ Ãß°¡ // price.value = eval(price.value) + (3500*eval(qty_code.value)) 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; 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;} document.orderform.wsize.value = size; if(kind_code.value == "pdkb5") { if(color_code.value == "cld04") { if(qty_code.value == 200){price.value = (2000*size)*subtitle} else if(qty_code.value == 400){price.value = (4000*size)*subtitle} else if(qty_code.value == 600){price.value = (6000*size)*subtitle} else if(qty_code.value == 800){price.value = (8000*size)*subtitle} else if(qty_code.value == 1000){price.value = (10000*size)*subtitle} else {price.value = 0} } else if(color_code.value == "cld08") { if(qty_code.value == 200){price.value = (3000*size)*subtitle} else if(qty_code.value == 400){price.value = (6000*size)*subtitle} else if(qty_code.value == 600){price.value = (9000*size)*subtitle} else if(qty_code.value == 800){price.value = (12000*size)*subtitle} else if(qty_code.value == 1000){price.value = (15000*size)*subtitle} else {price.value = 0} } } if(size01>200 || size02>200) //201mm ÀÌ»ó »çÀÌÁî´Â ±âº»°¡ 1.1¹è Àû¿ë { price.value = Math.round((price.value * 1.1)/100)*100 } 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; var price = frm.pay; 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]; } }