<%--
  - Author(s)  : Hyung min Son
  - Date       : 2014.08.05
  - Description: 정정공고
  --%>
  
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
<%@ page import="com.udapsoft.waf.common.ui.*" %>
<%@ page import="kr.co.udapsoft.common.code.*" %>
<%@ page import="kr.co.hsnc.common.util.*"%>
<%@ page import="kr.co.hsnc.common.sql.*" %>
<%@ page import="com.udapsoft.waf.common.util.Formatter2"%>
<%@ page import="com.udapsoft.waf.common.util.StringUtils"%>
<%@ include file="/jsp/work/taglib.jsp" %>
<jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
<%
    ctx.init(request, response);
    HandlerStorage storage = ctx.getHandlerStorage();
    ValueObject params = storage.getParams();
    ValueObject user = storage.getUser();
    ValueObject Order = storage.getValueObject("Order");
    ValueObject filein = storage.getValueObject(Order.get("DOC_ETC_IN"));
    ValueObject fileout = storage.getValueObject(Order.get("DOC_ETC_OUT"));
%>
<SCRIPT language="JavaScript">
document.body.onresize = addEvent( document.body.onresize, "autoResize()");
	/*예약함수*/
	var sheet1 = new ibsheetObject();
	var sheet1Row;
	var sheet1PageNo = 1;
	var pageLastRowIndex = 1;
	var validationResult = false;
	var filterShow = false;
	
	var must_msg = "(은)는 필수 입력 항목입니다."; 
	function _onReady(){
		/**
		 *	IBSheet object initialize
		 */
		gridInit(sheet1);
		
		/**
		 *	Application Initialize
		 */
		 //취소
		 $("#btn_cancel").click(function() {
				$("#fevent").val("FORM_SELECT");
				$("#form1").attr("action", "/bid/outside/BidIng.screen");
				$("#form1").attr("target", "_self");
				$("#form1").attr("method", "post");
				$("#form1").submit();
		});
		// 정정공고
		$("#btn_modify").click(function() {
			if(must_ck()){
				if (confirm("정정공고를 하시겠습니까?")){
					var f = document.form1;
					$("#fevent").val("UPDATE");
					var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/outside/BidModify_sheet.screen";
					var result = Modular.view.IBSheet7.doSave(sheet1, url, $("#form1"), false);
				}
			}
		});

		$("#sitedesc_flag_1").click(function() {
			$("#SITEDESCCHRGPRSNID").attr("disabled",false);
			$("#SITEDESCTELNO").attr("disabled",false);
			$("#SITEDESCDATE").attr("disabled",false);
			$("#SITEDESCDATE_HH").attr("disabled",false);
			$("#SITEDESCDATE_MI").attr("disabled",false);
			$("#SITEDESCEMAIL").attr("disabled",false);
			$("#SITEDESCPLACE").attr("disabled",false);
			$("#btn_sitedescchrgprsnid").show();
			$("#calendar_sitedescdate").show();
		});
		
		$("#sitedesc_flag_2").click(function() {
			$("#SITEDESCCHRGPRSNID").attr("disabled",true);
			$("#SITEDESCCHRGPRSNID").val("");
			$("#SITEDESCTELNO").attr("disabled",true);
			$("#SITEDESCTELNO").val("");
			$("#SITEDESCDATE").attr("disabled",true);
			$("#SITEDESCDATE").val("");
			$("#SITEDESCDATE_HH").attr("disabled",true);
			$("#SITEDESCDATE_HH").val("");
			$("#SITEDESCDATE_MI").attr("disabled",true);
			$("#SITEDESCDATE_MI").val("");
			$("#SITEDESCEMAIL").attr("disabled",true);
			$("#SITEDESCEMAIL").val("");
			$("#SITEDESCPLACE").attr("disabled",true);
			$("#SITEDESCPLACE").val("");
			$("#btn_sitedescchrgprsnid").hide();
			$("#calendar_sitedescdate").hide();
		});
		
		$("#sort_gb_3").click(function() {
			$("#TBE_DATE").attr("disabled",false);
			$("#EVAL_TEL").attr("disabled",false);
			$("#EVAL_EMPNM").attr("disabled",false);
			$("#btnevalemp").show();
			$("#calender_supp_req").show();
		});
		$("#sort_gb_4").click(function() {
			$("#TBE_DATE").attr("disabled",true);
			$("#TBE_DATE").val("");
			$("#EVAL_TEL").attr("disabled",true);
			$("#EVAL_TEL").val("");
			$("#EVAL_EMPNM").attr("disabled",true);
			$("#EVAL_EMPNM").val("");
			$("#EVAL_EMPID").attr("disabled",true);
			$("#EVAL_EMPID").val("");
			$("#btnevalemp").hide();
			$("#calender_supp_req").hide();
		});
		
		//견적대상 업체 조회
		doSearchSheet();
		
		//라디오 박스 체크 여부 //  N 일경우 비활성화
		if($("#sitedesc_flag_2").attr("checked") == "checked")
			$("#sitedesc_flag_2").click();
		if($("#sort_gb_4").attr("checked") == "checked")
			$("#sort_gb_4").click();
		
		//업체공지일자 변경
		$("#NOTI_DY").change(function() {
			if($("#BID_FROM_DT").val().length> 0){
				if($("#NOTI_DY").val()> $("#BID_FROM_DT").val()){
					alert("업체공지일자는 견적제출일이전이어야 합니다.\n- 견적제출일:"+$("#BID_FROM_DT").val());
					$("#NOTI_DY").val("");
					return;
				}
			}
			if($("#SITEDESCDATE").val().length> 0){
				if($("#NOTI_DY").val()> $("#SITEDESCDATE").val()){
					alert("업체공지일자는 견적설명일이전이어야 합니다.\n- 견적설명일:"+$("#SITEDESCDATE").val());
					$("#NOTI_DY").val("");
					return;
				}
			}
		});
		//견적제출기간 변경
		$("#BID_FROM_DT").change(function() {
			if($("#SITEDESCDATE").val().length> 0){
				if($("#BID_FROM_DT").val() < $("#SITEDESCDATE").val()){
					alert("견적제출기간은 견적설명일 이전 일 수 없습니다.\n- 견적설명일:"+$("#SITEDESCDATE").val());
					$("#BID_FROM_DT").val("");
					return;
				}
			}
			if($("#NOTI_DY").val().length> 0){	
				if($("#BID_FROM_DT").val() < $("#NOTI_DY").val()){
					alert("견적제출기간은 업체공지일 이전 일 수 없습니다.\n- 업체공지일:"+$("#NOTI_DY").val());
					$("#BID_FROM_DT").val("");
					return;
				}
			}
			if($("#BID_TO_DT").val().length> 0){	
				if($("#BID_TO_DT").val() < $("#BID_FROM_DT").val()){
					alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
					$("#BID_FROM_DT").val("");
					return;
				}
			}
		});
		
		//견적제출기간 변경
		$("#BID_TO_DT").change(function() {
			if($("#BID_FROM_DT").val().length> 0){	
				if($("#BID_TO_DT").val() < $("#BID_FROM_DT").val()){
					alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
					$("#BID_TO_DT").val("");
					return;
				}
			}
			if($("#SITEDESCDT").val().length> 0){
				if($("#BID_TO_DT").val() < $("#SITEDESCDT").val()){
					alert("견적제출기간은 견적설명일 이전 일 수 없습니다.\n- 견적설명일:"+$("#SITEDESCDATE").val());
					$("#BID_TO_DT").val("");
					return;
				}
			}
		});
		
		//견적제출기간 변경
		$("#DELI_START_DT").change(function() {
			if($("#DELI_END_DT").val().length> 0){	
				if($("#DELI_START_DT").val()>= $("#DELI_END_DT").val()){
					alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
					$("#DELI_START_DT").val("");
					return;
				}
			}
		});
		
		//견적제출기간 변경
		$("#DELI_END_DT").change(function() {
			if($("#DELI_START_DT").val().length> 0){	
				if($("#DELI_START_DT").val()>= $("#DELI_END_DT").val()){
					alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
					$("#DELI_END_DT").val("");
					return;
				}
			}
		});
		
		$("#OBC_FRST_CONT_RATE").focusout(function(){
			if($("#OBC_FRST_CONT_RATE").val() > 0){
				$("#OBC_FRST_CONDI").val("보증서 제출일로부터 15일 내 지급");
				$("#OBC_FRST_CNT_CONDI").val("1회 (계약 금액 변경시 추가 청구 가능)");
			}else{
				$("#OBC_FRST_CONDI").val("");
				$("#OBC_FRST_CNT_CONDI").val("");
			}
		});
		
		$("#OBC_MID_CASH_RATE").focusout(function() {
			cash_bill_sum("OBC_MID_CASH_RATE","OBC_MID_BILL_RATE");
		});
		$("#OBC_MID_BILL_RATE").focusout(function() {
			cash_bill_sum("OBC_MID_CASH_RATE","OBC_MID_BILL_RATE");
		});
		$("#OBC_FIN_CASH_RATE").focusout(function() {
			cash_bill_sum("OBC_FIN_CASH_RATE","OBC_FIN_BILL_RATE");
			if($("#OBC_FIN_CASH_RATE").val() != "" || $("#OBC_FIN_BILL_RATE").val() != ""){
				//$("#OBC_FIN_CONDI").val("1회 준공 해당월 말일에 청구");
			}else{
				//$("#OBC_FIN_CONDI").val("");
			}
		});
		$("#OBC_FIN_BILL_RATE").focusout(function() {
			cash_bill_sum("OBC_FIN_CASH_RATE","OBC_FIN_BILL_RATE");
			if($("#OBC_FIN_CASH_RATE").val() != "" || $("#OBC_FIN_BILL_RATE").val() != ""){
				//$("#OBC_FIN_CONDI").val("1회 준공 해당월 말일에 청구");
			}else{
				//$("#OBC_FIN_CONDI").val("");
			}
		});
		
		$("#OBC_EMP_YN").click(function() {if($(':checkbox[name="OBC_EMP_YN"]:checked').val() != "Y")$("#OBC_EMP_YN").val("N");	});
		$("#OBC_PENSION_YN").click(function() {if($(':checkbox[name="OBC_PENSION_YN"]:checked').val() != "Y")$("#OBC_PENSION_YN").val("N");	});
		$("#OBC_HEALTH_YN").click(function() {if($(':checkbox[name="OBC_HEALTH_YN"]:checked').val() != "Y")$("#OBC_HEALTH_YN").val("N");	});
		$("#OBC_ELDER_YN").click(function() {if($(':checkbox[name="OBC_ELDER_YN"]:checked').val() != "Y")$("#OBC_ELDER_YN").val("N");	});
		$("#OBC_WORK_YN").click(function() {if($(':checkbox[name="OBC_WORK_YN"]:checked').val() != "Y")$("#OBC_WORK_YN").val("N");	});
		$("#OBC_RESIGN_YN").click(function() {if($(':checkbox[name="OBC_RESIGN_YN"]:checked').val() != "Y")$("#OBC_RESIGN_YN").val("N");	});
		$("#OBC_SAFE_YN").click(function() {if($(':checkbox[name="OBC_SAFE_YN"]:checked').val() != "Y")$("#OBC_SAFE_YN").val("N");	});
		$("#OBC_ENV_YN").click(function() {if($(':checkbox[name="OBC_ENV_YN"]:checked').val() != "Y")$("#OBC_ENV_YN").val("N");	});
		$("#OBC_SITE_YN").click(function() {if($(':checkbox[name="OBC_SITE_YN"]:checked').val() != "Y")$("#OBC_SITE_YN").val("N");	});
		$("#OBC_DUTY_YN").click(function() {if($(':checkbox[name="OBC_DUTY_YN"]:checked').val() != "Y")$("#OBC_DUTY_YN").val("N");	});
		$("#OBC_WARR_YN").click(function() {if($(':checkbox[name="OBC_WARR_YN"]:checked').val() != "Y")$("#OBC_WARR_YN").val("N");	});
		
		$("#CPC_MID_RATE").focusout(function() {
			cash_bill_sum("CPC_MID_RATE","PBC_REST_RATE");
		});
		
		$("#PBC_REST_RATE").focusout(function() {
			cash_bill_sum("PBC_REST_RATE","CPC_MID_RATE");
		});
		
	}
	
	function cash_bill_sum(col1,col2){
		var amt1 = Number($("#"+col1).val());
		if(amt1 > 100){
			alert("100%를 넘을 수 없습니다.");
			$("#"+col1).val("");
			$("#"+col1).focus();
			return;
		}
		var sum = 100-amt1; 
		$("#"+col2).val(sum);
		if(amt1 == ""){
			$("#"+col1).val(0);
		}
	}
	
	function doSearchSheet(){
		$("#fevent").val("GET_CORP_LIST");
		var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/outside/BidModify_sheet.screen";
		Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
	}
	
	function SearchUser(NAME,CODE,DEPT_YN){
		var GB = "";
		if(CODE == "PUREMPNO"){
			CODE = "";
			NAME = "";
			GB = "PUREMP";
		}
		var win_id = "_searchUserPopup";
		var link = "/lib/dlgSearchUserPop.screen";
		    link += "?pop_win_id="+win_id;
		    link += "&NAME="+NAME;
		    link += "&CODE="+CODE;
		    link += "&GB="+GB;
		    if(DEPT_YN == "Y")
		    	link += "&deptNameYn=outside";
		fLayerPop(win_id, link, 700,400, '', '', 'NO');
	}
	
	function SearchUserClose(result){
		if(result[10] == "PUREMP"){
			$("#PUREMPNO").val(result[9])//ACCT_ID
			$("#PUREMPNM").val(result[1])//이름
			$("#PO_EMPNM").val(result[6])//연락처
		}
		setTimeout(function(){fLayerPopClose('_searchUserPopup');},100);
	}


	/**
	 *	IBSheet object initialize
	 */
	function gridInit(sheetName){
		var init_sheet = {};
		init_sheet.Cfg = {SearchMode:2, Page:30};
		init_sheet.Cols = [
		       			{Header:'삭제',				Type:"DelCheck",		SaveName:"DEL_CHECK", 					Width:0, 		Align:"Center",	Hidden:"True"},
		    			{Header:'Status',			Type:"Status", 		SaveName:"STATUS", 						Width:0, 		Align:"Center",	Hidden:"True"},
		    			{Header:'No.',				Type:"Seq", 			SaveName:"NO",								Width:0, 		Align:"Center",	Hidden:"True"},
		    			{Header:'추천부서',			Type:"Text", 			SaveName:"RECM_DEPT_NM", 			Width:100,		Align:"Center", Edit:false},
		    			{Header:'사업자번호',		Type:"Text", 			SaveName:"VENDOR_NO", 					Width:100,		Align:"Center", Edit:false,Format:"SaupNo"},
		    			{Header:'업체명',			Type:"Text", 			SaveName:"VENDOR_NAME", 				Width:100, 		Align:"Left", Edit:false},
		    			{Header:'대표자명',			Type:"Text", 			SaveName:"REPRE_NO", 					Width:100, 		Align:"Center", Edit:false},
		    			{Header:'담당자명',			Type:"Text",	 		SaveName:"CHARGE_NAME", 				Width:100, 		Align:"Center", Edit:false},
		    			{Header:'핸드폰',			Type:"Text", 			SaveName:"CHAGE_HP", 					Width:100, 		Align:"Center", Edit:false},
		    			{Header:'이메일',			Type:"Text", 			SaveName:"CHARGE_EMAIL", 				Width:130, 		Align:"Left", Edit:false},
		    			{Header:'추천사유',			Type:"Text", 			SaveName:"RECOMMEND_REASON",		Width:180, 		Align:"Left", Edit:false},
		    			{Header:'추천부서',			Type:"Text", 			SaveName:"RECM_DEPT_ID",				Width:0, 		Align:"Center",	Hidden:"True"},
		    			{Header:'고객사코드',		Type:"Text", 			SaveName:"VENDOR_CD",					Width:0, 		Align:"Center",	Hidden:"True"},
		    			{Header:'견적설명참여여부',	Type:"Text", 			SaveName:"SITEPARTI_YN", 			Width:100, 		Align:"Center", Hidden:"True"}
		    			
		];
		init_sheet.HeaderMode = {Sort:1};
		IBS_InitSheet(sheetName, init_sheet);
		sheetName.SetDataAutoTrim(0);
		sheetName.SetEditable(false);
		setGridSize();
	}
	
	/**
	 *	IBSheet Event: Click
	 */
	function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {

	 }
	
	/**
	 *	IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
	 */
	function sheet1_OnSearchEnd(code, message) {
	    if(code == 0) {
	    	setGridSize();
		} else {
			//조회 에러 수행
			alert(message);
		}
	}
	
	/**
	 *	IBSheet size setting
	 */
	function setGridSize() {
		sheet1.FitColWidth();
	}
	
	function cmpt_must_ck(){
		var rowcnt = sheet1.RowCount();
		if($("#CMPT_CD").val() == "03"){//수의계약
			if(rowcnt != 1){
				alert("견적 대상 업체가 1개 이어야 합니다.");
				$("#sheet1_div").focus();
				return true;
			}
		}else if($("#CMPT_CD").val() == "01" || $("#CMPT_CD").val() == "02"){//지명경쟁 공개경쟁 
			if(rowcnt < 2){
				alert("견적 대상 업체가 2개 이상 있어야 합니다.");
				$("#sheet1_div").focus();
				return true;
			}
		}
		return false;
	}
	
	function must_ck(){
		if(must_ck_val("MODIFY_REASON","정정사유"))return false;
		
		if(must_ck_val("BID_FROM_DT",""))return false;
		if(time_ck("BID_FROM_HH","HH"))return false;
		if(time_ck("BID_FROM_MI","MI"))return false;
		if(must_ck_val("BID_TO_DT",""))return false;
		if(time_ck("BID_TO_HH","HH"))return false;
		if(time_ck("BID_TO_MI","MI"))return false;
		if(jQuery("#BID_FROM_DT").val() == jQuery("#BID_TO_DT").val()){
			var fromitme = jQuery("#BID_FROM_HH").val()+jQuery("#BID_FROM_MI").val();
			var toitme = jQuery("#BID_TO_HH").val()+jQuery("#BID_TO_MI").val();
			if(toitme <= fromitme){
				alert("견적제출기간 시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
				jQuery("#BID_FROM_HH").focus();
				return false;
			}
		}
		if(must_ck_val("PUREMPNM",""))return false;
		if(must_ck_val("PO_EMPNM",""))return false;
		if(must_ck_val("OPEN_EMPNM",""))return false;
		if(must_ck_radio("TBE_FLAG","TBE여부"))return false;
		if($(':radio[name="TBE_FLAG"]:checked').val() == "Y"){
			/* if(must_ck_val("SUPP_REQ_DY",""))return false; */
			if(must_ck_val("EVAL_TEL",""))return false;
			if(must_ck_val("EVAL_EMPNM",""))return false;
		}
		if($("#CURRENCY_GB").val()==""){
			alert("통화구분은 필수입니다.");
			$("#CURRENCY_GB").focus();
			return false;
		}

		if("<%=Order.get("SITEDESC_FLAG")%>"=="예"){
			var rowcnt = sheet1.RowCount();
			for(var r=0; r < rowcnt; r++)
			{
				if(sheet1.GetCellValue(r+1,"SITEPARTI_YN") == ""){
					alert(sheet1.GetCellValue(r+1,"VENDOR_NAME") + " 참석여부는 필수 입니다.");
					return false;
				}
			}
		}
		
		if($(':checkbox[name="OBC_EMP_YN"]:checked').val() != "Y")$("#OBC_EMP_YN").val("N");
		if($(':checkbox[name="OBC_PENSION_YN"]:checked').val() != "Y")$("#OBC_PENSION_YN").val("N");	
		if($(':checkbox[name="OBC_HEALTH_YN"]:checked').val() != "Y")$("#OBC_HEALTH_YN").val("N");	
		if($(':checkbox[name="OBC_ELDER_YN"]:checked').val() != "Y")$("#OBC_ELDER_YN").val("N");	
		if($(':checkbox[name="OBC_WORK_YN"]:checked').val() != "Y")$("#OBC_WORK_YN").val("N");
		if($(':checkbox[name="OBC_RESIGN_YN"]:checked').val() != "Y")$("#OBC_RESIGN_YN").val("N");	
		if($(':checkbox[name="OBC_SAFE_YN"]:checked').val() != "Y")$("#OBC_SAFE_YN").val("N");	
		if($(':checkbox[name="OBC_ENV_YN"]:checked').val() != "Y")$("#OBC_ENV_YN").val("N");	
		if($(':checkbox[name="OBC_SITE_YN"]:checked').val() != "Y")$("#OBC_SITE_YN").val("N");	
		if($(':checkbox[name="OBC_DUTY_YN"]:checked').val() != "Y")$("#OBC_DUTY_YN").val("N");	
		if($(':checkbox[name="OBC_WARR_YN"]:checked').val() != "Y")$("#OBC_WARR_YN").val("N");	
		if($(':checkbox[name="OBC_DUTY_YN"]:checked').val() == "Y")if(must_ck_val("OBC_DUTY_RATE",""))return false;
		
 		return true;
 	}
	
	
	// value 값 체크 
	function must_ck_val(obj,desc){
		if($("#"+obj).val().length == 0){
			if(desc.length> 0){
				alert(desc+must_msg);
			}else{
				alert($("#"+obj).attr("desc")+must_msg);
			}
			$("#"+obj).focus();
			return true;
		}
		return false;
	}
	
	// radio 박스 체크
	function must_ck_radio(obj,name){
		var value   = $(':radio[name='+obj+']:checked').val();
		if(value == undefined){
			alert(name+must_msg);
			$("#"+obj).focus();
			return true;
		}
 		return false;
	}
	
	function time_ck(obj,type){
		if(must_ck_val(obj,""))return true;
		if(!isNumber($("#"+obj).val())){
			alert("숫자만 입력 가능합니다.");
			$("#"+obj).focus();
			return true;
		}else{
			var time = Number($("#"+obj).val());
			if(type == "HH"){
				if(time < -1 || time> 23){
					alert("0~23 까지 입력 가능합니다.");
					$("#"+obj).focus();
					return true;
				}
			}else if(type == "MI"){
				if(time < -1 || time> 59){
					alert("0~59 까지 입력 가능합니다.");
					$("#"+obj).focus();
					return true;
				}
			}
		}
		if($("#"+obj).val().length == 1){
			var timelength = $("#"+obj).val();
			$("#"+obj).val("0"+timelength); 
		}
		return false; 
	}
	
	//첨부파일   
	function doAttachFile(obj,No) {
		var file_div = "bid/outside/<%=Order.get("BID_NO")%>/";
		 if(obj==''){
			 alert("After you have saved, you can attach a file.");
		}
		else if(obj != ''){ 
			if(No == 1){
				//viewFileList("<%=Order.get("DOC_ETC_IN")%>", obj.value, document.form1.p_AttachFile1, "N", "N", "Y", "N");
				viewFileListNew('<%=Order.get("DOC_ETC_IN")%>', obj.value, document.form1.p_AttachFile1, "Y", file_div);
			}else{
				//viewFileList("<%=Order.get("DOC_ETC_OUT")%>", obj.value, document.form1.p_AttachFile2, "N", "N", "Y", "N");
				viewFileListNew('<%=Order.get("DOC_ETC_OUT")%>', obj.value, document.form1.p_AttachFile2, "Y", file_div);
			}
		} 
	}
	
	//견적대상업체 추가
	function doInsert(sheetObj) {
		sheetObj.DataAutoTrim = false;
		var rowIndex = sheet1.DataInsert(-1);
		sheet1.SetColProperty(rowIndex,3,info);
		sheet1.SetColProperty(rowIndex,4,info);
		sheet1.SetColProperty(rowIndex,5,info);
		sheet1.SetColProperty(rowIndex,6,info);
		sheet1.SetRowEditable(rowIndex,1);
		var info= {Edit:true};

	}   
	
	function doResult(resultObj) {
		try {
			if( resultObj.getRequestEvent() == "UPDATE") {
				if( resultObj.getSuccess() ) {
					alert("정정공고 하였습니다.");
				}
				else {
					dlgErrorMsg(resultObj);
				}
			}
			
			if( resultObj.getRequestEvent() == "FORM_DELETE") {
				if( resultObj.getSuccess() ) {
					alert("삭제 되었습니다.");
					go_list();
				}
				else {
					dlgErrorMsg(resultObj);
				}
			}
		} catch(errorObject) {
			showErrorDlg("doResult()", errorObject);
		}
	}
	
	function sheet1_OnSmartResize(Width, Height) { 
		sheet1.FitColWidth();
		autoResize();
		
	}

	function autoResize(){
		/* var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
		var iframeHeight= document.body.scrollHeight - t1_height;   
		var iframeWidth= document.body.scrollWidth;   
		 */
		
		sheet1.SetSheetHeight(300); 
	}	
	
	function sheet1_OnSaveEnd(code, msg)
	{
		var event = $("#fevent").val();
		if(event == "UPDATE"){
			alert("정정공고 하였습니다.");
			$("#fevent").val("FORM_SELECT");
			$("#form1").attr("action", "/bid/outside/BidIng.screen");
			$("#form1").attr("target", "_self");
			$("#form1").attr("method", "post");
			$("#form1").submit();
		}else{
			if(code>= "0"){
				alert("저장되었습니다.");
				
			}else{
				alert("에러가 발생하였습니다.\n"+msg);
			}
		}
	}
	
	function go_list(){
		$("#fevent").val("");
		$("#form1").attr("action", "/bid/purchase/BidIngList.screen");
		$("#form1").attr("target", "_self");
		$("#form1").attr("method", "post");
		
		$("#form1").submit();
	}
</SCRIPT>


<modular:search id="form1">
	<modular:key id="fevent" />
</modular:search>
<form id="form1" name="form1" method="post" modular:type="search">

<INPUT type='hidden' name="fevent" id="fevent"  value="">
<INPUT type='hidden' name="DEMANDED_ID" value="<%=Order.get("DEMANDED_ID")%>">
<INPUT type='hidden' name="BID_NO" value="<%=Order.get("BID_NO")%>">
<INPUT type='hidden' name="BID_DEG" value="<%=Order.get("BID_DEG")%>">
<INPUT type='hidden' name="STATUS_CD" value="<%=Order.get("STATUS_CD")%>">
<INPUT type='hidden' name="SITEDESCDATE" value="<%=Order.get("SITEDESCDATE")%>">
<INPUT type='hidden' name="SITEDESCDT" value="<%=Order.get("SITEDESCDT")%>">
<INPUT type='hidden' name="NOTI_DY" value="<%=Order.get("NOTI_DY")%>">
<INPUT type='hidden' name="MODIFYREASON" value="">
	<!-- 제목 및 버튼 -->
	<table width="100%">
		<colgroup>
			<col width="500" />
			<col width="*" />
		</colgroup>
		<tr>
	   		<th>		
				<div align="left" id="title">
					<ul>
						<li>외주_입찰진행 상세<font style="font-size:11px"> (정정공고)</font></li>
					</ul>
				</div> 
			</th>	
				<td align="right">
					<span class="btnSearch center" id="btn_cancel"><a href="javascript:void(0);">취소</a></span>
					<span class="btnSearch center" id="btn_modify"><a href="javascript:void(0);">정정공고</a></span>
			   </td>
	   	</tr>
   	</table>	
<div class="application-info  magT10">
	<div class="application-sub-title">
		<span class="title">정정사유</span>
	</div>
	<div class="application-location">
	</div>
</div>
<TABLE class="form-table">
	<colgroup>
		<col width="145"/>
		<col/>
	</colgroup>
   <TR height="100"> 
    <TH>정정사유</TH>
	<TD><textarea name="MODIFY_REASON" id="MODIFY_REASON" style="width:95%; height:98px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget"><%=Order.get("MODIFY_REASON")%></textarea> </TD>
  </TR>
</TABLE>
<div class="application-info  magT10">
	<div class="application-sub-title">
		<span class="title">발주의뢰정보</span>
	</div>
	<div class="application-location">
	</div>
</div>
<!-- 발주의뢰정보 : 시작 -->
<TABLE class="form-table">
	<colgroup>
		<col width="145"/>
		<col width="23%">
		<col width="145"/>
		<col width="23%">
		<col width="145"/>
		<col/>
	</colgroup>
  <TR height="25"> 
    <TH> 현장</TH>
	<TD><%=Order.get("dept_nm") %></TD>
	<TH> 발주의뢰번호</TH>
	<TD><%=Order.get("DEMANDED_NO")%></TD>
	<TH> 발주의뢰명</TH>
	<TD><%=Order.get("DEMANDED_TITLE")%></TD>
  </TR>

  <TR height="25"> 
	<TH> 발주의뢰일</TH>
	<TD><%= Order.get("DEMANDED_DATE")%></TD>
	<TH> 발주의뢰부서</TH>
	<TD><%= Order.get("REQ_DEPT_NM")%></TD>
	<TH> 발주의뢰자</TH>
	<TD><%= Order.get("EMP_NM")%></TD> 	
  </TR>
  
  <TR height="25"> 
	<TH> 발주접수일자</TH>
	<TD><%=Order.get("RECEIPT_DATE") %></TD>
	<TH> Pay Item</TH>
	<TD colspan="3"><%= Order.get("PAY_ITEM_NM") %></TD> 	
  </TR> 	

  <TR height="25"> 
	<TH> 도급금액 (원)</TH>
	<TD><%= Formatter2.currency(Order.get("CONT_AMT"),0) %></TD>
	<TH> 실행금액 (원)</TH>
	<TD><%=Formatter2.currency(Order.get("ACT_AMT"),0) %></TD>
	<TH> 도급대비실행율(%)</TH>
	<TD><%= Order.get("ACT_RATE")%></TD> 	
  </TR>
  
  <TR height="25">
	<TH>공사기간</TH>
	<TD><%= InputText.get("DELI_FROM_DY", Order.get("DELI_FROM_DY"), 10, 10, "desc=공사기간,readOnly,center") %>
		<IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('DELI_FROM_DY');">
		<%if(!Order.get("DELI_FROM_DY").isEmpty()||!Order.get("DELI_TO_DY").isEmpty()){ %>~<%} %> 
		<%= InputText.get("DELI_TO_DY", Order.get("DELI_TO_DY"), 10, 10, "desc=공사기간,readOnly,center") %>
		<IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('DELI_TO_DY');">
	</TD>
	<TH>공사장소</TH>
	<TD><%= Order.get("DELIVERY_PLACE") %></TD>
  	<TH>공종</TH>
	<TD><%= Order.get("OUT_ITEM_NM") %></TD> 
  </TR>    
  <!-- 발주의뢰정보 : 종료 -->
</table>

<div class="application-info magT20">
	<div class="application-sub-title">
		<span class="title">입찰기본정보</span>
	</div>
</div>

<TABLE class="form-table">
	<colgroup>
		<col width="145"/>
		<col width="145"/>
		<col width="29%"/>
		<col width="145"/>
		<col />
	</colgroup>
  <TR height="25"> 
    <TH> 입찰번호-차수</TH>
	<TD colspan="2"><%=Order.get("BID_NO")%>-<%=Order.get("BID_DEG")%></TD>
	<TH> 온라인입찰여부</TH>
	<TD><%=Order.get("ONBID_YN")%></TD>
  </TR>

  <TR height="25"> 
	<TH> 입찰명</TH>
	<TD colspan="4"><%=Order.get("BID_MASTER_NM")%></TD>
  </TR>
  
  <TR height="25"> 
	<TH> 경쟁방법</TH>
	<TD colspan="2"><%=Order.get("CMPT_NM")%></TD>
	<TH> 낙찰자선정방법</TH>
	<TD><%=Order.get("SUCC_NM")%></TD> 	
  </TR> 	
  <!-- 발주의뢰정보 : 종료 -->
</table>

<div class="application-info magT20">
	<div class="application-sub-title">
		<span class="title">입찰진행</span>
	</div>
</div>

<TABLE class="form-table">
	<colgroup>
		<col width="145"/>
		<col width="145"/>
		<col width="29%"/>
		<col width="145"/>
		<col />
	</colgroup>
  <TR height="25"> 
    <TH>업체공지일자</TH>
	<TD colspan="4"><%=Order.get("NOTI_DY")%></TD>
  </TR>

  <TR height="25"> 
	<TH rowspan="3"> 견적설명회 정보</TH>
	<TH> 여부</TH>
	<TD> 
		<%=Order.get("SITEDESC_FLAG")%>
	</TD>
	<TH> 담당자</TD>
	<TD> 
		<%=Order.get("SITEDESCCHRGPRSNNM")%><INPUT type='hidden' name="SITEDESCCHRGPRSNID" id="SITEDESCCHRGPRSNID"  value="<%=Order.get("SITEDESCCHRGPRSNID")%>">
	</TD>	
  </TR>
  
  <TR height="25"> 
	<TH> 담당자 전화번호</TH>
	<TD><%= Order.get("SITEDESCTELNO")%></TD>
	<TH> 일시</TH>
	<TD><%=Order.get("SITEDESCDATE")%></TD>		
  </TR> 	
  
    <TR height="25"> 
	<TH> 담당자 E-Mail</TH>
	<TD><%=Order.get("SITEDESCEMAIL")%></TD>
	<TH> 장소</TH>
	<TD><%=Order.get("SITEDESCPLACE")%></TD>		
  </TR> 
  
    <TR height="25"> 
	<TH rowspan="3"> 견적 의뢰</TH>
	<TH class="required"> 견적제출기간</TH>
	<TD colspan="3"> 
		<%= InputText.get("BID_FROM_DT", Order.get("BID_FROM_DT"), 10, 10, "desc=견적제출기간,readOnly") %>
		<IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('BID_FROM_DT');">
		<%= InputText.get("BID_FROM_HH", Order.get("BID_FROM_HH"), 2, 2, "desc=견적제출기간,Time") %> :
		<%= InputText.get("BID_FROM_MI", Order.get("BID_FROM_MI"), 2, 2, "desc=견적제출기간,Time") %>  ~
		<%= InputText.get("BID_TO_DT", Order.get("BID_TO_DT"), 10, 10, "desc=견적제출기간,readOnly") %>
		<IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('BID_TO_DT');">
		<%= InputText.get("BID_TO_HH", Order.get("BID_TO_HH"), 2, 2, "desc=견적제출기간,Time") %> :
		<%= InputText.get("BID_TO_MI", Order.get("BID_TO_MI"), 2, 2, "desc=견적제출기간,Time") %>
	</TD>
  </TR>
  
  <TR height="25"> 
	<TH class="required"> 외주담당자</TH>
	<TD> 
		<%= InputText.get("PUREMPNM", Order.get("PUREMPNM"), 7, 10, "desc=외주담당자,readOnly") %><INPUT type='hidden' name="PUREMPNO" id="PUREMPNO"  value="<%=Order.get("PUREMPNO")%>">
		<IMG src="/img/buyer/button/bt_search_right.gif" alt="담당자" border="0" align="absmiddle" style="cursor:pointer;"  onClick="JavaScript:SearchUser('PUREMPNM','PUREMPNO','Y');">
	</TD>
	<TH class="required"> 외주담당자 전화번호</TH>
	<TD><%= InputText.get("PO_EMPNM", Order.get("PO_EMPNM"), 15, 13, "desc=외주담당자 전화번호") %> ex)02-0000-0000</TD>		
  </TR> 	
  
    <TR height="25"> 
	<TH class="required"> 개찰자</TH>
	<TD colspan="3"> 
		<%= InputText.get("OPEN_EMPNM", Order.get("OPEN_EMPNM"), 7, 10, "desc=개찰자,readOnly") %><INPUT type='hidden' name="OPEN_EMPID" id="OPEN_EMPID"  value="<%=Order.get("OPEN_EMPID")%>">
		<IMG src="/img/buyer/button/bt_search_right.gif" alt="담당자" border="0" align="absmiddle" style="cursor:pointer;"  onClick="JavaScript:SearchUser('OPEN_EMPNM','OPEN_EMPID','N');">
	</TD>	
  </TR> 
  
  <TR height="25"> 
	<TH rowspan="2">기술검토(TBE)</TD>
	<TH class="required"> TBE 여부</TH>
	<TD  colspan="3" colspan="3"> 
		<LABEL for="sort_gb_3"><INPUT id="sort_gb_3" type="radio" name="TBE_FLAG" value="Y" desc="TBE 여부" <%=Order.get("TBE_FLAG").equals("Y") ? "checked=\"checked\"" : "" %>>예</LABEL>
		<LABEL for="sort_gb_4"><INPUT id="sort_gb_4" type="radio" name="TBE_FLAG" value="N" desc="TBE 여부" <%=Order.get("TBE_FLAG").equals("N") ? "checked=\"checked\"" : "" %>>아니오</LABEL>
	</TD>
  </TR>

  <TR height="25"> 
	<TH class="required"> TBE 심사자</TH>
	<TD> 
	<%= InputText.get("EVAL_EMPNM", Order.get("EVAL_EMPNM"), 21, 60, "desc=TBE심사자,readOnly") %><INPUT type='hidden' name="EVAL_EMPID" value="<%=Order.get("EVAL_EMPID")%>">
	<IMG id=btnevalemp src="/img/buyer/button/bt_search_right.gif" alt="담당자" border="0" align="absmiddle" style="cursor:pointer;"  onClick="JavaScript:SearchUser('EVAL_EMPNM','EVAL_EMPID','N');">
	</TD>		
	<TH class="required"> TBE 담당자 연락처</TH>
	<TD> 
		<%= InputText.get("EVAL_TEL", Order.get("EVAL_TEL"), 15, 13, "desc=TBE 담당자 연락처") %> ex)02-0000-0000
	</TD>	
  </TR> 	
  <!-- 발주의뢰정보 : 종료 -->
