function size_change() { var kind_code =document.orderform.kind_code; var paper_code =document.orderform.paper_code; var size_code =document.orderform.size_code; } function costchange() { memo1_change(); var kind_code =document.orderform.kind_code; var paper_code =document.orderform.paper_code; var paper_code_1 =document.orderform.paper_code_1; 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 ppk_gang =document.orderform.ppk_gang; var coating_not =document.orderform.coating_not; if(document.orderform.size_code.value != "pss99") { //document.orderform.size01.disabled = true; //document.orderform.size02.disabled = true; document.orderform.after_tom_side.disabled = true; document.orderform.check_p_tom.disabled = true; document.orderform.size_code.disabled = false; // document.orderform.touch_two.disabled = false; document.all.tom_plus.style.display = "none"; // document.orderform.size01.value = "0"; // document.orderform.size02.value = "0"; // document.orderform.cut1.value = "0"; // document.orderform.cut2.value = ""; // document.orderform.wsize.value = ""; // document.getElementById("span_cut_width").innerHTML = "0"; // document.getElementById("span_cut_height").innerHTML = "0"; } else if(document.orderform.size_code.value == "pss99") { document.orderform.size01.disabled = false; document.orderform.size02.disabled = false; document.orderform.after_tom_side.disabled = false; document.orderform.check_p_tom.disabled = false; // document.orderform.kind_code.value="pdkh1"; document.orderform.size_code.disabled = true; // document.orderform.touch_two.value = "Y"; // document.orderform.touch_two.disabled = true; if(document.orderform.size01.value != "" && document.orderform.size02.value != "" && document.orderform.size01.value != "0" && document.orderform.size02.value != "0"){chkexsize();} else{ document.orderform.pay.value = 0; document.all.span_price.innerHTML = 0; price01_change(); return false; } } if (size_code.value=="0")//사이즈가 없으면 가격 0 ================================================== { price.value = 0 } // price01_change(); //원가와 세금으로 나눔 } function memo1_change() { var kind_code =document.orderform.kind_code; var paper_code =document.orderform.paper_code; var paper_code_1 =document.orderform.paper_code_1; 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; var touch_two = document.orderform.touch_two; var after_tom_side = document.orderform.after_tom_side; var after_tom_side_1 = document.orderform.after_tom_side_1; if(document.orderform.paper_code.value == "extra"){ //별사이즈일 경우 if(document.orderform.check_p_tom.checked == true){ //혼합형 일경우 document.all.memo1.innerHTML = paper_code_1.options[paper_code_1.selectedIndex].innerText + " / " + paper_code.options[paper_code.selectedIndex].innerText + " / " + color_code.options[color_code.selectedIndex].innerText + " / " + document.orderform.size01.value+ "*" + document.orderform.size02.value+" ["+ after_tom_side.options[after_tom_side.selectedIndex].innerText+"] / " + document.orderform.size01_1.value+ "*" + document.orderform.size02_1.value+" ["+ after_tom_side_1.options[after_tom_side_1.selectedIndex].innerText+"] / "+ qty_code.options[qty_code.selectedIndex].innerText + " / " + subtitle.options[subtitle.selectedIndex].innerText; document.orderform.memo.value = paper_code.options[paper_code.selectedIndex].innerText + "혼합형:"+ document.orderform.size01.value+ "*" + document.orderform.size02.value+" ["+ after_tom_side.options[after_tom_side.selectedIndex].innerText+"] / " + document.orderform.size01_1.value+ "*" + document.orderform.size02_1.value+" ["+ after_tom_side_1.options[after_tom_side_1.selectedIndex].innerText+"] " } else{ document.all.memo1.innerHTML = paper_code_1.options[paper_code_1.selectedIndex].innerText + " / " + paper_code.options[paper_code.selectedIndex].innerText + " / " + color_code.options[color_code.selectedIndex].innerText + " / " + document.orderform.size01.value+ "*" + document.orderform.size02.value+" ["+ after_tom_side.options[after_tom_side.selectedIndex].innerText+"] / "+ qty_code.options[qty_code.selectedIndex].innerText + " / " + subtitle.options[subtitle.selectedIndex].innerText; document.orderform.memo.value = paper_code.options[paper_code.selectedIndex].innerText + document.orderform.size01.value+ "*" + document.orderform.size02.value+" ["+ after_tom_side.options[after_tom_side.selectedIndex].innerText+"] " } } else{ document.all.memo1.innerHTML = paper_code_1.options[paper_code_1.selectedIndex].innerText + " / " + 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; //document.orderform.memo.value = "["+paper_code.options[paper_code.selectedIndex].innerText + "]" + "["+size_code.options[size_code.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))); //제품 + 후가공 총액 //부가세 tax_price = (eval(price.value)+eval(after_price))/10; //제품 + 후가공 총액 + 원고총금액 /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 chkexsize(){ var size01 = document.orderform.size01.value; var size02 = document.orderform.size02.value; size01=Number(size01); size02=Number(size02); document.orderform.n_size01.value = eval(document.orderform.size01.value)+2; document.orderform.n_size02.value = eval(document.orderform.size02.value)+2; if (size01 != 0 && size02 !=0){ if(size01 >= 10 && size01 <= 300) { if(size02 < 10 || size02 > 250){ alert("최소 사이즈는 10x10 이상이며.\n\n최대 사이즈는 300x250 입니다. \n\n그 외의 사이즈는 별도 문의 바랍니다."); document.orderform.size01.value = "0"; document.orderform.size02.value = "0"; document.orderform.pay.value = "0"; document.all.span_price.innerHTML = 0; document.orderform.size01.focus(); } else {size_change_text();} } else if(size02 >= 10 && size02 <= 250) { if(size01 < 10 || size01 > 300){ alert("최소 사이즈는 10x10 이상이며.\n\n최대 사이즈는 300x250 입니다. \n\n그 외의 사이즈는 별도 문의 바랍니다."); document.orderform.size01.value = "0"; document.orderform.size02.value = "0"; document.orderform.pay.value = "0"; document.all.span_price.innerHTML = 0; document.orderform.size01.focus(); } else {size_change_text();} } else if(size01 < 10 && size02 < 10) { alert("최소 사이즈는 10x10 이상이며.\n\n최대 사이즈는 300x250 입니다. \n\n그 외의 사이즈는 별도 문의 바랍니다."); document.orderform.size01.value = "0"; document.orderform.size02.value = "0"; document.orderform.pay.value = "0"; document.all.span_price.innerHTML = 0; document.orderform.size01.focus(); } else if(size01 > 300 && size02 > 250) { alert("최소 사이즈는 10x10 이상이며.\n\n최대 사이즈는 300x250 입니다. \n\n그 외의 사이즈는 별도 문의 바랍니다."); document.orderform.size01.value = "0"; document.orderform.size02.value = "0"; document.orderform.pay.value = "0"; document.all.span_price.innerHTML = 0; document.orderform.size01.focus(); } size_change_text(); } }