<%--
  - Author(s)  : chj
  - Date       : 2015-03-02
  - Description: 시행결의
  --%>
  
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%@ 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"%>
<%@ page import="com.udapsoft.waf.common.ui.InitCombo" %>
<%@ page import="kr.co.udapsoft.common.code.CommCodeManager" %>
<%@ 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 Vendor = storage.getValueObject("Vendor");
    ValueObject Merge = storage.getValueObject("Merge");
    //System.out.println(Vendor);
    ValueObject filein = storage.getValueObject(Order.get("DOC_ETC_IN"));
    ValueObject fileout = storage.getValueObject(Order.get("DOC_ETC_OUT"));

    boolean o_reason = false;   //2015.3.27
    
    //2015.3.27 개찰의견 추가
    if(Order.get("OPEN_OPINION").length()> 0){
    	o_reason = true;
    }
    
	//공통코드
	CommCodeManager commCodeManager = new CommCodeManager();
	InitCombo initCombo = new InitCombo();

	initCombo.makeComboData(commCodeManager.getCodeRowSet("BID_CHK_YN","DETAILCD","Y"), "DETAILNM", "DETAILCD");
	String BID_CHK_CD = initCombo.getCode();
	String BID_CHK_NM = initCombo.getCodeName();
	
	//공통코드
	InitCombo initCombo2 = new InitCombo();

	initCombo2.makeComboData(commCodeManager.getCodeRowSet("TBE_EVAL"), "NAME", "CODE");
	String TBE_EVAL_CD = initCombo2.getCode();
	String TBE_EVAL_NM = initCombo2.getCodeName();
	
	ValueObject sign_info = storage.getValueObject("SIGN_INFO");
	
	RowSet getFileListRowSet = storage.getRowSet("getFileListRowSet");
	ValueObject suppinfo = storage.getValueObject("suppinfo");
    
    String gwurl	=	"https://gw.sgcenc.co.kr/";//WAFConfig.get("gw.url.address2");
