prepayRequestList.jsp 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <%--
  2. - FileName : prepayRequestList.jsp
  3. - Author(s) : chj
  4. - Date : 2014.07.28
  5. - Copyright : Copyright (c) 2014 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.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. //검색조건 현장 설정
  23. String initSearchDeptCd = params.get("searchDeptCd");
  24. String initSearchDeptNm = params.get("searchDeptNm");
  25. String dept_cd = params.get("searchDeptCd");
  26. String dept_nm = params.get("searchDeptNm");
  27. //검색조건 작성일
  28. //String initSearchDateStart = params.get("searchDateStart");
  29. //String initSearchDateEnd = params.get("searchDateEnd");
  30. String pageDiv = params.get("pageDiv"); //1:조달 2:포탈
  31. %>
  32. <SCRIPT language="JavaScript">
  33. /*예약함수*/
  34. var sheet1;
  35. var sheet1Row;
  36. var sheet1PageNo = 1;
  37. var pageLastRowIndex = 1;
  38. var validationResult = false;
  39. var filterShow = false;
  40. function _onReady(){
  41. /**
  42. * IBSheet object initialize
  43. */
  44. gridInit(sheet1);
  45. /**
  46. * Application Initialize
  47. */
  48. jQuery("#btnCreate").click(function() {
  49. if(sheet1.RowCount("U") == 0){
  50. alert("신규생성할 선급금 대상건을 선택하세요.");
  51. return;
  52. }
  53. if (confirm("선급금을 생성 하시겠습니까?")) {
  54. jQuery("#fevent").val("SAVE_DATA");
  55. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/purchase/PrepayRequestList_sheet.screen";
  56. var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
  57. }
  58. });
  59. jQuery("#btnClose").click(function() {
  60. //setTimeout(function(){parent.searchAccDeptClose(null);},100);
  61. parent.PurchaseRequestPopupClose();
  62. });
  63. jQuery("#btnSearch").click(function() {
  64. searchData();
  65. });
  66. pageinit();
  67. }
  68. function pageinit(){
  69. //검색조건의 작성일 일자 설정
  70. setSearchDate();
  71. //데이터 조회
  72. searchData();
  73. //1:조달, 2:포탈
  74. if(jQuery("#pageDiv").val() == "2"){
  75. sheet1.SetColHidden(5, 1); //업체명 숨김
  76. }
  77. }
  78. /**
  79. * IBSheet object initialize
  80. */
  81. function gridInit(sheetName){
  82. var init_sheet = {};
  83. init_sheet.Cfg = {SearchMode:2, Page:30, MergeSheet:msHeaderOnly};
  84. init_sheet.Cols = [
  85. {Header:'상태', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  86. {Header:'선택', Type:"CheckBox", SaveName:"CHECKBOX", Width:40, Align:"Center"},
  87. {Header:'현장코드', Type:"Text", SaveName:"DEPT_CD", Width:50, Align:"Left", Hidden:"True"},
  88. {Header:'현장명', Type:"Text", SaveName:"DEPT_NM", Width:110, Align:"Left", Edit:"False", Hidden:"True"},
  89. {Header:'계약번호', Type:"Text", SaveName:"ORD_DOC_NO", Width:100, Align:"Left", Edit:"False"},
  90. {Header:'차수', Type:"Text", SaveName:"MOD_NO", Width:20, Align:"Center", Edit:"False"},
  91. {Header:'계약명', Type:"Text", SaveName:"CST_DOC_NAME", Width:110, Align:"Left", Edit:"False"},
  92. {Header:'업체명', Type:"Text", SaveName:"CORP_KOR", Width:110, Align:"Left", Edit:"False"},
  93. {Header:'통화', Type:"Text", SaveName:"CURRENCY_GB", Width:40, Align:"Center", Edit:"False"},
  94. {Header:'계약금액', Type:"Text", SaveName:"ORD_SUPPLY_AMT", Width:80, Align:"Right", Edit:"False"},
  95. {Header:'PUR_CONT_ID', Type:"Text", SaveName:"PUR_CONT_ID", Width:80, Align:"Center", Hidden:"True"},
  96. {Header:'PUR_CONT_MOD_ID', Type:"Text", SaveName:"PUR_CONT_MOD_ID", Width:80, Align:"Center", Hidden:"True"},
  97. ];
  98. init_sheet.HeaderMode = {Sort:1};
  99. IBS_InitSheet(sheetName, init_sheet);
  100. sheetName.SetDataAutoTrim(0);
  101. sheetName.SetEditable(true);
  102. sheetName.SetActionMenu("ExcelDown");
  103. setGridSize();
  104. }
  105. function sheet1_OnSelectMenu(Text, Code) {
  106. // text 또는 code값으로 Action수행
  107. switch(Text) {
  108. case "ExcelDown":
  109. sheetExcelDown(sheet1,$('li').html());
  110. break;
  111. }
  112. }
  113. /**
  114. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  115. */
  116. function sheet1_OnSearchEnd(code, message) {
  117. if(code == 0) {
  118. setGridSize();
  119. } else {
  120. //조회 에러 수행
  121. alert(message);
  122. }
  123. }
  124. /**
  125. * IBSheet Event: Save End(IBSheet 데이터 저장 CallBack)
  126. */
  127. function sheet1_OnSaveEnd(code, msg) {
  128. if(code >= 0) {
  129. //alert("신규로 대금건이 생성되었습니다. \n\n 외주_기성현황에서 확인 하실수 있습니다.");
  130. alert("신규 선급금건이 생성되었습니다.");
  131. } else {
  132. alert("생성실패 하였습니다.");
  133. }
  134. //searchData();
  135. searchClose();
  136. }
  137. /**
  138. * IBSheet Event: Click
  139. */
  140. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  141. //masterSheetRow = Row;
  142. }
  143. /**
  144. * IBSheet size setting
  145. */
  146. function setGridSize() {
  147. sheet1.FitColWidth();
  148. }
  149. /**
  150. * IBSheet Event: DBLCLICK
  151. */
  152. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  153. }
  154. function doKeyPress() {
  155. if( event.keyCode == 13 ) {
  156. jQuery("#btnSearch").click();
  157. }
  158. }
  159. function calendar(thisDayObj){
  160. dlgCalendar(thisDayObj);
  161. }
  162. function searchData(){
  163. jQuery("#fevent").val("GET_LIST");
  164. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/purchase/PrepayRequestList_sheet.screen";
  165. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  166. }
  167. function searchClose(){
  168. parent.PurchaseRequestPopupClose();
  169. }
  170. function sheet1_OnSmartResize(Width, Height) {
  171. sheet1.FitColWidth();
  172. }
  173. //검색 조건에 작성일 일자 설정
  174. function setSearchDate(){
  175. /* //검색조건 시작일
  176. var startDate = get_year() +'-'+ get_month() +'-'+ '01';
  177. if(jQuery('#searchDateStart').val() == ""){
  178. jQuery('#searchDateStart').val(startDate);
  179. }
  180. //검색조건 종료일
  181. var nowYearMonth = new Date( get_year(), get_month(), "");
  182. var lastDay = nowYearMonth.getDate();
  183. var endDate = get_year() +'-'+ get_month() +'-'+ lastDay;
  184. if(jQuery('#searchDateEnd').val() == ""){
  185. jQuery('#searchDateEnd').val(endDate);
  186. } */
  187. }
  188. </SCRIPT>
  189. <modular:search id="form1">
  190. <modular:key id="fevent" />
  191. </modular:search>
  192. <BODY>
  193. <form id="form1" name="form1" method="post" modular:type="search">
  194. <INPUT type="hidden" name="fevent" id="fevent" value="">
  195. <INPUT type="hidden" name="pageDiv" id="pageDiv" value="<%=params.get("pageDiv")%>"> <!-- //1:조달 2:포탈 -->
  196. <INPUT type="hidden" name="userCorpId" id="userCorpId" value="<%=user.get("CORP_ID")%>">
  197. <!-- 검색조건 영역 : 시작 -->
  198. <table class="search-form-table" style="width: 100%">
  199. <colgroup>
  200. <col width="8%" />
  201. <col width="35%" />
  202. <col width="8%" />
  203. <col width="*" />
  204. <col width="25%" />
  205. </colgroup>
  206. <TR height="25">
  207. <!-- 검색조건 타이틀 1 -->
  208. <TH>현장</TH>
  209. <TD>
  210. <%=InputText.getSiteCodeNew("searchDeptCd", "searchDeptNm", "", user, dept_cd, dept_nm)%>
  211. </TD>
  212. <th>계약명</th>
  213. <td>
  214. <input name="searchCstNm" class="input" id="searchCstNm" type="text" style="width: 95%; value="" onkeypress="javascript:doKeyPress() "/>
  215. </td>
  216. <TD class="button" rowspan="2">
  217. <!-- 검색버튼 영역 : 시작 -->
  218. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSearch">검색</a></span>
  219. <span class="btnSearch center"><a href="javascript:void(0);" id="btnCreate">신규 선급금 생성</a></span>
  220. <span class="btnSearch center"><a href="javascript:void(0);" id="btnClose">닫기</a></span>
  221. <!-- 검색버튼 영역 : 종료 -->
  222. </TD>
  223. </TR>
  224. <TR height="25">
  225. <!-- 검색조건 타이틀 1 -->
  226. <th>업체명</th>
  227. <td colspan="3">
  228. <input name="searchCorpKor" class="input" id="searchCorpKor" type="text" style="width: 98%; value="" onkeypress="javascript:doKeyPress() "/>
  229. </td>
  230. </TR>
  231. </TABLE>
  232. <!-- 검색조건 영역 : 종료 -->
  233. <div id="sheet1_div" style="width: 100%; padding-top:5px; height: auto; min-height: 360px; overflow: auto;">
  234. <script>createIBSheet('sheet1','100%', '330px');</script>
  235. </div>
  236. </FORM>
  237. </body>