ItemAddPopup.jsp 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <%--
  2. - FileName : ItemAddPopup.jsp
  3. - Author(s) : chs
  4. - Date : 2022.08.03
  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.udapsoft.common.code.*" %>
  11. <%@ page import="kr.co.hsnc.common.util.*"%>
  12. <%@ page import="kr.co.hsnc.common.sql.*" %>
  13. <%@ page import="kr.co.hsnc.common.util.Formatter"%>
  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. RowSet itemList = storage.getRowSet("itemList");
  23. %>
  24. <SCRIPT language="JavaScript">
  25. function _onReady(){
  26. jQuery("#btnSave").click(function(){
  27. if($("#MATERIAL_CD").val() == ""){
  28. alert("추가품목을 선택하십시오.");
  29. return;
  30. }
  31. if (confirm("품목을 추가하시겠습니까?")){
  32. submitXmlRequest("/cont/purchase/ItemAddPopup_form.screen", "ITEM_ADD_SAVE", document.form1);
  33. }
  34. });
  35. jQuery("#btnDel").click(function(){
  36. if (confirm("등록된 추가품목을 삭제하시겠습니까?")){
  37. submitXmlRequest("/cont/purchase/ItemAddPopup_form.screen", "ITEM_ADD_DEL", document.form1);
  38. }
  39. });
  40. jQuery("#btnClose").click(function(){
  41. parent.ItemAddClose();
  42. });
  43. }
  44. function pageinit(){
  45. }
  46. function doResult(resultObj) {
  47. try {
  48. if( resultObj.getRequestEvent() == "ITEM_ADD_SAVE") {
  49. if( resultObj.getSuccess() ) {
  50. alert("추가되었습니다.");
  51. }
  52. else {
  53. dlgErrorMsg(resultObj);
  54. }
  55. document.form1.isSubmit = false;
  56. }else if( resultObj.getRequestEvent() == "ITEM_ADD_DEL") {
  57. if( resultObj.getSuccess() ) {
  58. alert("삭제되었습니다.");
  59. }
  60. else {
  61. dlgErrorMsg(resultObj);
  62. }
  63. document.form1.isSubmit = false;
  64. }
  65. }
  66. catch(errorObject) {
  67. showErrorDlg("doResult()", errorObject);
  68. }
  69. }
  70. </SCRIPT>
  71. <modular:search id="form1">
  72. <modular:key id="fevent" />
  73. </modular:search>
  74. <form id="form1" name="form1" method="post" modular:type="search">
  75. <INPUT type="hidden" name="fevent" id="fevent" value="">
  76. <INPUT type="hidden" name="PUR_CONT_MOD_ID" value="<%=params.get("PUR_CONT_MOD_ID")%>">
  77. <INPUT type="hidden" name="PUR_CONT_ID" value="<%=params.get("PUR_CONT_ID")%>">
  78. <INPUT type="hidden" name="DEMANDED_ID" " value="<%=params.get("pDemID")%>">
  79. <!-- 검색조건 영역 : 시작 -->
  80. <table class="search-form-table" style="width: 100%">
  81. <col width="15%">
  82. <col width="30%">
  83. <col width="*">
  84. <TR height="25">
  85. <th>추가품목</th>
  86. <TD colspan="2">
  87. <%=CommCodeManager.getSelectCodeList("ADD_ITEM_CD","MATERIAL_CD","height=18;","<option value=''>--선택--</option>","") %>
  88. </TD>
  89. <TD class="button" style="text-align: right;">
  90. <!-- 검색버튼 영역 : 시작 -->
  91. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSave">추가</a></span>
  92. <span class="btnSearch center"><a href="javascript:void(0);" id="btnDel">삭제</a></span>
  93. <span class="btnSearch center"><a href="javascript:void(0);" id="btnClose">닫기</a></span>
  94. &nbsp;&nbsp;&nbsp;
  95. </TD>
  96. </TR>
  97. </TABLE>
  98. </FORM>