%>
<SCRIPT language="JavaScript">
document.body.onresize = addEvent( document.body.onresize, "autoResize()");
	/*예약함수*/
	var sheet1 = new ibsheetObject();
	var sheet3 = new ibsheetObject();
	var pageLastRowIndex = 1;
	var validationResult = false;
	var filterShow = false;
	var succ_vendor = "";
	var for_po = $("#FOR_PO").val();
	
	function _onReady(){

		//저장된 첨부파일 리스트 불러오기
	    getFileListForTextarea();
		
		/**
		 *	IBSheet object initialize
		 */
		gridInit(sheet1);
		gridInit(sheet3);
		/**
		 *	Application Initialize
		 */
		 
		 
		 jQuery("#btn_appr").hide();
		 jQuery("#btn_Save").hide();
		
		 //2015.3.25 시행결의서 견적대비표 추가 
		 jQuery("#btn_report").click(function() {
			     var reportInfo = new ReportInfo();

		        if($(':radio[name="PBC_CBE_TYPE_CD"]:checked').val() == "A")
	            {
		            reportInfo.title = "견적대비표";
		            reportInfo.reportName = "/report/mrd/buyer/bid/purchase/Bid_purchase_Atype.mrd";
		            
		            reportInfo.set($("#BID_NO").val());    	// $1
			        reportInfo.set($("#BID_DEG").val());    	// $2
			        
			        
	            }
		        else if($(':radio[name="PBC_CBE_TYPE_CD"]:checked').val() == "B")
	            {		        	
		            reportInfo.title = "견적대비표";
		            if(<%=Vendor.get("BID_SUPP_CNT")%> > 5) reportInfo.reportName = "/report/mrd/buyer/bid/purchase/Bid_purchase_Btype2.mrd";
		            else reportInfo.reportName = "/report/mrd/buyer/bid/purchase/Bid_purchase_Btype.mrd";
		            
		            reportInfo.set($("#BID_NO").val());    	// $1
			        reportInfo.set($("#BID_DEG").val());    	// $2
	            }
		        else
	            {
		            reportInfo.title = "견적대비표";
		            reportInfo.reportName = "/report/mrd/buyer/bid/purchase/Bid_purchase_Ctype.mrd";
		            
		            reportInfo.set($("#BID_NO").val());    	// $1
			        reportInfo.set($("#BID_DEG").val());    	// $2
	            }
		        
		        reportInfo.width = 1000;                         	// Default: 1024
		        reportInfo.height = 700;                         	// Default: 768

				reportInfo.showPopup();
					 
		 });
        
		 //2015.3.31 TBE결과표 등록  
		 $("#btn_tbecheckpop").click(function() {
			 var win_id = "_TBECheckPop";
			 var link = "/bid/purchase/TBECheckPop.screen";
			       link += "?pop_win_id="+win_id;
			       link += "&BID_NO="+$("#BID_NO").val();
			       link += "&BID_DEG="+$("#BID_DEG").val();
			fLayerPop(win_id, link, 900,210, '', '', 'YES');
	 	});
		 
		//2016.5.12 외국환거래신고
		 $("#btn_foreign").click(function() {//저장
			   var win_id = "ForeignCheckPop";			
				var editYN = "N";
				if(<%=!Vendor.get("BID_STATUS_CD").equals("10")%> && <%=!Vendor.get("BID_STATUS_CD").equals("07")%>){
					editYN="Y";
				}
				var link = "/bid/purchase/ForeignCheckPop.screen";
				link += "?pop_win_id="+win_id+"&BID_NO="+$("#BID_NO").val()+"&BID_DEG="+$("#BID_DEG").val()+"&VENDOR_CD="+$("#VENDOR_CD").val() + "&editYN="+ editYN;
		 
				fLayerPop(win_id, link, 950,600, '','', 'NO');
		 });

		
		 jQuery("#btn_list").click(function() {
			 jQuery("#fevent").val("");
			 jQuery("#form1").attr("action", "/bid/purchase/BidResolutionList.screen");
			 jQuery("#form1").attr("target", "_self");
			 jQuery("#form1").attr("method", "post");
			 jQuery("#form1").submit();
		});
		 
		 jQuery("#btn_Save").click(function() {//저장
			var f = document.form1;
			submitXmlRequest("/bid/signidentify.screen", "CHK2", f, "SUCCESS");
			btn_act = "to_Save";			 
		 });
		 
		 
		 jQuery("#btn_appr").click(function() {//결재
			 if(jQuery("#CONF_NO").val() != ""){
			     
			    
			     if(Number(jQuery("#H_CBC_FIRST_RATE").val()) != Number(jQuery("#CBC_FIRST_RATE").val())){
				 	alert("입찰조건이 eTEC조건과 상이합니다.\n\n확인후 진행바랍니다.");
			     }else if(jQuery("#H_PBC_FIRST_CONDI").val() != jQuery("#PBC_FIRST_CONDI").val()){
				 	alert("입찰조건이 eTEC조건과 상이합니다.\n\n확인후 진행바랍니다.");
			     }else if(Number(jQuery("#H_CPC_MID_RATE").val()) != Number(jQuery("#CPC_MID_RATE").val())){
				 	alert("입찰조건이 eTEC조건과 상이합니다.\n\n확인후 진행바랍니다.");
			     }else if(jQuery("#H_PBC_MID_CONDI").val() != jQuery("#PBC_MID_CONDI").val()){
				 	alert("입찰조건이 eTEC조건과 상이합니다.\n\n확인후 진행바랍니다.");
			     }else if(Number(jQuery("#H_PBC_REST_RATE").val()) != Number(jQuery("#PBC_REST_RATE").val())){
				 	alert("입찰조건이 eTEC조건과 상이합니다.\n\n확인후 진행바랍니다.");
			     }else if(jQuery("#H_PBC_REST_CONDI").val() != jQuery("#PBC_REST_CONDI").val()){
				 	alert("입찰조건이 eTEC조건과 상이합니다.\n\n확인후 진행바랍니다.");
			     }
			     
			     if(jQuery("#PO_PRC").val() == null || jQuery("#PO_PRC").val() == ''){
				 	alert("발주진행율 등록해주십시오.");
				 	jQuery("#PO_PRC").focus();
				 	return;
			     }
			     if(jQuery("#RES_PRC").val() == null || jQuery("#RES_PRC").val() == ''){
				 	alert("실적진행율 등록해주십시오.");
				 	jQuery("#RES_PRC").focus();
				 	return;
			     }
			     //2016.5.12 외국환거래 확인   
				<%-- if("<%=Vendor.get("CURRENCY_GB")%>" != "KRW" && jQuery("#FOREIGN_CHK").val()=="A" ){
					alert("외국환거래 신고대상여부를 확인해 주세요");
					return;
				} --%>
				var f = document.form1;
				submitXmlRequest("/bid/signidentify.screen", "CHK2", f, "SUCCESS");
				btn_act = "to_appr";				 
			 }else{
				 alert("계약번호를 확인하세요.");
			 }
		 });
		 
		
		if(<%=!Vendor.get("BID_STATUS_CD").equals("10")%> && <%=!Vendor.get("BID_STATUS_CD").equals("07")%>){
			 jQuery("#btn_appr").show();
			 jQuery("#btn_Save").show();
		
			 if(<%=Vendor.get("CONFIRM_YN").equals("Y")%>){
					jQuery("#btn_appr").show();
				}else{
					jQuery("#btn_appr").hide();
				}
			 
		}else{
			 jQuery("#btn_appr").hide();
			 jQuery("#btn_Save").hide();
			 sheet3.SetColHidden("DEL_CHECK", true);
		}
		
		 
		$(document).on("blur", "#CONF_NO", function() {
			
			$("#CONF_NO").val($("#CONF_NO").val().toUpperCase().replace(/ /g, ''));
	     });
		
		
		if("<%=Merge.get("PBC_DEFECT_CONDI2")%>"!=""||"<%=Merge.get("CBC_DEFECT_DAY2")%>"!=""||"<%=Merge.get("CBC_DERECT_TERM_CD2")%>"!=""){
			jQuery("#addGuar").attr("checked", true);
			jQuery(".checkAdd").show();
		}

		$("#addGuar").click(function(){
			var chk = jQuery("#addGuar").is(":checked");
			if(chk){
			    jQuery(".checkAdd").show();
			}else{
			    jQuery(".checkAdd").hide();
			    jQuery("#PBC_DEFECT_CONDI2_O").val("");
			    jQuery("#CBC_DEFECT_DAY2_O").val("");
			    jQuery("#CBC_DERECT_TERM_CD2_O").val("");
			}
		});
		
		$("#AMT_HIDDEN").click(function(){
			var chk = jQuery("#AMT_HIDDEN").is(":checked");
			if(chk){
				jQuery("#AMT_HIDDEN").val("Y");
			}else{
				jQuery("#AMT_HIDDEN").val("N");
			}
		});
		
		$("#report_emp_add").click(function(){
			SearchUser('REPORT_EMP','REPORT_EMP','N');
		});
		
		$("#report_emp_del").click(function() {
			if(confirm("삭제 하시겠습니까?")){
				$("#fevent").val("SET_REPORT_EMP_DELETE");
				var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/BidResolution_sheet.screen";
				var result = Modular.view.IBSheet7.doSave(sheet3, url, $("#form1"), false);
			}
		});
		
		//유관부서 담당자 조회
		doSearchsheet3();
		//낙찰업체 자재내역
		doSearchSheet();
		

	}
	
	function PopClose(win_id,result){
		if( result != null ){
			if(result[0] == 0){
				setTimeout(function(){	fLayerPopClose(win_id);},100);
				if(result[1].length> 0)alert(result[1]);
				$("#btn_list").click();
			}else if(result[0] == 1){
				setTimeout(function(){	fLayerPopClose(win_id);},100);
				if(result[1].length> 0)alert(result[1]);
				$("#fevent").val("FORM_SELECT");
				$("#form1").attr("action", "/bid/purchase/SuccessBid.screen");
				$("#form1").attr("target", "_self");
				$("#form1").attr("method", "post");
				$("#form1").submit();
			}else if(result[0] == 2){  //2016.5.12 외국환거래신고 
				setTimeout(function(){	fLayerPopClose(win_id);},100);
				if(result[1].length> 0)alert(result[1]);
				$("#FOREIGN_CHK").val(result[2]); 
				$("#FOREIGN_NM").val(result[3]); 
			}
		}else{
			setTimeout(function(){	fLayerPopClose(win_id);	},100);
		}
		
	}

	function doSearchSheet(){
		$("#fevent").val("GET_ITEM_LIST");
		var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/BidResolution_sheet.screen";
		Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
	}
	
	function doSearchsheet3(){
		$("#fevent").val("GET_REPORT_EMP_LIST");
		var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/BidResolution_sheet.screen";
		Modular.view.IBSheet7.doSearch(sheet3, url, jQuery("#form1"), 30, "");
	}
	
	function doSaveSheet3(){
		$("#fevent").val("REPORT_EMP_UPDATE");
		var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/BidResolution_sheet.screen";
		var result = Modular.view.IBSheet7.doSave(sheet3, url, $("#form1"), false);
	}
	
	function sheet3_OnSaveEnd(code, msg)
	{
		var event = $("#fevent").val();
		if(event == "SET_REPORT_EMP_DELETE"){
			if(code>= "0"){
				alert("삭제되었습니다.");
				doSearchSheet3();
			}else{
				alert("에러가 발생하였습니다.\n"+msg);
				document.form1.isSubmit = false;
			}
		}else if(event == "REPORT_EMP_UPDATE"){
			if(code>= "0"){
				if(btn_act == "to_appr"){
					document.form1.isSubmit = false;
					var f = document.form1;
					var sign_bid_no = jQuery("#BID_NO").val();
					var sign_bid_deg = jQuery("#BID_DEG").val();
					var sign_vendor_cd = jQuery("#VENDOR_CD").val();
					var AMT_HIDDEN = jQuery("#AMT_HIDDEN").val();
					
					dlgSignForm('ebid_ppoD', '/bid/purchase/BidSuccessSign.screen?sign_bid_no='+sign_bid_no+'^sign_bid_deg='+sign_bid_deg+'^sign_vendor_cd='+sign_vendor_cd+'^acct_id='+'<%=user.get("ACCT_ID")%>'+'^AMT_HIDDEN='+AMT_HIDDEN);
				} else {
					alert("저장되었습니다.");
					refresh();
				}
			}else{
				alert("에러가 발생하였습니다.\n"+msg);
				document.form1.isSubmit = false;
			}
		}
	}
	
	function refresh(){//저장
		$("#fevent").val("FORM_SELECT");
		$("#form1").attr("action", "/bid/purchase/BidResolution.screen");
		$("#form1").attr("target", "_self");
		$("#form1").attr("method", "post");
		$("#form1").submit();
	}
	
	//결재
	function dlgSignForm( sign_class_cd, uri ) {
		var f = document.form1;
		var sheet1 = document.all.sheet1;
		var url = "/bidPurchaseSign/BidSuccessSign_form.screen";
		url += "?sign_class_cd=" + sign_class_cd;
		url += "&uri="           + uri;
		url += "&sign_bid_no="   + $("#BID_NO").val();
		url += "&sign_bid_deg="   + $("#BID_DEG").val();
		url += "&sign_vendor_cd="   + $("#VENDOR_CD").val();
		url += "&acct_type=1" ;
		window.open(url, "_blank","width=200,height=100,SCROLLBARS=no");
		window.focus();
	}

	


	/**
	 *	IBSheet object initialize
	 */
	function gridInit(sheetName){
		var init_sheet = {};
		if(sheetName.id == "sheet1"){
			init_sheet.Cfg = {SearchMode:2, Page:30 , MergeSheet:msHeaderOnly};
			init_sheet.Cols = [
			    			{Header:'Status|Status',							Type:"Status", 			SaveName:"STATUS", 					Width:0, 		Align:"Center",	Hidden:"True"},
			    			{Header:'자재코드|자재코드',								Type:"Seq", 			SaveName:"MATERIAL_CD",				Width:0, 		Align:"Center",	Hidden:"True"},
			    			{Header:'자재명|자재명',								Type:"Text", 			SaveName:"MATERIAL_NAME", 			Width:200,		Align:"Left", Edit:false},
			    			{Header:'규격|규격',									Type:"Text", 			SaveName:"MATERIAL_SPEC", 			Width:150,		Align:"Left", Edit:false},
			    			{Header:'단위|단위',									Type:"Text", 			SaveName:"UNIT_KIND_NM", 			Width:100, 		Align:"Center", Edit:false},
			    			{Header:'견적의뢰 수량|견적의뢰 수량',						Type:"Float", 			SaveName:"QTY", 					Width:120, 		Align:"Right", Edit:false, PointCount:2},
			    			{Header:'낙찰수량|낙찰수량',								Type:"Float",	 		SaveName:"SELECT_QTY", 				Width:120, 		Align:"Right", Edit:false, PointCount:2},
			    			{Header:'낙찰단가|낙찰단가',								Type:"Text", 			SaveName:"UNIT_COST", 				Width:120, 		Align:"Right", Edit:false},
			    			{Header:'낙찰금액|낙찰금액',								Type:"Text", 			SaveName:"SELECT_AMT", 				Width:120, 		Align:"Right", Edit:false},
			    			
			];
			init_sheet.HeaderMode = {Sort:1,HeaderCheck:false};
			sheetName.SetEditable(false);
		}else if(sheetName.id == "sheet3"){
			init_sheet.Cfg = {SearchMode:2, Page:30,MergeSheet:msHeaderOnly,SizeMode:1};
			init_sheet.Cols = [
				       		{Header:'삭제',			Type:"DelCheck",		SaveName:"DEL_CHECK", 		Width:0, 		Align:"Center"},
				    		{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:'계정ID',		Type:"Text", 			SaveName:"ACCT_ID", 		Width:0, 		Align:"Center", Hidden:"True"},
   			    			{Header:'이름',			Type:"Text", 			SaveName:"USER_NAME", 		Width:100, 		Align:"Center", Edit:false},
   			    			{Header:'부서명',			Type:"Text", 			SaveName:"BUSEO_NAME", 		Width:150, 		Align:"Left", 	Edit:false},
   			    			{Header:'직위명',			Type:"Text", 			SaveName:"GRADE_NAME", 		Width:100, 		Align:"Center", Edit:false}
				];
			init_sheet.HeaderMode = {Sort:1};
		}
		
		
		IBS_InitSheet(sheetName, init_sheet);
		sheetName.SetDataAutoTrim(0);
		setGridSize();
	}
	
	/**
	 *	IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
	 */
	function sheet1_OnSearchEnd(code, message) {
		var fevent = $("#fevent").val();
	    if(code == 0) {
	    	setGridSize();
		} else {
			//조회 에러 수행
			alert(message);
		}
	}
	
	function sheet3_OnSearchEnd(code, message) {
		 if(code == 0) {
			//sheet3.FitColWidth();
			//견적대상 업체 조회
			doSearchSheet();
		} else {
			//조회 에러 수행
			alert(message);
		}
	}
	
	function SearchUser(NAME,CODE,DEPT_YN){
		if(CODE == "PUREMPNO"){
			CODE = "";
			NAME = "";
			GB = "PUREMP";
		}else if(CODE == "SITEDESCCHRGPRSNID"){
			CODE = "";
			NAME = "";
			GB = "SITEDESCCHRGPRSN";
		}else if(CODE == "REPORT_EMP"){
			CODE = "";
			NAME = "";
			GB = "REPORT_EMP";
		}else{
			GB = "";
		}
		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=purchase";
		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])//연락처
		}else if(result[10] == "SITEDESCCHRGPRSN"){
			$("#SITEDESCCHRGPRSNID").val(result[9])//ACCT_ID
			$("#SITEDESCCHRGPRSNNM").val(result[1])//이름
			$("#SITEDESCTELNO").val(result[6])//연락처
			$("#SITEDESCEMAIL").val(result[8])//이메일
		}else if(result[10] == "REPORT_EMP"){
	 		var rowcnt = sheet3.RowCount();
			 if(rowcnt> 0){
				for(var r=0; r < rowcnt; r++)
				{
					var acct_id = sheet3.GetCellValue(r+1,"ACCT_ID");
					if(acct_id == result[9]){
						alert(result[1]+" " +result[5]+ "님은 이미 등록된 보고자 입니다.");
						return;
					}
				}
			} 
	 		//sheetObj.DataAutoTrim = false;
			var row = sheet3.DataInsert(-1);
			sheet3.SetCellValue(row,"ACCT_ID",result[9]);
			sheet3.SetCellValue(row,"USER_NAME",result[1]);
			sheet3.SetCellValue(row,"BUSEO_NAME",result[3]);
			sheet3.SetCellValue(row,"GRADE_NAME",result[5]);
		}
		setTimeout(function(){	fLayerPopClose('_searchUserPopup');},100);
	}
	
	/**
	 *	IBSheet size setting
	 */
	function setGridSize() {
		sheet1.FitColWidth();
	}
	
	
	//첨부파일   
	function doAttachFile(obj,No) {
		var file_div = "bid/purchase/<%=Order.get("BID_NO")%>/";
		 if(obj==''){
			 alert("After you have saved, you can attach a file.");
		}else{ 
			if(No == 1){
				viewFileListNew("<%=Order.get("DOC_ETC_IN")%>", obj.value, document.form1.p_AttachFile1, "N", file_div);
			}else{
				viewFileListNew("<%=Order.get("DOC_ETC_OUT")%>", obj.value, document.form1.p_AttachFile2, "N", file_div);
			}
		} 
	}
	
	function doResult(resultObj) {
		try {
			if( resultObj.getRequestEvent() == "CHK2") {
				if( resultObj.getSuccess() ) {
					document.form1.isSubmit = false;
					if(btn_act == "to_fileDw"){//결재중이 아니면 파일 수정가능
						jQuery("#signCheck").val("");
						doAttachFile2(jQuery("#fileGB").val(), jQuery("#fileID").val());
					}else if(btn_act == "to_fileCk"){//결재중이 아니면 파일 수정가능
						jQuery("#signCheck").val("");
						fileAfterCheck(jQuery("#ckVal").val());
					}else {
						submitXmlRequest("/bid/purchase/BidResolution_process.screen", "PO_CHECK", document.form1, "VALUEOBJECT");
					}					
				} else {
					if(btn_act == "to_fileDw"){
						jQuery("#signCheck").val("N");
						doAttachFile2(jQuery("#fileGB").val(), jQuery("#fileID").val());
					}else if(btn_act == "to_fileCk"){
						jQuery("#signCheck").val("N");
						fileAfterCheck(jQuery("#ckVal").val());
					}else {
						alert("시행결의중입니다.");
					}
					document.form1.isSubmit = false;
					return;
				}
			}
			
			if(resultObj.getRequestEvent() == "PO_CHECK"){
				if( resultObj.getSuccess() ) {
					document.form1.isSubmit = false;				
					var vo = resultObj.getValueObject();
					var cnt = vo.get("cnt");
					if(cnt == 0){
				     	if(btn_act == "to_Save"){
							if (confirm("저장 하시겠습니까?")){
								if($("#DELI_FROM_DY").val()>$("#DELI_TO_DY").val()||$("#DELI_FROM_DY").val()==""||$("#DELI_TO_DY").val()==""){
									alert("Delivery Period를 확인해주세요.");
									$("#DELI_TO_DY").focus();
									return;
								}
								jQuery("#fevent").val("SAVE_DATA");
								submitXmlRequest("/bid/purchase/BidResolution_process.screen", "SAVE_DATA", document.form1, "SUCCESS");
							}
						}else if(btn_act == "to_appr"){
							 if (confirm("결재 하시겠습니까?")){
								if($("#DELI_FROM_DY").val()>$("#DELI_TO_DY").val()||$("#DELI_FROM_DY").val()==""||$("#DELI_TO_DY").val()==""){
									alert("Delivery Period를 확인해주세요.");
									$("#DELI_TO_DY").focus();
									return;
								}								
								jQuery("#fevent").val("SAVE_APPR");
								submitXmlRequest("/bid/purchase/BidResolution_process.screen", "SAVE_APPR", document.form1, "SUCCESS");
							 }
						}
					}else{
						alert("중복된 계약 번호가 있습니다.");
					}
				}else {
					dlgErrorMsg(resultObj);
				}
			}
		
			if( resultObj.getRequestEvent() == "SAVE_DATA") {
				if( resultObj.getSuccess() ) {
					doSaveSheet3();
					/* alert("저장되었습니다.");
					document.form1.isSubmit = false; */
				}
				else {
					dlgErrorMsg(resultObj);
				}
			}

			if( resultObj.getRequestEvent() == "SAVE_APPR") {
				if( resultObj.getSuccess() ) {
					doSaveSheet3();
					<%-- document.form1.isSubmit = false;
					var f = document.form1;
					var sign_bid_no = jQuery("#BID_NO").val();
					var sign_bid_deg = jQuery("#BID_DEG").val();
					var sign_vendor_cd = jQuery("#VENDOR_CD").val();
					var AMT_HIDDEN = jQuery("#AMT_HIDDEN").val();
					
					dlgSignForm('ebid_ppoD', '/bid/purchase/BidSuccessSign.screen?sign_bid_no='+sign_bid_no+'^sign_bid_deg='+sign_bid_deg+'^sign_vendor_cd='+sign_vendor_cd+'^acct_id='+'<%=user.get("ACCT_ID")%>'+'^AMT_HIDDEN='+AMT_HIDDEN); --%>
				}
				else {
					dlgErrorMsg(resultObj);
				}
			}
			
			if(resultObj.getRequestEvent() == "GET_ATTACHFILE")
	    	{
	    		if( resultObj.getSuccess() ) {				
					document.form1.p_AttachFile3.value = resultObj.getValueObject().get("AttachFile");
				}else {
					dlgErrorMsg(resultObj);
				}
				document.form1.isSubmit = false;
	    	}
			
			document.form1.isSubmit = false;
		} catch(errorObject) {
			showErrorDlg("doResult()", errorObject);
		}
	}
	
	function sheet1_OnSmartResize(Width, Height) { 
		sheet1.FitColWidth();
		autoResize();
	}

	function autoResize(){
		//var t1_height = document.getElementById("t1").scrollHeight + 10;
		var iframeHeight= 200;   
		var iframeWidth= document.body.scrollWidth;   
		sheet1.SetSheetHeight(160);
	}	
	
	//2015.02.27 mklee 실행대비율 자동계산 추가 
	function act_rate(){
		var cont = $("#CONT_AMT").val();
		if(cont == "")
			cont = 0;
		else
			cont = cont.replace(/,/gi,"");
		
		var act = $("#ACT_AMT").val();
		if(act == "")
			act = 0;
		else
			act = act.replace(/,/gi,"");
		
		if(cont > 0 && act > 0){
			var rate = Number(act)/Number(cont) * 100;
			$("#ACT_RATE").val(Math.round(rate *10)/10);
		}else{
			$("#ACT_RATE").val("0");
		}
	}
	
	function btnEvent(num){
		if(num == '1')
			$("#btn_list").click();
		if(num == '2')
		if(num == '3')
			 $("#btn_defer").click();
		if(num == '4')
			$("#btn_cancel").click();
	}
	
	
	
	function DisqReasonClose(returnValue){
		if(returnValue != null){
			if(returnValue[1].length > 0){
				sheet1.SetCellValue(returnValue[0],"DISQ_REASON",returnValue[1]);
				sheet1.SetCellValue(returnValue[0],"DISQ_YN","[수정]");
				sheet1.SetCellEditable(returnValue[0], "SUCC_YN", false);
			}else{
				sheet1.SetCellValue(returnValue[0],"DISQ_REASON","");
				sheet1.SetCellValue(returnValue[0],"DISQ_YN","[등록]");
				sheet1.SetCellEditable(returnValue[0], "SUCC_YN", true);
			}
		}
		setTimeout(function(){fLayerPopClose("_DisqPop");},100);
	}
	
	function doSignFile(doc_id){
		//alert(doc_id);
		if(doc_id == ""){
			alert("결재 정보가 없습니다.");
			return;
		}
		var doc_chk = doc_id.substring(doc_id.length-3, doc_id.length);
		
		doc_chk = doc_chk * 1;
		
		var link = "";
		var year = "<%=sign_info.get("year") %>";
		if (year > "20151213") {
			link = "<%=gwurl%>upload_approval/TEC/doc/" + year.substr(0,4) + "/" + doc_chk + "/"+ doc_id+".mht";
		}
		else{
			link = "<%=gwurl%>upload_approval/TEC/doc/" + doc_chk + "/"+ doc_id+".mht";
		}
		//var popOption = "width=400, height=450, resizable=no, scrollbars=auto, status=no;";    //팝업창 옵션(optoin)
		
		window.open(link,"_viewDraft","");	
	}
	
	function fileCheck(val){
		var f = document.form1;
		jQuery("#ckVal").val(val);				
		submitXmlRequest("/bid/signidentify.screen", "CHK2", f, "SUCCESS");
		btn_act = "to_fileCk";
		document.form1.isSubmit = false;
	}

	function doAttachFile2(fileGB, id, editYN) {		
		if(fileGB != ''){ 
			var file_div = "bid/purchase/succfile/<%=Order.get("BID_NO")%>/";
			var upLoadFlg = "Y";
			if((jQuery("#signCheck").val() != "") || (jQuery("#fileEditYN").val() == "N")){
				upLoadFlg = "N";
			}
			viewFileListNew1(fileGB, id, document.form1.p_AttachFile4, upLoadFlg, file_div, null, null);
		} 
	}

	function viewFileListNew1(fileGB, id, obj, isModify, isDrectory, iframeID, user_filename) {
		
		var win_id = "_viewFileList";
		var link = "/common/file/FileListNew.screen";
		    link += "?pop_win_id="+win_id;
		    link += "&extFunction=viewFileListClose1";
		    link += "&file_gb=" + fileGB;
		    link += "&id=" + id;
		    
		    if( obj.id != null )
			    link += "&obj_id=" + obj.id;
		    if( iframeID != null )
		    	link += "&iframeID=" + iframeID;
		    
			if( isModify != null )
				link += "&is_modify=" + isModify;
			if( isDrectory != null )
				link += "&sys_gb=" + isDrectory;	    
			if( user_filename != null )
				link += "&user_filename=" + user_filename;	 
		
		fLayerPop(win_id, link, 750,430, '', '', 'NO', '200');
	}
	
	function fileAfterCheck(val){		
		if(!jQuery("#signCheck").val() == ""){
			var obj = eval("document.getElementById('p_" + val + "')");
			alert("결재중엔 파일 수정이 불가합니다.");
			jQuery(obj).attr("checked",false);
			return;
		}else{
			var obj = eval("document.getElementById('" + val + "')");
			if(obj.style.display == "none"){
				obj.style.display = "inline";
			}else{
				obj.style.display = "none";
			}
		}		
	}
	
	//첨부목록 조회
	function getFileListForTextarea(){
		document.form1.p_AttachFile3.value = "";
		var f = document.form1;  
		jQuery("#fevent").val("GET_ATTACHFILE");
		submitXmlRequest("/bid/purchase/BidResolution_process.screen", "GET_ATTACHFILE", f, "VALUEOBJECT");	
	}	
	
	function doDupChk(fileGB, id, editYN) {
		var f = document.form1;		
		jQuery("#fileGB").val(fileGB);
		jQuery("#fileID").val(id);
		jQuery("#fileEditYN").val(editYN);
		
		submitXmlRequest("/bid/signidentify.screen", "CHK2", f, "SUCCESS");
		btn_act = "to_fileDw";
		document.form1.isSubmit = false;				
	}
	
    function open_bidamtpop(bidno, biddeg, vendorcd, vendor_name, esti_tot_amt, file_gb, div_po_yn, demanded_id) {
        var win_id = "_BidAmtPop";
        var link = "http://ebid.sgcenc.co.kr:80/bid/purchase/SignBidAmtPop.screen";
        link += "?pop_win_id=" + win_id; link += "&VENDOR_CD=" + vendorcd;
        link += "&BID_NO=" + bidno;
        link += "&BID_DEG=" + biddeg;
        link += "&FILE_GB=" + file_gb;
        link += "&VENDOR_NO=" + vendorcd;
        link += "&VENDOR_NAME=" + vendor_name;
        link += "&ESTI_TOT_AMT=" + esti_tot_amt;
        link += "&DIV_PO_YN=" + div_po_yn;
        link += "&DEMANDED_ID=" + demanded_id;
        window.open(link, win_id, "toolbar=no, width=1000, height=600, top=50, left=40, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new");
    }	
