ContChgRcvList.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. <%--
  2. - Author(s) : kyj
  3. - Date : 2015.01.21
  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="kr.co.udapsoft.common.code.CommCodeManager" %>
  12. <%@ include file="/jsp/work/taglib.jsp" %>
  13. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  14. <%
  15. ctx.init(request, response);
  16. HandlerStorage storage = ctx.getHandlerStorage();
  17. ValueObject params = storage.getParams();
  18. ValueObject user = storage.getUser();
  19. RowSet statusRow = CommCodeManager.getCodeRowsetStatic("SUB_REQSTATUS_CD", "CHG_CODE01", "1");
  20. ValueObject sign_info = storage.getValueObject("SIGN_INFO");
  21. String gwurl = "http://gw.sgcenc.co.kr/";
  22. if(params.get("p_cont_req_status").isEmpty()){
  23. params.set("p_cont_req_status","30");
  24. }
  25. %>
  26. <SCRIPT language="JavaScript">
  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. /**
  40. * Application Initialize
  41. */
  42. $("#btnSearch").click(function() {
  43. jQuery("#fevent").val("SHEET_SELECT");
  44. var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/outside/ContChgRcvList_sheet.screen";
  45. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  46. });
  47. $("#p_dept_nm").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == 8){$("#p_dept_cd").val("");$("#p_dept_nm").val("");}});
  48. //$("#p_cont_status").change(function(){$("#btnSearch").click();});
  49. $("#p_build_nm").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
  50. $("#p_dealer_nm").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
  51. $("#btnSearch").click();
  52. $("#dataClear").click(function(){$("#ContFromDt").val("");$("#ContToDt").val("");});
  53. jQuery("#btnExcel").click(function() {
  54. if(sheet1.RowCount() == 0) {
  55. alert("내역이 없습니다.");
  56. return;
  57. }
  58. var params = { FileName : "ContChgRcvList.xls", SheetName : "ContChgRcvList", SheetDesign:0, Merge:1, DownCols:"CON_DOC_NO|MOD_NO|BUILD_NAME|MEMBER_NAME|AFT_SUPP_AMT|CON_CUR_CD"+
  59. "|CON_DATE|AFT_CONT_DATE|MOD_GB|STATUS_CD", TitleText:"외주_변경계약접수", UserMerge:"0,0,1,10", AutoSizeColumn:1 } ;
  60. sheet1.Down2Excel(params);
  61. });
  62. autoResize();
  63. }
  64. /**
  65. * IBSheet object initialize
  66. */
  67. function gridInit(sheetName){
  68. var init_sheet = {};
  69. init_sheet.Cfg = {SearchMode:2, Page:100};
  70. init_sheet.Cols = [
  71. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center", Hidden:"True"},
  72. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  73. {Header:'변경계약요청ID', Type:"Text", SaveName:"SUB_CONT_REQ_ID", Width:0, Align:"Center", Hidden:"True"},
  74. {Header:'외주계약변경ID', Type:"Text", SaveName:"SUB_CONT_MOD_ID", Width:0, Align:"Center", Hidden:"True"},
  75. {Header:'현장명', Type:"Text", SaveName:"DEPT_NAME", Width:200, Align:"Left" , Edit:"false"},
  76. {Header:'계약번호', Type:"Text", SaveName:"CON_DOC_NO", Width:120, Align:"Left", Edit:"false"},
  77. {Header:'변경차수', Type:"Text", SaveName:"MOD_NO", Width:50, Align:"Center" , Edit:"false"},
  78. {Header:'☞계약명', Type:"Text", SaveName:"BUILD_NAME", Width:200, Align:"Left" , Edit:"false", Cursor:'pointer'},
  79. {Header:'업체ID', Type:"Text", SaveName:"CORP_ID", Width:50, Align:"Center" , Hidden:"True"},
  80. {Header:'업체명', Type:"Text", SaveName:"MEMBER_NAME", Width:100, Align:"Left" , Edit:"false"},
  81. {Header:'계약금액(VAT별도)',Type:"Text", SaveName:"AFT_SUPP_AMT", Width:80, Align:"right", Edit:"false"},
  82. {Header:'통화', Type:"Text", SaveName:"CON_CUR_CD", Width:50, Align:"Center" , Edit:"false"},
  83. {Header:'계약일자', Type:"Text", SaveName:"CON_DATE", Width:80, Align:"Center" , Edit:"false"},
  84. {Header:'계약기간', Type:"Text", SaveName:"AFT_CONT_DATE", Width:80, Align:"Center", Edit:"false"},
  85. {Header:'자료', Type:"Image", SaveName:"IMG_GB", Width:50, Align:"Center" , Edit:"false", Cursor:'pointer'},
  86. {Header:'문서번호', Type:"Text", SaveName:"DOC_ID", Width:0, Align:"Left", Edit:"false", Hidden:"True"},
  87. {Header:'year', Type:"Text", SaveName:"year", Width:0, Align:"Left", Edit:"false", Hidden:"True"},
  88. {Header:'요청구분', Type:"Text", SaveName:"MOD_GB", Width:100, Align:"Left", Edit:"false"},
  89. {Header:'상태', Type:"Text", SaveName:"STATUS_CD", Width:80, Align:"center", Edit:"false"},
  90. ];
  91. init_sheet.HeaderMode = {Sort:1};
  92. IBS_InitSheet(sheetName, init_sheet);
  93. sheetName.SetDataAutoTrim(0);
  94. sheetName.SetImageList(1,"/img/buyer/button/bt_change.gif");
  95. sheetName.SetActionMenu("ExcelDown");
  96. setGridSize();
  97. }
  98. /*
  99. IBSheet Event : Mouse Right Menu
  100. */
  101. function sheet1_OnSelectMenu(Text, Code) {
  102. // text 또는 code값으로 Action수행
  103. switch(Text) {
  104. case "ExcelDown":
  105. jQuery("#btnExcel").click();
  106. break;
  107. }
  108. }
  109. /**
  110. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  111. */
  112. function sheet1_OnSearchEnd(code, message) {
  113. if(code == 0) {
  114. setGridSize();
  115. sheet1.SetColFontColor("BUILD_NAME", "#0000ff");
  116. } else {
  117. //조회 에러 수행
  118. alert(message);
  119. }
  120. }
  121. /**
  122. * IBSheet Event: Click
  123. */
  124. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  125. if(Row == 0)return;
  126. if (sheet1.ColSaveName(Col) == "BUILD_NAME") {
  127. $("#SUB_CONT_MOD_ID").val(sheet1.GetCellValue(Row, "SUB_CONT_MOD_ID"));
  128. $("#fevent").val("FORM_SELECT");
  129. $("#form1").attr("action", "/cont/outside/ContChgRcvDetail.screen");
  130. $("#form1").attr("target", "_self");
  131. $("#form1").attr("method", "post");
  132. $("#form1").submit();
  133. }
  134. if (sheet1.ColSaveName(Col) == "IMG_GB") {
  135. var doc_id = sheet1.GetCellValue(Row, "DOC_ID");
  136. if(doc_id == ""){
  137. alert("결재 정보가 없습니다.");
  138. return;
  139. }
  140. var doc_chk = doc_id.substring(doc_id.length-3, doc_id.length);
  141. doc_chk = doc_chk * 1;
  142. var link = "";
  143. var year = sheet1.GetCellValue(Row, "year");
  144. if ( year > "20151213"){
  145. link = "<%=gwurl%>upload_approval/TEC/doc/"+ year.substr(0,4) + "/" + doc_chk+"/"+doc_id+".mht";
  146. }
  147. else{
  148. link = "<%=gwurl%>upload_approval/TEC/doc/"+doc_chk+"/"+doc_id+".mht";
  149. }
  150. window.open(link,"_viewDraft","");
  151. }
  152. }
  153. /**
  154. * IBSheet size setting
  155. */
  156. function setGridSize() {sheet1.FitColWidth();}
  157. function sheet1_OnSmartResize(Width, Height) {
  158. sheet1.FitColWidth();
  159. autoResize();
  160. }
  161. function autoResize(){
  162. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  163. var iframeHeight= document.body.scrollHeight - t1_height;
  164. var iframeWidth= document.body.scrollWidth;
  165. sheet1.SetSheetHeight(iframeHeight);
  166. }
  167. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  168. </SCRIPT>
  169. <modular:search id="form1">
  170. <modular:key id="fevent" />
  171. </modular:search>
  172. <form id="form1" name="form1" method="post" modular:type="search">
  173. <INPUT type="hidden" name="fevent" id="fevent" value="">
  174. <INPUT type="hidden" name="SUB_CONT_MOD_ID" value="">
  175. <INPUT type='hidden' name="acct_id" value="<%= params.get("acct_id") %>">
  176. <div align="left" id="title">
  177. <ul>
  178. <li>외주_변경계약접수</li>
  179. </ul>
  180. </div>
  181. <!-- 검색조건 시작 -->
  182. <table id="search-table" class="search-form-table">
  183. <colgroup>
  184. <col width="100" />
  185. <col width="*" />
  186. <col width="100" />
  187. <col width="*" />
  188. <col width="100" />
  189. <col width="*" />
  190. <col width="100" />
  191. </colgroup>
  192. <tr height="25">
  193. <th>현장</th>
  194. <td>
  195. <%=InputText.getSiteCodeNew("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%>
  196. </td>
  197. <th>계약명</th>
  198. <td colspan="3">
  199. <INPUT type="text" name="p_build_nm" class="input" value="<%= params.get("p_build_nm") %>" style="width:95%">
  200. </td>
  201. <td class="button" rowspan="2">
  202. <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
  203. <span class="btnSearch center" id="btnExcel"><a href="javascript:void(0);">엑셀</a></span>
  204. </td>
  205. </tr>
  206. <tr>
  207. <th>업체명</th>
  208. <td>
  209. <INPUT type="text" name="p_dealer_nm" class="input" value="<%= params.get("p_dealer_nm") %>" style="width:95%">
  210. </td>
  211. <th>계약기간</th>
  212. <td>
  213. <%= InputText.get("ContFromDt", params.get("ContFromDt"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
  214. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('ContFromDt');">
  215. ~
  216. <%= InputText.get("ContToDt", params.get("ContToDt"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
  217. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('ContToDt');">
  218. <IMG name="dataClear" id="dataClear" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
  219. </td>
  220. <th>상태</th>
  221. <td>
  222. <%= HTMLMaker.getSelectTag(statusRow, "DETAILCD", "DETAILNM", "p_cont_req_status", "width:100px;height=18;", "<option value='00'>--전체--</option>", params.get("p_cont_req_status")) %>
  223. </td>
  224. </tr>
  225. </table>
  226. </form>
  227. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 400px; overflow: auto;">
  228. <script>createIBSheet('sheet1','100%', '400px');</script>
  229. </div>