ContBudgetSearch.jsp 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <%--
  2. - FileName : ContPriceSearch.jsp
  3. - Author(s) : lee mi kyoung
  4. - Date : 2016.6.24
  5. -
  6. - Description: 구매단가조회
  7. --%>
  8. <%@ page contentType="text/html; charset=utf-8" %>
  9. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  10. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  11. <%@ page import="kr.co.hsnc.common.util.*"%>
  12. <%@ page import="kr.co.hsnc.common.sql.*" %>
  13. <%@ page import = "blowfishj.*"%>
  14. <%@ page import = "java.text.SimpleDateFormat"%>
  15. <%@ page import="com.udapsoft.waf.common.util.DateUtil"%>
  16. <%@ page import = "java.util.Date"%>
  17. <%@ page import = "java.util.*"%>
  18. <%@ include file="/jsp/work/taglib.jsp" %>
  19. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  20. <%
  21. ctx.init(request, response);
  22. HandlerStorage storage = ctx.getHandlerStorage();
  23. ValueObject params = storage.getParams();
  24. ValueObject user = storage.getUser();
  25. String event = storage.getEvent();
  26. /*RowSet materialKindCodeLv1 = storage.getRowSet("materialKindCodeLv1");
  27. RowSet materialKindCodeLv2 = new RowSetImpl();
  28. RowSet materialKindCodeLv3 = new RowSetImpl();*/
  29. //검색조건 작성일
  30. String initSearchDateStart = params.get("p_from_dt");
  31. String initSearchDateEnd = params.get("p_to_dt");
  32. ValueObject defaultDate = DateUtil.getDefaultPeriod();
  33. if("".equals(initSearchDateStart)){
  34. initSearchDateStart = defaultDate.get("START_DATE");
  35. }
  36. if("".equals(initSearchDateEnd)){
  37. initSearchDateEnd = defaultDate.get("END_DATE");
  38. }
  39. %>
  40. <script type="text/javascript" src="/js/creditEvaluationPop.js"></script>
  41. <script language="javascript">
  42. /*예약함수*/
  43. var sheet1 = new ibsheetObject();
  44. var sheet1Row;
  45. var sheet1PageNo = 1;
  46. var pageLastRowIndex = 1;
  47. var validationResult = false;
  48. var filterShow = false;
  49. $(document).on("keyup", "input:text", function(e) {
  50. if($(this).attr("numberOnly") == "true")
  51. {
  52. $(this).val( $(this).val().replace(/[^0-9]/gi,"") );
  53. }
  54. if (e.keyCode == 13)
  55. {
  56. $.searchList();
  57. }
  58. });
  59. $.gridInit = function(sheetName)
  60. {
  61. var init_sheet = {};
  62. init_sheet.Cfg = {SearchMode:2, MergeSheet:msHeaderOnly, Page:100};
  63. init_sheet.Cols = [
  64. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center", Hidden:"True"},
  65. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Edit:"false", Hidden:"True"},
  66. {Header:'MR NO', Type:"Text", SaveName:"REQ_DOC_NO", Width:120, Align:"Left", Edit:"false"},
  67. {Header:'자재명', Type:"Text", SaveName:"CST_DOC_NAME", Width:180, Align:"Left", Edit:"false"},
  68. {Header:'도급예산', Type:"AutoSum", SaveName:"CONT_AMT", Width:60, Align:"Right", Edit:"false"},
  69. {Header:'실행예산', Type:"AutoSum", SaveName:"EXE_AMT", Width:60, Align:"Right", Edit:"false"},
  70. {Header:'계약금액', Type:"AutoSum", SaveName:"ORD_SUPPLY_AMT", Width:60, Align:"Right", Edit:"false"},
  71. {Header:'계약금액(KRW)', Type:"AutoSum", SaveName:"ORD_AMT_KRW", Width:60, Align:"Right", Edit:"false"},
  72. {Header:'계약일자', Type:"Text", SaveName:"ORD_CON_DATE", Width:70, Align:"Center", Edit:"false"},
  73. {Header:'예실대비', Type:"Float", SaveName:"RATE", Width:60, Align:"Right", Edit:"false"},
  74. {Header:'예산절감액', Type:"AutoSum", SaveName:"ADV_AMT", Width:60, Align:"Right", Edit:"false"},
  75. {Header:'계약화폐', Type:"Text", SaveName:"CUR_GB", Width:50, Align:"Center", Edit:"false"},
  76. {Header:'VENDOR', Type:"Text", SaveName:"MEMBER_NAME", Width:150, Align:"Left", Edit:"false"},
  77. {Header:'IP', Type:"Text", SaveName:"A", Width:150, Align:"Left", Edit:"false", Hidden:"True"},
  78. {Header:'TERMINAL', Type:"Text", SaveName:"B", Width:150, Align:"Left", Edit:"false", Hidden:"True"},
  79. {Header:'MODULE', Type:"Text", SaveName:"C", Width:150, Align:"Left", Edit:"false", Hidden:"True"},
  80. {Header:'SERVER_HOST', Type:"Text", SaveName:"D", Width:150, Align:"Left", Edit:"false", Hidden:"True"}
  81. ];
  82. init_sheet.HeaderMode = {Sort:1};
  83. IBS_InitSheet(sheetName, init_sheet);
  84. sheetName.SetDataAutoTrim(0);
  85. setGridSize();
  86. }
  87. $(function(){
  88. $("#btn_search").click(function(){
  89. $.searchList();
  90. });
  91. $("#btn_excel").click(function(){
  92. var params = {FileName:"계약단가현황.xls",SheetName:"계약단가현황",Merge:1,SheetDesign:1, HiddenColumn:1};
  93. sheet1.Down2Excel (params);
  94. });
  95. $.searchList = function()
  96. {
  97. $("#fevent").val("BUDGET_CONTROL");
  98. var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/purchase/ContBudgetSearch_sheet.screen";
  99. Modular.view.IBSheet7.doSearch(sheet1, url, $("#form1"), 30, "");
  100. }
  101. });
  102. $(document).ready(function(){
  103. $.gridInit(sheet1);
  104. autoResize();
  105. });
  106. function calendar(thisDayObj){
  107. dlgCalendar(thisDayObj);
  108. }
  109. function setGridSize() {sheet1.FitColWidth();}
  110. function autoResize(){
  111. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  112. var iframeHeight= document.body.scrollHeight - t1_height;
  113. var iframeWidth= document.body.scrollWidth;
  114. sheet1.SetSheetHeight(iframeHeight);
  115. }
  116. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  117. </script>
  118. <modular:search id="form1">
  119. <modular:key id="fevent" />
  120. </modular:search>
  121. <form id="form1" name="form1" method="post" modular:type="search">
  122. <input type="hidden" name="fevent" id="fevent" value="">
  123. <input type="hidden" name="materialgroup" id="materialgroup" value=""/>
  124. <div align="left" id="title">
  125. <ul>
  126. <li>계약단가조회</li>
  127. </ul>
  128. </div>
  129. <!-- 검색조건 시작 -->
  130. <table id="search-table" class="search-form-table">
  131. <colgroup>
  132. <col width="100" />
  133. <col width="480" />
  134. <col width="100" />
  135. <col width="*" />
  136. <col width="100" />
  137. </colgroup>
  138. <tr height="25">
  139. <th>현장</th>
  140. <td>
  141. <%=InputText.getSiteCodeNew("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%>
  142. </td>
  143. <th>계약명</th>
  144. <td>
  145. <INPUT type="text" name="p_cst_doc_name" class="input" value="<%= params.get("p_cst_doc_name") %>" style="width:90%">
  146. </td>
  147. <td class="button" rowspan="2">
  148. <span class="btnSearch center" id="btn_search"><a href="javascript:void(0);">검색</a></span>
  149. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_excel">엑셀</a></span>
  150. </td>
  151. </tr>
  152. <tr>
  153. <th>계약일</th>
  154. <td>
  155. <%= InputText.get("p_from_dt", initSearchDateStart, 15, 50, "Center, date, PerSize, readonly", "date", "") %>
  156. <a href="JavaScript:calendar('p_from_dt');"><img src="/img/buyer/button/bt_calender.gif" alt="달력" border="0" align="absmiddle" /></a>
  157. &nbsp;~&nbsp;
  158. <%= InputText.get("p_to_dt", initSearchDateEnd, 15, 50, "Center, date, PerSize, readonly", "date", "") %>
  159. <a href="JavaScript:calendar('p_to_dt');"><img src="/img/buyer/button/bt_calender.gif" alt="달력" border="0" align="absmiddle" /></a>
  160. </td>
  161. <th>업체명</th>
  162. <td>
  163. <INPUT type="text" name="p_member_name" class="input" value="<%= params.get("p_member_name") %>" style="width:90%">
  164. </td>
  165. </tr>
  166. </table>
  167. </form>
  168. <img src="/img/com/blank.gif" height="5px" />
  169. <div align="right" id="bugase">
  170. <ul>
  171. 단위(천원)
  172. </ul>
  173. </div>
  174. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 400px; overflow: auto;">
  175. <script>createIBSheet('sheet1','100%', '400px');</script>
  176. </div>