</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="">
<!-- List Search -->
<INPUT type="hidden" name="P_BID_MASTER_NM" id="P_BID_MASTER_NM" value="<%= params.get("P_BID_MASTER_NM") %>">
<INPUT type="hidden" name="p_dept_nm" id="p_dept_nm" value="<%= params.get("p_dept_nm") %>">
<INPUT type="hidden" name="p_dept_cd" id="p_dept_cd" value="<%= params.get("p_dept_cd") %>">
<INPUT type="hidden" name="p_demanded_status" id="p_demanded_status" value="<%= params.get("p_demanded_status") %>">
<!-- List Search -->  
<INPUT type='hidden' name="VENDOR_CD" value="<%= params.get("vendor_cd") %>">
<INPUT type='hidden' name="signClass" value="ebid_ppoD">
<%-- <INPUT type='hidden' name="PBC_CBE_TYPE_CD" value="<%=Order.get("PBC_CBE_TYPE_CD")%>"> --%>
<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="DIV_PO_YN" value="<%=Order.get("DIV_PO_YN")%>">
<INPUT type='hidden' name="ONBID_YN" value="<%=Order.get("ONBID_YN")%>">
<INPUT type='hidden' name="ONBID_YN_NM" value="<%=Order.get("ONBID_YN_NM")%>">
<INPUT type='hidden' name="DELIVERY_CONDITION_YN" value="<%=Order.get("DELIVERY_CONDITION_YN")%>">
<INPUT type='hidden' name="PBC_LANDTRAN_YN" value="<%=Order.get("PBC_LANDTRAN_YN")%>">
<INPUT type='hidden' name="PBC_PACK_YN" value="<%=Order.get("PBC_PACK_YN")%>">
<INPUT type='hidden' name="PBC_DOC_YN" value="<%=Order.get("PBC_DOC_YN")%>">
<INPUT type='hidden' name="PBC_TEST_YN" value="<%=Order.get("PBC_TEST_YN")%>">
<INPUT type='hidden' name="PBC_SPETOOL_YN" value="<%=Order.get("PBC_SPETOOL_YN")%>">
<INPUT type='hidden' name="PBC_COMMISS_YN" value="<%=Order.get("PBC_COMMISS_YN")%>">
<INPUT type='hidden' name="PBC_INSTALL_YN" value="<%=Order.get("PBC_INSTALL_YN")%>">
<INPUT type='hidden' name="CURRENCY_GB_YN" value="<%=Order.get("CURRENCY_GB_YN")%>">
<INPUT type='hidden' name="PBC_FEE_YN" value="<%=Order.get("PBC_FEE_YN")%>">
<INPUT type='hidden' name="PBC_OPTION_YN" value="<%=Order.get("PBC_OPTION_YN")%>">
<INPUT type='hidden' name="CONTFUL_RATE" value="<%=Order.get("CONTFUL_RATE")%>">
<INPUT type='hidden' name="CURRENCY_GB" value="<%=Order.get("CURRENCY_GB")%>">
<INPUT type='hidden' name="PBC_OPTION_COMMENT" value="<%=Order.get("PBC_OPTION_COMMENT")%>">
<INPUT type='hidden' name="CBC_DAMAGE_RATE" value="<%=Order.get("CBC_DAMAGE_RATE")%>">
<INPUT type='hidden' name="CBC_DAMAGE_MAXRATE" value="<%=Order.get("CBC_DAMAGE_MAXRATE")%>">
<INPUT type='hidden' name="FOREIGN_CHK" value="<%=Order.get("FOREIGN_CHK")%>">