</table>

<div class="application-info magT20">
	<div class="application-sub-title">
		<span class="title">입찰조건</span>
	</div>
</div>

<TABLE class="form-table">
	<colgroup>
		<col width="145"/>
		<col width="145"/>
		<col width="29%"/>
		<col width="145"/>
		<col/>
	</colgroup>
  <TR height="25"> 
	<TH class="required">통화구분</TH>
	<TD colspan="4"> 
		<%=CommCodeManager.getSelectCodeList("911","CURRENCY_GB","height=18;","<option value=''>--선택--</option>",Order.get("CURRENCY_GB")) %>
	</TD>
  </TR>
   <TR height="25"> 
	<TH>계약형태</TH>
	<TD colspan="4"> 
		<LABEL for="obc_cont_type_1"><INPUT id="obc_cont_type_1" type="radio" name="OBC_CONT_TYPE_CD" value="01" desc="계약형태" <%=Order.get("OBC_CONT_TYPE_CD").equals("01") ? "checked=\"checked\"" : "" %>>도면견적 기준</LABEL><!-- 총액계약(도면견적 기준,총액입찰) 2015.9.17 여부장님 수정요청 -->
		<LABEL for="obc_cont_type_2"><INPUT id="obc_cont_type_2" type="radio" name="OBC_CONT_TYPE_CD" value="02" desc="계약형태" <%=Order.get("OBC_CONT_TYPE_CD").equals("02") ? "checked=\"checked\"" : "" %>>단가계약(공내역 물량 기준,단가입찰)</LABEL>
	</TD>
  </TR>
  <TR height="75"> 
  	<TH rowspan="2">공사대금</TH>
	<TH>선급금</TH>
	<TD> 계약금액의 : <%= InputText.get("OBC_FRST_CONT_RATE", Order.get("OBC_FRST_CONT_RATE"), 4, 3, "Number,Right","Number") %>%<br>
	<%= InputText.get("OBC_FRST_CONDI", Order.get("OBC_FRST_CONDI"), 40, 250, "readOnly") %> <br>
	<%= InputText.get("OBC_FRST_CNT_CONDI", Order.get("OBC_FRST_CNT_CONDI"), 40, 250, "readOnly") %></TD>
	<TH>기성금</TH>
	<TD> 계약금액의 : <%= InputText.get("CPC_MID_RATE", Order.get("CPC_MID_RATE"), 4, 3, "Number,Right","Number") %>% , 현금 : <%= InputText.get("OBC_MID_CASH_RATE", Order.get("OBC_MID_CASH_RATE"), 4, 3, "Number,Right","Number") %>% , 어음 : <%= InputText.get("OBC_MID_BILL_RATE", Order.get("OBC_MID_BILL_RATE"), 4, 3, "Number,Right","Number") %>%<br>
			세금계산서 발행일로부터 <%= InputText.get("OBC_MID_PAYDAY", Order.get("OBC_MID_PAYDAY"), 10, 50, "Number,Right","Number") %>일 내 지급<br>
			<%= InputText.get("OBC_MID_REQ_MONTH", Order.get("OBC_MID_REQ_MONTH"), 10, 10, "Number,Right","Number") %>개월 당<%= InputText.get("OBC_MID_CNT", Order.get("OBC_MID_CNT"), 10, 10, "Number,Right","Number") %>회 말일에 청구
	</TD>	
  </TR>
    <TR height="25"> 
	<TH>준공금</TH>
	<TD colspan="3"> 계약금액의 : <%= InputText.get("PBC_REST_RATE", Order.get("PBC_REST_RATE"), 4, 3, "Number,Right","Number") %>% , 현금 : <%= InputText.get("OBC_FIN_CASH_RATE", Order.get("OBC_FIN_CASH_RATE"), 4, 3, "Number,Right","Number") %>% , 어음 : <%= InputText.get("OBC_FIN_BILL_RATE", Order.get("OBC_FIN_BILL_RATE"), 4, 3, "Number,Right","Number") %>%
			<%-- <br>세금계산서 발행일로부터 <%= InputText.get("OBC_FIN_PAYDAY", Order.get("OBC_FIN_PAYDAY"), 10, 10, "desc=준공금 날짜,Number,Right","Number") %>일 내 지급<br>
			<%= InputText.get("OBC_FIN_CONDI", Order.get("OBC_FIN_CONDI"), 40, 250, "readOnly") %></TD> --%>
  </TR>
  <TR height="25"> 
  	<TH rowspan="2">보증조건</TH>
	<TH>선급금보증</TH>
	<TD>계약금액의<%= InputText.get("CBC_FIRST_RATE", Order.get("CBC_FIRST_RATE"), 4, 3, "Number,Right","Number") %>%</TD>
	<TH>계약이행 보증</TH>
	<TD>계약금액의<%= InputText.get("CONTFUL_RATE", Order.get("CONTFUL_RATE"), 4, 3, "Number,Right","Number") %>%</TD>	
  </TR>
  <TR height="25"> 
	<TH>하자이행 보증</TH>
	<TD>준공금액의<%= InputText.get("WARR_RATE", Order.get("WARR_RATE"), 4, 3, "Number,Right","Number") %>%</TD>
	<TH>하자담보기간</TH>
	<TD>준공일로부터<%= InputText.get("CBC_DEFECT_DAY", Order.get("CBC_DEFECT_DAY"), 4, 3, "Number,Right","Number") %> 개월</TD>
  </TR>  
  <TR height="25"> 
  	<TH>기타조건</TH>
	<TH>하도급대금<br>연동 기준비율</TH>
	<TD><%= InputText.get("PAY_CON_RATE", Order.get("PAY_CON_RATE"), 4, 5, "Float,Right","Float") %>%</TD>
	<TH>지체상금</TH>
	<TD>일당 계약금액의<%= InputText.get("CBC_DAMAGE_RATE", Order.get("CBC_DAMAGE_RATE"), 4, 5, "float,Right","float") %>%, 최대<%= InputText.get("CBC_DAMAGE_MAXRATE", Order.get("CBC_DAMAGE_MAXRATE"), 4, 5, "float,Right","float") %>%</TD>	
  </TR>
  <TR height="25"> 
  	<TH rowspan="6">간접비 견적조건</TH>
	<TH>고용보험료</TH>
	<TD>노무비 * <%= InputText.get("OBC_EMP_RATE", Order.get("OBC_EMP_RATE"), 10, 50, "Left") %>  % &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp  
		<LABEL for="OBC_EMP_YN">견적포함&nbsp<INPUT type="checkbox" id="OBC_EMP_YN" name="OBC_EMP_YN" value="Y" <%=Order.get("OBC_EMP_YN").equals("Y") ? "checked=\"checked\"" : "" %>></LABEL></TD>
	<TH>연금보험료</TH>
	<TD>직접노무비 <%= InputText.get("OBC_PENSION_RATE", Order.get("OBC_PENSION_RATE"), 10, 50, "Left") %>  % &nbsp &nbsp &nbsp&nbsp&nbsp 
		<LABEL for="OBC_PENSION_YN">견적포함&nbsp<INPUT type="checkbox" id="OBC_PENSION_YN" name="OBC_PENSION_YN" value="Y" <%=Order.get("OBC_PENSION_YN").equals("Y") ? "checked=\"checked\"" : "" %>></LABEL></TD>	
  </TR>
  <TR height="25"> 
	<TH>건강보험료</TH>
	<TD>직접노무비 * <%= InputText.get("OBC_HEALTH_RATE", Order.get("OBC_HEALTH_RATE"), 10, 50, "Left") %>  % &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp  
	<LABEL for="OBC_HEALTH_YN">견적포함&nbsp<INPUT type="checkbox" id="OBC_HEALTH_YN" name="OBC_HEALTH_YN" value="Y" <%=Order.get("OBC_HEALTH_YN").equals("Y") ? "checked=\"checked\"" : "" %>></LABEL></TD>
	<TH>노인장기보험료</TH>
	<TD>건강보험료 * <%= InputText.get("OBC_ELDER_RATE", Order.get("OBC_ELDER_RATE"), 10, 50, "Left") %>  % &nbsp &nbsp&nbsp&nbsp 
	<LABEL for="OBC_ELDER_YN">견적포함&nbsp<INPUT type="checkbox" id="OBC_ELDER_YN" name="OBC_ELDER_YN" value="Y" <%=Order.get("OBC_ELDER_YN").equals("Y") ? "checked=\"checked\"" : "" %>></LABEL></TD>	
  </TR>
  <TR height="25"> 
	<TH>산재보험료</TH>
	<TD>노무비 * <%= InputText.get("OBC_WORK_RATE", Order.get("OBC_WORK_RATE"), 10, 50, "Left") %>  % &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
		<LABEL for="OBC_WORK_YN">견적포함&nbsp<INPUT type="checkbox" id="OBC_WORK_YN" name="OBC_WORK_YN" value="Y" <%=Order.get("OBC_WORK_YN").equals("Y") ? "checked=\"checked\"" : "" %>></LABEL></TD>
	<TH>퇴직공제부금</TH>
	<TD>노무비 * <%= InputText.get("OBC_RESIGN_RATE", Order.get("OBC_RESIGN_RATE"), 10, 50, "Left") %>  % &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp 
		<LABEL for="OBC_RESIGN_YN">견적포함&nbsp<INPUT type="checkbox" id="OBC_RESIGN_YN" name="OBC_RESIGN_YN" value="Y" <%=Order.get("OBC_RESIGN_YN").equals("Y") ? "checked=\"checked\"" : "" %>></LABEL></TD>	
  </TR>
  <TR height="25"> 
	<TH>안전관리비</TH>
	<TD>노무비 * <%= InputText.get("OBC_SAFE_RATE", Order.get("OBC_SAFE_RATE"), 10, 50, "Left") %>  % &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
		<LABEL for="OBC_SAFE_YN">견적포함&nbsp<INPUT type="checkbox" id="OBC_SAFE_YN" name="OBC_SAFE_YN" value="Y" <%=Order.get("OBC_SAFE_YN").equals("Y") ? "checked=\"checked\"" : "" %>></LABEL></TD>
	<TH>환경관리비</TH>
	<TD>재료비 * <%= InputText.get("OBC_ENV_RATE", Order.get("OBC_ENV_RATE"), 10, 50, "Left") %>  %  &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp 
		<LABEL for="OBC_ENV_YN">견적포함&nbsp<INPUT type="checkbox" id="OBC_ENV_YN" name="OBC_ENV_YN" value="Y" <%=Order.get("OBC_ENV_YN").equals("Y") ? "checked=\"checked\"" : "" %>></LABEL></TD>	
  </TR>
  <TR height="25"> 
	<TH>현장관리비</TH>
	<TD>직접비 * <%= InputText.get("OBC_SITE_RATE", Order.get("OBC_SITE_RATE"), 10, 50, "Left") %>  % &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
		<LABEL for="OBC_SITE_YN">견적포함&nbsp<INPUT type="checkbox" id="OBC_SITE_YN" name="OBC_SITE_YN" value="Y" <%=Order.get("OBC_SITE_YN").equals("Y") ? "checked=\"checked\"" : "" %>></LABEL></TD>
	<TH>매입부가세</TH>
	<TD>재료비 * 매입세율 <%= InputText.get("OBC_DUTY_RATE", Order.get("OBC_DUTY_RATE"), 4, 5, "desc=매입세율,float,Center","float") %>  % 
		<LABEL for="OBC_DUTY_YN">견적포함&nbsp<INPUT type="checkbox" id="OBC_DUTY_YN" name="OBC_DUTY_YN" value="Y" <%=Order.get("OBC_DUTY_YN").equals("Y") ? "checked=\"checked\"" : "" %>></LABEL></TD>	
  </TR>
   <TR height="25"> 
	<TH>간접비 정산조건</TH>
	<TD>
	<LABEL for="obc_ind_type_1"><INPUT id="obc_ind_type_1" type="radio" name="OBC_IND_YN" value="Y" desc="간접비 정산조건" <%=Order.get("OBC_IND_YN").equals("Y") ? "checked=\"checked\"" : "" %>>실적정산</LABEL>
	<LABEL for="obc_ind_type_2"><INPUT id="obc_ind_type_2" type="radio" name="OBC_IND_YN" value="N" desc="간접비 정산조건" <%=Order.get("OBC_IND_YN").equals("N") ? "checked=\"checked\"" : "" %>>비례정산</LABEL>
	</TD>
	<TH>건설기계 수수료</TH>
	<TD><LABEL for="OBC_WARR_YN">견적포함&nbsp<INPUT type="checkbox" id="OBC_WARR_YN" name="OBC_WARR_YN" value="Y" <%=Order.get("OBC_WARR_YN").equals("Y") ? "checked=\"checked\"" : "" %>></LABEL>
	</TD>
  </TR>
