BidIngList2.jsp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. <%--
  2. - Author(s) : Hyung min Son
  3. - Date : 2014.06.30
  4. - Description: 구매_입찰진행
  5. --%>
  6. <%@page import="monfox.toolkit.snmp.agent.modules.SnmpV2Mib.SysOREntry"%>
  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="com.udapsoft.waf.common.ui.InitCombo" %>
  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. //공통코드
  22. CommCodeManager commCodeManager = new CommCodeManager();
  23. InitCombo initCombo = new InitCombo();
  24. initCombo.makeComboData(commCodeManager.getCodeRowSet("BID_STATUS_CD"), "NAME", "CODE");
  25. String BID_STATUS_CD = initCombo.getCode();
  26. String BID_STATUS_NM = initCombo.getCodeName();
  27. initCombo = new InitCombo();
  28. initCombo.makeComboData(commCodeManager.getCodeRowSet("BID_CHK_YN","DETAILCD","Y"), "DETAILNM", "DETAILCD");
  29. String BID_CHK_CD = initCombo.getCode();
  30. String BID_CHK_NM = initCombo.getCodeName();
  31. %>
  32. <SCRIPT language="JavaScript">
  33. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  34. /*예약함수*/
  35. var sheet1 = new ibsheetObject();
  36. var sheet1Row;
  37. var sheet1PageNo = 1;
  38. var pageLastRowIndex = 1;
  39. var validationResult = false;
  40. var filterShow = false;
  41. function _onReady(){
  42. /**
  43. * IBSheet object initialize
  44. */
  45. gridInit(sheet1);
  46. autoResize();
  47. /**
  48. * Application Initialize
  49. */
  50. $("#btnSearch").click(function() {
  51. jQuery("#fevent").val("SHEET_SELECT");
  52. var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/BidIngList_sheet.screen";
  53. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  54. });
  55. /*
  56. 현장 팝업
  57. */
  58. $("#btn_dept").click(function() {
  59. PopsearchSite("");
  60. });
  61. $("#p_dept_nm").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == 8||keycode == 46){$("#p_dept_cd").val("");$("#p_dept_nm").val("");}});
  62. /* $("#p_demanded_status").change(function(){$("#btnSearch").click();}); */
  63. $("#P_BID_MASTER_NM").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
  64. $("#dataClear1").click(function(){$("#P_SITEDESCDATE_FROM_DT").val("");$("#P_SITEDESCDATE_TO_DT").val("");});
  65. $("#dataClear2").click(function(){$("#p_bid_from_dt").val("");$("#p_bid_to_dt").val("");});
  66. $("#btnSearch").click();
  67. }
  68. /**
  69. * IBSheet object initialize
  70. */
  71. function gridInit(sheetName){
  72. var init_sheet = {};
  73. init_sheet.Cfg = {SearchMode:2, Page:30};
  74. init_sheet.Cols = [
  75. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center", Hidden:"True"},
  76. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  77. {Header:'No.', Type:"Seq", SaveName:"NO", Width:0, Align:"Center", Hidden:"True"},
  78. {Header:'입찰번호', Type:"Text", SaveName:"BID_NO", Width:120, Align:"Center"},
  79. {Header:'차수', Type:"Text", SaveName:"BID_DEG", Width:30, Align:"Center"},
  80. {Header:'현장', Type:"Text", SaveName:"DEPT_NM", Width:200, Align:"Left"},
  81. {Header:'☞입찰공고명', Type:"Text", SaveName:"BID_MASTER_NM", Width:200, Align:"Left", Cursor:"pointer"},
  82. {Header:'견적설명회일시', Type:"Text", SaveName:"SITEDESCDATE", Width:80, Align:"Center"},
  83. {Header:'견적제출마감일시', Type:"Text", SaveName:"BID_TO_DT", Width:80, Align:"Center"},
  84. {Header:'연기', Type:"Combo", SaveName:"POSTPONE_YN", Width:30, Align:"Center", ComboText:"<%=BID_CHK_NM%>", ComboCode:"<%=BID_CHK_CD%>"},
  85. {Header:'정정', Type:"Combo", SaveName:"MODIFY_YN", Width:30, Align:"Center", ComboText:"<%=BID_CHK_NM%>", ComboCode:"<%=BID_CHK_CD%>"},
  86. {Header:'개찰요청', Type:"Combo", SaveName:"OPEN_CONFIRM_YN", Width:40, Align:"Center", ComboText:"<%=BID_CHK_NM%>", ComboCode:"<%=BID_CHK_CD%>"},
  87. {Header:'상태', Type:"Combo", SaveName:"STATUS_CD", Width:80, Align:"Center", ComboText:"<%=BID_STATUS_NM%>", ComboCode:"<%=BID_STATUS_CD%>"},
  88. {Header:'발주번호', Type:"Text", SaveName:"DEMANDED_ID", Width:80, Align:"Center", Hidden:"True"}
  89. ];
  90. init_sheet.HeaderMode = {Sort:1};
  91. IBS_InitSheet(sheetName, init_sheet);
  92. sheetName.SetDataAutoTrim(0);
  93. sheetName.SetEditable(false);
  94. sheetName.SetActionMenu("ExcelDown");
  95. setGridSize();
  96. }
  97. function sheet1_OnSelectMenu(Text, Code) {
  98. // text 또는 code값으로 Action수행
  99. switch(Text) {
  100. case "ExcelDown":
  101. sheetExcelDown(sheet1,$('li').html());
  102. break;
  103. }
  104. }
  105. function searchSiteClose(result) {
  106. if( result == null ){
  107. $("#p_dept_nm").val("");
  108. $("#p_dept_cd").val("");
  109. }else{
  110. $("#p_dept_nm").val(result[1]);
  111. $("#p_dept_cd").val(result[0]);
  112. }
  113. setTimeout(function(){fLayerPopClose('_searchSite'); },100);
  114. }
  115. /**
  116. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  117. */
  118. function sheet1_OnSearchEnd(code, message) {
  119. if(code == 0) {
  120. setGridSize();
  121. sheet1.SetColFontColor("BID_MASTER_NM", "#0000ff");
  122. sheet1.SetColFontColor("POSTPONE_YN", "#ff0000");
  123. sheet1.SetColFontColor("MODIFY_YN", "#ff0000");
  124. sheet1.SetColFontColor("OPEN_CONFIRM_YN", "#ff0000");
  125. } else {
  126. //조회 에러 수행
  127. alert(message);
  128. }
  129. }
  130. /**
  131. * IBSheet Event: Click
  132. */
  133. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  134. }
  135. /**
  136. * IBSheet size setting
  137. */
  138. function setGridSize() {sheet1.FitColWidth();}
  139. /**
  140. * IBSheet Event: DBLCLICK
  141. */
  142. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  143. if(Row == 0)return;
  144. if (Col == 6) {
  145. var status = sheet1.GetCellValue(Row,"STATUS_CD");
  146. $("#DEMANDED_ID").val(sheet1.GetCellValue(Row, "DEMANDED_ID"));
  147. $("#BID_NO").val(sheet1.GetCellValue(Row, "BID_NO"));
  148. $("#BID_DEG").val(sheet1.GetCellValue(Row, "BID_DEG"));
  149. if(status == "04"){//견적의뢰
  150. $("#fevent").val("FORM_SELECT");
  151. $("#form1").attr("action", "/bid/purchase/BidIng.screen");
  152. }else if(status == "03"){//현설의뢰
  153. $("#fevent").val("FORM_SELECT_SITE");
  154. $("#form1").attr("action", "/bid/purchase/SiteExplanIng.screen");
  155. }
  156. $("#form1").attr("target", "_self");
  157. $("#form1").attr("method", "post");
  158. $("#form1").submit();
  159. }
  160. }
  161. function sheet1_OnSmartResize(Width, Height) {
  162. sheet1.FitColWidth();
  163. autoResize();
  164. }
  165. function autoResize(){
  166. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  167. var iframeHeight= document.body.scrollHeight - t1_height;
  168. var iframeWidth= document.body.scrollWidth;
  169. sheet1.SetSheetHeight(iframeHeight);
  170. }
  171. </SCRIPT>
  172. <modular:search id="form1">
  173. <modular:key id="fevent" />
  174. </modular:search>
  175. <form id="form1" name="form1" method="post" modular:type="search">
  176. <TABLE id="t1" border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
  177. <INPUT type="hidden" name="fevent" id="fevent" value="">
  178. <INPUT type="hidden" name="DEMANDED_ID" value="">
  179. <INPUT type="hidden" name="BID_NO" value="">
  180. <INPUT type="hidden" name="BID_DEG" value="">
  181. <INPUT type='hidden' name="acct_id" value="<%= params.get("acct_id") %>">
  182. <div align="left" id="title" >
  183. <ul><li>구매_입찰진행</li></ul>
  184. </div>
  185. <!-- 검색조건 영역 : 시작 -->
  186. <TR><TD height="1">
  187. <!-- 검색조건 시작 -->
  188. <table id="search-table" class="search-form-table" >
  189. <colgroup>
  190. <col width="120PX" />
  191. <col/>
  192. <col width="120PX" />
  193. <col/>
  194. <col width="150PX" />
  195. </colgroup>
  196. <tr>
  197. <th>현장</th>
  198. <td colspan="3">
  199. <%=InputText.getSiteCodeNew("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%>
  200. </td>
  201. <td class="button" rowspan="3">
  202. <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
  203. <span class="btnSearch center" id="btnExcel"><a href="javascript:sheetExcelDown(sheet1,$('li').html());">ExcelDown</a></span>
  204. </td>
  205. </tr>
  206. <tr>
  207. <th>입찰공고명</th>
  208. <td>
  209. <INPUT type="text" name="P_BID_MASTER_NM" class="input" value="<%=params.get("P_BID_MASTER_NM") %>" style="width:90%">
  210. </td>
  211. <th>견적설명일</th>
  212. <td>
  213. <%= InputText.get("P_SITEDESCDATE_FROM_DT", params.get("P_SITEDESCDATE_TO_DT"), 10, 50, "hangule,center, desc=견적설명일,ReadOnly") %>
  214. <IMG name="start_img" id="calender_from" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('P_SITEDESCDATE_FROM_DT');">
  215. ~ <%= InputText.get("P_SITEDESCDATE_TO_DT", params.get("P_SITEDESCDATE_TO_DT"), 10, 50, "hangule,center, desc=견적설명일,ReadOnly") %>
  216. <IMG name="start_img" id="calender_to" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('P_SITEDESCDATE_TO_DT');">
  217. <IMG name="dataClear1" id="dataClear1" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
  218. </td>
  219. </tr>
  220. <tr>
  221. <th>견적제출마감일</th>
  222. <td>
  223. <%= InputText.get("p_bid_from_dt", params.get("p_bid_from_dt"), 10, 50, "hangule,center, desc=견적제출마감일,ReadOnly") %>
  224. <IMG name="start_img" id="calender_from" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('p_bid_from_dt');">
  225. ~ <%= InputText.get("p_bid_to_dt", params.get("p_bid_to_dt"), 10, 50, "hangule,center, desc=견적제출마감일,ReadOnly") %>
  226. <IMG name="start_img" id="calender_from" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('p_bid_to_dt');">
  227. <IMG name="dataClear2" id="dataClear2" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
  228. </td>
  229. <th>상태</th>
  230. <td>
  231. <%=CommCodeManager.getSelectCodeSearchList("BID_STATUS_CD","P_DEMANDED_STATUS","height=18;width:80px;","<option value=''>--전체--</option>",params.get("P_DEMANDED_STATUS"),"AND DETAILCD IN (03,04)","DETAILCD") %>
  232. </td>
  233. </tr>
  234. </table>
  235. </TD></TR>
  236. </TABLE>
  237. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 350px; overflow: auto;">
  238. <script>createIBSheet('sheet1','100%', '350px');</script>
  239. </div>
  240. </FORM>