BidItemPopup.jsp 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <%--
  2. - FileName : BidItemPopup.jsp
  3. - Author(s) : mklee
  4. - Date : 2018.10.18
  5. - Description: ITEM 내역
  6. --%>
  7. <%@ page contentType="text/html; charset=utf-8" %>
  8. <%@ page import="kr.co.hsnc.common.sql.RowSet" %>
  9. <%@ page import="kr.co.hsnc.common.util.ValueObject" %>
  10. <%@ page import="com.udapsoft.waf.system.*" %>
  11. <%@ page import="com.udapsoft.waf.common.*" %>
  12. <%@ page import="kr.co.udapsoft.common.*" %>
  13. <%@ page import="com.udapsoft.waf.common.util.*" %>
  14. <%@ page import="kr.co.hsnc.common.util.*"%>
  15. <%@ page import="kr.co.hsnc.common.util.Formatter"%>
  16. <%@ page import="com.udapsoft.waf.common.ui.HTMLMaker" %>
  17. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  18. <%@page import="java.net.URLDecoder"%>
  19. <%@ include file="/jsp/work/taglib.jsp" %>
  20. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  21. <%
  22. ctx.init(request, response);
  23. HandlerStorage storage = ctx.getHandlerStorage();
  24. ValueObject user = ctx.getUser();
  25. ValueObject params = storage.getParams();
  26. String event = storage.getEvent();
  27. %>
  28. <SCRIPT language="JavaScript">
  29. var sheet1;
  30. var sheet1Row;
  31. var sheet1PageNo = 1;
  32. var pageLastRowIndex = 1;
  33. var validationResult = false;
  34. var filterShow = false;
  35. function _onReady(){
  36. gridInit(sheet1);
  37. autoResize();
  38. var info = [{StdCol:"DEPTH1" , SumCols:"8|9",CaptionText:"[소 계]",CaptionCol:3}];
  39. sheet1.ShowSubSum (info);
  40. sheet1.SetSumValue(3,"총 공 사 비");
  41. jQuery("#btnSearch").click(function() {
  42. jQuery("#fevent").val("SHEET_ITEM_SELECT");
  43. var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/outside/BidItemPopup_sheet.screen";
  44. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  45. });
  46. jQuery("#btnSearch").click();
  47. }
  48. function gridInit(sheetName){
  49. var init_sheet = {};
  50. init_sheet.Cfg = {SearchMode:0 , MergeSheet:msHeaderOnly+msPrevColumnMerge};
  51. init_sheet.Cols = [
  52. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:0, Align:"Center", Hidden:"True"},
  53. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center" , Hidden:"True"},
  54. {Header:'구분', Type:"Text", SaveName:"DEPTH1", Width:40, Align:"Center", Edit:false},
  55. {Header:'내역', Type:"Text", SaveName:"ITEM_NAME", Width:120, Align:"left", Edit:false},
  56. {Header:'No.', Type:"Seq", SaveName:"NO", Width:0, Align:"Center", Hidden:"True"},
  57. {Header:'MATERIAL_CD', Type:"Text", SaveName:"MATERIAL_CD", Width:0, Align:"Center", Hidden:"True"},
  58. {Header:'PARENT_LEVEL', Type:"Text", SaveName:"PARENT_LEVEL", Width:0, Align:"left", Hidden:"True"},
  59. {Header:'수량/규격', Type:"Text", SaveName:"ITEMS", Width:0, Align:"Center", Hidden:"True"},
  60. {Header:'도급금액', Type:"AutoSum", SaveName:"AMT_ORD", Width:60, Align:"right" },
  61. {Header:'실행금액', Type:"AutoSum", SaveName:"AMT_ACT", Width:60, Align:"right" }
  62. ];
  63. init_sheet.HeaderMode = {Sort:1};
  64. IBS_InitSheet(sheetName, init_sheet);
  65. sheetName.SetDataAutoTrim(0);
  66. setGridSize();
  67. }
  68. function setGridSize() {
  69. sheet1.FitColWidth();
  70. }
  71. function sheet1_OnSearchEnd(code, message) {
  72. if(code == 0) {
  73. var row = sheet1.RowCount();
  74. sheet1.RowDelete(row);
  75. //sheet1.RowDelete(row-2);
  76. //sheet1.RowDelete(row-4);
  77. //sheet1.SetMergeCell(row-3,2,1,2);//타이틀 머지
  78. //sheet1.SetMergeCell(row-4,2,1,2);
  79. //sheet1.SetMergeCell(row-5,2,1,2);
  80. sheet1.SetSelectRow(1);
  81. setGridSize();
  82. } else {
  83. //조회 에러 수행
  84. alert(message);
  85. }
  86. }
  87. function sheet1_OnSmartResize(Width, Height) {
  88. sheet1.FitColWidth();
  89. //autoResize();
  90. }
  91. /**
  92. * enter click 시 자동으로 검색이되도록 조
  93. */
  94. function check_Enter(){
  95. if (event.keyCode==13)
  96. jQuery("#btnSearch").click();
  97. }
  98. function autoResize(){
  99. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title_pop").scrollHeight + 20;
  100. var iframeHeight= document.body.scrollHeight - t1_height;
  101. var iframeWidth= document.body.scrollWidth;
  102. sheet1.SetSheetHeight(iframeHeight);
  103. }
  104. document.onkeydown = closePopupWindow;
  105. //document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  106. </SCRIPT>
  107. <modular:search id="form1">
  108. <modular:key id="fevent" />
  109. </modular:search>
  110. <FORM id="form1" name="form1" method="get" modular:type="search">
  111. <INPUT type="hidden" name="fevent" id="fevent" value="">
  112. <INPUT type="hidden" name="BID_NO" value="<%=params.get("BID_NO")%>" />
  113. <INPUT type="hidden" name="BID_DEG" value="<%=params.get("BID_DEG")%>" />
  114. <INPUT type="hidden" name="pop_win_id" value="<%=params.get("pop_win_id")%>" />
  115. <table id="search-table" class="search-form-table">
  116. <colgroup>
  117. <col width="*" />
  118. </colgroup>
  119. <tr>
  120. <td class="button" style="text-align:right; padding-right:10px;">
  121. <span class="btnSearch center" id="btnSearch" style="display:;"><a href="javascript:void(0);">검색</a></span>
  122. </td>
  123. </tr>
  124. </table>
  125. <!-- 검색조건 종료 -->
  126. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 450px; overflow: auto;">
  127. <script>createIBSheet('sheet1','100%', '450px');</script>
  128. </div>
  129. </form>