<INPUT type='hidden' name="PBC_FRSTGUAR_RATE" value="<%=Order.get("PBC_FRSTGUAR_RATE")%>">
<INPUT type='hidden' name="WARR_RATE" value="<%=Order.get("WARR_RATE")%>">
<INPUT type='hidden' name="PBC_DEFECT_CONDI" value="<%=Order.get("PBC_DEFECT_CONDI")%>">
<INPUT type='hidden' name="CBC_DEFECT_DAY" value="<%=Order.get("CBC_DEFECT_DAY")%>">
<INPUT type='hidden' name="CBC_DERECT_TERM_NM" value="<%=Order.get("CBC_DERECT_TERM_NM")%>">
<INPUT type='hidden' name="CBC_DERECT_TERM_CD" value="<%=Order.get("CBC_DERECT_TERM_CD")%>">
<INPUT type='hidden' name="KRW_APPR_YN" value="<%=Order.get("KRW_APPR_YN")%>">
<INPUT type='hidden' name="FOR_PO" value="<%=Order.get("FOR_PO")%>">
<INPUT type='hidden' name="SITEPARTI_YN" value="Y">

<INPUT type='hidden' name="TBE_FLAG" value="<%=Order.get("TBE_FLAG")%>">

<INPUT type='hidden' name="H_CBC_FIRST_RATE" value="<%=Order.get("CBC_FIRST_RATE")%>">
<INPUT type='hidden' name="H_PBC_FIRST_CONDI" value="<%=Order.get("PBC_FIRST_CONDI")%>">
<INPUT type='hidden' name="H_CPC_MID_RATE" value="<%=Order.get("CPC_MID_RATE")%>">
<INPUT type='hidden' name="H_PBC_MID_CONDI" value="<%=Order.get("PBC_MID_CONDI")%>">
<INPUT type='hidden' name="H_PBC_REST_RATE" value="<%=Order.get("PBC_REST_RATE")%>">
<INPUT type='hidden' name="H_PBC_REST_CONDI" value="<%=Order.get("PBC_REST_CONDI")%>">

