QuotPlanList.jsp 12 KB

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