PurPricesysPopup.jsp 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <%--
  2. - FileName : PurPricesysPopup.jsp
  3. - Author(s) : TC4035
  4. - Date : 2024.10.29
  5. - Description: 협력업체포탈 표준 미연동 계약서 입력 팝업
  6. --%>
  7. <%@ page contentType="text/html; charset=utf-8" %>
  8. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  9. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  10. <%@ page import="kr.co.hsnc.common.util.*"%>
  11. <%@ page import="kr.co.hsnc.common.sql.*" %>
  12. <%@ page import="kr.co.hsnc.common.util.Formatter"%>
  13. <%@ page import="kr.co.udapsoft.common.code.CommCodeManager" %>
  14. <%@ include file="/jsp/work/taglib.jsp" %>
  15. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  16. <%
  17. ctx.init(request, response);
  18. HandlerStorage storage = ctx.getHandlerStorage();
  19. ValueObject params = storage.getParams();
  20. ValueObject user = storage.getUser();
  21. String event = storage.getEvent();
  22. //공통코드
  23. CommCodeManager commCodeManager = new CommCodeManager();
  24. InitCombo initCombo = new InitCombo();
  25. initCombo.makeComboData(commCodeManager.getCodeRowSet("PUR_PRICESYS_RS","DETAILCD","Y"), "DETAILNM", "DETAILCD");
  26. String SYS_REASON_CD = initCombo.getCode();
  27. String SYS_REASON_NM = initCombo.getCodeName();
  28. RowSet PricesysRsComboList = CommCodeManager.getCodeRowsetStatic("PUR_PRICESYS_RS", "SUBSTR(CHG_CODE01,1,1)", "Y");
  29. /*표준 미연동 계약 정보 */
  30. ValueObject pricesysInfo = storage.getValueObject("pricesysInfo");
  31. if (pricesysInfo == null) {
  32. // 초기화할 값을 설정
  33. pricesysInfo = new ValueObject(); // 예: 새로운 ValueObject 생성
  34. }
  35. %>
  36. <SCRIPT language="JavaScript">
  37. function _onReady(){
  38. jQuery("#btnSave").click(function() {
  39. if (confirm("저장하시겠습니까?")) {
  40. var f = document.form1;
  41. jQuery("#fevent").val("FORM_SAVE");
  42. submitXmlRequest("/portal/cont/PurPricesysPopup_form.screen", "FORM_SAVE", f, "SUCCESS");
  43. }
  44. });
  45. jQuery("#SYS_REASON").attr("readonly", true);
  46. jQuery("#SYS_REASON").css({'background-color' : '#dedede'});
  47. }
  48. function doResult(resultObj) {
  49. try {
  50. if( resultObj.getRequestEvent() == "FORM_SAVE" ) {
  51. if( resultObj.getSuccess() ) {
  52. alert("저장되었습니다.");
  53. returnValue = new Array(0,"OK");
  54. parent.popPricesysClose(returnValue);
  55. }else {
  56. dlgErrorMsg(resultObj);
  57. }
  58. document.form1.isSubmit = false;
  59. }
  60. }
  61. catch(errorObject) {
  62. showErrorDlg("doResult()", errorObject);
  63. }
  64. }
  65. function inputDataSet(){
  66. if(jQuery("#SYS_REASON option:selected").val() == "00"){ //직접입력
  67. jQuery("#REMARK").attr("readonly", false);
  68. jQuery("#REMARK").css({'background-color' : '#ffffff'});
  69. jQuery("#REMARK").css({'border' : '1px solid #595a5a'});
  70. }else if(jQuery("#SYS_REASON option:selected").val() == ""){ //선택
  71. $("#REMARK").val("");
  72. document.getElementById("REMARK").style.display = "";
  73. jQuery("#REMARK").attr("readonly", true);
  74. jQuery("#REMARK").css({'background-color' : '#dedede'});
  75. }else{
  76. $("#REMARK").val("");
  77. jQuery("#REMARK").attr("readonly", true);
  78. jQuery("#REMARK").css({'background-color' : '#dedede'});
  79. }
  80. }
  81. </SCRIPT>
  82. <modular:search id="form1">
  83. <modular:key id="fevent" />
  84. </modular:search>
  85. <form id="form1" name="form1" method="post" modular:type="search">
  86. <INPUT type='hidden' name="objectNm" value="<%=pricesysInfo.get("OBJECT_NM")%>">
  87. <INPUT type='hidden' name="itemNm" value="<%=pricesysInfo.get("ITEM_NM")%>">
  88. <INPUT type='hidden' name="sysReason" value="<%=pricesysInfo.get("SYS_REASON")%>">
  89. <INPUT type='hidden' name="priceSysId" value="<%=pricesysInfo.get("PRICE_SYS_ID")%>">
  90. <INPUT type='hidden' name="priceSysYn" value="<%=pricesysInfo.get("PRICE_SYS_YN")%>">
  91. <INPUT type='hidden' name="contModId" value="<%=pricesysInfo.get("CONT_MOD_ID")%>">
  92. <INPUT type='hidden' name="corpRegNo" value="<%=pricesysInfo.get("C_VENDCD")%>">
  93. <INPUT type='hidden' name="corpName" value="<%=pricesysInfo.get("C_MEMBER_NAME")%>">
  94. <INPUT type='hidden' name="contNo" value="<%=pricesysInfo.get("CONT_NO")%>">
  95. <INPUT type='hidden' name="modNo" value="<%=pricesysInfo.get("MOD_NO")%>">
  96. <INPUT type='hidden' name="reamrk" value="<%=pricesysInfo.get("REMARK")%>">
  97. <!-- 제목 및 버튼 -->
  98. <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ftit_table">
  99. <colgroup>
  100. <col width="200" />
  101. <col width="*" />
  102. </colgroup>
  103. <tr>
  104. <td align="right">
  105. <span class="btnSearch center" id="btnSave"><a>저장</a></span>
  106. </td>
  107. </tr>
  108. </table>
  109. <!-- 상세 정보 -->
  110. <TABLE class="form-table" style="margin-top:10px;">
  111. <colgroup>
  112. <col width="300" />
  113. <col width="*" />
  114. </colgroup>
  115. <TR height="40">
  116. <TH style="text-align:left;">미연동 대상 목적물등 또는 물품등의 명칭</TH>
  117. <TD style="text-align:left;">
  118. <textarea name="OBJECT_NM" style="width:98%; height:40px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget"><%=pricesysInfo.get("OBJECT_NM")%></textarea>
  119. </TD>
  120. </TR>
  121. <TR height="40">
  122. <TH style="text-align:left;">미연동 대상 주요 원재료 명칭</TH>
  123. <TD style="text-align:left;">
  124. <textarea name="ITEM_NM" style="width:98%; height:40px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget"><%=pricesysInfo.get("ITEM_NM")%></textarea>
  125. <%--
  126. --%>
  127. </TD>
  128. </TR>
  129. <TR height="80">
  130. <TH style="text-align:left;">미연동 사유</TH>
  131. <TD style="text-align:left;">
  132. <%= HTMLMaker.getSelectTag(PricesysRsComboList, "DETAILCD", "DETAILNM", "SYS_REASON", "width:99%;height=40px;' onChange='inputDataSet();", "<option value=''>선택</option>", pricesysInfo.get("SYS_REASON")) %>
  133. <textarea name="REMARK" style="width:98%; height:50px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget" readOnly><%=pricesysInfo.get("REMARK")%></textarea>
  134. </TD>
  135. </TR>
  136. </TABLE>
  137. </FORM>