Browse Source

하도급 연동제 개발

cyyun 1 week ago
parent
commit
46d1c6ec53

+ 2 - 12
java/kr/co/udapsoft/ebid/buyer/cont/purchase/biz/ContIngBiz.java

@@ -1338,21 +1338,11 @@ public class ContIngBiz extends Biz {
 			sqlstr.append("         PRICE_SYS_YN,                                            		\n");
 			sqlstr.append("         OBJECT_NM,                                                      \n");
 			sqlstr.append("         ITEM_NM,                                                        \n");
-			sqlstr.append("         SYS_REASON,                                                     \n");
+			sqlstr.append("         DECODE(PRICE_SYS_YN, '01', DECODE(SYS_REASON, '00', REMARK, ETEC_EBID.F_GET_CODE_NAME('PUR_PRICESYS_RS', B.SYS_REASON)), SYS_REASON) AS SYS_REASON,  \n");
 			sqlstr.append("         CONT_MOD_ID,                                                    \n");
 			sqlstr.append("         CORP_REG_NO,                                                    \n");
 			sqlstr.append("         CORP_NAME,                                                     	\n");
-			sqlstr.append("         REMARK,                                                         \n");
-			sqlstr.append("         (SELECT DECODE (MAX (AA.FILE_ID), NULL, '파일첨부', '1')        	\n");
-			sqlstr.append("            FROM PUB0510T AA, PUB0500T BB                                \n");
-			sqlstr.append("           WHERE     AA.FILE_ID = BB.FILE_ID                             \n");
-			sqlstr.append("                 AND FILE_GB = 'PUR_PRICE_SYS'                         	\n");
-			sqlstr.append("                 AND ID = B.PRICE_SYS_ID)    AS FILE_YN,               	\n");
-			sqlstr.append("         (SELECT MAX (AA.FILE_ID)                                        \n");
-			sqlstr.append("            FROM PUB0510T AA, PUB0500T BB                                \n");
-			sqlstr.append("           WHERE     AA.FILE_ID = BB.FILE_ID                             \n");
-			sqlstr.append("                 AND FILE_GB = 'PUR_PRICE_SYS'                         	\n");
-			sqlstr.append("                 AND ID = B.PRICE_SYS_ID)    AS FILE_ID                	\n");
+			sqlstr.append("         DECODE(PRICE_SYS_YN, '01', '1', '') AS FILE_YN  		        \n");
 			sqlstr.append("    FROM PUR2000T A, PRICE_SYS B                                  		\n");
 			sqlstr.append("   WHERE     A.PUR_CONT_MOD_ID = B.CONT_MOD_ID                           \n");
 			sqlstr.append("         AND A.PUR_CONT_MOD_ID = '"+params.get("PUR_CONT_MOD_ID")+"'     \n");

+ 1 - 0
java/kr/co/udapsoft/ebid/supplier/portal/cont/biz/PurContBiz.java

@@ -1273,6 +1273,7 @@ public class PurContBiz extends Biz {
 			sqlstr.append(" B.OBJECT_NM,          																					\n");
 			sqlstr.append(" B.ITEM_NM,          																					\n");
 			sqlstr.append(" B.SYS_REASON,         																					\n");
+			sqlstr.append(" B.REMARK,         																						\n");
 			sqlstr.append(" D.USER_NAME AS O_USER_NAME,          																	\n");
 			sqlstr.append(" D.POSITION AS O_POSITION,                           													\n");
 			sqlstr.append(" DECODE(D.ADDRESS, '', C.ADDRESS, D.ADDRESS) AS O_ADDRESS,         										\n");

+ 16 - 13
java/kr/co/udapsoft/ebid/supplier/portal/cont/biz/PurPricesysBiz.java

@@ -75,19 +75,20 @@ public class PurPricesysBiz extends Biz {
 		PreparedStatement pstmt = null;
         StrBuffer sqlstr = new StrBuffer();
         try {
-        	sqlstr.append("MERGE INTO PRICE_SYS   																								\n");
-        	sqlstr.append("USING DUAL   																										\n");
-        	sqlstr.append("ON (CONT_MOD_ID = ?)   																								\n");
-        	sqlstr.append("WHEN MATCHED THEN   																									\n");
-        	sqlstr.append("UPDATE SET   																										\n");
-        	sqlstr.append("OBJECT_NM = ?	,																									\n");
-        	sqlstr.append("ITEM_NM = ?		,																									\n");
-        	sqlstr.append("SYS_REASON = ?																										\n");
-        	sqlstr.append("WHEN NOT MATCHED THEN																								\n");
-        	sqlstr.append("INSERT																												\n");
-        	sqlstr.append("(PRICE_SYS_ID, PRICE_SYS_YN, OBJECT_NM, ITEM_NM, SYS_REASON, CONT_MOD_ID, CORP_REG_NO, CORP_NAME, CONT_NO, MOD_NO)	\n");
-        	sqlstr.append("VALUES																												\n");
-        	sqlstr.append("(PRICE_SYS_ID_S.NEXTVAL, '01', ?, ?, ?, ?, ?, ?, ?, ?)																\n");
+        	sqlstr.append("MERGE INTO PRICE_SYS   																										\n");
+        	sqlstr.append("USING DUAL   																												\n");
+        	sqlstr.append("ON (CONT_MOD_ID = ?)   																										\n");
+        	sqlstr.append("WHEN MATCHED THEN   																											\n");
+        	sqlstr.append("UPDATE SET   																												\n");
+        	sqlstr.append("OBJECT_NM = ?	,																											\n");
+        	sqlstr.append("ITEM_NM = ?		,																											\n");
+        	sqlstr.append("SYS_REASON = ?	,																											\n");
+        	sqlstr.append("REMARK = ?																													\n");
+        	sqlstr.append("WHEN NOT MATCHED THEN																										\n");
+        	sqlstr.append("INSERT																														\n");
+        	sqlstr.append("(PRICE_SYS_ID, PRICE_SYS_YN, OBJECT_NM, ITEM_NM, SYS_REASON, REMARK, CONT_MOD_ID, CORP_REG_NO, CORP_NAME, CONT_NO, MOD_NO)	\n");
+        	sqlstr.append("VALUES																														\n");
+        	sqlstr.append("(PRICE_SYS_ID_S.NEXTVAL, '01', ?, ?, ?, ?, ?, ?, ?, ?, ?)																	\n");
             
         	
         	pstmt = connection.prepareStatement(sqlstr.toString());
@@ -97,9 +98,11 @@ public class PurPricesysBiz extends Biz {
 			pstmt.setString(paramIdx++, valueObject.get("OBJECT_NM"));
 			pstmt.setString(paramIdx++, valueObject.get("ITEM_NM"));
 			pstmt.setString(paramIdx++, valueObject.get("SYS_REASON"));
+			pstmt.setString(paramIdx++, valueObject.get("REMARK"));
 			pstmt.setString(paramIdx++, valueObject.get("OBJECT_NM"));
 			pstmt.setString(paramIdx++, valueObject.get("ITEM_NM"));
 			pstmt.setString(paramIdx++, valueObject.get("SYS_REASON"));
+			pstmt.setString(paramIdx++, valueObject.get("REMARK"));
 			pstmt.setString(paramIdx++, valueObject.get("CONTMODID"));
 			pstmt.setString(paramIdx++, valueObject.get("CORPREGNO"));
 			pstmt.setString(paramIdx++, valueObject.get("CORPNAME"));

+ 20 - 30
web/jsp/ko_KR/buyer/cont/purchase/priceSys.jsp

@@ -47,13 +47,13 @@
 		var init_sheet = {};
 		init_sheet.Cfg = {SearchMode:2, Page:10};
 		init_sheet.Cols = [
-		       			{Header:'Del',						Type:"DelCheck",		SaveName:"DEL_CHECK", 			Width:20, 		Align:"Center"},
+		       			{Header:'Del',						Type:"DelCheck",		SaveName:"DEL_CHECK", 			Width:20, 		Align:"Center", Edit:"false"},
 		       			{Header:'Status',					Type:"Status", 			SaveName:"STATUS", 				Width:0, 		Align:"Center", Hidden:"true"},
 		    			{Header:'계약서ID',					Type:"Text", 			SaveName:"PRICE_SYS_ID", 		Width:0, 		Align:"Center", Hidden:"true"},
-		    			{Header:'하도급대금 연동 여부',				Type:"Combo", 			SaveName:"PRICE_SYS_YN",		Width:30, 		Align:"Center",	ComboText:"<%=PRICESYS_GB_NM%>", ComboCode:"<%=PRICESYS_GB_CD%>"},
-		    			{Header:'미연동 대상 목적물 또는 물품 등의 명칭',		Type:"Text", 			SaveName:"OBJECT_ITEM",			Width:80, 		Align:"Center"},
-		    			{Header:'[수급사업자] 미연동 사유',			Type:"Text", 			SaveName:"SYS_REASON", 			Width:150, 		Align:"Center", 	EditLen:"500"},
-		    			{Header:'☞사본',						Type:"Text", 			SaveName:"FILE_YN", 			Width:30, 		Align:"center", Edit:"false",	Cursor:'pointer'},
+		    			{Header:'하도급대금 연동 여부',				Type:"Combo", 			SaveName:"PRICE_SYS_YN",		Width:30, 		Align:"Center", Edit:"false", ComboText:"<%=PRICESYS_GB_NM%>", ComboCode:"<%=PRICESYS_GB_CD%>"},
+		    			{Header:'미연동 대상 목적물 또는 물품 등의 명칭',		Type:"Text", 			SaveName:"OBJECT_NM",			Width:80, 		Align:"Center", Edit:"false"},
+		    			{Header:'[수급사업자] 미연동 사유',			Type:"Text", 			SaveName:"SYS_REASON", 			Width:150, 		Align:"Center", Edit:"false", 	EditLen:"500"},
+		    			{Header:'☞계약서',						Type:"Text", 			SaveName:"FILE_YN", 			Width:30, 		Align:"center", Edit:"false",	Cursor:'pointer'},
 		    			{Header:'FILE_ID',					Type:"Text", 			SaveName:"FILE_ID", 			Width:0, 		Align:"center", Hidden:"true"},
 		]; 
 	
@@ -89,7 +89,7 @@
 			sheet4.SetColFontColor("FILE_YN", "#0000ff");
 	    
 	    	for(i=1; i <= sheet4.RowCount(); i++){
-				if(sheet4.GetCellValue(i, "FILE_ID")!=""){
+				if(sheet4.GetCellValue(i, "FILE_YN")!=""){
 					sheet4.InitCellProperty(i, "FILE_YN", info);
 				}
 			}
@@ -107,24 +107,20 @@
 		}
 	}
 	
-	function downPriceSysFile(){
-		var url="/common/file/FileDownloadServlet?mode=fpDown";
-		url += "&mode=fpDown";
-		url += "&filePath=/pricesysDoc";
-		url += "&fileName=" + encodeURI("에스지씨이앤씨_표준 미연동계약서.docx");
-		url += "&fileRealName=pricesys_doc.docx";
-		
-		document.getElementById("fileDown").src=url;
-	}
+	function sheet4_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
+		 if(Row == 0)return;
+		 if (sheet4.ColSaveName(Col) == "FILE_YN" && jQuery("#p_pricesys_gb").val() == '01') {
+			 
+		        var reportInfo = new ReportInfo();
+	            reportInfo.title = "표준 미연동 계약서";
+	            reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PurPricesysCont.mrd";
+	            reportInfo.set($("#PUR_CONT_MOD_ID").val());    	// $1 contModId
+		        reportInfo.width = 1500;                         	// Default: 1024
+		        reportInfo.height = 100;                         	// Default: 768
+				reportInfo.showPopup(); 
+	     }
+	 }
 	
-/* 	function purPricesysPopSave() {
-		if (confirm("저장하시겠습니까?")) {
-			var f = document.form1;
-			jQuery("#fevent").val("FORM_SAVE");
-			submitXmlRequest("/portal/cont/PurPricesysPopup_form.screen", "FORM_SAVE", f, "SUCCESS");	
-		}
-		
-	} */
 	
 	/**
 	 *	IBSheet size setting
@@ -135,21 +131,15 @@
 </SCRIPT>
 
 
-
-
 <div class="application-info  magT10">
 	<div class="application-sub-title">
-		<span class="title">표준 미연동 계약서</span><a href="javascript:priceSysDesc()"></a><a href="javascript:downPriceSysFile()"><IMG src='/img/buyer/button/bt_change.gif' align="absmiddle"></a>
+		<span class="title">표준 미연동 계약서</span>
 	</div>
 </div>
 <!-- 검색조건 시작 -->
 <table id="search-table" class="search-form-table">
   <tr height="25"> 
   	<td>연동제 구분:&nbsp;&nbsp;<%= HTMLMaker.getSelectTag(pricesysGbRow, "CODE", "NAME", "p_pricesys_gb", "style='width:100px;' ", "", ContInfo.get("PRICE_SYS_GB")) %></td>
-<!-- 	<td class="button" align="right" style="text-align: center;width: 95px">
-		<span class="btnSearch center" id="btnPricesysAdd" ><a href="javascript:void(0);">추가</a></span>
-		<span class="btnSearch center" id="btnSavePricesys" style="display: none;" ><a href="javascript:void(0);">저장</a></span>
-	</td>	 -->
   </tr>
 </table>
 <div id="sheet4_div" style="padding-top:5px; height: 157px; min-height: 157px; ">

+ 27 - 16
web/jsp/ko_KR/supplier/portal/cont/PurPricesysPopup.jsp

@@ -21,6 +21,15 @@
     ValueObject user = storage.getUser();
     String event = storage.getEvent();
     
+	//공통코드
+	CommCodeManager commCodeManager = new CommCodeManager();
+	InitCombo initCombo = new InitCombo();
+
+	initCombo.makeComboData(commCodeManager.getCodeRowSet("PUR_PRICESYS_RS","DETAILCD","Y"), "DETAILNM", "DETAILCD");
+	String SYS_REASON_CD = initCombo.getCode();
+	String SYS_REASON_NM = initCombo.getCodeName();
+	
+	
     RowSet PricesysRsComboList = CommCodeManager.getCodeRowsetStatic("PUR_PRICESYS_RS", "SUBSTR(CHG_CODE01,1,1)", "Y");
     
     /*표준 미연동 계약 정보 */
@@ -41,6 +50,9 @@
 				submitXmlRequest("/portal/cont/PurPricesysPopup_form.screen", "FORM_SAVE", f, "SUCCESS");	
 			}
 		}); 
