ContResultList.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <%--
  2. - Author(s) : Kim Myung Ho
  3. - Date : 2014.08.11
  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. <%@ include file="/jsp/work/taglib.jsp" %>
  12. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  13. <%
  14. ctx.init(request, response);
  15. HandlerStorage storage = ctx.getHandlerStorage();
  16. ValueObject params = storage.getParams();
  17. ValueObject user = storage.getUser();
  18. RowSet contKindCode = storage.getRowSet("contKindCode");
  19. %>
  20. <SCRIPT language="JavaScript">
  21. /*예약함수*/
  22. var sheet1;
  23. var sheet1Row;
  24. var sheet1PageNo = 1;
  25. var pageLastRowIndex = 1;
  26. var validationResult = false;
  27. var filterShow = false;
  28. function _onReady(){
  29. /**
  30. * IBSheet object initialize
  31. */
  32. gridInit(sheet1);
  33. /**
  34. * Application Initialize
  35. */
  36. $("#btnSearch").click(function() {
  37. if(jQuery("#p_dept_cd").val() == "" && jQuery("#p_build_nm").val() == "" && jQuery("#p_dealer_nm").val() == ""
  38. && (jQuery("#ContFromDt").val() == "" || jQuery("#ContToDt").val() == "")){
  39. alert("검색조건을 최소 1개 이상 입력하십시요.");
  40. return;
  41. }
  42. jQuery("#fevent").val("SHEET_SELECT");
  43. var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/outside/ContResultList_sheet.screen";
  44. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  45. });
  46. $("#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("");}});
  47. $("#p_cont_status").change(function(){$("#btnSearch").click();});
  48. $("#p_build_nm").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
  49. $("#p_dealer_nm").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
  50. $("#dataClear").click(function(){$("#ContFromDt").val("");$("#ContToDt").val("");});
  51. jQuery("#btnExcel").click(function() {
  52. if(sheet1.RowCount() == 0) {
  53. alert("내역이 없습니다.");
  54. return;
  55. }
  56. var params = { FileName : "ContResultList.xls", SheetName : "ContResultList", SheetDesign:0, Merge:1, DownCols:"SUB_CONT_MOD_ID|DEPT_NAME|CON_DOC_NO|MOD_NO|BUILD_NAME|CON_SUPPLY_AMT|CON_CUR_CD|MEMBER_NAME"+
  57. "|CON_DATE|WORK_START_END_DATE|INSUR_YN1|INSUR_YN|TEMPLATE_NAME|STATUS_CD", TitleText:"외주_계약결과", UserMerge:"0,0,1,14", AutoSizeColumn:1 } ;
  58. sheet1.Down2Excel(params);
  59. });
  60. autoResize();
  61. }
  62. /**
  63. * IBSheet object initialize
  64. */
  65. function gridInit(sheetName){
  66. var init_sheet = {};
  67. init_sheet.Cfg = {SearchMode:2, Page:100};
  68. <%-- if("<%= user.get("RIGHT_NAME")%>" == "OUTSIDE" || "<%= user.get("RIGHT_NAME")%>" == "ADMIN NEW" ){ --%>
  69. init_sheet.Cols = [
  70. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center", Hidden:"True"},
  71. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  72. {Header:'계약번호', Type:"Text", SaveName:"SUB_CONT_MOD_ID", Width:0, Align:"Center", Hidden:"True"},
  73. {Header:'현장명', Type:"Text", SaveName:"DEPT_NAME", Width:200, Align:"Left" , Edit:"false"},
  74. {Header:'계약번호', Type:"Text", SaveName:"CON_DOC_NO", Width:120, Align:"Left", Edit:"false"},
  75. {Header:'변경차수', Type:"Text", SaveName:"MOD_NO", Width:50, Align:"Center" , Edit:"false"},
  76. {Header:'☞계약명', Type:"Text", SaveName:"BUILD_NAME", Width:200, Align:"Left" , Edit:"false", Cursor:"pointer"},
  77. {Header:'계약금액(VAT별도)', Type:"Text", SaveName:"CON_SUPPLY_AMT", Width:80, Align:"right", Edit:"false"},
  78. {Header:'통화구분', Type:"Text", SaveName:"CON_CUR_CD", Width:50, Align:"Center" , Edit:"false"},
  79. {Header:'업체명', Type:"Text", SaveName:"MEMBER_NAME", Width:100, Align:"Left" , Edit:"false"},
  80. {Header:'자료', Type:"Image", SaveName:"IMG_GB", Width:50, Align:"Center" , Edit:"false", Cursor:'pointer'},
  81. {Header:'계약id', Type:"Text", SaveName:"SUB_CONT_ID", Width:50, Align:"Center" , Hidden:"True"},
  82. {Header:'계약일자', Type:"Text", SaveName:"CON_DATE", Width:80, Align:"Center" , Edit:"false"},
  83. {Header:'계약기간', Type:"Text", SaveName:"WORK_START_END_DATE", Width:120, Align:"Center", Edit:"false"},
  84. {Header:'상태', Type:"Combo", SaveName:"STATUS_CD", Width:80, Align:"center", Edit:"false", ComboText:"계약완료", ComboCode:"50", Hidden:"True"},
  85. {Header:'지급보증', Type:"Text", SaveName:"INSUR_YN1", Width:50, Align:"center", Edit:"false"},//, Hidden:"True"
  86. {Header:'고용보험', Type:"Text", SaveName:"INSUR_YN", Width:50, Align:"center", Edit:"false"},
  87. {Header:'보험인수', Type:"Text", SaveName:"INSURANCE_YN", Width:50, Align:"center", Edit:"false", Hidden:"True"},
  88. {Header:'계약서종류', Type:"Text", SaveName:"TEMPLATE_NAME", Width:100, Align:"Left", Edit:"false", Cursor:"pointer"},
  89. {Header:'계약서코드', Type:"Text", SaveName:"TEMPLATE_CD", Width:80, Align:"Center", Hidden:"True"},
  90. {Header:'계약서변경여부', Type:"Text", SaveName:"CHG_CONT_YN", Width:80, Align:"Center", Hidden:"True"},
  91. ];
  92. /* }
  93. else
  94. {
  95. init_sheet.Cols = [
  96. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center", Hidden:"True"},
  97. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  98. {Header:'계약번호', Type:"Text", SaveName:"SUB_CONT_MOD_ID", Width:0, Align:"Center", Hidden:"True"},
  99. {Header:'현장명', Type:"Text", SaveName:"DEPT_NAME", Width:200, Align:"Left" , Edit:"false"},
  100. {Header:'계약번호', Type:"Text", SaveName:"CON_DOC_NO", Width:120, Align:"Left", Edit:"false"},
  101. {Header:'변경차수', Type:"Text", SaveName:"MOD_NO", Width:50, Align:"Center" , Edit:"false"},
  102. {Header:'☞계약명', Type:"Text", SaveName:"BUILD_NAME", Width:200, Align:"Left" , Edit:"false", Cursor:"pointer"},
  103. {Header:'계약금액(VAT별도)', Type:"Text", SaveName:"CON_SUPPLY_AMT", Width:80, Align:"right", Edit:"false"},
  104. {Header:'통화구분', Type:"Text", SaveName:"CON_CUR_CD", Width:50, Align:"Center" , Edit:"false"},
  105. {Header:'업체명', Type:"Text", SaveName:"MEMBER_NAME", Width:100, Align:"Left" , Edit:"false"},
  106. {Header:'계약id', Type:"Text", SaveName:"SUB_CONT_ID", Width:50, Align:"Center" , Hidden:"True"},
  107. {Header:'계약일자', Type:"Text", SaveName:"CON_DATE", Width:80, Align:"Center" , Edit:"false"},
  108. {Header:'계약기간', Type:"Text", SaveName:"WORK_START_END_DATE", Width:80, Align:"Center", Edit:"false"},
  109. {Header:'상태', Type:"Combo", SaveName:"STATUS_CD", Width:80, Align:"center", Edit:"false", ComboText:"계약완료", ComboCode:"50", Hidden:"True"},
  110. {Header:'지급보증', Type:"Text", SaveName:"INSUR_YN1", Width:50, Align:"center", Edit:"false"},//, Hidden:"True"
  111. {Header:'고용보험', Type:"Text", SaveName:"INSUR_YN", Width:50, Align:"center", Edit:"false"},
  112. {Header:'보험인수', Type:"Text", SaveName:"INSURANCE_YN", Width:50, Align:"center", Edit:"false", Hidden:"True"},
  113. {Header:'계약서종류', Type:"Text", SaveName:"TEMPLATE_NAME", Width:100, Align:"Left", Edit:"false", Cursor:"pointer"},
  114. {Header:'계약서코드', Type:"Text", SaveName:"TEMPLATE_CD", Width:80, Align:"Center", Hidden:"True"},
  115. {Header:'계약서변경여부', Type:"Text", SaveName:"CHG_CONT_YN", Width:80, Align:"Center", Hidden:"True"},
  116. ];
  117. } */
  118. init_sheet.HeaderMode = {Sort:1};
  119. IBS_InitSheet(sheetName, init_sheet);
  120. sheetName.SetDataAutoTrim(0);
  121. sheetName.SetImageList(1,"/img/buyer/button/bt_search_right.gif");
  122. sheetName.SetActionMenu("ExcelDown");
  123. setGridSize();
  124. }
  125. /*
  126. IBSheet Event : Mouse Right Menu
  127. */
  128. function sheet1_OnSelectMenu(Text, Code) {
  129. // text 또는 code값으로 Action수행
  130. switch(Text) {
  131. case "ExcelDown":
  132. jQuery("#btnExcel").click();
  133. break;
  134. }
  135. }
  136. /**
  137. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  138. */
  139. function sheet1_OnSearchEnd(code, message) {
  140. if(code == 0) {
  141. setGridSize();
  142. sheet1.SetColFontColor("BUILD_NAME", "#0000ff");
  143. } else {
  144. //조회 에러 수행
  145. alert(message);
  146. }
  147. }
  148. /**
  149. * IBSheet Event: Click
  150. */
  151. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  152. if(Row == 0)return;
  153. if ((sheet1.ColSaveName(Col) == "TEMPLATE_NAME") || (sheet1.ColSaveName(Col) == "BUILD_NAME")) {
  154. var status = sheet1.GetCellValue(Row,8);
  155. $("#SUB_CONT_MOD_ID").val(sheet1.GetCellValue(Row, "SUB_CONT_MOD_ID"));
  156. $("#TEMPLATE_CD").val(sheet1.GetCellValue(Row, "TEMPLATE_CD"));
  157. $("#ChgCont").val(sheet1.GetCellValue(Row, "CHG_CONT_YN"));
  158. $("#TEMPLATE_NAME").val(sheet1.GetCellValue(Row, "TEMPLATE_NAME"));
  159. $("#fevent").val("FORM_SELECT");
  160. $("#form1").attr("action", "/cont/outside/ContResult.screen");
  161. $("#form1").attr("target", "_self");
  162. $("#form1").attr("method", "get");
  163. $("#form1").submit();
  164. }else if(sheet1.ColSaveName(Col) == "IMG_GB"){
  165. var job_div = "O";
  166. var popUrl = "/payment/outside/PayItemOutDashBoardPop.screen?job_div="+job_div+"&sModule=LM&subContId="+sheet1.GetCellValue(Row, "SUB_CONT_ID")+"&job_auth=<%= user.get("RIGHT_NAME")%>";
  167. //CellValue(Row, "SUB_CONT_ID") = '7098';
  168. job_div = "O";
  169. var popOption = "width=800, height=600, resizable=no, scrollbars=yes, status=no;";
  170. window.open(popUrl,"",popOption);
  171. }
  172. }
  173. /**
  174. * IBSheet Event Change
  175. */
  176. function sheet1_OnChange(Row, Col, Value, OldValue, RaiseFlag) {
  177. var comboValue = sheet1.GetCellValue(Row,12);
  178. if(comboValue != "" ){
  179. sheet1.SetCellImage(Row ,13, "/img/buyer/button/bt_save_item.gif");
  180. return;
  181. }
  182. }
  183. /**
  184. * IBSheet size setting
  185. */
  186. function setGridSize() {sheet1.FitColWidth();}
  187. //자동로그인 기능
  188. function f_gologin(login_id,login_pw){
  189. var f = document.form1;
  190. if('<%= user.get("ACCT_TYPE_CODE")%>' != "ADMIN"){
  191. dlgAlert("User who logged in as administrator only can do automatic log-in.");
  192. return;
  193. }
  194. f.login_id.value = login_id;
  195. f.login_pw.value = login_pw;
  196. if( !submitXmlRequest("/sign_on_check", "", document.form1) ) {
  197. alert("Log-in is being processed.");
  198. };
  199. }
  200. function sheet1_OnSmartResize(Width, Height) {
  201. sheet1.FitColWidth();
  202. autoResize();
  203. }
  204. function autoResize(){
  205. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  206. var iframeHeight= document.body.scrollHeight - t1_height;
  207. var iframeWidth= document.body.scrollWidth;
  208. sheet1.SetSheetHeight(iframeHeight);
  209. }
  210. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  211. </SCRIPT>
  212. <modular:search id="form1">
  213. <modular:key id="fevent" />
  214. </modular:search>
  215. <form id="form1" name="form1" method="post" modular:type="search">
  216. <INPUT type="hidden" name="fevent" id="fevent" value="">
  217. <INPUT type="hidden" name="SUB_CONT_MOD_ID" value="">
  218. <INPUT type="hidden" name="TEMPLATE_CD" value="">
  219. <INPUT type='hidden' name="ChgCont">
  220. <INPUT type='hidden' name="acct_id" value="<%= params.get("acct_id") %>">
  221. <INPUT type='hidden' name="p_cont_status" value="50">
  222. <INPUT type='hidden' name="TEMPLATE_NAME" value="">
  223. <div align="left" id="title">
  224. <ul>
  225. <li>외주_계약결과</li>
  226. </ul>
  227. </div>
  228. <!-- 검색조건 시작 -->
  229. <table id="search-table" class="search-form-table">
  230. <colgroup>
  231. <col width="100" />
  232. <col width="*" />
  233. <col width="100" />
  234. <col width="*" />
  235. <col width="100" />
  236. </colgroup>
  237. <tr height="25">
  238. <th>현장</th>
  239. <td>
  240. <%=InputText.getSiteCodeNew("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%>
  241. </td>
  242. <th>계약명</th>
  243. <td>
  244. <INPUT type="text" name="p_build_nm" class="input" value="<%= params.get("p_build_nm") %>" style="width:90%">
  245. </td>
  246. <td class="button" rowspan="3">
  247. <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
  248. <span class="btnSearch center" id="btnExcel"><a href="javascript:void(0);">엑셀</a></span>
  249. </td>
  250. </tr>
  251. <tr>
  252. <th>업체명</th>
  253. <td>
  254. <INPUT type="text" name="p_dealer_nm" class="input" value="<%= params.get("p_dealer_nm") %>" style="width:90%">
  255. </td>
  256. <th>계약기간</th>
  257. <td>
  258. <%= InputText.get("ContFromDt", params.get("ContFromDt"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
  259. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('ContFromDt');">
  260. ~
  261. <%= InputText.get("ContToDt", params.get("ContToDt"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
  262. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('ContToDt');">
  263. <IMG name="dataClear" id="dataClear" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
  264. </td>
  265. </tr>
  266. <tr>
  267. <th>계약서종류</th>
  268. <td colspan=3>
  269. <%= HTMLMaker.getSelectTag(contKindCode, "TEMPLATE_CD", "TEMPLATE_NAME" , "cont_Kind_Code", "style='width:28%;height=18;'", "<OPTION value=''>-- 전체 --</OPTION>", params.get("cont_Kind_Code"), 0) %>
  270. </td>
  271. </tr>
  272. </table>
  273. </form>
  274. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 400px; overflow: auto;">
  275. <script>createIBSheet('sheet1','100%', '400px');</script>
  276. </div>