advencePaymentResultList.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <%--
  2. - FileName : advencePaymentList.jsp
  3. - Author(s) : ok
  4. - Date : 2014.06.18
  5. - Copyright : Copyright (c) 2013 www.udapsoft.co.kr, Inc.
  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.udapsoft.common.code.*" %>
  12. <%@ page import="kr.co.hsnc.common.util.*"%>
  13. <%@ page import="kr.co.hsnc.common.sql.*" %>
  14. <%@ page import="com.udapsoft.waf.common.util.DateUtil" %>
  15. <%@ page import="kr.co.hsnc.common.util.Formatter"%>
  16. <%@ include file="/jsp/work/taglib.jsp" %>
  17. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  18. <%
  19. ctx.init(request, response);
  20. HandlerStorage storage = ctx.getHandlerStorage();
  21. ValueObject params = storage.getParams();
  22. ValueObject user = storage.getUser();
  23. String event = storage.getEvent();
  24. RowSet statusComboList = storage.getRowSet("statusComboList"); //상태 ComboList Data
  25. //상태 sheetComboList Data
  26. String statusSheetComboListText = (String)storage.getObject("selectText");
  27. String statusSheetComboListValue = (String)storage.getObject("selectValue");
  28. //신청구분
  29. String perpayReqDivComboListText = (String)storage.getObject("selectText1");
  30. String perpayReqDivComboListValue = (String)storage.getObject("selectValue1");
  31. //상태값 초기설정
  32. String initStatusCd = params.get("searchStatusCd");
  33. if(initStatusCd == null || initStatusCd == ""){
  34. initStatusCd = "";
  35. }
  36. String dept_cd = params.get("dept_cd");
  37. String dept_nm = params.get("dept_nm");
  38. String signDt_from = params.get("signDt_from");
  39. String signDt_to = params.get("signDt_to");
  40. //com.udapsoft.waf.common.util.DateUtil
  41. ValueObject defaultDate = DateUtil.getDefaultPeriod();
  42. if("".equals(signDt_from)){
  43. signDt_from = defaultDate.get("START_DATE");
  44. }
  45. if("".equals(signDt_to)){
  46. signDt_to = defaultDate.get("END_DATE");
  47. }
  48. //조회 계약명
  49. String returnBuildName = params.get("searchBuildName");
  50. %>
  51. <SCRIPT language="JavaScript">
  52. /*예약함수*/
  53. var sheet1;
  54. var sheet1Row;
  55. var sheet1PageNo = 1;
  56. var pageLastRowIndex = 1;
  57. var validationResult = false;
  58. var filterShow = false;
  59. function _onReady(){
  60. gridInit(sheet1);
  61. autoResize();
  62. jQuery("#btnSearch").click(function() {
  63. if(Number(jQuery("#signDt_from").val().replace(/(\-|\:)/g, "")) > Number(jQuery("#signDt_to").val().replace(/(\-|\:)/g, ""))){
  64. alert("신청일자를 확인해주세요");
  65. return;
  66. }
  67. jQuery("#fevent").val("GET_DATA");
  68. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/outside/AdvencePaymentResultList_sheet.screen";
  69. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  70. });
  71. $("#dataClear1").click(function(){$("#signDt_from").val("");$("#signDt_to").val("");});
  72. pageinit();
  73. }
  74. function pageinit(){
  75. //jQuery("#btnSearch").click();
  76. }
  77. function gridInit(sheetName){
  78. var init_sheet = {};
  79. init_sheet.Cfg = {SearchMode:2, Page:30};
  80. init_sheet.Cols = [
  81. {Header:'상태', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  82. {Header:'현장명', Type:"Text", SaveName:"DEPT_NAME", Width:160, Align:"Left"},
  83. {Header:'☞계약명', Type:"Text", SaveName:"BUILD_NAME", Width:160, Align:"Left"},
  84. {Header:'업체명', Type:"Text", SaveName:"MEMBER_NAME", Width:160, Align:"Left"},
  85. {Header:'공사기간', Type:"Text", SaveName:"START_END_WORK_DATE", Width:100, Align:"Center"},
  86. {Header:'계약금액', Type:"Int", SaveName:"CON_AMT", Width:80, Align:"Right", Format:"#,##0"},
  87. {Header:'선급금액', Type:"Int", SaveName:"PREPAY_AMT", Width:80, Align:"Right", Format:"#,##0"},
  88. {Header:'신청금액', Type:"Int", SaveName:"REQ_PREPAY_AMT", Width:80, Align:"Right", Format:"#,##0"},
  89. {Header:'신청일자', Type:"Text", SaveName:"SIGN_DT", Width:100, Align:"Center", Format:"Ymd"},
  90. {Header:'신청구분', Type:"Combo", SaveName:"REQ_DIV_CD", Width:70, Align:"Center", ComboText:"<%=perpayReqDivComboListText%>", ComboCode:"<%=perpayReqDivComboListValue%>"},
  91. {Header:'상태', Type:"Combo", SaveName:"STATUS_CD", Width:70, Align:"Center", ComboText:"<%=statusSheetComboListText%>", ComboCode:"<%=statusSheetComboListValue%>"},
  92. {Header:'SUB_CONT_MOD_ID', Type:"Text", SaveName:"SUB_CONT_MOD_ID", Width:0, Align:"Center", Hidden:"True"}
  93. ];
  94. init_sheet.HeaderMode = {Sort:1};
  95. IBS_InitSheet(sheetName, init_sheet);
  96. sheetName.SetDataAutoTrim(0);
  97. sheetName.SetEditable(false);
  98. sheetName.SetDataLinkMouse("BUILD_NAME", 1);
  99. sheetName.SetActionMenu("ExcelDown");
  100. setGridSize();
  101. }
  102. function sheet1_OnSelectMenu(Text, Code) {
  103. // text 또는 code값으로 Action수행
  104. switch(Text) {
  105. case "ExcelDown":
  106. sheetExcelDown(sheet1,$('li').html());
  107. break;
  108. }
  109. }
  110. function sheet1_OnSearchEnd(code, message) {
  111. if(code == 0) {
  112. setGridSize();
  113. sheet1.SetColFontColor("BUILD_NAME", "#0000ff");
  114. } else {
  115. //조회 에러 수행
  116. alert(message);
  117. }
  118. }
  119. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  120. }
  121. /**
  122. * IBSheet size setting
  123. */
  124. function setGridSize() {
  125. sheet1.FitColWidth();
  126. }
  127. /**
  128. * IBSheet Event: DBLCLICK
  129. */
  130. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  131. if (sheet1.ColSaveName(Col) == "BUILD_NAME") { //신청금액
  132. jQuery("#selectSubContModId").val(sheet1.GetCellValue(Row, "SUB_CONT_MOD_ID")); //변경계약ID
  133. jQuery("#fevent").val("");
  134. jQuery("#form1").attr("action", "/payment/outside/AdvencePayment.screen");
  135. jQuery("#form1").attr("target", "_self");
  136. jQuery("#form1").attr("method", "post");
  137. jQuery("#form1").submit();
  138. }
  139. }
  140. function doKeyPress() {
  141. if( event.keyCode == 13 ) {
  142. jQuery("#btnSearch").click();
  143. }
  144. }
  145. function sheet1_OnSmartResize(Width, Height) {
  146. sheet1.FitColWidth();
  147. autoResize();
  148. }
  149. /* function autoResize(){
  150. var t1_height = document.getElementById("t1").scrollHeight + 10;
  151. var iframeHeight= document.body.scrollHeight - t1_height;
  152. var iframeWidth= document.body.scrollWidth;
  153. sheet1.SetSheetHeight(iframeHeight);
  154. } */
  155. function searchSite() {
  156. var win_id = "_searchSite";
  157. var link = "/lib/dlgSearchSpotDept_Unitcd.screen";
  158. link += "?pop_win_id="+win_id;
  159. fLayerPop(win_id, link, 550,500, '', '', 'NO');
  160. }
  161. function searchSiteClose(result) {
  162. if( result == null ){
  163. document.form1.dept_cd.value = ""; //부서코드
  164. document.form1.dept_nm.value = ""; //부서명
  165. }else{
  166. document.form1.dept_cd.value = result[0]; //부서코드
  167. document.form1.dept_nm.value = result[1]; //부서명
  168. }
  169. fLayerPopClose('_searchSite');
  170. }
  171. function autoResize(){
  172. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 54;
  173. var iframeHeight= document.body.scrollHeight - t1_height;
  174. var iframeWidth= document.body.scrollWidth;
  175. sheet1.SetSheetHeight(iframeHeight);
  176. }
  177. function selectChange(){
  178. jQuery("#btnSearch").click();
  179. }
  180. </SCRIPT>
  181. <modular:search id="form1">
  182. <modular:key id="fevent" />
  183. </modular:search>
  184. <BODY onresize="autoResize()" >
  185. <form id="form1" name="form1" method="post" modular:type="search" style="width:100%;height:100%;">
  186. <INPUT type="hidden" name="fevent" id="fevent" value="">
  187. <INPUT type="hidden" name="selectSubContModId" id="selectSubContModId" value="">
  188. <INPUT type="hidden" name="resultListDiv" id="resultListDiv" value="2">
  189. <div align="left" id="title">
  190. <ul>
  191. <li>외주_선급금완료</li>
  192. </ul>
  193. </div>
  194. <!-- 검색조건 영역 : 시작 -->
  195. <table id="search-table" class="search-form-table">
  196. <colgroup>
  197. <col width="100px">
  198. <col width="40%">
  199. <col width="100px">
  200. <col/>
  201. <col width="100px">
  202. </colgroup>
  203. <TR>
  204. <TH>현장</TH>
  205. <TD>
  206. <%=InputText.getSiteCodeNew("dept_cd", "dept_nm", "", user, dept_cd, dept_nm)%>
  207. </TD>
  208. <th>신청일자</th>
  209. <td>
  210. <%= InputText.get("signDt_from", "", 10, 50, "hangule,center, desc=신청일,ReadOnly") %>
  211. <IMG name="start_img" id="calender_from" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('signDt_from');">
  212. ~
  213. <%= InputText.get("signDt_to", "", 10, 50, "hangule,center, desc=신청일,ReadOnly") %>
  214. <IMG name="start_img" id="calender_to" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('signDt_to');">
  215. <IMG name="dataClear1" id="dataClear1" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
  216. </td>
  217. <TD class="button" rowspan="3">
  218. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSearch">검색</a></span>
  219. </TD>
  220. </TR>
  221. <TR>
  222. <TH>계약명</TH>
  223. <TD colspan="1">
  224. <INPUT type="text" id="searchBuildName" name="searchBuildName" value="<%=returnBuildName %>" maxlength="50" class="input" style="IME-MODE : active; width:90%;" desc='계약명' onKeyPress="doKeyPress();">
  225. </TD>
  226. <TH>상태</TH>
  227. <TD>
  228. <%= HTMLMaker.getSelectTag(statusComboList, "DETAILCD", "DETAILNM", "searchStatusCd", "width:30%;height=18;", "<option value=''>--전체--</option>", initStatusCd) %>
  229. </TD>
  230. </TR>
  231. <TR>
  232. <TH>업체명</TH>
  233. <TD colspan="3">
  234. <INPUT type="text" id="searchCorp" name="searchCorp" value="" maxlength="50" class="input" style="IME-MODE : active; width:42%;" desc='업체명' onKeyPress="doKeyPress();">
  235. </TD>
  236. </TR>
  237. </TABLE>
  238. <!-- 검색조건 영역 : 종료 -->
  239. <img src="/img/com/blank.gif" height="5px" />
  240. <div align="right" id="bugase">
  241. <ul>
  242. <li valign="bottom"><span style="color: red;">* 부가세별도</span></li>
  243. </ul>
  244. </div>
  245. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 350px; overflow: auto;">
  246. <script>createIBSheet('sheet1','100%', '350px');</script>
  247. </div>
  248. </FORM>
  249. </body>