+		
+		jQuery("#SYS_REASON").attr("readonly", true);
+		jQuery("#SYS_REASON").css({'background-color' : '#dedede'});
 	}
 	
 
@@ -69,23 +81,21 @@
 
 	function inputDataSet(){
 		
-		if(jQuery("#pricesysRsCode option:selected").val() == "00"){	//직접입력
-			$("#SYS_REASON").val("");
-			$("#SYS_REASON").attr("disabled",false);
+		if(jQuery("#SYS_REASON option:selected").val() == "00"){	//직접입력
+			jQuery("#REMARK").attr("readonly", false);
+			jQuery("#REMARK").css({'background-color' : '#ffffff'});
+			jQuery("#REMARK").css({'border' : '1px solid #595a5a'});
 
-		}else if(jQuery("#pricesysRsCode option:selected").val() == ""){
-			$("#SYS_REASON").val("");
-			$("#SYS_REASON").attr("disabled",true);
+		}else if(jQuery("#SYS_REASON option:selected").val() == ""){ //선택
+			$("#REMARK").val("");
+			document.getElementById("REMARK").style.display	=	"";
+			jQuery("#REMARK").attr("readonly", true);
+			jQuery("#REMARK").css({'background-color' : '#dedede'});
 			
 		}else{
-			//$("#SYS_REASON").val(jQuery("#pricesysRsCode option:selected").val());
-			$("#SYS_REASON").val(pricesysInfo.get("SYS_REASON").val());
-			$("#SYS_REASON").attr("disabled",false);
-			/* getFileListRowSet.getRow(i).get("DETAILCD") */
-			//$("#material_Kind_Code_Lv3").append("<option value='"+rowSet.getColValue( i, 0)+"'>"+rowSet.getColValue( i, 1 ) + "</option>");
-			//reportInfo.set($("#BID_NO").val()); 
-			//getFileListRowSet.getRow(i).get("DETAILNM")
-			//$("#SYS_REASON").val($("#pricesysRsCode").val());
+			$("#REMARK").val("");
+			jQuery("#REMARK").attr("readonly", true);
+			jQuery("#REMARK").css({'background-color' : '#dedede'});
 		}
 	}
 	
@@ -108,6 +118,7 @@
 <INPUT type='hidden' name="corpName" value="<%=pricesysInfo.get("C_MEMBER_NAME")%>">
 <INPUT type='hidden' name="contNo" value="<%=pricesysInfo.get("CONT_NO")%>">
 <INPUT type='hidden' name="modNo" value="<%=pricesysInfo.get("MOD_NO")%>">
+<INPUT type='hidden' name="reamrk" value="<%=pricesysInfo.get("REMARK")%>">
 
 
 	<!-- 제목 및 버튼 -->
@@ -146,8 +157,8 @@
 	<TR height="80">
 		<TH style="text-align:left;">미연동 사유</TH>
 		<TD style="text-align:left;">
-		<%= HTMLMaker.getSelectTag(PricesysRsComboList, "DETAILCD", "DETAILNM", "pricesysRsCode", "width:99%;height=40px;' onChange='inputDataSet();", "<option value=''>선택</option>", pricesysInfo.get("SYS_REASON")) %>
-		<textarea name="SYS_REASON" style="width:98%; height:50px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget"><%=pricesysInfo.get("SYS_REASON")%></textarea>
+		<%= HTMLMaker.getSelectTag(PricesysRsComboList, "DETAILCD", "DETAILNM", "SYS_REASON", "width:99%;height=40px;' onChange='inputDataSet();", "<option value=''>선택</option>", pricesysInfo.get("SYS_REASON")) %>
+		<textarea name="REMARK" style="width:98%; height:50px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget" readOnly><%=pricesysInfo.get("REMARK")%></textarea> 
 		</TD>
 	</TR>
 </TABLE>

+ 6 - 39
web/jsp/ko_KR/supplier/portal/cont/priceSys.jsp

@@ -37,13 +37,6 @@
 	var filterShow = false;
 /* 
 	function _onReady(){
-		jQuery("#btnSavePricesys").click(function() {
-			if (confirm("저장하시겠습니까?")) {
-				jQuery("#fevent").val("SAVE_PRICESYS_LIST");
-				var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/purchase/PricesysList_sheet.screen";
-				Modular.view.IBSheet7.doSave(sheet4, url, jQuery("#form1"), false);
-			}
-		}); 
 	} */
 	
 	/**
@@ -92,12 +85,6 @@
 	    doSearchPricesys();
 	}
 	
-	/* 
-	function btnSavePricesys() {
-		jQuery("#fevent").val("SAVE_PRICESYS_LIST");
-		var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/purchase/PricesysList_sheet.screen";
-		Modular.view.IBSheet7.doSave(sheet4, url, jQuery("#form1"), false);
-	} */
 	
 	
 	/**
@@ -111,7 +98,7 @@
 			sheet4.SetColFontColor("FILE_YN", "#0000ff");
 	    
 	    	for(i=1; i <= sheet4.RowCount(); i++){
-				if(sheet4.GetCellValue(i, "FILE_ID")!=""){
+				if(sheet4.GetCellValue(i, "FILE_YN")!=""){
 					sheet4.InitCellProperty(i, "FILE_YN", info);
 				}
 			}
@@ -128,17 +115,7 @@
 			jQuery("#btnPromiseAdd").show();	
 		}
 	}
-	
-	function downPriceSysFile(){
-		var url="/common/file/FileDownloadServlet?mode=fpDown";
-		url += "&mode=fpDown";
-		url += "&filePath=/pricesysDoc";
-		url += "&fileName=" + encodeURI("에스지씨이앤씨_표준 미연동계약서.docx");
-		url += "&fileRealName=pricesys_doc.docx";
-		
-		document.getElementById("fileDown").src=url;
-	}
-	
+
 	function btnPricesysAdd(){
 		if(jQuery("#p_pricesys_gb").val()=="01"){
 			popPricesys();
@@ -149,22 +126,14 @@
 	
 	function sheet4_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
 		 if(Row == 0)return;
-		 if (sheet4.ColSaveName(Col) == "FILE_YN") {
-			 
-			/* if(sheet4.GetCellValue(Row, "PROMISE_DOC_ID")=='' || sheet3.GetCellValue(Row, "STATUS")=="I" || sheet3.GetCellValue(Row, "STATUS")=="U"){
-				alert("입력한 내용을 저장을 한 후 파일을 첨부할 수 있습니다.");
-				return;
-			}
-			else{  */
+		 if (sheet4.ColSaveName(Col) == "FILE_YN" && jQuery("#p_pricesys_gb").val() == '01') {
 		        var reportInfo = new ReportInfo();
 	            reportInfo.title = "표준 미연동 계약서";
 	            reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PurPricesysCont.mrd";
 	            reportInfo.set($("#PUR_CONT_MOD_ID").val());    	// $1 contModId
-		        reportInfo.width = 1000;                         	// Default: 1024
-		        reportInfo.height = 700;                         	// Default: 768
+		        reportInfo.width = 1500;                         	// Default: 1024
+		        reportInfo.height = 1000;                         	// Default: 768
 				reportInfo.showPopup(); 
-			//} 
-		
 	     }
 	 }
 	