<INPUT type="hidden" id="signCheck" value="">
<INPUT type="hidden" id="ckVal" value="">
<INPUT type="hidden" id="fileGB" value="">
<INPUT type="hidden" id="fileID" value="">
<INPUT type="hidden" id="fileEditYN" value="">
<input type="hidden" name="p_AttachFile4" id="p_AttachFile4" onPropertyChange="JavaScript:getFileListForTextarea();"/>
<INPUT type="hidden" id="DOC_ETC_OUT" value="<%=Order.get("DOC_ETC_OUT")%>">
<INPUT type="hidden" id="TOT_FILE_GB" value="<%=Order.get("TOT_FILE_GB")%>">

<table width="100%">
	<colgroup>
		<col width="*" />
		<col width="320" />
	</colgroup>
	<tr>
   		<th>
			<div align="left" id="title">
			    <ul><li>구매_시행결의 작성</li></ul>
			</div> 
   		</th>
   		<td align="right">
				<span class="btnSearch center" id="btn_Save"><a href="javascript:void(0);">저장</a></span>
				<span class="btnSearch center" id="btn_appr"><a href="javascript:void(0);">결재</a></span>
				<span class="btnSearch center" id="btn_list"><a href="javascript:void(0);">목록</a></span>
   		</td>
  	</tr>
</table>

<%if(o_reason ){ %>
<TABLE class="form-table">
	<colgroup>
		<col width="160">
		<col/>
	</colgroup>
  
   <%if(o_reason){ %>
  <TR height="25">
    <TH>개찰 특기사항</TH>
	<TD><%=StringUtils.cvtHTML(Order.get("OPEN_OPINION"))%></TD>
  </TR>
  <%} %>
  </TABLE>
 <%} %>
   
<div class="application-info magT10">
	<div class="application-sub-title">
		<span class="title">발주의뢰정보</span>
	</div>
</div>

<!-- 발주의뢰정보 : 시작 -->

<TABLE class="form-table">
	<colgroup>
		<col width="160"/>
		<col width="23%">
		<col width="160"/>
		<col width="23%">
		<col width="160"/>
		<col/>
	</colgroup>
  <TR height="25"> 
    <TH> 현장</TH>
	<TD><%=Order.get("dept_nm") %></TD>
	<TH> 발주의뢰번호</TH>
	<TD><a href="javascript:doSignFile('<%=sign_info.get("doc_id") %>');"><%=Order.get("DEMANDED_NO")%></a>
	 </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><%= Order.get("PAY_ITEM_NM") %></TD> 	
	<TH> 구매예산 (원)</TH>  <!-- 2015.02.27 구매예산추가 mklee -->
	<TD><%=  Formatter2.currency(Order.get("PUR_AMT"),0)%></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>
  <!-- 발주의뢰정보 : 종료 -->
</table>

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

<TABLE class="form-table">
	<colgroup>
		<col width="160"/>
		<col width="160"/>
		<col width="25%"/>
		<col width="160"/>
		<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_NM")%>            
	</TD>
  </TR>


  <TR height="25"> 
	<TH> 입찰명</TH>
	<TD colspan="2"> 
		<%=Order.get("BID_MASTER_NM")%> 
	</TD>
	<TH>단가계약여부</TH>
	<TD colspan="2"><%=Order.get("DIV_PO_YN").equals("Y") ? "예" : "아니오" %></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 magT15">
	<div class="application-sub-title">
		<span class="title">입찰조건</span>
	</div>
</div>

<TABLE class="form-table">
	<colgroup>
		<col width="160"/>
		<col width="23%">
		<col width="160"/>
		<col width="23%">
		<col width="160"/>
		<col/>
	</colgroup>
  <TR height="25"> 
  	<TH>선급금</TH>
	<TD><%= InputText.get("H_CBC_FIRST_RATE", Order.get("CBC_FIRST_RATE"), 5, 3, "Right,Number,readOnly","Number" ) %>% <%= InputText.get("H_PBC_FIRST_CONDI", Order.get("PBC_FIRST_CONDI"), 20, 50, "readOnly") %></TD>
	<TH>중도금</TH>
	<TD><%= InputText.get("H_CPC_MID_RATE", Order.get("CPC_MID_RATE"), 5, 3, "Right,Number,readOnly","Number") %>% <%= InputText.get("H_PBC_MID_CONDI", Order.get("PBC_MID_CONDI"), 20, 50, "readOnly") %></TD>
	<TH>잔금</TH>
	<TD><%= InputText.get("H_PBC_REST_RATE", Order.get("PBC_REST_RATE"), 5, 3, "Right,Number,readOnly","Number") %>% <%= InputText.get("H_PBC_REST_CONDI", Order.get("PBC_REST_CONDI"), 20, 50, "readOnly") %></TD>
  </TR>
  <TR height="25"> 
	<TH>First Payment Bond</TH><!-- 선급금이행증권(yes, no) -->
	<TD>
		<%=Order.get("PBC_FRSTGUAR_RATE")%>% <%=Order.get("PBC_FRSTGUAR_CONDI")%>
	</TD>
	<TH>Performance Bond</TH><!-- 계약이행증권(yes, no) -->
	<TD>
		<%=Order.get("CONTFUL_RATE")%>% <%=Order.get("CONTFUL_CONDI")%>
	</TD>
	<TH>Guarantee Bond</TH><!-- 하자이행증권(yes, no) -->
	<TD>
		<%=Order.get("WARR_RATE")%>% <%=Order.get("WARR_CONDI")%>
	</TD>	
  </TR>  
  <TR height="25"> 
	<TH>Guarantee Period</TH><!-- 하자보수기간 -->
	<TD colspan="5">
	<%=Order.get("PBC_DEFECT_CONDI") %> <%=Order.get("CBC_DEFECT_DAY") %> 
	<% if(!Order.get("CBC_DERECT_TERM_NM").isEmpty()){ %><%=Order.get("CBC_DERECT_TERM_NM") %>간<%} %> 
	</TD>
  </TR>  
