ApplicationRequestList.jsp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. <%--
  2. - FileName : applicationRequestList.jsp
  3. - Author(s) : ok
  4. - Date : 2014.07.04
  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.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. <SCRIPT language="JavaScript">
  24. /*예약함수*/
  25. var sheet1;
  26. var sheet1Row;
  27. var sheet1PageNo = 1;
  28. var pageLastRowIndex = 1;
  29. var validationResult = false;
  30. var filterShow = false;
  31. function _onReady(){
  32. /**
  33. * IBSheet object initialize
  34. */
  35. gridInit(sheet1);
  36. /**
  37. * Application Initialize
  38. */
  39. jQuery("#btnCreate").click(function() {
  40. if(sheet1.RowCount("U") == 0){
  41. alert("신규생성할 기성대상건을 선택하세요.");
  42. return;
  43. }
  44. if (confirm("기성 정보를 생성 하시겠습니까?")) {
  45. jQuery("#fevent").val("SAVE_DATA");
  46. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/outside/ApplicationRequestList_sheet.screen";
  47. var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
  48. }
  49. });
  50. jQuery("#btnClose").click(function() {
  51. //setTimeout(function(){parent.searchAccDeptClose(null);},100);
  52. parent.callback_getData();
  53. });
  54. pageinit();
  55. }
  56. function pageinit(){
  57. searchData();
  58. }
  59. /**
  60. * IBSheet object initialize
  61. */
  62. function gridInit(sheetName){
  63. var init_sheet = {};
  64. init_sheet.Cfg = {SearchMode:2, Page:30, MergeSheet:msHeaderOnly};
  65. init_sheet.Cols = [
  66. {Header:'상태', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  67. {Header:'선택', Type:"CheckBox", SaveName:"CHECKBOX", Width:30, Align:"Center"},
  68. {Header:'현장명', Type:"Text", SaveName:"DEPT_NAME", Width:120, Align:"Left"},
  69. {Header:'계약명', Type:"Text", SaveName:"BUILD_NAME", Width:120, Align:"Left"},
  70. {Header:'공사기간', Type:"Text", SaveName:"START_END_WORK_DATE", Width:90, Align:"Center"},
  71. {Header:'공급가', Type:"Int", SaveName:"CON_SUPPLY_AMT", Width:50, Align:"Right", Format:"#,##0"},
  72. {Header:'부가세', Type:"Int", SaveName:"CON_SURTAX_AMT", Width:50, Align:"Right", Format:"#,##0"},
  73. {Header:'합계', Type:"Int", SaveName:"CON_AMT", Width:50, Align:"Right", Format:"#,##0"},
  74. {Header:'지급차수', Type:"Text", SaveName:"ACMP_NO", Width:30, Align:"Center"},
  75. {Header:'금회기성', Type:"Int", SaveName:"FUND_AMT", Width:50, Align:"Right", Format:"#,##0"},
  76. {Header:'누계기성', Type:"Int", SaveName:"TOT_FUND_AMT", Width:50, Align:"Right", Format:"#,##0"},
  77. {Header:'잔여기성', Type:"Int", SaveName:"MOD_FUND_AMT", Width:50, Align:"Right", Format:"#,##0"},
  78. {Header:'선금처리', Type:"Text", SaveName:"P_STATUS_CD", Width:50, Align:"Right", Hidden:"True"},
  79. {Header:'선금처리', Type:"Text", SaveName:"STATUS_NM", Width:50, Align:"Center" },
  80. {Header:'당월기성건수', Type:"Text", SaveName:"CNT", Width:70, Align:"Center", Hidden:"True" },
  81. {Header:'SUB_CONT_ID', Type:"Text", SaveName:"SUB_CONT_ID", Width:0, Align:"Center", Hidden:"True"},
  82. {Header:'CON_CORP_ID', Type:"Text", SaveName:"CON_CORP_ID", Width:0, Align:"Center", Hidden:"True"},
  83. {Header:'MOD_NO', Type:"Text", SaveName:"MOD_NO", Width:0, Align:"Center", Hidden:"True"},
  84. {Header:'ACMP_YYYYMM', Type:"Text", SaveName:"ACMP_YYYYMM", Width:0, Align:"Center", Hidden:"True"},
  85. {Header:'ACMP_DATE', Type:"Text", SaveName:"ACMP_DATE", Width:0, Align:"Center", Hidden:"True"},
  86. {Header:'CON_START_DATE', Type:"Text", SaveName:"CON_START_DATE", Width:0, Align:"Center", Hidden:"True"},
  87. {Header:'CON_END_DATE', Type:"Text", SaveName:"CON_END_DATE", Width:0, Align:"Center", Hidden:"True"},
  88. {Header:'START_WORK_DATE', Type:"Text", SaveName:"START_WORK_DATE", Width:0, Align:"Center", Hidden:"True"},
  89. {Header:'END_WORK_DATE', Type:"Text", SaveName:"END_WORK_DATE", Width:0, Align:"Center", Hidden:"True"},
  90. {Header:'CON_CUR_CD', Type:"Text", SaveName:"CON_CUR_CD", Width:0, Align:"Center", Hidden:"True"},
  91. {Header:'CON_SUPPLY_TAMT', Type:"Text", SaveName:"CON_SUPPLY_TAMT", Width:0, Align:"Center", Hidden:"True"},
  92. {Header:'CON_SUPPLY_NAMT', Type:"Text", SaveName:"CON_SUPPLY_NAMT", Width:0, Align:"Center", Hidden:"True"},
  93. {Header:'FUND_TAMT', Type:"Text", SaveName:"FUND_TAMT", Width:0, Align:"Center", Hidden:"True"},
  94. {Header:'FUND_NAMT', Type:"Text", SaveName:"FUND_NAMT", Width:0, Align:"Center", Hidden:"True"},
  95. {Header:'PAY_DEDUCT_AMT', Type:"Text", SaveName:"PAY_DEDUCT_AMT", Width:0, Align:"Center", Hidden:"True"},
  96. {Header:'PAY_DEDUCT_TAMT', Type:"Text", SaveName:"PAY_DEDUCT_TAMT", Width:0, Align:"Center", Hidden:"True"},
  97. {Header:'PAY_DEDUCT_NAMT', Type:"Text", SaveName:"PAY_DEDUCT_NAMT", Width:0, Align:"Center", Hidden:"True"},
  98. {Header:'PAY_DEDUCT_RATE', Type:"Text", SaveName:"PAY_DEDUCT_RATE", Width:0, Align:"Center", Hidden:"True"},
  99. {Header:'REQU_AMT', Type:"Text", SaveName:"REQU_AMT", Width:0, Align:"Center", Hidden:"True"},
  100. {Header:'REQU_SUPPLY_AMT', Type:"Text", SaveName:"REQU_SUPPLY_AMT", Width:0, Align:"Center", Hidden:"True"},
  101. {Header:'REQU_SUPPLY_TAMT', Type:"Text", SaveName:"REQU_SUPPLY_TAMT", Width:0, Align:"Center", Hidden:"True"},
  102. {Header:'REQU_SUPPLY_NAMT', Type:"Text", SaveName:"REQU_SUPPLY_NAMT", Width:0, Align:"Center", Hidden:"True"},
  103. {Header:'REQU_SURTAX_AMT', Type:"Text", SaveName:"REQU_SURTAX_AMT", Width:0, Align:"Center", Hidden:"True"},
  104. {Header:'PRE_FUND_AMT', Type:"Text", SaveName:"PRE_FUND_AMT", Width:0, Align:"Center", Hidden:"True"},
  105. {Header:'PRE_FUND_TAMT', Type:"Text", SaveName:"PRE_FUND_TAMT", Width:0, Align:"Center", Hidden:"True"},
  106. {Header:'PRE_FUND_NAMT', Type:"Text", SaveName:"PRE_FUND_NAMT", Width:0, Align:"Center", Hidden:"True"},
  107. {Header:'PRE_PAY_DEDUCT_AMT', Type:"Text", SaveName:"PRE_PAY_DEDUCT_AMT", Width:0, Align:"Center", Hidden:"True"},
  108. {Header:'PRE_PAY_DEDUCT_TAMT', Type:"Text", SaveName:"PRE_PAY_DEDUCT_TAMT", Width:0, Align:"Center", Hidden:"True"},
  109. {Header:'PRE_PAY_DEDUCT_NAMT', Type:"Text", SaveName:"PRE_PAY_DEDUCT_NAMT", Width:0, Align:"Center", Hidden:"True"},
  110. {Header:'PRE_PAY_DEDUCT_RATE', Type:"Text", SaveName:"PRE_PAY_DEDUCT_RATE", Width:0, Align:"Center", Hidden:"True"},
  111. {Header:'PRE_REQU_AMT', Type:"Text", SaveName:"PRE_REQU_AMT", Width:0, Align:"Center", Hidden:"True"},
  112. {Header:'PRE_REQU_SUPPLY_AMT', Type:"Text", SaveName:"PRE_REQU_SUPPLY_AMT", Width:0, Align:"Center", Hidden:"True"},
  113. {Header:'PRE_REQU_SUPPLY_TAMT', Type:"Text", SaveName:"PRE_REQU_SUPPLY_TAMT",Width:0, Align:"Center", Hidden:"True"},
  114. {Header:'PRE_REQU_SUPPLY_NAMT', Type:"Text", SaveName:"PRE_REQU_SUPPLY_NAMT",Width:0, Align:"Center", Hidden:"True"},
  115. {Header:'PRE_REQU_SURTAX_AMT', Type:"Text", SaveName:"PRE_REQU_SURTAX_AMT", Width:0, Align:"Center", Hidden:"True"},
  116. {Header:'PROOF_CD', Type:"Text", SaveName:"PROOF_CD", Width:0, Align:"Center", Hidden:"True"},
  117. {Header:'STATUS_CD', Type:"Text", SaveName:"STATUS_CD", Width:0, Align:"Center", Hidden:"True"},
  118. {Header:'DEPT_CD', Type:"Text", SaveName:"DEPT_CD", Width:0, Align:"Center", Hidden:"True"},
  119. {Header:'TOT_FUND_TAMT', Type:"Text", SaveName:"TOT_FUND_TAMT", Width:0, Align:"Center", Hidden:"True"},
  120. {Header:'TOT_FUND_NAMT', Type:"Text", SaveName:"TOT_FUND_NAMT", Width:0, Align:"Center", Hidden:"True"},
  121. {Header:'TOT_PAY_DEDUCT_AMT', Type:"Text", SaveName:"TOT_PAY_DEDUCT_AMT", Width:0, Align:"Center", Hidden:"True"},
  122. {Header:'TOT_PAY_DEDUCT_TAMT', Type:"Text", SaveName:"TOT_PAY_DEDUCT_TAMT", Width:0, Align:"Center", Hidden:"True"},
  123. {Header:'TOT_PAY_DEDUCT_NAMT', Type:"Text", SaveName:"TOT_PAY_DEDUCT_NAMT", Width:0, Align:"Center", Hidden:"True"},
  124. {Header:'TOT_PAY_DEDUCT_RATE', Type:"Text", SaveName:"TOT_PAY_DEDUCT_RATE", Width:0, Align:"Center", Hidden:"True"},
  125. {Header:'TOT_REQU_AMT', Type:"Text", SaveName:"TOT_REQU_AMT", Width:0, Align:"Center", Hidden:"True"},
  126. {Header:'TOT_REQU_SUPPLY_AMT', Type:"Text", SaveName:"TOT_REQU_SUPPLY_AMT", Width:0, Align:"Center", Hidden:"True"},
  127. {Header:'TOT_REQU_SUPPLY_TAMT', Type:"Text", SaveName:"TOT_REQU_SUPPLY_TAMT",Width:0, Align:"Center", Hidden:"True"},
  128. {Header:'TOT_REQU_SUPPLY_NAMT', Type:"Text", SaveName:"TOT_REQU_SUPPLY_NAMT",Width:0, Align:"Center", Hidden:"True"},
  129. {Header:'TOT_REQU_SURTAX_AMT', Type:"Text", SaveName:"TOT_REQU_SURTAX_AMT", Width:0, Align:"Center", Hidden:"True"},
  130. {Header:'SUPP_DIRECT_YN', Type:"Text", SaveName:"SUPP_DIRECT_YN", Width:0, Align:"Center", Hidden:"True"},
  131. {Header:'LABOR_USE_YN', Type:"Text", SaveName:"LABOR_USE_YN", Width:0, Align:"Center", Hidden:"True"},
  132. {Header:'TAX_CHARG_NM', Type:"Text", SaveName:"TAX_CHARG_NM", Width:0, Align:"Center", Hidden:"True"},
  133. {Header:'TAX_CHARG_HP', Type:"Text", SaveName:"TAX_CHARG_HP", Width:0, Align:"Center", Hidden:"True"},
  134. {Header:'TAX_CHARG_EMAIL', Type:"Text", SaveName:"TAX_CHARG_EMAIL", Width:0, Align:"Center", Hidden:"True"}
  135. ];
  136. init_sheet.HeaderMode = {Sort:1};
  137. IBS_InitSheet(sheetName, init_sheet);
  138. sheetName.SetDataAutoTrim(0);
  139. sheetName.SetEditable(true);
  140. setGridSize();
  141. }
  142. /**
  143. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  144. */
  145. function sheet1_OnSearchEnd(code, message) {
  146. <% if (user.get("RIGHT_NAME").equals("ADMIN NEW")) { %>
  147. sheet1.SetColHidden("CNT",0);
  148. <%}%>
  149. if(code == 0) {
  150. setGridSize();
  151. } else {
  152. //조회 에러 수행
  153. alert(message);
  154. }
  155. //2015.11.17
  156. var frmObj = document.getElementsByName('form1')[0];
  157. for(i=1; i<=sheet1.RowCount(); i++){
  158. if(sheet1.GetCellValue(i, 'P_STATUS_CD') != '10' && sheet1.GetCellValue(i, 'P_STATUS_CD') != '11' && sheet1.GetCellValue(i, 'P_STATUS_CD') != ''){
  159. sheet1.SetRowEditable(i, false);
  160. }
  161. if(sheet1.GetCellValue(i, 'END_WORK_DATE') < frmObj.searchDate.value + '-00' ){
  162. sheet1.SetRowEditable(i, false);
  163. }
  164. }
  165. }
  166. /**
  167. * IBSheet Event: Save End(IBSheet 데이터 저장 CallBack)
  168. */
  169. function sheet1_OnSaveEnd(code, msg) {
  170. if(code >= 0) {
  171. alert("신규로 기성건이 생성되었습니다. \n\n 외주_기성현황에서 확인 하실수 있습니다.");
  172. } else {
  173. alert(msg);
  174. }
  175. searchData();
  176. }
  177. /**
  178. * IBSheet Event: Click
  179. */
  180. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  181. //masterSheetRow = Row;
  182. }
  183. /**
  184. * IBSheet size setting
  185. */
  186. function setGridSize() {
  187. sheet1.FitColWidth();
  188. }
  189. /**
  190. * IBSheet Event: DBLCLICK
  191. */
  192. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  193. /* if (sheet1.ColSaveName(Col) == "BUILD_NAME1") { //계약명
  194. jQuery("#selectSubContId").val(sheet1.GetCellValue(Row, "SUB_CONT_ID")); //외주계약서ID
  195. jQuery("#acmpId").val(sheet1.GetCellValue(Row, "ACMP_ID")); //기성ID
  196. jQuery("#acmpYyyymm").val(sheet1.GetCellValue(Row, "ACMP_YYYYMM")); //기성년월
  197. jQuery("#conCorpId").val(sheet1.GetCellValue(Row, "CON_CORP_ID")); //계약업체ID
  198. jQuery("#acmpNo").val(sheet1.GetCellValue(Row, "ACMP_NO")); //기성차수
  199. jQuery("#fevent").val("");
  200. jQuery("#form1").attr("action", "/portal/payment/ResolutionRequest.screen");
  201. jQuery("#form1").attr("target", "_self");
  202. jQuery("#form1").attr("method", "post");
  203. jQuery("#form1").submit();
  204. } */
  205. }
  206. function doKeyPress() {
  207. if( event.keyCode == 13 ) {
  208. jQuery("#btnSearch").click();
  209. }
  210. }
  211. function calendar(thisDayObj){
  212. dlgMCalendar(thisDayObj);
  213. }
  214. function searchData(){
  215. jQuery("#fevent").val("GET_DATA");
  216. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/outside/ApplicationRequestList_sheet.screen";
  217. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 10000, "");
  218. }
  219. function sheet1_OnSmartResize(Width, Height) {
  220. sheet1.FitColWidth();
  221. }
  222. </SCRIPT>
  223. <modular:search id="form1">
  224. <modular:key id="fevent" />
  225. </modular:search>
  226. <BODY>
  227. <form id="form1" name="form1" method="post" modular:type="search">
  228. <INPUT type="hidden" name="fevent" id="fevent" value="">
  229. <INPUT type="hidden" name="dept_cd" id="dept_cd" value="<%=params.get("dept_cd")%>">
  230. <!-- 프로그램 제목 -->
  231. <div align="left" id="title">
  232. <ul>
  233. <li>신규기성 신청대상</li>
  234. </ul>
  235. </div>
  236. <!-- 검색조건 영역 : 시작 -->
  237. <table class="search-form-table" style="width: 970px">
  238. <colgroup>
  239. <col width="10%" />
  240. <col width="*" />
  241. <col width="25%" />
  242. </colgroup>
  243. <TR height="25">
  244. <!-- 검색조건 타이틀 1 -->
  245. <Th>기성년월</Th>
  246. <TD>
  247. <%= InputText.get("searchDate", Formatter.formatDate(params.get("searchDate"), "-"), 30, 30, "class=input_blank, readOnly=white, string, left, readOnly, tabIndex=-1", "String") %>
  248. </TD>
  249. <TD class="button">
  250. <!-- 검색버튼 영역 : 시작 -->
  251. <span class="btnSearch center"><a href="javascript:void(0);" id="btnCreate">신규기성생성</a></span>
  252. <span class="btnSearch center"><a href="javascript:void(0);" id="btnClose">닫기</a></span>
  253. <!-- 검색버튼 영역 : 종료 -->
  254. </TD>
  255. </TR>
  256. </TABLE>
  257. <!-- 검색조건 영역 : 종료 -->
  258. <div id="sheet1_div" style="width: 970px; padding-top:5px; height: auto; min-height: 480px; overflow: auto;">
  259. <script>createIBSheet('sheet1','100%', '480px');</script>
  260. </div>
  261. </FORM>
  262. </body>