@@ -182,7 +151,7 @@
 
 <div class="application-info  magT10">
 	<div class="application-sub-title">
-		<span class="title">표준 미연동 계약서</span><a href="javascript:priceSysDesc()"></a><a href="javascript:downPriceSysFile()"><IMG src='/img/buyer/button/bt_change.gif' align="absmiddle"></a>
+		<span class="title">표준 미연동 계약서</span>
 	</div>
 </div>
 <!-- 검색조건 시작 -->
@@ -191,8 +160,6 @@
   	<td>연동제 구분:&nbsp;&nbsp;<%= HTMLMaker.getSelectTag(pricesysGbRow, "CODE", "NAME", "p_pricesys_gb", "style='width:100px;' ", "", ContInfo.get("PRICE_SYS_GB")) %></td>
 	<td class="button" align="right" style="text-align: center;width: 95px">
 		<span class="btnSearch center" id="btnPricesysAdd" ><a href="javascript:void(0);">추가</a></span>
-		<%-- <span class="btnSearch center" onclick="javascript:popPricesys('<%=pricesysInfo.get("OBJECT_NM")%>','<%=pricesysInfo.get("ITEM_NM")%>','<%=pricesysInfo.get("SYS_REASON")%>');" ><a href="javascript:void(0);">추가</a></span> --%>
-		<%-- <IMG src="/img/buyer/button/bt_search_right.gif" onclick="javascript:popPricesys('<%=pricesysInfo.getRow(i).get("OBJECT_NM")%>','<%=pricesysInfo.getRow(i).get("ITEM_NM")%>','<%=pricesysInfo.getRow(i).get("SYS_REASON")%>');" id="btnPricesysAdd" alt="보증정보" border="0" align="absmiddle" style="cursor:pointer;" /> --%> 
 		<span class="btnSearch center" id="btnSavePricesys" ><a href="javascript:void(0);">저장</a></span>
 	</td>	
   </tr>