</TABLE>

<div class="application-info magT15">
	<div class="application-sub-title">
		<span class="title">업체입찰내역</span>
	</div>
</div>

<TABLE class="form-table">
	<colgroup>
		<col width="160"/>
		<col width="23%">
		<col width="160"/>
		<col width="23%">
		<col width="160"/>
		<col/>
	</colgroup>
  <TR height="25"> 
	<TH>통화구분</TH>
	<TD><%=Vendor.get("CURRENCY_GB_NM") %> &nbsp&nbsp  
	</TD>
	<TH>CBE문서 TYPE</TH>
	<TD colspan="3">
	    <LABEL for="pbc_cbe_type_1"><INPUT id="pbc_cbe_type_1" type="radio" name="PBC_CBE_TYPE_CD" value="A" desc="CBE문서 TYPE" <%=Order.get("PBC_CBE_TYPE_CD").equals("A") ? "checked=\"checked\"" : "" %> > A type</LABEL>
		<LABEL for="pbc_cbe_type_2"><INPUT id="pbc_cbe_type_2" type="radio" name="PBC_CBE_TYPE_CD" value="B" desc="CBE문서 TYPE" <%=Order.get("PBC_CBE_TYPE_CD").equals("B") ? "checked=\"checked\"" : "" %> > B type</LABEL>
	    <LABEL for="pbc_cbe_type_3"><INPUT id="pbc_cbe_type_3" type="radio" name="PBC_CBE_TYPE_CD" value="C" desc="CBE문서 TYPE" <%=Order.get("PBC_CBE_TYPE_CD").equals("C") ? "checked=\"checked\"" : "" %> > C type(최종입찰업체만 표시)</LABEL>
	</TD>	
  </TR>
  <TR height="25"> 
	<TH>Installation</TH><!-- 설치비 포함여부 -->
	<TD><%=Vendor.get("INSTALL_YN").equals("Y") ? "included" : "not included" %></TD>
	<TH>Spare Parts for Commissionig</TH><!-- 시운전 포함여부 -->
	<TD><%=Vendor.get("COMMISS_YN").equals("Y") ? "included" : "not included" %></TD>
	<TH>Special Tool</TH><!-- 설치비 특별공구 포함여부 -->
	<TD><%=Vendor.get("SPETOOL_YN").equals("Y") ? "included" : "not included" %></TD>	
  </TR>
  <TR height="25"> 
	<TH>Test & Inspection at Fabrication shop</TH><!-- 샾(공장) 검사비용 포함여부 -->
	<TD><%=Vendor.get("TEST_YN").equals("Y") ? "included" : "not included" %></TD>
	<TH>Documentation</TH><!-- vendor print  (무조건 포함)  삭제? -->
	<TD><%=Vendor.get("DOC_YN").equals("Y") ? "included" : "not included" %></TD>
	<TH>Packing cost</TH><!-- 포장비용 포함여부 -->
	<TD><%=Vendor.get("PACK_YN").equals("Y") ? "included" : "not included" %></TD>	
  </TR>
  <TR height="25"> 
	<TH>Inland Transportaion</TH><!-- 내륙운송비 -->
	<TD><%=Vendor.get("LANDTRAN_YN").equals("Y") ? "included" : "not included" %></TD>
	<TH>Delivery Condition</TH><!-- 인도조건 (현장도착도, 현장상차도,현장설치도, 설치시운전도) -->
	<TD colspan="3">
	  <%=Vendor.get("DELIVERY_CONDITION_NM") %>&nbsp&nbsp  <%=Order.get("DELIVERY_CONDITION_YN").equals("Y") ? "[업체변경가능]" : "[업체 변경 불가능]" %></TD>
  </TR>
   <TR height="25"> 
	<TH>OPTIONAL PRICE</TH><!-- 현장감독관 일당   &     기타일당 내역 -->
	<TD colspan="5">A. Supervision fee &nbsp <%=Order.get("FEE_NOTI") %>
	    <% if(!Order.get("OPTION_NOTI").isEmpty()){ %>&nbsp&nbsp  B. <%= Order.get("OPTION_NOTI")%> &nbsp;<%} %></TD>
  </TR>
  <TR height="25"> 
	<TH>Liquidated Damages</TH><!-- 지체상금 fix -->
	<TD colspan="5"><%= InputText.get("CBC_DAMAGE_RATE2", Merge.get("CBC_DAMAGE_RATE"), 5, 6, "Right,Float","Float") %>% <%=CommCodeManager.getSelectCodeList("LIQ_DMG_CD","CBC_DAMAGE_CD","height=18;","",Merge.get("CBC_DAMAGE_CD")) %>, Max <%= InputText.get("CBC_DAMAGE_MAXRATE2", Merge.get("CBC_DAMAGE_MAXRATE"), 5, 6, "Right,Float","Float") %>%
	</TD>
  </TR>
  <TR height="25"> 
	<TH>선급금</TH>
	<TD><%= InputText.get("CBC_FIRST_RATE", Merge.get("CBC_FIRST_RATE"), 5, 3, "Right,Number","Number" ) %>% <%= InputText.get("PBC_FIRST_CONDI", Merge.get("PBC_FIRST_CONDI"), 20, 50,"Left") %></TD>
	<TH>중도금</TH>
	<TD><%= InputText.get("CPC_MID_RATE", Merge.get("CPC_MID_RATE"), 5, 3, "Right,Number","Number") %>% <%= InputText.get("PBC_MID_CONDI", Merge.get("PBC_MID_CONDI"), 20, 50,"Left") %></TD>
	<TH>잔금</TH>
	<TD><%= InputText.get("PBC_REST_RATE", Merge.get("PBC_REST_RATE"), 5, 3, "Right,Number","Number") %>% <%= InputText.get("PBC_REST_CONDI", Merge.get("PBC_REST_CONDI"), 20, 50,"Left") %></TD>
	<%-- <TH>선급금</TH>
	<TD><% if(!Order.get("CBC_FIRST_RATE").isEmpty()){ %><%=Order.get("CBC_FIRST_RATE") %>% <%} %><%= Order.get("PBC_FIRST_CONDI")%></TD>
	<TH>중도금</TH>
	<TD><% if(!Order.get("CPC_MID_RATE").isEmpty()){ %><%= Order.get("CPC_MID_RATE")%>% <%} %><%=Order.get("PBC_MID_CONDI")%></TD>
	<TH>잔금</TH>
	<TD><% if(!Order.get("PBC_REST_RATE").isEmpty()){ %><%= Order.get("PBC_REST_RATE") %>% <%} %><%=Order.get("PBC_REST_CONDI")%></TD> --%>	
  </TR>
  <%if(!Merge.get("FRSTGUAR_YN").equals("Y") || !Merge.get("CONTFUL_YN").equals("Y") || !Merge.get("WARR_YN").equals("Y")){ %>
  <TR height="75"> 
	<TH>First Payment Bond</TH><!-- 선급금이행증권(yes, no) -->
	<TD>
			<%= InputText.get("PBC_FRSTGUAR_RATE2", Merge.get("PBC_FRSTGUAR_RATE"), 5, 3, "Right,Number","Number") %>% <%= InputText.get("PBC_FRSTGUAR_CONDI", Merge.get("PBC_FRSTGUAR_CONDI"), 20, 50, "") %>
			</br></br>
			<TEXTAREA name="FRSTGUAR_NOT_NOTI" id="FRSTGUAR_NOT_NOTI" style="width:98%;" rows="2" class="input" readOnly><%=Merge.get("FRSTGUAR_NOT_NOTI") %></TEXTAREA>
	</TD>
	<TH>Performance Bond</TH><!-- 계약이행증권(yes, no) -->
	<TD>
			<%= InputText.get("CONTFUL_RATE2", Merge.get("CONTFUL_RATE"), 5, 3, "Right,Number","Number") %>% <%= InputText.get("CONTFUL_CONDI", Merge.get("CONTFUL_CONDI"), 20, 50, "") %>
			</br></br>
			<TEXTAREA name="CONTFUL_NOT_NOTI" id="CONTFUL_NOT_NOTI" style="width:98%;" rows="2" class="input" readOnly><%=Merge.get("CONTFUL_NOT_NOTI") %></TEXTAREA>
	</TD>
	<TH>Guarantee Bond</TH><!-- 하자이행증권(yes, no) -->
	<TD>
			<%= InputText.get("WARR_RATE2", Merge.get("WARR_RATE"), 5, 3, "Right,Number","Number") %>% <%= InputText.get("WARR_CONDI", Merge.get("WARR_CONDI"), 20, 50, "") %>
			</br></br>
			<TEXTAREA name="WARR_NOT_NOTI" id="WARR_NOT_NOTI" style="width:98%;" rows="2" class="input" readOnly><%=Merge.get("WARR_NOT_NOTI") %></TEXTAREA>
	</TD>	
  </TR> 
  <%}else{ %> 
  <TR height="25"> 
	<TH>First Payment Bond</TH><!-- 선급금이행증권(yes, no) -->
	<TD><%= InputText.get("PBC_FRSTGUAR_RATE2", Merge.get("PBC_FRSTGUAR_RATE"), 5, 3, "Right,Number","Number") %>% <%= InputText.get("PBC_FRSTGUAR_CONDI", Merge.get("PBC_FRSTGUAR_CONDI"), 20, 50, "") %>
	</TD>
	<TH>Performance Bond</TH><!-- 계약이행증권(yes, no) -->
	<TD>
		<%= InputText.get("CONTFUL_RATE2", Merge.get("CONTFUL_RATE"), 5, 3, "Right,Number","Number") %>% <%= InputText.get("CONTFUL_CONDI", Merge.get("CONTFUL_CONDI"), 20, 50, "") %>
	</TD>
	<TH>Guarantee Bond</TH><!-- 하자이행증권(yes, no) -->
	<TD>
		<%= InputText.get("WARR_RATE2", Merge.get("WARR_RATE"), 5, 3, "Right,Number","Number") %>% <%= InputText.get("WARR_CONDI", Merge.get("WARR_CONDI"), 20, 50, "") %>
	</TD>	
  </TR> 
  <%} %>
	<%if(Merge.get("DEFECT_YN").equals("Y")){ %>
  <TR height="75"> 
	<TH>Guarantee Period</TH><!-- 하자보수기간 -->
	<TD colspan="3">
		<%= InputText.get("PBC_DEFECT_CONDI_O", Merge.get("PBC_DEFECT_CONDI"), 25, 50, "") %> <%= InputText.get("CBC_DEFECT_DAY_O", Merge.get("CBC_DEFECT_DAY"), 2, 2, "Number","Number") %>  
		<%=CommCodeManager.getSelectCodeList("CBC_DERECT_TERM_CD","CBC_DERECT_TERM_CD_O","height=18;","<option value=''>--선택--</option>",Merge.get("CBC_DERECT_TERM_CD")) %> 간
		<input type="checkbox" id="addGuar" style="margin-top:2px">
		<span class="checkAdd" style="display:none;">&nbsp;or&nbsp;
		<%= InputText.get("PBC_DEFECT_CONDI2_O", Merge.get("PBC_DEFECT_CONDI2"), 25, 50, "") %> <%= InputText.get("CBC_DEFECT_DAY2_O", Merge.get("CBC_DEFECT_DAY2"), 2, 2, "Number","Number") %>  
		<%=CommCodeManager.getSelectCodeList("CBC_DERECT_TERM_CD","CBC_DERECT_TERM_CD2_O","height=18;","<option value=''>--선택--</option>",Merge.get("CBC_DERECT_TERM_CD2")) %> 간 중 선도래일
	</span>
	</br></br>
		<TEXTAREA name="DEFECT_NOT_NOTI" id="DEFECT_NOT_NOTI" style="width:98%;" rows="2" class="input" readOnly><%=Merge.get("DEFECT_NOT_NOTI") %></TEXTAREA>
	</TD>
	
	<TH>Delivery Period</TH><!-- 납기일 fix -->
	<TD>
		<%= InputText.get("DELI_FROM_DY", Merge.get("DELI_FROM_DY"), 10, 50, "hangule,center, desc=납기일,ReadOnly") %>
		<IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('DELI_FROM_DY');"> 
		~
		<%= InputText.get("DELI_TO_DY", Merge.get("DELI_TO_DY"), 10, 50, "hangule,center, desc=납기일,ReadOnly") %>
		<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>
  </TR>  
	<%}else{ %>
  <TR height="25"> 
	<TH>Guarantee Period</TH><!-- 하자보수기간 -->
	<TD colspan="3">
		<%= InputText.get("PBC_DEFECT_CONDI_O", Merge.get("PBC_DEFECT_CONDI"), 25, 50, "") %> <%= InputText.get("CBC_DEFECT_DAY_O", Merge.get("CBC_DEFECT_DAY"), 2, 2, "Number","Number") %>  
		<%=CommCodeManager.getSelectCodeList("CBC_DERECT_TERM_CD","CBC_DERECT_TERM_CD_O","height=18;","<option value=''>--선택--</option>",Merge.get("CBC_DERECT_TERM_CD")) %> 간
		<input type="checkbox" id="addGuar" style="margin-top:2px">
		<span class="checkAdd" style="display:none;">&nbsp;or&nbsp;
		<%= InputText.get("PBC_DEFECT_CONDI2_O", Merge.get("PBC_DEFECT_CONDI2"), 25, 50, "") %> <%= InputText.get("CBC_DEFECT_DAY2_O", Merge.get("CBC_DEFECT_DAY2"), 2, 2, "Number","Number") %>  
		<%=CommCodeManager.getSelectCodeList("CBC_DERECT_TERM_CD","CBC_DERECT_TERM_CD2_O","height=18;","<option value=''>--선택--</option>",Merge.get("CBC_DERECT_TERM_CD2")) %> 간 중 선도래일
	</span>
	</TD>
	
	<TH>Delivery Period</TH><!-- 납기일 fix -->
	<TD>
		<%= InputText.get("DELI_FROM_DY", Merge.get("DELI_FROM_DY"), 10, 50, "hangule,center, desc=납기일,ReadOnly") %>
		<IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('DELI_FROM_DY');"> 
		~
		<%= InputText.get("DELI_TO_DY", Merge.get("DELI_TO_DY"), 10, 50, "hangule,center, desc=납기일,ReadOnly") %>
		<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>
  </TR>  
	<%} %>
