ResultFinishList.jsp 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. <%--
  2. - FileName : OutSupplierApprList.jsp
  3. - Author(s) : Sung Min Lee
  4. - Date : 2014.06.17
  5. -
  6. - Description: 협력업체평가현황
  7. --%>
  8. <%@ page contentType="text/html; charset=utf-8" %>
  9. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  10. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  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. java.util.Calendar curDate = java.util.Calendar.getInstance();
  21. curDate.add ( curDate.YEAR, -1 );
  22. java.text.SimpleDateFormat fmtDay = new java.text.SimpleDateFormat("yyyy");
  23. String p_yyyy = fmtDay.format(curDate.getTime()); // 오늘
  24. %>
  25. <script type="text/javascript">
  26. <!--
  27. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  28. /*예약함수*/
  29. var sheet1 = new ibsheetObject();
  30. var sheet1Row;
  31. var sheet1PageNo = 1;
  32. var pageLastRowIndex = 1;
  33. var validationResult = false;
  34. var filterShow = false;
  35. $(document).on("keyup", "input:text", function(e) {
  36. if (e.keyCode == 13)
  37. {
  38. $.searchList();
  39. }
  40. });
  41. $.gridInit = function(sheetName)
  42. {
  43. var init_sheet = {};
  44. init_sheet.Cfg = {SearchMode:2, Page:30, MergeSheet:msHeaderOnly};
  45. init_sheet.Cols = [
  46. {Header:"Status", Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Edit:"False", Hidden:"True"},
  47. {Header:"상호명", Type:"Text", SaveName:"ISU_VENDNM", Width:80, Align:"Left", Edit:"False"},
  48. {Header:"현장명", Type:"Text", SaveName:"DEPT_NAME", Width:80, Align:"Left", Edit:"False"},
  49. {Header:"☞계약명", Type:"Text", SaveName:"CONT_NM", Width:80, Align:"Left", Edit:"False"},
  50. {Header:"기성년도", Type:"Text", SaveName:"ACMP_YYYY", Width:80, Align:"Center", Edit:"False"},
  51. {Header:"착공연월일", Type:"Text", SaveName:"CONT_SDATE", Width:80, Align:"Center", Edit:"False", Format:"Ymd"},
  52. {Header:"준공연월일", Type:"Text", SaveName:"CONT_EDATE", Width:80, Align:"Center", Edit:"False", Format:"Ymd"},
  53. {Header:"총계약금액", Type:"Int", SaveName:"CONT_TAMT", Width:80, Align:"Right", Format:"#,##0", Edit:"False",},
  54. {Header:"당년도기성액", Type:"Int", SaveName:"CUR_PAY_AMT", Width:80, Align:"Right", Format:"#,##0", Edit:"False",},
  55. {Header:"제출협회코드", Type:"Text", SaveName:"SOC_CD", Width:0, Align:"Center", Hidden:"True"},
  56. {Header:"제출협회", Type:"Text", SaveName:"SOC_NM", Width:80, Align:"Center"},
  57. {Header:"진행상태코드", Type:"Text", SaveName:"PROG_STAT_CD", Width:0, Align:"Center", Hidden:"True"},
  58. {Header:"진행상태", Type:"Text", SaveName:"PROG_STAT_NM", Width:80, Align:"Center"},
  59. {Header:"외주계약변경ID", Type:"Text", SaveName:"SUB_CONT_MOD_ID", Width:80, Align:"Center", Cursor:"Pointer", Edit:"False", Hidden:"True"},
  60. {Header:"CORP_ID", Type:"Text", SaveName:"CORP_ID", Width:80, Align:"Center", Cursor:"Pointer", Edit:"False", Hidden:"True"},
  61. {Header:"총계약금액", Type:"Int", SaveName:"CONT_TAMT_O", Width:80, Align:"Right", Format:"#,##0", Edit:"False",Hidden:"True"},
  62. {Header:"당년도기성액", Type:"Int", SaveName:"CUR_PAY_AMT_O", Width:80, Align:"Right", Format:"#,##0", Edit:"False",Hidden:"True"}
  63. ];
  64. init_sheet.HeaderMode = {Sort:1};
  65. IBS_InitSheet(sheetName, init_sheet);
  66. sheetName.SetDataAutoTrim(0);
  67. sheetName.SetEditable(false);
  68. //sheetName.SetCountPosition(0);
  69. sheetName.SetDataLinkMouse("CONT_NM", 1);
  70. sheetName.SetColFontColor("CONT_NM", "#0000ff");
  71. sheetName.SetActionMenu("ExcelDown");
  72. sheetName.FitColWidth();
  73. }
  74. function sheet1_OnSelectMenu(Text, Code) {
  75. // text 또는 code값으로 Action수행
  76. switch(Text) {
  77. case "ExcelDown":
  78. if(sheet1.RowCount() == 0) {
  79. alert("내역이 없습니다.");
  80. return;
  81. }
  82. var params = { FileName : "ResultFinishList.xls", SheetName : "ResultFinishList", SheetDesign:0, Merge:1, DownCols:"ISU_VENDNM|DEPT_NAME|CONT_NM|ACMP_YYYY|CONT_SDATE|"+
  83. "CONT_EDATE|CONT_TAMT|CUR_PAY_AMT|SOC_NM|PROG_STAT_NM", TitleText:"외주실적발급현황", UserMerge:"0,0,1,10", AutoSizeColumn:1 } ;
  84. sheet1.Down2Excel(params);
  85. break;
  86. }
  87. }
  88. $.searchList = function()
  89. {
  90. $("#fevent").val("GET_LIST");
  91. var url = Modular.model.PageContext.CONTEXT_ROOT + "/result/outside/ResultFinishList_sheet.screen";
  92. Modular.view.IBSheet7.doSearch(sheet1, url, $("#form1"), 30, "");
  93. }
  94. $(document).ready(function(){
  95. $.gridInit(sheet1);
  96. $.searchList();
  97. autoResize();
  98. });
  99. $(function(){
  100. $("#btnSearch").click(function(){
  101. $.searchList();
  102. });
  103. });
  104. function sheet1_OnDblClick(Row, Col)
  105. {
  106. var comboValue = sheet1.GetCellValue(Row,"SOC_CD");
  107. if (sheet1.ColSaveName(Col) == "CONT_NM")
  108. {
  109. $("#p_corp_id").val(sheet1.GetCellValue(Row,"CORP_ID"));
  110. $("#p_acmp_yyyy").val(sheet1.GetCellValue(Row,"ACMP_YYYY"));
  111. $("#p_sub_cont_mod_id").val(sheet1.GetCellValue(Row,"SUB_CONT_MOD_ID"));
  112. $("#p_soc_cd").val(sheet1.GetCellValue(Row,"SOC_CD"));
  113. $("#p_List").val("/result/outside/ResultFinishList.screen");
  114. if(comboValue == "01")
  115. {
  116. $("#fevent").val("GET_DETAIL_01");
  117. $("#form1").attr("action", "/result/outside/ResultDetail01.screen");
  118. }
  119. else if(comboValue == "02")
  120. {
  121. $("#fevent").val("GET_DETAIL_02");
  122. $("#form1").attr("action", "/result/outside/ResultDetail02.screen");
  123. }
  124. else if(comboValue == "03")
  125. {
  126. $("#fevent").val("GET_DETAIL_03");
  127. $("#form1").attr("action", "/result/outside/ResultDetail03.screen");
  128. }
  129. else if(comboValue == "04")
  130. {
  131. $("#fevent").val("GET_DETAIL_04");
  132. $("#form1").attr("action", "/result/outside/ResultDetail04.screen");
  133. }
  134. else if(comboValue == "05")
  135. {
  136. $("#fevent").val("GET_DETAIL_05");
  137. $("#form1").attr("action", "/result/outside/ResultDetail05.screen");
  138. }
  139. $("#form1").attr("target", "_self");
  140. $("#form1").attr("method", "post");
  141. $("#form1").submit();
  142. }
  143. }
  144. function sheet1_OnSearchEnd(code, message) {
  145. if(code == 0) {
  146. sheet1.FitColWidth();
  147. var rowcnt = sheet1.RowCount();
  148. if(rowcnt > 0){
  149. for(var r=1; r < rowcnt+1; r++)
  150. {
  151. if(sheet1.GetCellValue(r,"CONT_TAMT") != sheet1.GetCellValue(r,"CONT_TAMT_O") ){
  152. sheet1.SetCellFontColor(r, "CONT_TAMT" , "#EF0B0B");
  153. }
  154. if(sheet1.GetCellValue(r,"CUR_PAY_AMT") != sheet1.GetCellValue(r,"CUR_PAY_AMT_O") ){
  155. sheet1.SetCellFontColor(r, "CUR_PAY_AMT" , "#EF0B0B");
  156. }
  157. }
  158. }
  159. } else {
  160. //조회 에러 수행
  161. alert(message);
  162. }
  163. }
  164. function autoResize(){
  165. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  166. var iframeHeight= document.body.scrollHeight - t1_height;
  167. var iframeWidth= document.body.scrollWidth;
  168. sheet1.SetSheetHeight(iframeHeight);
  169. }
  170. //-->
  171. </script>
  172. <modular:search id="form1">
  173. <modular:key id="fevent" />
  174. </modular:search>
  175. <form id="form1" name="form1" method="post" modular:type="search">
  176. <INPUT type="hidden" name="fevent" id="fevent" value="" />
  177. <input type="hidden" name="p_corp_id" id="p_corp_id" value="" />
  178. <input type="hidden" name="p_acmp_yyyy" id="p_acmp_yyyy" value="" />
  179. <input type="hidden" name="p_sub_cont_mod_id" id="p_sub_cont_mod_id" value="" />
  180. <input type="hidden" name="p_page_gubun" id="p_page_gubun" value="info" />
  181. <input type="hidden" name="p_soc_cd" id="p_soc_cd" value="" />
  182. <input type="hidden" name="p_success_gubun" id="p_success_gubun" value="R" />
  183. <input type="hidden" name="p_List" id="p_List" value="" />
  184. <div align="left" id="title">
  185. <ul>
  186. <li>실적증명 발급결과</li>
  187. </ul>
  188. </div>
  189. <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="search-table" class="search-form-table">
  190. <colgroup>
  191. <col width="15%" />
  192. <col width="30%" />
  193. <col width="15%" />
  194. <col width="30%" />
  195. <col width="10%" />
  196. </colgroup>
  197. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 시작 -->
  198. <tr>
  199. <th>기성년도</th>
  200. <td>
  201. <%-- <input type="text" name="p_yyyy" id="p_yyyy" value="<%=params.get("p_yyyy") %>" /> --%>
  202. <%= InputText.get("p_yyyy", p_yyyy, 10, 4, "center, desc=기성년도,") %>
  203. </td>
  204. <th>현장명</th>
  205. <td>
  206. <input type="text" name="p_dept_nm" id="p_dept_nm" value="<%=params.get("p_dept_nm") %>" />
  207. </td>
  208. <td class="button" rowspan="2">
  209. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSearch">검색</a></span>
  210. </td>
  211. </tr>
  212. <tr>
  213. <th>계약명</th>
  214. <td >
  215. <input type="text" name="p_cont_nm" id="p_cont_nm" value="<%=params.get("p_cont_nm") %>" />
  216. </td>
  217. <th>업체명</th>
  218. <td >
  219. <input type="text" name="p_supp_nm" id="p_supp_nm" value="<%=params.get("p_supp_nm") %>" />
  220. </td>
  221. </tr>
  222. </table>
  223. <!-- 시트 -->
  224. <div id="sheet1_div" style="padding-top:5px; height: 400px">
  225. <script>createIBSheet("sheet1","100%", "400px");</script>
  226. </div>
  227. </form>