BidIngList.jsp 12 KB

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