</TABLE>

<TABLE class="form-table" style="margin-top: 10px">
		<colgroup>
		<col width="160"/>
		<col width="160"/>
		<col width="25%"/>
		<col width="160"/>
		<col/>
	</colgroup>
  <TR height="25"> 
	<TH> 구매 발주진행율 누계</TH>
	<TD colspan="2"><%= InputText.get("PO_PRC", Order.get("PO_PRC"), 5, 5, "Right,Float","Float") %>%</TD>
	<TH> 구매 발주실적율 누계</TH>
	<TD><%= InputText.get("RES_PRC", Order.get("RES_PRC"), 5, 5, "Right,Float","Float") %>%</TD>	
  </TR>
  <TR height="25"> 
    <TH>주요발주내용</TH>
	<TD colspan="2">
		<textarea name="MAIN_PR_CONTENTS" style="width:98%; height:80px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget"><%=Order.get("MAIN_PR_CONTENTS")%></textarea>		
    </TD>
	
	<TH>입찰업체선정사유</TH>
	<TD>
		<textarea name="BID_SUPP_SELECT_REASON" style="width:98%; height:80px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget"><%=Order.get("BID_SUPP_SELECT_REASON")%></textarea>
	</TD>
  </TR>	
  <TR height="25"> 
    <TH>특이사항 내부</TH>
	<TD colspan="2">
		<%=StringUtils.cvtHTML(Order.get("INNER_REMARKS"))%>
    </TD>
	
	<TH> 특이사항 외부</TH>
	<TD>
	 <%=StringUtils.cvtHTML(Order.get("OUTER_REMARKS"))%>      
	</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>  
  <TR height="25"> 
	<TH> 유관부서 담당자</TH>
	<TD colspan="4">
		<div id="report_emp_btn" style="width:410px; margin-top:5px; text-align: left; height: 25px; vertical-align: top;">
            <span class="btnSearch center"><a href="javascript:void(0);" id="report_emp_add">추가</a></span>
			<span class="btnSearch center"><a href="javascript:void(0);" id="report_emp_del">삭제</a></span>
		</div>	
		<div  id="sheet3_div" style="width: 100%; height: 100%;"> 	
			<script>createIBSheet('sheet3','100%', '100px');</script>
		</div>
	</TD>
  </TR> 
</TABLE>
<!--  
<div class="application-info magT10">
	<div class="application-sub-title">
		<span class="title">낙찰정보</span>
	</div>
