prepaymentsResultList.jsp 11 KB

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