</TABLE>

<TABLE class="form-table" style="margin-top:5px">
	<colgroup>
		<col width="145"/>
		<col width="145"/>
		<col width="29%"/>
		<col width="145"/>
		<col/>
	</colgroup>
  <TR height="100"> 
    <TH>특이사항 내부</TH>
	<TD colspan="2">
		<textarea name="INNER_REMARKS" id="INNER_REMARKS" style="width:98%; height:80px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget"><%=Order.get("INNER_REMARKS")%></textarea> 
    </TD>
	
	<TH>특이사항 외부</TH>
	<TD>
	 <textarea name="OUTER_REMARKS" id="OUTER_REMARKS" style="width:98%; height:80px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget"><%=Order.get("OUTER_REMARKS")%></textarea>            
	</TD>
  </TR>
  <TR height="100"> 
    <TH>내부자료</TH>
	<TD colspan="2"> 
	 <TEXTAREA name="p_AttachFile1" id="p_AttachFile1" style="width:85%;height:80px" rows="1" class="input" readOnly><%=filein.get(Order.get("DOC_ETC_IN")) %></TEXTAREA>
	                    <IMG id='search_spot_button' onClick="doAttachFile(document.form1.DEMANDED_ID,1);" src='/img/buyer/button/bt_change.gif' border='0'  align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
    </TD>
	<TH>외부자료</TH>
	<TD>
	 <TEXTAREA name="p_AttachFile2" id="p_AttachFile2" style="width:85%;height:80px" rows="1" class="input" readOnly><%=fileout.get(Order.get("DOC_ETC_OUT")) %></TEXTAREA>
	                    <IMG id='search_spot_button' onClick="doAttachFile(document.form1.DEMANDED_ID,2);" src='/img/buyer/button/bt_change.gif' border='0'  align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
	</TD>
  </TR>  
</TABLE>

<table width="100%">
	<colgroup>
		<col width="500" />
		<col width="*" />
	</colgroup>
	<tr>
   		<th>
   		<div class="application-info magT15">
			<div class="application-sub-title">
				<span class="title">견적대상업체</span>
			</div>
		</div>
   		</th>
   		<td align="right">
   		</td>
  	</tr>
</table>
	<div id="sheet1_div" style="padding-top:5px;height: auto; min-height: 200px; overflow: auto;">
		<script>createIBSheet('sheet1','100%', '200px');</script>
	</div>
</form>