</div>-->
<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">	
   				<span class="btnSearch center" id="btn_report"><a href="javascript:void(0);">견적대비표</a></span>
   				<span class="btnSearch center" id="btn_tbecheckpop"><a href="javascript:void(0);">기술검토결과서</a></span>
   		</td>
  	</tr>
</table>


<!-- 낙찰정보 : 시작 -->

<TABLE class="form-table">
	<colgroup>
		<col width="160"/>
		<col width="160"/>
		<col width="25%">
		<col width="160"/>
		<col/>
	</colgroup>
  <TR height="25"> 
    <TH> 업체명</TH>
	<TD colspan="2"><%=Vendor.get("CORP_KOR")%></TD>
	<TH> 대표자</TH>
	<TD><%=Vendor.get("REP_NAME")%></TD>
  </TR>

  <TR height="25"> 
	<TH> 담당자</TH>
	<TD colspan="2" ><%=Vendor.get("CHARGE_NAME") %></TD>
	<TH> 이메일</TH>
	<TD><%= Vendor.get("CHARGE_EMAIL") %></TD> 	
  </TR> 	

  <TR height="25"> 
	<TH> 전화번호</TH>
	<TD colspan="2"><%=Vendor.get("CHARGE_HP") %></TD>
	<TH> 구매예산 (원)</TH>	
	<TD><%= InputText.get("PUR_AMT", Formatter2.currency(Vendor.get("PUR_AMT"),0), 13, 300, "desc=실행예산,Number,right","Number") %></TD>
  </TR> 	

  <TR height="25"> 
	<TH> 도급금액(원)</TH>
	<TD colspan="2"><%= InputText.get("CONT_AMT", Formatter2.currency(Vendor.get("CONT_AMT"),0), 13, 300, "desc=실행예산,Number,right","Number") %></TD>
	<TH> 실행예산 (원)</TH>	
	<TD><%= InputText.get("ACT_AMT", Formatter2.currency(Vendor.get("ACT_AMT"),0), 13, 300, "desc=실행예산,Number,right","Number") %></TD>
  </TR>

  <TR height="25"> 
	<TH> 낙찰총액</TH>
	<%if(Order.get("DIV_PO_YN").equals("Y")){ %>
		<%if(Vendor.getInt("PointCount") > 0){ %>
			<TD colspan="2">
			<%= InputText.get("SELECT_TOT_AMT", Formatter2.currency(Vendor.get("SELECT_TOT_AMT"),Vendor.getInt("PointCount")), 13, 300, "desc=낙찰총개,float,right","float") %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<%= InputText.get("WON_SELECT_TOT_AMT", Formatter2.currency(Vendor.get("WON_SELECT_TOT_AMT"),0), 13, 300, "desc=낙찰총개,Number,right","Number") %>)
			&nbsp;&nbsp;&nbsp;<INPUT type="checkbox" id="AMT_HIDDEN" name="AMT_HIDDEN"  value="N" >숨김
			</TD>
		<%}else{ %>
			<TD colspan="2">
			<%= InputText.get("SELECT_TOT_AMT", Formatter2.currency(Vendor.get("SELECT_TOT_AMT"),0), 13, 300, "desc=낙찰총개,Number,right","Number") %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<%= InputText.get("WON_SELECT_TOT_AMT", Formatter2.currency(Vendor.get("WON_SELECT_TOT_AMT"),0), 13, 300, "desc=낙찰총개,Number,right","Number") %>)
			&nbsp;&nbsp;&nbsp;<INPUT type="checkbox" id="AMT_HIDDEN" name="AMT_HIDDEN" value="N" >숨김
			</TD>
		<%} %>
	<%}else{ %>
	<TD colspan="2"><%=Formatter2.currency(Vendor.get("SELECT_TOT_AMT"),Vendor.getInt("PointCount"))%> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<%=Formatter2.currency(Vendor.get("WON_SELECT_TOT_AMT"),0)%>)
	&nbsp;&nbsp;&nbsp;<INPUT type="checkbox" id="AMT_HIDDEN" name="AMT_HIDDEN" value="N"  >숨김
	</TD>
	<%} %>
	<TH> 분할낙찰 여부</TH>	
	<TD><%= Order.get("DIV_CONT_NM") %></TD>
  </TR>

  <TR height="25"> 
	<TH> 계약번호</TH>
	<TD colspan="4"><INPUT type="text" name="CONF_NO" id="CONF_NO" value="<%=Vendor.get("CONF_NO")%>" maxlength="100" class="input" size="50" style="IME-MODE : disabled;"  desc='계약번호'></TD>
  <%-- <TH> 외국환거래 신고대상</TH>	 
	<TD><%if (Vendor.get("CURRENCY_GB").equals("KRW")) { %>
	    비대상
	<%}else{ %>
	<%= InputText.get("FOREIGN_NM", Order.get("FOREIGN_NM"), 10, 10, "readOnly") %>
	   &nbsp;<span class="btnSearch center" id="btn_foreign"><a href="javascript:void(0);">검토</a></span>
	<%} %>
	</TD>
  </TR> --%>

  <TR height="75"> 
    <TH>특이사항</TH>
	<TD colspan="4"><!-- 저장할때 추가해야됨 -->
	<textarea id="CON_REMARK" style="width:95%;height:80px" rows="1" class="input"><%=Vendor.get("CON_REMARK")%></textarea>
    </TD>
  </TR>
  
	<tr >
		<th>첨부파일</th>
		<td colspan="3">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<%			
				if(getFileListRowSet.size() > 0){
					int i_mod = 0;
					for(int i = 0; getFileListRowSet.size() > i; i++){
						i_mod = i%2;
						if(i_mod == 0){ %>
							<TR>
					<%	} %>
								<td width="50%">
									<label for="p_<%=getFileListRowSet.getRow(i).get("DETAILCD") %>"><input type="checkbox" name="<%=getFileListRowSet.getRow(i).get("DETAILNM") %>" id="p_<%=getFileListRowSet.getRow(i).get("DETAILCD") %>" value="<%=getFileListRowSet.getRow(i).get("DETAILCD") %>" style="cursor:pointer;" onClick="fileCheck('<%=getFileListRowSet.getRow(i).get("DETAILCD") %>')" <%if(!getFileListRowSet.getRow(i).get("DOC_CD").equals("")){out.print("checked");} %> <%if(getFileListRowSet.getRow(i).get("EDIT_YN").equals("N")){out.print("disabled");} %>> <%=getFileListRowSet.getRow(i).get("DETAILNM") %></label>
								</td>
								<td width="5%" height="24">
									<%	if(getFileListRowSet.getRow(i).get("DETAILCD").equals("130")) { %>
										<IMG src="/img/supplier/button/bt_attach_file.gif" id="<%=getFileListRowSet.getRow(i).get("DETAILCD") %>" alt="첨부파일 관리" align="top" style="display:<%if(!getFileListRowSet.getRow(i).get("DOC_CD").equals("")){out.print("inline");}else{out.print("none");} %>" onClick="open_bidamtpop('<%=suppinfo.get("BID_NO")%>','<%=suppinfo.get("BID_DEG")%>','<%=suppinfo.get("VENDOR_CD")%>','<%=suppinfo.get("VENDOR_NAME")%>','<%=suppinfo.get("ESTI_TOT_AMT")%>','<%=suppinfo.get("FILE_GB")%>','<%=suppinfo.get("DIV_PO_YN")%>','<%=suppinfo.get("DEMANDED_ID")%>');" class="button">
									<%}else{ %>
										<IMG src="/img/supplier/button/bt_attach_file.gif" id="<%=getFileListRowSet.getRow(i).get("DETAILCD") %>" alt="첨부파일 관리" align="top" style="display:<%if(!getFileListRowSet.getRow(i).get("DOC_CD").equals("")){out.print("inline");}else{out.print("none");} %>" onClick="doDupChk('<%=getFileListRowSet.getRow(i).get("FILE_GB") %>', '<%=getFileListRowSet.getRow(i).get("ID")%>', '<%=getFileListRowSet.getRow(i).get("EDIT_YN")%>');" class="button">
									<%} %>
								</td>
					<%	if(i_mod == 2) { %>		
							</TR>
					<%	} %>		
				<%
					}
					for(int i=i_mod+1; i<2; i++){ %>
						<td></td>
				<%	}
					if(i_mod == 0 || i_mod == 1){ %>
						</TR>	
				<%	}
				}
			%>
			</table>
		</TD>
		<td>
			<textarea name="p_AttachFile3" id="p_AttachFile3" style="width:98%;height:100px" rows="1" class="input" readOnly></textarea>
		</td>
	</tr>  
  <!-- 낙찰정보 : 종료 -->
</table>
<table id=item_list width="100%">
	<colgroup>
		<col width="500" />
		<col width="*" />
	</colgroup>
	<tr>
   		<th>
   		<div class="application-info magT20">
			<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%', '300px');</script>
	</div>
</form>