BidResolutionList.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <%--
  2. - Author(s) : chj
  3. - Date : 2015-02-26
  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_RESOL_CD"), "NAME", "CODE");
  24. String BID_RESOL_CD = initCombo.getCode();
  25. String BID_RESOL_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/purchase/BidResolutionList_sheet.screen";
  49. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  50. });
  51. jQuery("#btnConfirm").click(function(){
  52. if(confirm("확정 하시겠습니까?")){
  53. jQuery("#fevent").val("CONFIRM_SHEET_LIST");
  54. var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/BidResolutionList_sheet.screen";
  55. var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
  56. }
  57. });
  58. jQuery("#btnDelete").click(function(){
  59. jQuery("#fevent").val("DELETE_SHEET_LIST");
  60. var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/BidResolutionList_sheet.screen";
  61. var result = Modular.view.IBSheet7.doSave(sheet1, url, $("#form1"), false);
  62. });
  63. /*
  64. 현장 팝업
  65. */
  66. $("#btn_dept").click(function() {
  67. PopsearchSite("");
  68. });
  69. $("#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("");}});
  70. $("#p_demanded_status").change(function(){$("#btnSearch").click();});
  71. $("#P_BID_MASTER_NM").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
  72. $("#btnSearch").click();
  73. }
  74. /**
  75. * IBSheet object initialize
  76. */
  77. function gridInit(sheetName){
  78. var init_sheet = {};
  79. init_sheet.Cfg = {SearchMode:2, Page:30};
  80. init_sheet.Cols = [
  81. {Header:'선택', Type:"CheckBox", SaveName:"CHECK", Width:50, Align:"Center"},
  82. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True" },
  83. {Header:'No.', Type:"Seq", SaveName:"NO", Width:0, Align:"Center", Hidden:"True", Edit:"False"},
  84. {Header:'입찰번호', Type:"Text", SaveName:"BID_NO", Width:120, Align:"Center", Edit:"False"},
  85. {Header:'차수', Type:"Text", SaveName:"BID_DEG", Width:30, Align:"Center", Edit:"False"},
  86. {Header:'현장', Type:"Text", SaveName:"DEPT_NM", Width:170, Align:"Left", Edit:"False"},
  87. {Header:'☞입찰공고명', Type:"Text", SaveName:"BID_MASTER_NM", Width:150, Align:"Left", Cursor:"pointer", Edit:"False"},
  88. {Header:'업체id', Type:"Text", SaveName:"VENDOR_CD", Width:30, Align:"Center", Edit:"False", Hidden:"True"},
  89. {Header:'업체명', Type:"Text", SaveName:"VENDOR_NM", Width:100, Align:"Left", Edit:"False"},
  90. {Header:'개찰일시', Type:"Text", SaveName:"OPEN_DT", Width:80, Align:"Center", Edit:"False"},
  91. {Header:'TBE', Type:"Text", SaveName:"TBE_FIN_DT", Width:80, Align:"Center", Edit:"False"},
  92. {Header:'개찰자', Type:"Text", SaveName:"OPEN_EMPNM", Width:80, Align:"Center", Edit:"False"},
  93. {Header:'개찰자ID', Type:"Text", SaveName:"OPEN_EMPID", Width:80, Align:"Center", Hidden:"True", Edit:"False"},
  94. {Header:'상태', Type:"Combo", SaveName:"STATUS_CD", Width:80, Align:"Center", ComboText:"<%=BID_RESOL_NM%>", ComboCode:"<%=BID_RESOL_CD%>", Edit:"False"},
  95. {Header:'발주번호', Type:"Text", SaveName:"DEMANDED_ID", Width:80, Align:"Center", Hidden:"True", Edit:"False"},
  96. ];
  97. init_sheet.HeaderMode = {Sort:1,HeaderCheck:0};
  98. IBS_InitSheet(sheetName, init_sheet);
  99. sheetName.SetDataAutoTrim(0);
  100. sheetName.SetActionMenu("ExcelDown");
  101. setGridSize();
  102. }
  103. function sheet1_OnSelectMenu(Text, Code) {
  104. // text 또는 code값으로 Action수행
  105. switch(Text) {
  106. case "ExcelDown":
  107. sheetExcelDown(sheet1,$('li').html());
  108. break;
  109. }
  110. }
  111. function searchSiteClose(result) {
  112. if( result == null ){
  113. $("#p_dept_nm").val("");
  114. $("#p_dept_cd").val("");
  115. }else{
  116. $("#p_dept_nm").val(result[1]);
  117. $("#p_dept_cd").val(result[0]);
  118. }
  119. setTimeout(function(){fLayerPopClose('_searchSite');},100);
  120. }
  121. /**
  122. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  123. */
  124. function sheet1_OnSearchEnd(code, message) {
  125. if(code == 0) {
  126. setGridSize();
  127. sheet1.SetColFontColor("BID_MASTER_NM", "#0000ff");
  128. } else {
  129. //조회 에러 수행
  130. alert(message);
  131. }
  132. }
  133. function sheet1_OnSaveEnd(code, msg)
  134. {
  135. var event = jQuery("#fevent").val();
  136. if(event == "CONFIRM_SHEET_LIST"){
  137. if(code>= "0"){
  138. alert("확정 되었습니다.");
  139. jQuery("#btnSearch").click();
  140. }else{
  141. alert("에러가 발생하였습니다.\n"+msg);
  142. }
  143. }else if(event == "DELETE_SHEET_LIST"){
  144. if(code >= "0"){
  145. alert("삭제 되었습니다.");
  146. jQuery("#btnSearch").click();
  147. }else{
  148. alert("에러가 발생하였습니다.\n"+msg);
  149. }
  150. }
  151. }
  152. /**
  153. * IBSheet Event: Click
  154. */
  155. function sheet1_OnChange(Row, Col, Value) {
  156. var sSaveName = sheet1.ColSaveName(Col);
  157. if(sSaveName == "CHECK"){
  158. var CheckValue = Value;
  159. var bidNo = sheet1.GetCellValue(Row, "BID_NO");
  160. for(var i =1; i <= sheet1.LastRow(); i++){
  161. if(bidNo == sheet1.GetCellValue(i , "BID_NO")){
  162. sheet1.SetCellValue(i , "CHECK", CheckValue,0);
  163. }
  164. }
  165. }
  166. }
  167. /**
  168. * IBSheet size setting
  169. */
  170. function setGridSize() {sheet1.FitColWidth();}
  171. /**
  172. * IBSheet Event: DBLCLICK
  173. */
  174. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  175. if(Row == 0)return;
  176. var sSaveName = sheet1.ColSaveName(Col);
  177. if (sSaveName == "BID_MASTER_NM") {
  178. var status = sheet1.GetCellValue(Row,"STATUS_CD");
  179. $("#DEMANDED_ID").val(sheet1.GetCellValue(Row, "DEMANDED_ID"));
  180. $("#BID_NO").val(sheet1.GetCellValue(Row, "BID_NO"));
  181. $("#BID_DEG").val(sheet1.GetCellValue(Row, "BID_DEG"));
  182. $("#VENDOR_CD").val(sheet1.GetCellValue(Row, "VENDOR_CD"));
  183. $("#fevent").val("FORM_SELECT");
  184. $("#form1").attr("action", "/bid/purchase/BidResolution.screen");
  185. $("#form1").attr("target", "_self");
  186. $("#form1").attr("method", "post");
  187. $("#form1").submit();
  188. }
  189. }
  190. function sheet1_OnSmartResize(Width, Height) {
  191. sheet1.FitColWidth();
  192. autoResize();
  193. }
  194. function autoResize(){
  195. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  196. var iframeHeight= document.body.scrollHeight - t1_height;
  197. var iframeWidth= document.body.scrollWidth;
  198. sheet1.SetSheetHeight(iframeHeight);
  199. }
  200. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  201. </SCRIPT>
  202. <modular:search id="form1">
  203. <modular:key id="fevent" />
  204. </modular:search>
  205. <form id="form1" name="form1" method="post" modular:type="search">
  206. <TABLE id="t1" border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
  207. <INPUT type="hidden" name="fevent" id="fevent" value="">
  208. <INPUT type="hidden" name="DEMANDED_ID" value="">
  209. <INPUT type="hidden" name="BID_NO" value="">
  210. <INPUT type="hidden" name="BID_DEG" value="">
  211. <INPUT type="hidden" name="VENDOR_CD" value="">
  212. <INPUT type='hidden' name="acct_id" value="<%= params.get("acct_id") %>">
  213. <div align="left" id="title" >
  214. <ul><li>구매_시행결의</li></ul>
  215. </div>
  216. <!-- 검색조건 영역 : 시작 -->
  217. <TR><TD height="1">
  218. <!-- 검색조건 시작 -->
  219. <table id="search-table" class="search-form-table" >
  220. <colgroup>
  221. <col width="100" />
  222. <col/>
  223. <col width="100" />
  224. <col/>
  225. <col width="250" />
  226. </colgroup>
  227. <tr>
  228. <th>현장</th>
  229. <td colspan="3">
  230. <%=InputText.getSiteCodeNew("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%>
  231. </td>
  232. <td class="button" rowspan="2">
  233. <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
  234. <span class="btnSearch center" id="btnConfirm"><a href="javascript:void(0);">확정</a></span>
  235. <span class="btnSearch center" id="btnDelete"><a href="javascript:void(0);">삭제</a></span>
  236. </td>
  237. </tr>
  238. <tr>
  239. <th>입찰공고명</th>
  240. <td>
  241. <INPUT type="text" name="P_BID_MASTER_NM" class="input" value="<%=params.get("P_BID_MASTER_NM") %>" style="width:90%">
  242. </td>
  243. <th>상태</th>
  244. <td><%=CommCodeManager.getSelectCodeSearchList("BID_RESOL_CD","P_STATUS","height=18;width:80px;","<option value=''>--전체--</option>",params.get("P_STATUS"),"","DETAILCD") %>
  245. <!-- <SELECT class='input_select' id='p_demanded_status' name='p_demanded_status' style='width:100px' >
  246. <option value=''>--전체--</option><OPTION value='04'>기술검토대상</OPTION><OPTION value='05'>기술검토의뢰</OPTION><OPTION value='06'>업체선정대상</OPTION>
  247. </SELECT> -->
  248. </td>
  249. </tr>
  250. </table>
  251. </TD></TR>
  252. </TABLE>
  253. <div id="sheet1_div" style=" padding-top:5px; height: auto; min-height: 300px; overflow: auto;">
  254. <script>createIBSheet('sheet1','100%', '300px');</script>
  255. </div>
  256. </FORM>