QuotResultList.jsp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. <%--
  2. - Author(s) : Hoonseok Choi
  3. - Date : 2023.11.10
  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. %>
  24. <script language="javascript" src="/js/popup.js"></script>
  25. <SCRIPT language="JavaScript">
  26. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  27. /*예약함수*/
  28. var sheet1 = new ibsheetObject();
  29. var sheet1Row;
  30. var sheet1PageNo = 1;
  31. var pageLastRowIndex = 1;
  32. var validationResult = false;
  33. var filterShow = false;
  34. function _onReady(){
  35. /**
  36. * IBSheet object initialize
  37. */
  38. gridInit(sheet1);
  39. autoResize();
  40. /**
  41. * Application Initialize
  42. */
  43. $("#btnSearch").click(function() {
  44. jQuery("#fevent").val("SHEET_SELECT");
  45. var url = Modular.model.PageContext.CONTEXT_ROOT + "/quot/outside/QuotResultList_sheet.screen";
  46. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  47. });
  48. $("#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("");}});
  49. $("#p_request_from_dt").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == 8||keycode == 46){$("#p_request_from_dt").val("");}});
  50. $("#p_request_to_dt").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == 8||keycode == 46){$("#p_request_to_dt").val("");}});
  51. /* $("#p_demanded_status").change(function(){$("#btnSearch").click();}); */
  52. $("#P_QUOT_BID_MASTER_NM").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
  53. $("#btnSearch").click();
  54. //발주의뢰일 To
  55. $("#p_request_to_dt").change(function() {
  56. if($("#p_request_from_dt").val().length > 0){
  57. if($("#p_request_to_dt").val() <= $("#p_request_from_dt").val()){
  58. alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
  59. $("#p_request_to_dt").val("");
  60. return;
  61. }
  62. }
  63. });
  64. //발주 의뢰일 form
  65. $("#p_request_from_dt").change(function() {
  66. if($("#p_request_to_dt").val().length > 0){
  67. if($("#p_request_from_dt").val() >= $("#p_request_to_dt").val()){
  68. alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
  69. $("#p_request_from_dt").val("");
  70. return;
  71. }
  72. }
  73. });
  74. $("#dataClear1").click(function(){$("#p_request_from_dt").val("");$("#p_request_to_dt").val("");});
  75. }
  76. /**
  77. * IBSheet object initialize
  78. */
  79. function gridInit(sheetName){
  80. var init_sheet = {};
  81. init_sheet.Cfg = {SearchMode:2, Page:30};
  82. init_sheet.Cols = [
  83. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center", Hidden:"True"},
  84. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  85. {Header:'No.', Type:"Seq", SaveName:"NO", Width:0, Align:"Center", Hidden:"True"},
  86. {Header:'quot_id', Type:"Text", SaveName:"QUOT_ID", Width:200, Align:"Left", Hidden:"True"},
  87. {Header:'견적번호', Type:"Text", SaveName:"QUOT_BID_NO", Width:120, Align:"Center"},
  88. {Header:'차수', Type:"Text", SaveName:"QUOT_BID_DEG", Width:30, Align:"Center"},
  89. {Header:'현장', Type:"Text", SaveName:"DEPT_NM", Width:200, Align:"Left"},
  90. {Header:'☞견적명', Type:"Text", SaveName:"QUOT_BID_MASTER_NM", Width:200, Align:"Left", Cursor:"pointer"},
  91. {Header:'견적담당자', Type:"Text", SaveName:"QUOT_MAN_NM", Width:120, Align:"Center"},
  92. {Header:'견적의뢰일', Type:"Text", SaveName:"REQUEST_DATE", Width:0, Align:"Center"},
  93. {Header:'상태', Type:"Text", SaveName:"STATUS_NM", Width:50, Align:"Center"},
  94. {Header:'참석업체', Type:"Text", SaveName:"SEND_CNT", Width:50, Align:"Center"},
  95. {Header:'발주번호', Type:"Text", SaveName:"DEMANDED_ID", Width:80, Align:"Center", Hidden:"True"}
  96. ];
  97. init_sheet.HeaderMode = {Sort:1};
  98. IBS_InitSheet(sheetName, init_sheet);
  99. sheetName.SetDataAutoTrim(0);
  100. sheetName.SetEditable(false);
  101. sheetName.SetActionMenu("ExcelDown");
  102. setGridSize();
  103. }
  104. function sheet1_OnSelectMenu(Text, Code) {
  105. // text 또는 code값으로 Action수행
  106. switch(Text) {
  107. case "ExcelDown":
  108. sheetExcelDown(sheet1,$('li').html());
  109. break;
  110. }
  111. }
  112. /**
  113. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  114. */
  115. function sheet1_OnSearchEnd(code, message) {
  116. if(code == 0) {
  117. setGridSize();
  118. sheet1.SetColFontColor("QUOT_BID_MASTER_NM", "#0000ff");
  119. } else {
  120. //조회 에러 수행
  121. alert(message);
  122. }
  123. }
  124. /**
  125. * IBSheet Event: Click
  126. */
  127. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  128. }
  129. /**
  130. * IBSheet size setting
  131. */
  132. function setGridSize() {sheet1.FitColWidth();}
  133. /**
  134. * IBSheet Event: DBLCLICK
  135. */
  136. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  137. if(Row == 0)return;
  138. if (Col == 7) {
  139. $("#QUOT_BID_NO").val(sheet1.GetCellValue(Row, "QUOT_BID_NO"));
  140. $("#QUOT_BID_DEG").val(sheet1.GetCellValue(Row, "QUOT_BID_DEG"));
  141. $("#QUOT_ID").val(sheet1.GetCellValue(Row, "QUOT_ID"));
  142. $("#STATUS_CD").val(sheet1.GetCellValue(Row, "STATUS_CD"));
  143. $("#fevent").val("GET_QUOT_DETAIL");
  144. $("#form1").attr("action", "/quot/outside/QuotResult.screen");
  145. $("#form1").attr("target", "_self");
  146. $("#form1").attr("method", "post");
  147. $("#form1").submit();
  148. }
  149. }
  150. function sheet1_OnSmartResize(Width, Height) {
  151. sheet1.FitColWidth();
  152. autoResize();
  153. }
  154. function autoResize(){
  155. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  156. var iframeHeight= document.body.scrollHeight - t1_height;
  157. var iframeWidth= document.body.scrollWidth;
  158. sheet1.SetSheetHeight(iframeHeight);
  159. }
  160. function popSearchCodeDetail(bcd)
  161. {
  162. var win_id = "_searchCodePopup";
  163. var link = "/sycs/code/dlgCodePopup.screen";
  164. link += "?pop_win_id="+win_id;
  165. link += "&p_basecd="+bcd;
  166. link += "&p_search=Y";
  167. fLayerPop(win_id, link, 600,400, '', '', 'NO');
  168. }
  169. function SearchCodeDetailClose(result){
  170. if(result != null){
  171. if(result[2]=="QUOT_DEPT"){
  172. $("#p_dept_cd").val(result[0]);
  173. $("#p_dept_nm").val(result[1]);
  174. }
  175. }
  176. fLayerPopClose('_searchCodePopup');
  177. }
  178. </SCRIPT>
  179. <modular:search id="form1">
  180. <modular:key id="fevent" />
  181. </modular:search>
  182. <form id="form1" name="form1" method="post" modular:type="search">
  183. <TABLE id="t1" border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
  184. <TR><TD height="1">
  185. <INPUT type="hidden" name="fevent" id="fevent" value="">
  186. <INPUT type="hidden" name="QUOT_BID_NO" value="">
  187. <INPUT type="hidden" name="QUOT_BID_DEG" value="">
  188. <INPUT type="hidden" name="QUOT_ID" id="QUOT_ID" value="">
  189. <INPUT type='hidden' name="acct_id" value="<%= params.get("acct_id") %>">
  190. <div align="left" id="title" >
  191. <ul><li>외주_견적 결과 리스트</li></ul>
  192. </div>
  193. </TD></TR>
  194. <!-- 검색조건 영역 : 시작 -->
  195. <TR><TD height="1">
  196. <TR><TD height="1">
  197. <!-- 검색조건 시작 -->
  198. <table id="search-table" class="search-form-table" >
  199. <colgroup>
  200. <col width="100" />
  201. <col/>
  202. <col width="100" />
  203. <col/>
  204. <col width="150" />
  205. </colgroup>
  206. <tr>
  207. <th>현장</th>
  208. <%-- <td colspan="3">
  209. <%=InputText.getSiteCodeNew("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%>
  210. </td> --%>
  211. <%-- <td colspan="3"><%=CommCodeManager.getSelectCodeSearchList("QUOT_DEPT","DEPT_CD","height=18;width:80px;","<option value=''>--전체--</option>",params.get("DEPT_CD"),"","DETAILCD") %> --%>
  212. <td>
  213. <span><input type="hidden" name="p_dept_cd" class="input_readonly p_dept_cd" style="display:none;" /></span>
  214. <span><input type="text" name="p_dept_nm" class="input_r p_dept_nm" style="width:200px" required="Y" hname="현장" readOnly errfunc="tabView(0)"></span>
  215. <span><img id='btn_sitedescchrgprsnid' src='/img/buyer/button/bt_search_right.gif' onclick="popSearchCodeDetail('QUOT_DEPT');" align="absmiddle" style="cursor:pointer;" border="0" pdf="no:pdf_row" /></span>
  216. </td>
  217. <TH>견적유형</TH>
  218. <TD><%=CommCodeManager.getSelectCodeSearchList("QUOT_HQ_CD","CHG_CODE01","height=18;width:80px;","<option value=''>--전체--</option>",params.get("CHG_CODE01"),"","DETAILCD") %>
  219. <!-- <SELECT class='input_select' id='CHG_CODE01' name='CHG_CODE01' style='width:80px;' >
  220. <option value=''>--전체--</option>
  221. <OPTION value='C'>토건</OPTION>
  222. <OPTION value='P'>플랜트</OPTION>
  223. </SELECT> -->
  224. </TD>
  225. <td class="button" rowspan="3">
  226. <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
  227. <!-- <span class="btnSearch center" id="btnExcel"><a href="javascript:sheetExcelDown(sheet1,$('li').html());">ExcelDown</a></span> -->
  228. </td>
  229. </tr>
  230. <tr>
  231. <th>견적명</th>
  232. <td>
  233. <INPUT type="text" name="P_QUOT_BID_MASTER_NM" class="input" value="<%=params.get("P_QUOT_BID_MASTER_NM") %>" style="width:90%">
  234. </td>
  235. <th>견적의뢰일</th>
  236. <td>
  237. <%= InputText.get("p_request_from_dt", params.get("p_request_from_dt"), 10, 50, "hangule,center, desc=견적의뢰일,ReadOnly") %>
  238. <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_request_from_dt');">
  239. ~
  240. <%= InputText.get("p_request_to_dt", params.get("p_request_from_dt"), 10, 50, "hangule,center, desc=견적의뢰일,ReadOnly") %>
  241. <!-- <INPUT type="text" name="p_request_to_dt" id="p_request_to_dt" class="input" value="" onClick="JavaScript:dlgCalendar('p_request_to_dt');" style="width:70px;text-align:center" ReadOnly> -->
  242. <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_request_to_dt');">
  243. <IMG name="dataClear1" id="dataClear1" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
  244. </td>
  245. </tr>
  246. <tr>
  247. <th>견적담당자</th>
  248. <td colspan="3">
  249. <INPUT type="text" name="P_QUOT_MAN_NM" class="input" value="<%=params.get("P_QUOT_MAN_NM") %>" style="width:50%">
  250. </td>
  251. </tr>
  252. </table>
  253. </TD></TR>
  254. </TABLE>
  255. <div id="sheet1_div" style=" padding-top:5px; height: auto; min-height: 300px; overflow: auto;">
  256. <script>createIBSheet('sheet1','100%', '300px');</script>
  257. </div>
  258. </FORM>