advencePaymentList.jsp 11 KB

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