OrderReqeustList.jsp 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <%--
  2. - Author(s) : Hyung min Son
  3. - Date : 2014.06.18
  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="com.udapsoft.waf.common.ui.InitCombo" %>
  11. <%@ page import="kr.co.udapsoft.common.code.CommCodeManager" %>
  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. InitCombo initCombo2 = new InitCombo();
  27. initCombo2.makeComboData(commCodeManager.getCodeRowSet("DEMANDDED_STATUS"), "NAME", "CODE");
  28. String DEMANDDED_STATUS_CD = initCombo2.getCode();
  29. String DEMANDDED_STATUS_NM = initCombo2.getCodeName();
  30. if(params.get("P_DEMANDED_STATUS").isEmpty()){
  31. params.set("P_DEMANDED_STATUS","3");
  32. }
  33. %>
  34. <SCRIPT language="JavaScript">
  35. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  36. /*예약함수*/
  37. var sheet1 = new ibsheetObject();
  38. var sheet1Row;
  39. var sheet1PageNo = 1;
  40. var pageLastRowIndex = 1;
  41. var validationResult = false;
  42. var filterShow = false;
  43. function _onReady(){
  44. /**
  45. * IBSheet object initialize
  46. */
  47. gridInit(sheet1);
  48. autoResize();
  49. /**
  50. * Application Initialize
  51. */
  52. jQuery("#btnSearch").click(function() {
  53. jQuery("#fevent").val("SHEET_SELECT");
  54. var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/OrderReqeustList_sheet.screen";
  55. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  56. });
  57. /* $("#P_DEMANDED_STATUS").change(function(){
  58. $("#btnSearch").click();
  59. }); */
  60. $("#p_dept_nm").keydown(function (event){
  61. var keycode = (event.keyCode ? event.keyCode : event.which);
  62. if(keycode == 8 || keycode == 46){
  63. $("#p_dept_cd").val("");$("#p_dept_nm").val("");
  64. }
  65. });
  66. $("#P_DEMANDED_TITLE").keydown(function (event){
  67. var keycode = (event.keyCode ? event.keyCode : event.which);
  68. if(keycode == 13){
  69. $("#btnSearch").click();
  70. }
  71. });
  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:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center", Hidden:"True"},
  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"},
  84. {Header:'입찰방법', Type:"Combo", SaveName:"ONBID_YN", Width:0, Align:"Center", ComboText:"<%=ONBID_NM%>", ComboCode:"<%=ONBID_CD%>"},
  85. {Header:'발주의뢰번호', Type:"Text", SaveName:"DEMANDED_NO", Width:150, Align:"Center"},
  86. {Header:'현장', Type:"Text", SaveName:"DEPT_NM", Width:200, Align:"Left"},
  87. {Header:'☞발주의뢰명', Type:"Text", SaveName:"DEMANDED_TITLE", Width:200, Align:"Left", Cursor:"pointer"},
  88. {Header:'발주의뢰 부서', Type:"Text", SaveName:"BUSEO_NM", Width:0, Align:"Center"},
  89. {Header:'발주의뢰자', Type:"Text", SaveName:"EMP_NM", Width:0, Align:"Center"},
  90. {Header:'발주의뢰자', Type:"Text", SaveName:"EMP_NO", Width:0, Align:"Center", Hidden:"True"},
  91. {Header:'발주의뢰일', Type:"Text", SaveName:"DEMANDED_DATE", Width:0, Align:"Center"},
  92. {Header:'접수자', Type:"Text", SaveName:"RECEIPT_NM", Width:0, Align:"Center"},
  93. {Header:'접수자', Type:"Text", SaveName:"RECEIPT_NO", Width:0, Align:"Center", Hidden:"True"},
  94. {Header:'상태', Type:"Combo", SaveName:"DEMANDED_STATUS", Width:50, Align:"Center", ComboText:"<%=DEMANDDED_STATUS_NM%>", ComboCode:"<%=DEMANDDED_STATUS_CD%>"},
  95. {Header:'BID_DEG', Type:"Text", SaveName:"BID_DEG", Width:100, Align:"Center", Hidden:"True"},
  96. {Header:'DEMANDED_ID', Type:"Text", SaveName:"DEMANDED_ID", Width:100, Align:"Center", Hidden:"True"}
  97. ];
  98. init_sheet.HeaderMode = {Sort:1};
  99. IBS_InitSheet(sheetName, init_sheet);
  100. sheetName.SetDataAutoTrim(0);
  101. sheetName.SetEditable(false);
  102. sheetName.SetActionMenu("ExcelDown");
  103. setGridSize();
  104. }
  105. function sheet1_OnSelectMenu(Text, Code) {
  106. // text 또는 code값으로 Action수행
  107. switch(Text) {
  108. case "ExcelDown":
  109. sheetExcelDown(sheet1,$('li').html());
  110. break;
  111. }
  112. }
  113. /**
  114. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  115. */
  116. function sheet1_OnSearchEnd(code, message) {
  117. if(code == 0) {
  118. setGridSize();
  119. sheet1.SetColFontColor("DEMANDED_TITLE", "#0000ff");
  120. } else {
  121. //조회 에러 수행
  122. alert(message);
  123. }
  124. }
  125. /**
  126. * IBSheet Event: Click
  127. */
  128. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  129. if(Row == 0)return;
  130. if (Col == 6) {
  131. jQuery("#DEMANDED_ID").val(sheet1.GetCellValue(Row, "DEMANDED_ID"));
  132. jQuery("#BID_NO").val(sheet1.GetCellValue(Row, "BID_NO"));
  133. jQuery("#BID_DEG").val(sheet1.GetCellValue(Row, "BID_DEG"));
  134. jQuery("#fevent").val("FORM_SELECT");
  135. jQuery("#form1").attr("action", "/bid/purchase/OrderReqeust.screen");
  136. jQuery("#form1").attr("target", "_self");
  137. jQuery("#form1").attr("method", "post");
  138. jQuery("#form1").submit();
  139. }
  140. }
  141. /**
  142. * IBSheet size setting
  143. */
  144. function setGridSize() {
  145. sheet1.FitColWidth();
  146. }
  147. function sheet1_OnSmartResize(Width, Height) {
  148. sheet1.FitColWidth();
  149. autoResize();
  150. }
  151. function autoResize(){
  152. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  153. var iframeHeight= document.body.scrollHeight - t1_height;
  154. var iframeWidth= document.body.scrollWidth;
  155. sheet1.SetSheetHeight(iframeHeight);
  156. }
  157. function seacrch(){
  158. jQuery("#fevent").val("SHEET_SELECT");
  159. var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/OrderReqeustList_sheet.screen";
  160. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  161. }
  162. </SCRIPT>
  163. <modular:search id="form1">
  164. <modular:key id="fevent" />
  165. </modular:search>
  166. <BODY onresize="autoResize()" >
  167. <form id="form1" name="form1" method="post" modular:type="search">
  168. <TABLE id="t1" border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
  169. <TR><TD height="1">
  170. <INPUT type="hidden" name="p_user_sabun" value="">
  171. <INPUT type="hidden" name="fevent" id="fevent" value="">
  172. <INPUT type="hidden" name="p_user_pw" value="">
  173. <INPUT type="hidden" name="P_DEMANDED_KIND" value="O">
  174. <INPUT type="hidden" name="p_tel_no" value="">
  175. <INPUT type="hidden" name="p_hand_tel_no" value="">
  176. <INPUT type="hidden" name="BID_DEG" value="">
  177. <INPUT type="hidden" name="BID_NO" value="">
  178. <INPUT type="hidden" name="DEMANDED_ID" value="">
  179. <INPUT type="hidden" name="j_usertype" value="head">
  180. <input type='hidden' name='login_id' >
  181. <input type='hidden' name='login_pw' >
  182. <INPUT type="hidden" name="j_admin_login_gb" value="Y">
  183. </TD></TR>
  184. <div align="left" id="title" >
  185. <ul><li>구매_발주의뢰접수</li></ul>
  186. </div>
  187. <!-- 검색조건 영역 : 시작 -->
  188. <TR><TD height="1">
  189. <!-- 검색조건 시작 -->
  190. <table id="search-table" class="search-form-table" >
  191. <colgroup>
  192. <col width="100" />
  193. <col/>
  194. <col width="100" />
  195. <col/>
  196. <col width="150" />
  197. </colgroup>
  198. <tr>
  199. <th>현장</th>
  200. <td colspan="3">
  201. <%-- <%=InputText.getSiteCode("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%> --%>
  202. <%=InputText.getSiteCodeNew("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%>
  203. </td>
  204. <td class="button" rowspan="2">
  205. <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
  206. <span class="btnSearch center" id="btnExcel"><a href="javascript:sheetExcelDown(sheet1,$('li').html());">ExcelDown</a></span>
  207. </td>
  208. </tr>
  209. <tr>
  210. <th>발주의뢰명</th>
  211. <td>
  212. <INPUT type="text" name="P_DEMANDED_TITLE" id="P_DEMANDED_TITLE" class="input" value="<%=params.get("P_DEMANDED_TITLE") %>" style="width:90%">
  213. </td>
  214. <th>상태</th>
  215. <td>
  216. <%=CommCodeManager.getSelectCodeList("DEMANDDED_STATUS","P_DEMANDED_STATUS","height=18;width:80px;","<option value=''>--전체--</option>",params.get("P_DEMANDED_STATUS")) %>
  217. </td>
  218. </tr>
  219. </table>
  220. </TD></TR>
  221. <!-- 검색조건 영역 : 종료 -->
  222. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 종료 -->
  223. </TABLE>
  224. <div id="sheet1_div" style=" padding-top:5px; height: auto; min-height: 400px; overflow: auto;">
  225. <script>createIBSheet('sheet1','100%', '450px');</script>
  226. </div>
  227. </FORM>