BidPlanList.jsp 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <%--
  2. - Author(s) : Hyung min Son
  3. - Date : 2014.06.23
  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="com.udapsoft.waf.common.ui.InitCombo" %>
  10. <%@ page import="kr.co.udapsoft.common.code.CommCodeManager" %>
  11. <%@ page import="kr.co.hsnc.common.util.*"%>
  12. <%@ page import="kr.co.hsnc.common.sql.*" %>
  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("ONBID"), "NAME", "CODE");
  24. String ONBID_CD = initCombo.getCode();
  25. String ONBID_NM = initCombo.getCodeName();
  26. %>
  27. <script language="javascript" src="/js/popup.js"></script>
  28. <SCRIPT language="JavaScript">
  29. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  30. /*예약함수*/
  31. var sheet1 = new ibsheetObject();
  32. var sheet1Row;
  33. var sheet1PageNo = 1;
  34. var pageLastRowIndex = 1;
  35. var validationResult = false;
  36. var filterShow = false;
  37. function _onReady(){
  38. /**
  39. * IBSheet object initialize
  40. */
  41. gridInit(sheet1);
  42. autoResize();
  43. /**
  44. * Application Initialize
  45. */
  46. $("#btnSearch").click(function() {
  47. jQuery("#fevent").val("SHEET_SELECT");
  48. var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/outside/BidPlanList_sheet.screen";
  49. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  50. });
  51. /*
  52. 현장 팝업
  53. */
  54. $("#btn_dept").click(function() {
  55. PopsearchSite("");
  56. });
  57. $("#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("");}});
  58. $("#p_demanded_from_dt").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == 8||keycode == 46){$("#p_demanded_from_dt").val("");}});
  59. $("#p_demanded_to_dt").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == 8||keycode == 46){$("#p_demanded_to_dt").val("");}});
  60. $("#p_rceipt_from_dt").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == 8||keycode == 46){$("#p_rceipt_from_dt").val("");}});
  61. $("#p_rceipt_to_dt").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == 8||keycode == 46){$("#p_rceipt_to_dt").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. $("#btnSearch").click();
  65. //발주의뢰일 To
  66. $("#p_demanded_to_dt").change(function() {
  67. if($("#p_demanded_from_dt").val().length > 0){
  68. if($("#p_demanded_to_dt").val() <= $("#p_demanded_from_dt").val()){
  69. alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
  70. $("#p_demanded_to_dt").val("");
  71. return;
  72. }
  73. }
  74. });
  75. //발주 의뢰일 form
  76. $("#p_demanded_from_dt").change(function() {
  77. if($("#p_demanded_to_dt").val().length > 0){
  78. if($("#p_demanded_from_dt").val() >= $("#p_demanded_to_dt").val()){
  79. alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
  80. $("#p_demanded_from_dt").val("");
  81. return;
  82. }
  83. }
  84. });
  85. //접수일 form
  86. $("#p_rceipt_from_dt").change(function() {
  87. if($("#p_rceipt_to_dt").val().length > 0){
  88. if($("#p_rceipt_from_dt").val() > $("#p_rceipt_to_dt").val()){
  89. alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
  90. $("#p_rceipt_from_dt").val("");
  91. return;
  92. }
  93. }
  94. });
  95. //접수일 to
  96. $("#p_rceipt_to_dt").change(function() {
  97. if($("#p_rceipt_from_dt").val().length > 0){
  98. if($("#p_rceipt_to_dt").val() < $("#p_rceipt_from_dt").val()){
  99. alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
  100. $("#p_rceipt_to_dt").val("");
  101. return;
  102. }
  103. }
  104. });
  105. $("#dataClear1").click(function(){$("#p_demanded_from_dt").val("");$("#p_demanded_to_dt").val("");});
  106. $("#dataClear2").click(function(){$("#p_rceipt_from_dt").val("");$("#p_rceipt_to_dt").val("");});
  107. }
  108. /**
  109. * IBSheet object initialize
  110. */
  111. function gridInit(sheetName){
  112. var init_sheet = {};
  113. init_sheet.Cfg = {SearchMode:2, Page:30};
  114. init_sheet.Cols = [
  115. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center", Hidden:"True"},
  116. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  117. {Header:'No.', Type:"Seq", SaveName:"NO", Width:0, Align:"Center", Hidden:"True"},
  118. {Header:'입찰번호', Type:"Text", SaveName:"BID_NO", Width:120, Align:"Center"},
  119. {Header:'차수', Type:"Text", SaveName:"BID_DEG", Width:30, Align:"Center"},
  120. {Header:'현장', Type:"Text", SaveName:"DEPT_NM", Width:200, Align:"Left"},
  121. {Header:'☞입찰공고명', Type:"Text", SaveName:"BID_MASTER_NM", Width:200, Align:"Left", Cursor:"pointer"},
  122. {Header:'입찰방법', Type:"Combo", SaveName:"ONBID_YN", Width:0, Align:"Center", ComboText:"<%=ONBID_NM%>", ComboCode:"<%=ONBID_CD%>"},
  123. {Header:'발주의뢰일', Type:"Text", SaveName:"DEMANDED_DATE", Width:0, Align:"Center"},
  124. {Header:'접수일', Type:"Text", SaveName:"RECEIPT_DATE", Width:0, Align:"Center"},
  125. {Header:'상태', Type:"Text", SaveName:"STATUS_NM", Width:50, Align:"Center"},
  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. sheetName.SetActionMenu("ExcelDown");
  133. setGridSize();
  134. }
  135. function sheet1_OnSelectMenu(Text, Code) {
  136. // text 또는 code값으로 Action수행
  137. switch(Text) {
  138. case "ExcelDown":
  139. sheetExcelDown(sheet1,$('li').html());
  140. break;
  141. }
  142. }
  143. /**
  144. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  145. */
  146. function sheet1_OnSearchEnd(code, message) {
  147. if(code == 0) {
  148. setGridSize();
  149. sheet1.SetColFontColor("BID_MASTER_NM", "#0000ff");
  150. } else {
  151. //조회 에러 수행
  152. alert(message);
  153. }
  154. }
  155. /**
  156. * IBSheet Event: Click
  157. */
  158. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  159. }
  160. /**
  161. * IBSheet size setting
  162. */
  163. function setGridSize() {sheet1.FitColWidth();}
  164. /**
  165. * IBSheet Event: DBLCLICK
  166. */
  167. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  168. if(Row == 0)return;
  169. if (Col == 6) {
  170. if(sheet1.GetCellValue(Row, "ONBID_YN") == "Y"){
  171. $("#DEMANDED_ID").val(sheet1.GetCellValue(Row, "DEMANDED_ID"));
  172. $("#BID_NO").val(sheet1.GetCellValue(Row, "BID_NO"));
  173. $("#BID_DEG").val(sheet1.GetCellValue(Row, "BID_DEG"));
  174. $("#fevent").val("FORM_SELECT");
  175. $("#form1").attr("action", "/bid/outside/BidPlan.screen");
  176. $("#form1").attr("target", "_self");
  177. $("#form1").attr("method", "post");
  178. $("#form1").submit();
  179. }else if(sheet1.GetCellValue(Row, "ONBID_YN") == "N"){
  180. $("#DEMANDED_ID").val(sheet1.GetCellValue(Row, "DEMANDED_ID"));
  181. $("#BID_NO").val(sheet1.GetCellValue(Row, "BID_NO"));
  182. $("#BID_DEG").val(sheet1.GetCellValue(Row, "BID_DEG"));
  183. $("#fevent").val("FORM_SELECT");
  184. $("#form1").attr("action", "/bid/outside/OfflineBid.screen");
  185. $("#form1").attr("target", "_self");
  186. $("#form1").attr("method", "post");
  187. $("#form1").submit();
  188. }
  189. }
  190. }
  191. function sheet1_OnSmartResize(Width, Height) {
  192. sheet1.FitColWidth();
  193. autoResize();
  194. }
  195. function autoResize(){
  196. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  197. var iframeHeight= document.body.scrollHeight - t1_height;
  198. var iframeWidth= document.body.scrollWidth;
  199. sheet1.SetSheetHeight(iframeHeight);
  200. }
  201. function searchSiteClose(result) {
  202. //PopsearchSite
  203. if( result == null ){
  204. $("#p_dept_nm").val("");
  205. $("#p_dept_cd").val("");
  206. }else{
  207. $("#p_dept_nm").val(result[1]);
  208. $("#p_dept_cd").val(result[0]);
  209. }
  210. setTimeout(function(){fLayerPopClose('_searchSite');},100);
  211. }
  212. </SCRIPT>
  213. <modular:search id="form1">
  214. <modular:key id="fevent" />
  215. </modular:search>
  216. <form id="form1" name="form1" method="post" modular:type="search">
  217. <TABLE id="t1" border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
  218. <TR><TD height="1">
  219. <INPUT type="hidden" name="fevent" id="fevent" value="">
  220. <INPUT type="hidden" name="DEMANDED_ID" value="">
  221. <INPUT type="hidden" name="BID_NO" value="">
  222. <INPUT type="hidden" name="BID_DEG" value="">
  223. <INPUT type='hidden' name="acct_id" value="<%= params.get("acct_id") %>">
  224. <div align="left" id="title" >
  225. <ul><li>외주_입찰계획</li></ul>
  226. </div>
  227. </TD></TR>
  228. <!-- 검색조건 영역 : 시작 -->
  229. <TR><TD height="1">
  230. <TR><TD height="1">
  231. <!-- 검색조건 시작 -->
  232. <table id="search-table" class="search-form-table" >
  233. <colgroup>
  234. <col width="100" />
  235. <col/>
  236. <col width="100" />
  237. <col/>
  238. <col width="150" />
  239. </colgroup>
  240. <tr>
  241. <th>현장</th>
  242. <td colspan="3">
  243. <%=InputText.getSiteCodeNew("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%>
  244. </td>
  245. <td class="button" rowspan="3">
  246. <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
  247. <span class="btnSearch center" id="btnExcel"><a href="javascript:sheetExcelDown(sheet1,$('li').html());">ExcelDown</a></span>
  248. </td>
  249. </tr>
  250. <tr>
  251. <th>입찰공고명</th>
  252. <td>
  253. <INPUT type="text" name="P_BID_MASTER_NM" class="input" value="<%=params.get("P_BID_MASTER_NM") %>" style="width:90%">
  254. </td>
  255. <th>발주의뢰일</th>
  256. <td>
  257. <!-- <INPUT type="text" name="p_demanded_from_dt" id="p_demanded_from_dt" class="input" value="" onClick="JavaScript:dlgCalendar('p_demanded_from_dt');" style="width:70px;text-align:center" ReadOnly> -->
  258. <%= InputText.get("p_demanded_from_dt", params.get("p_demanded_from_dt"), 10, 50, "hangule,center, desc=발주의뢰일,ReadOnly") %>
  259. <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_demanded_from_dt');">
  260. ~
  261. <%= InputText.get("p_demanded_to_dt", params.get("p_demanded_from_dt"), 10, 50, "hangule,center, desc=발주의뢰일,ReadOnly") %>
  262. <!-- <INPUT type="text" name="p_demanded_to_dt" id="p_demanded_to_dt" class="input" value="" onClick="JavaScript:dlgCalendar('p_demanded_to_dt');" style="width:70px;text-align:center" ReadOnly> -->
  263. <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_demanded_to_dt');">
  264. <IMG name="dataClear1" id="dataClear1" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
  265. </td>
  266. </tr>
  267. <tr>
  268. <th>접수일</th>
  269. <td>
  270. <!-- <INPUT type="text" name="p_rceipt_from_dt" class="input" value="" onClick="JavaScript:dlgCalendar('p_rceipt_from_dt');" style="width:70px;text-align:center" ReadOnly> -->
  271. <%= InputText.get("p_rceipt_from_dt", params.get("p_rceipt_from_dt"), 10, 50, "hangule, center,desc=접수일,ReadOnly") %>
  272. <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_rceipt_from_dt');">
  273. ~ <%= InputText.get("p_rceipt_to_dt", params.get("p_rceipt_to_dt"), 10, 50, "hangule,center, desc=접수일,ReadOnly") %>
  274. <!-- <INPUT type="text" name="p_rceipt_to_dt" class="input" value="" onClick="JavaScript:dlgCalendar('p_rceipt_to_dt');" style="width:70px;text-align:center" ReadOnly> -->
  275. <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_rceipt_to_dt');">
  276. <IMG name="dataClear2" id="dataClear2" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
  277. </td>
  278. <th>상태</th>
  279. <td><%=CommCodeManager.getSelectCodeSearchList("BID_STATUS_CD","P_DEMANDED_STATUS","height=18;width:80px;","<option value=''>--전체--</option>",params.get("P_DEMANDED_STATUS"),"AND DETAILCD IN ('00','01','02')","DETAILCD") %>
  280. <%-- <SELECT class='input_select' id='p_demanded_status' name='p_demanded_status' style='width:80px;' >
  281. <option value=''>--전체--</option><OPTION value='00'>계획대상</OPTION><OPTION value='01'>작성중</OPTION><OPTION value='02'>결재중</OPTION>
  282. </SELECT> --%>
  283. </td>
  284. </tr>
  285. </table>
  286. </TD></TR>
  287. </TABLE>
  288. <div id="sheet1_div" style=" padding-top:5px; height: auto; min-height: 300px; overflow: auto;">
  289. <script>createIBSheet('sheet1','100%', '300px');</script>
  290. </div>
  291. </FORM>