BidIngList.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  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/purchase/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:"STATUS_CD", Width:80, Align:"Center", ComboText:"<%=BID_STATUS_NM%>", ComboCode:"<%=BID_STATUS_CD%>"},
  126. {Header:'발주번호', Type:"Text", SaveName:"DEMANDED_ID", Width:80, Align:"Center", Hidden:"True"}
  127. ];
  128. init_sheet.HeaderMode = {Sort:1};
  129. IBS_InitSheet(sheetName, init_sheet);
  130. sheetName.SetDataAutoTrim(0);
  131. sheetName.SetEditable(false);
  132. setGridSize();
  133. }
  134. function searchSiteClose(result) {
  135. if( result == null ){
  136. $("#p_dept_nm").val("");
  137. $("#p_dept_cd").val("");
  138. }else{
  139. $("#p_dept_nm").val(result[1]);
  140. $("#p_dept_cd").val(result[0]);
  141. }
  142. setTimeout(function(){ fLayerPopClose('_searchSite');},100);
  143. }
  144. /**
  145. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  146. */
  147. function sheet1_OnSearchEnd(code, message) {
  148. if(code == 0) {
  149. setGridSize();
  150. sheet1.SetColFontColor("BID_MASTER_NM", "#0000ff");
  151. sheet1.SetColFontColor("POSTPONE_YN", "#ff0000");
  152. sheet1.SetColFontColor("MODIFY_YN", "#ff0000");
  153. } else {
  154. //조회 에러 수행
  155. alert(message);
  156. }
  157. }
  158. /**
  159. * IBSheet Event: Click
  160. */
  161. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  162. }
  163. /**
  164. * IBSheet size setting
  165. */
  166. function setGridSize() {sheet1.FitColWidth();}
  167. /**
  168. * IBSheet Event: DBLCLICK
  169. */
  170. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  171. if(Row == 0)return;
  172. if (Col == 6) {
  173. var status = sheet1.GetCellValue(Row,"STATUS_CD");
  174. $("#DEMANDED_ID").val(sheet1.GetCellValue(Row, "DEMANDED_ID"));
  175. $("#BID_NO").val(sheet1.GetCellValue(Row, "BID_NO"));
  176. $("#BID_DEG").val(sheet1.GetCellValue(Row, "BID_DEG"));
  177. if(status == "04"){//견적의뢰
  178. $("#fevent").val("FORM_SELECT");
  179. $("#form1").attr("action", "/bid/purchase/BidIng.screen");
  180. }else if(status == "03"){//현설의뢰
  181. $("#fevent").val("FORM_SELECT_SITE");
  182. $("#form1").attr("action", "/bid/purchase/SiteExplanIng.screen");
  183. }
  184. $("#form1").attr("target", "_self");
  185. $("#form1").attr("method", "post");
  186. $("#form1").submit();
  187. }
  188. }
  189. function sheet1_OnSmartResize(Width, Height) {
  190. sheet1.FitColWidth();
  191. autoResize();
  192. }
  193. function autoResize(){
  194. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  195. var iframeHeight= document.body.scrollHeight - t1_height;
  196. var iframeWidth= document.body.scrollWidth;
  197. sheet1.SetSheetHeight(iframeHeight);
  198. }
  199. </SCRIPT>
  200. <modular:search id="form1">
  201. <modular:key id="fevent" />
  202. </modular:search>
  203. <form id="form1" name="form1" method="post" modular:type="search">
  204. <TABLE id="t1" border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
  205. <INPUT type="hidden" name="fevent" id="fevent" value="">
  206. <INPUT type="hidden" name="DEMANDED_ID" value="">
  207. <INPUT type="hidden" name="BID_NO" value="">
  208. <INPUT type="hidden" name="BID_DEG" value="">
  209. <INPUT type='hidden' name="acct_id" value="<%= params.get("acct_id") %>">
  210. <div align="left" id="title" >
  211. <ul><li>구매_입찰진행</li></ul>
  212. </div>
  213. <!-- 검색조건 영역 : 시작 -->
  214. <TR><TD height="1">
  215. <!-- 검색조건 시작 -->
  216. <table id="search-table" class="search-form-table" >
  217. <colgroup>
  218. <col width="150" />
  219. <col width="250" />
  220. <col width="150" />
  221. <col width="250" />
  222. <col width="150" />
  223. <col width="250" />
  224. <col width="*" />
  225. </colgroup>
  226. <tr>
  227. <th>현장</th>
  228. <td colspan="3">
  229. <%=InputText.getSiteCodeNew("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%>
  230. </td>
  231. <td class="button" rowspan="3">
  232. <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
  233. <span class="btnSearch center" id="btnExcel"><a href="javascript:sheetExcelDown(sheet1,$('li').html());">ExcelDown</a></span>
  234. </td>
  235. </tr>
  236. <tr>
  237. <th>입찰공고명</th>
  238. <td>
  239. <INPUT type="text" name="P_BID_MASTER_NM" class="input" value="<%=params.get("P_BID_MASTER_NM") %>" style="width:90%">
  240. </td>
  241. <th>견적설명일</th>
  242. <td>
  243. <%= InputText.get("P_SITEDESCDATE_FROM_DT", params.get("P_SITEDESCDATE_FROM_DT"), 10, 50, "hangule,center, desc=견적설명일,ReadOnly") %>
  244. <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');">
  245. ~ <%= InputText.get("P_SITEDESCDATE_TO_DT", params.get("P_SITEDESCDATE_TO_DT"), 10, 50, "hangule,center, desc=견적설명일,ReadOnly") %>
  246. <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');">
  247. <IMG name="dataClear1" id="dataClear1" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
  248. </td>
  249. </tr>
  250. <tr>
  251. <th>견적제출마감일</th>
  252. <td>
  253. <%= InputText.get("p_bid_from_dt", params.get("p_bid_from_dt"), 10, 50, "hangule,center, desc=견적제출마감일,ReadOnly") %>
  254. <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');">
  255. ~ <%= InputText.get("p_bid_to_dt", params.get("p_bid_to_dt"), 10, 50, "hangule,center, desc=견적제출마감일,ReadOnly") %>
  256. <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');">
  257. <IMG name="dataClear2" id="dataClear2" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
  258. </td>
  259. <th>상태</th>
  260. <td>
  261. <%=CommCodeManager.getSelectCodeSearchList("DEMANDDED_STATUS","P_DEMANDED_STATUS","height=18;width:80px;","<option value=''>--전체--</option>",params.get("P_DEMANDED_STATUS"),"AND CHG_CODE01 = 'biding'") %>
  262. <!-- <SELECT class='input_select' id='p_demanded_status' name='p_demanded_status' style='width:80px;' >
  263. <option value=''>--전체--</option><OPTION value='03'>현설의뢰</OPTION><OPTION value='04'>견적의뢰</OPTION>
  264. </SELECT> -->
  265. </td>
  266. </tr>
  267. </table>
  268. </TD></TR>
  269. </TABLE>
  270. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 400px; overflow: auto;">
  271. <script>createIBSheet('sheet1','100%', '400px');</script>
  272. </div>
  273. </FORM>