PayRequestList.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <%--
  2. - FileName : PayRequestList.jsp
  3. - Author(s) : ok
  4. - Date : 2014.06.30
  5. - Copyright : Copyright (c) 2013 www.udapsoft.co.kr, Inc.
  6. - Description: 전자조달 기성신청현황 - 2019.04.24
  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. <%@ page import="kr.co.hsnc.common.util.Formatter"%>
  14. <%@ include file="/jsp/work/taglib.jsp" %>
  15. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  16. <%
  17. ctx.init(request, response);
  18. HandlerStorage storage = ctx.getHandlerStorage();
  19. ValueObject params = storage.getParams();
  20. ValueObject user = storage.getUser();
  21. String event = storage.getEvent();
  22. RowSet statusComboList = storage.getRowSet("statusComboList"); //상태 ComboList Data
  23. String returnAcmpYyyymm = params.get("acmpYyyymm");
  24. String returnBuildName = params.get("searchBuildName");
  25. String returnDeptName = params.get("searchDeptName");
  26. String returnStatusCd = params.get("searchStatusCd");
  27. //초기 상태값 설정
  28. if(returnStatusCd == null || returnStatusCd == ""){
  29. returnStatusCd = "00";
  30. }
  31. String dept_cd = params.get("dept_cd");
  32. String dept_nm = params.get("dept_nm");
  33. %>
  34. <SCRIPT language="JavaScript">
  35. /*예약함수*/
  36. var sheet1;
  37. var sheet1Row;
  38. var sheet1PageNo = 1;
  39. var pageLastRowIndex = 1;
  40. var validationResult = false;
  41. var filterShow = false;
  42. function _onReady(){
  43. /**
  44. * IBSheet object initialize
  45. */
  46. gridInit(sheet1);
  47. autoResize();
  48. /**
  49. * Application Initialize
  50. */
  51. jQuery("#btnSearch").click(function() {
  52. jQuery("#fevent").val("GET_DATA");
  53. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/outside/PayRequestList_sheet.screen";
  54. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  55. });
  56. jQuery("#btnCreate").click(function() {
  57. var win_id = "ApplicationRequest";
  58. var link = "/payment/outside/ApplicationRequestList.screen";
  59. link += "?pop_win_id="+win_id;
  60. link += "&searchDate=" + jQuery("#searchDate").val();
  61. link += "&dept_cd=" + jQuery("#dept_cd").val();
  62. //link += "&{{query}}";
  63. fLayerPop(win_id, link, 980, 540, '', '', 'NO');
  64. });
  65. pageinit();
  66. }
  67. function pageinit(){
  68. setSearchDate();
  69. jQuery("#btnSearch").click();
  70. }
  71. /**
  72. * IBSheet object initialize
  73. */
  74. function gridInit(sheetName){
  75. var init_sheet = {};
  76. init_sheet.Cfg = {SearchMode:2, Page:30, MergeSheet:msHeaderOnly};
  77. init_sheet.Cols = [
  78. {Header:'상태|상태', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  79. {Header:'현장명|현장명', Type:"Text", SaveName:"DEPT_NAME", Width:130, Align:"Left"},
  80. {Header:'계약번호|계약번호', Type:"Text", SaveName:"CON_DOC_NO", Width:110, Align:"Center"},
  81. {Header:'☞계약명|☞계약명', Type:"Text", SaveName:"BUILD_NAME", Width:130, Align:"Left"},
  82. {Header:'계약업체|계약업체', Type:"Text", SaveName:"CUST_NAME", Width:130, Align:"Left"},
  83. {Header:'공사기간|공사기간', Type:"Text", SaveName:"START_END_WORK_DATE", Width:80, Align:"Center"},
  84. {Header:'계약금액|공급가', Type:"Int", SaveName:"CON_SUPPLY_AMT", Width:50, Align:"Right", Format:"#,##0"},
  85. {Header:'계약금액|부가세', Type:"Int", SaveName:"CON_SURTAX_AMT", Width:50, Align:"Right", Format:"#,##0"},
  86. {Header:'계약금액|합계', Type:"Int", SaveName:"CON_AMT", Width:50, Align:"Right", Format:"#,##0"},
  87. {Header:'지급차수|지급차수', Type:"Text", SaveName:"ACMP_NO", Width:30, Align:"Center"},
  88. {Header:'기성액|금회기성', Type:"Int", SaveName:"FUND_AMT", Width:50, Align:"Right", Format:"#,##0"},
  89. {Header:'기성액|누계기성', Type:"Int", SaveName:"TOT_FUND_AMT", Width:50, Align:"Right", Format:"#,##0"},
  90. {Header:'기성액|잔여기성', Type:"Int", SaveName:"MOD_FUND_AMT", Width:50, Align:"Right", Format:"#,##0"},
  91. {Header:'기성율|기성율', Type:"Text", SaveName:"FUND_RATE", Width:30, Align:"Right"},
  92. {Header:'상태|상태', Type:"Text", SaveName:"STATUS_NM", Width:50, Align:"Center"},
  93. {Header:'STATUS_CD', Type:"Text", SaveName:"STATUS_CD", Width:50, Align:"Center", Hidden:"True"},
  94. {Header:'SUB_CONT_ID', Type:"Text", SaveName:"SUB_CONT_ID", Width:0, Align:"Center", Hidden:"True"},
  95. {Header:'ACMP_YYYYMM', Type:"Text", SaveName:"ACMP_YYYYMM", Width:0, Align:"Center", Hidden:"True"},
  96. {Header:'CON_CORP_ID', Type:"Text", SaveName:"CON_CORP_ID", Width:0, Align:"Center", Hidden:"True"},
  97. {Header:'SUB_CONT_MOD_ID', Type:"Text", SaveName:"SUB_CONT_MOD_ID", Width:0, Align:"Center", Hidden:"True"},
  98. {Header:'MOD_NO', Type:"Text", SaveName:"MOD_NO", Width:0, Align:"Center", Hidden:"True"},
  99. {Header:'ACMP_ID', Type:"Text", SaveName:"ACMP_ID", Width:0, Align:"Center", Hidden:"True"}
  100. ];
  101. init_sheet.HeaderMode = {Sort:1};
  102. IBS_InitSheet(sheetName, init_sheet);
  103. sheetName.SetDataAutoTrim(0);
  104. sheetName.SetEditable(false);
  105. sheetName.SetDataLinkMouse("BUILD_NAME", 1);
  106. setGridSize();
  107. }
  108. /**
  109. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  110. */
  111. function sheet1_OnSearchEnd(code, message) {
  112. if(code == 0) {
  113. setGridSize();
  114. sheet1.SetColFontColor("BUILD_NAME", "#0000ff");
  115. } else {
  116. //조회 에러 수행
  117. alert(message);
  118. }
  119. }
  120. /**
  121. * IBSheet Event: Click
  122. */
  123. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  124. //masterSheetRow = Row;
  125. }
  126. /**
  127. * IBSheet size setting
  128. */
  129. function setGridSize() {
  130. sheet1.FitColWidth();
  131. }
  132. /**
  133. * IBSheet Event: DBLCLICK
  134. */
  135. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  136. if (sheet1.ColSaveName(Col) == "BUILD_NAME") { //계약명
  137. jQuery("#selectSubContId").val(sheet1.GetCellValue(Row, "SUB_CONT_ID")); //외주계약서ID
  138. jQuery("#selectSubContModId").val(sheet1.GetCellValue(Row, "SUB_CONT_MOD_ID")); //외주계약서ID
  139. jQuery("#acmpId").val(sheet1.GetCellValue(Row, "ACMP_ID")); //기성ID
  140. jQuery("#acmpYyyymm").val(sheet1.GetCellValue(Row, "ACMP_YYYYMM")); //기성년월
  141. jQuery("#acmpNo").val(sheet1.GetCellValue(Row, "ACMP_NO")); //기성차수
  142. jQuery("#fevent").val("");
  143. jQuery("#form1").attr("action", "/payment/outside/ResolutionRequest.screen");
  144. jQuery("#form1").attr("target", "_self");
  145. jQuery("#form1").attr("method", "post");
  146. jQuery("#form1").submit();
  147. }
  148. }
  149. function doKeyPress() {
  150. if( event.keyCode == 13 ) {
  151. jQuery("#btnSearch").click();
  152. }
  153. }
  154. function calendar(thisDayObj){
  155. dlgMCalendar(thisDayObj);
  156. }
  157. function setSearchDate(){
  158. var newDay = new Date( get_year(), get_month(), "");
  159. var lastDay = newDay.getDate();
  160. var yyyymm = get_year() +'-'+ get_month();
  161. if(jQuery('#searchDate').val() == ""){
  162. jQuery('#searchDate').val(yyyymm);
  163. }
  164. }
  165. function sheet1_OnSmartResize(Width, Height) {
  166. sheet1.FitColWidth();
  167. autoResize();
  168. }
  169. function autoResize(){
  170. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("bugase").scrollHeight + document.getElementById("title").scrollHeight + 54;
  171. var iframeHeight= document.body.scrollHeight - t1_height;
  172. var iframeWidth= document.body.scrollWidth;
  173. sheet1.SetSheetHeight(iframeHeight);
  174. }
  175. function callback_getData(){
  176. setTimeout(function(){fLayerPopClose('ApplicationRequest');},100);
  177. jQuery("#btnSearch").click();
  178. }
  179. </SCRIPT>
  180. <modular:search id="form1">
  181. <modular:key id="fevent" />
  182. </modular:search>
  183. <form id="form1" name="form1" method="post" modular:type="search" >
  184. <INPUT type="hidden" name="fevent" id="fevent" value="">
  185. <INPUT type="hidden" name="selectSubContId" id="selectSubContId" value="">
  186. <INPUT type="hidden" name="selectSubContModId" id="selectSubContModId" value="">
  187. <INPUT type="hidden" name="acmpId" id="acmpId" value="">
  188. <INPUT type="hidden" name="acmpYyyymm" id="acmpYyyymm" value="">
  189. <INPUT type="hidden" name="acmpNo" id="acmpNo" value="">
  190. <!-- 프로그램 제목 -->
  191. <div align="left" id="title">
  192. <ul>
  193. <li>외주_기성현황</li>
  194. </ul>
  195. </div>
  196. <!-- 검색조건 시작 -->
  197. <table id="search-table" class="search-form-table">
  198. <colgroup>
  199. <col width="10%" />
  200. <col width="20%" />
  201. <col width="10%" />
  202. <col width="*" />
  203. <col width="15%" />
  204. </colgroup>
  205. <tr>
  206. <th>현장명</th>
  207. <td><%=InputText.getSiteCodeNew("dept_cd", "dept_nm", "", user, dept_cd, dept_nm)%></td>
  208. <th>기성년월</th>
  209. <td>
  210. <%= InputText.get("searchDate", returnAcmpYyyymm, 30, 10, "Center, date, PerSize, readonly", "date", "") %>
  211. <a href="JavaScript:calendar('searchDate');"><img src="/img/supplier/template/bt_calender.gif" alt="달력" border="0" align="absmiddle" /></a>
  212. </td>
  213. <td class="button" rowspan="2">
  214. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSearch">검색</a></span>
  215. <span class="btnSearch center"><a href="javascript:void(0);" id="btnCreate">신규기성작성</a></span>
  216. </td>
  217. </tr>
  218. <tr>
  219. <th>계약명</th>
  220. <td><INPUT type="text" id="searchBuildName" name="searchBuildName" value="<%=returnBuildName %>" maxlength="50" class="input" style="IME-MODE : active; width:90%;" desc='계약명' onKeyPress="doKeyPress();"></td>
  221. <th>상태</th>
  222. <td>
  223. <%= HTMLMaker.getSelectTag(statusComboList, "DETAILCD", "DETAILNM", "detailcd", "width:45%;height=18;", "<option value=''>전체</option>", returnStatusCd) %>
  224. </td>
  225. </tr>
  226. </table>
  227. <!-- 검색조건 종료 -->
  228. <img src="/img/com/blank.gif" height="5px" />
  229. <div align="right" id="bugase">
  230. <ul>
  231. <li valign="bottom"><span style="color: red;">* 부가세별도</span></li>
  232. </ul>
  233. </div>
  234. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 350px; overflow: auto;">
  235. <SCRIPT>
  236. createIBSheet('sheet1','100%', '350px');
  237. </SCRIPT>
  238. </div>
  239. </FORM>