SubStampList.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <%--
  2. - Author(s) : 김예진
  3. - Date : 2015.01.08
  4. - Description: 외주_인지세 현황 리스트
  5. --%>
  6. <%@ page contentType="text/html; charset=utf-8" %>
  7. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  8. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  9. <%@ page import="kr.co.hsnc.common.util.*"%>
  10. <%@ page import="kr.co.hsnc.common.sql.*" %>
  11. <%@ page import="kr.co.udapsoft.common.code.CommCodeManager" %>
  12. <%@ include file="/jsp/work/taglib.jsp" %>
  13. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  14. <%
  15. ctx.init(request, response);
  16. HandlerStorage storage = ctx.getHandlerStorage();
  17. ValueObject params = storage.getParams();
  18. ValueObject user = storage.getUser();
  19. //계약 상태 List
  20. RowSet statusRow = CommCodeManager.getCodeRowsetStatic("STAMP_DUTY_ISSUE_GB");
  21. %>
  22. <SCRIPT language="JavaScript">
  23. /*예약함수*/
  24. var sheet1;
  25. var sheet1Row;
  26. var sheet1PageNo = 1;
  27. var pageLastRowIndex = 1;
  28. var validationResult = false;
  29. var filterShow = false;
  30. function _onReady(){
  31. /**
  32. * IBSheet object initialize
  33. */
  34. gridInit(sheet1);
  35. /**
  36. * Application Initialize
  37. */
  38. $("#btnSearch").click(function() {
  39. jQuery("#fevent").val("SHEET_SELECT");
  40. var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/stamptax/SubStampList_sheet.screen";
  41. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  42. });
  43. $("#p_dept_nm").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == 8){$("#p_dept_cd").val("");$("#p_dept_nm").val("");}});
  44. $("#p_cont_status").change(function(){$("#btnSearch").click();});
  45. $("#p_build_name").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
  46. $("#p_member_name").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
  47. //$("#btnSearch").click();
  48. $("#dataClear").click(function(){$("#DutyFromDt").val("");$("#DutyToDt").val("");});
  49. jQuery("#btnExcel").click(function() {
  50. if(sheet1.RowCount() == 0) {
  51. alert("내역이 없습니다.");
  52. return;
  53. }
  54. var params = { FileName : "SubStampList.xls", SheetName : "SubStampList", SheetDesign:0, Merge:1, DownCols:"DEPT_NAME|CON_DOC_NO|MOD_NO|BUILD_NAME|VENDCD|MEMBER_NAME"+
  55. "|CON_AMT|CON_CUR_CD|STAMP_DUTY_NO|STAMP_DUTY_TAX|STAMP_DUTY_DATE|REMARK", TitleText:"외주_인지세현황", UserMerge:"0,0,1,12", AutoSizeColumn:1 } ;
  56. sheet1.Down2Excel(params);
  57. });
  58. autoResize();
  59. }
  60. /**
  61. * IBSheet object initialize
  62. */
  63. function gridInit(sheetName){
  64. var init_sheet = {};
  65. init_sheet.Cfg = {SearchMode:2, Page:100, MergeSheet:msPrevColumnMerge};
  66. init_sheet.Cols = [
  67. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:0, Align:"Center", Hidden:"True"},
  68. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  69. {Header:'외주계약변경ID', Type:"Text", SaveName:"SUB_CONT_MOD_ID", Width:0, Align:"Center", Hidden:"True"},
  70. {Header:'현장명', Type:"Text", SaveName:"DEPT_NAME", Width:150, Align:"Left" , Edit:"false"},
  71. {Header:'계약번호', Type:"Text", SaveName:"CON_DOC_NO", Width:100, Align:"Left", Edit:"false"},
  72. {Header:'변경차수', Type:"Text", SaveName:"MOD_NO", Width:50, Align:"Center" , Edit:"false"},
  73. {Header:'계약명', Type:"Text", SaveName:"BUILD_NAME", Width:150, Align:"Left" , Edit:"false"},
  74. {Header:'사업자등록번호', Type:"Text", SaveName:"VENDCD", Width:80, Align:"Center" , Format:"SaupNo", Edit:"false"},
  75. {Header:'업체명', Type:"Text", SaveName:"MEMBER_NAME", Width:80, Align:"Left" , Edit:"false"},
  76. {Header:'통화', Type:"Text", SaveName:"CON_CUR_CD", Width:40, Align:"Center" , Edit:"false"},
  77. {Header:'계약금액', Type:"Text", SaveName:"CON_AMT", Width:80, Align:"right", Edit:"false"},
  78. {Header:'인지세ID', Type:"Text", SaveName:"STAMP_DUTY_ID", Width:0, Align:"Center" , Edit:"false", Hidden:"True"},
  79. {Header:'고유식별번호', Type:"Text", SaveName:"STAMP_DUTY_NO", Width:80, Align:"Center" , Edit:"false"},
  80. {Header:'인지세액', Type:"Int", SaveName:"STAMP_DUTY_TAX", Width:60, Align:"right", Edit:"false"},
  81. {Header:'발행일자', Type:"Date", SaveName:"STAMP_DUTY_DATE", Width:70, Align:"Center" , Edit:"false"},
  82. {Header:'비고', Type:"Text", SaveName:"REMARK", Width:100, Align:"Left", Edit:"false"},
  83. {Header:'☞사본', Type:"Image", SaveName:"FILE_YN", Width:40, Align:"center", Edit:"false", Cursor:'pointer'},
  84. {Header:'FILE_ID', Type:"Text", SaveName:"FILE_ID", Width:0, Align:"center", Hidden:"True"},
  85. ];
  86. init_sheet.HeaderMode = {Sort:1};
  87. IBS_InitSheet(sheetName, init_sheet);
  88. sheetName.SetDataAutoTrim(0);
  89. sheetName.SetImageList(1,"/img/buyer/button/bt_change.gif");
  90. sheet1.SetEditable(0);
  91. var info = [{StdCol:4 , SumCols:"13" , CaptionText:"소 계"}];
  92. sheet1.ShowSubSum (info);
  93. sheetName.SetActionMenu("ExcelDown");
  94. setGridSize();
  95. }
  96. /*
  97. IBSheet Event : Mouse Right Menu
  98. */
  99. function sheet1_OnSelectMenu(Text, Code) {
  100. // text 또는 code값으로 Action수행
  101. switch(Text) {
  102. case "ExcelDown":
  103. jQuery("#btnExcel").click();
  104. break;
  105. }
  106. }
  107. /**
  108. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  109. */
  110. function sheet1_OnSearchEnd(code, message) {
  111. if(code == 0) {
  112. setGridSize();
  113. var info = {Type:"Text",Align:"Center"};
  114. for(i=1; i <= sheet1.RowCount(); i++){
  115. if(sheet1.GetCellValue(i, "DEPT_NAME")=="소 계"){
  116. sheet1.InitCellProperty(i, "DEPT_NAME", info);
  117. sheet1.SetMergeCell(i, 3, 1, 3);
  118. }
  119. }
  120. } else {
  121. //조회 에러 수행
  122. alert(message);
  123. }
  124. }
  125. /**
  126. * IBSheet Event: Click
  127. */
  128. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  129. if(Row == 0)return;
  130. if (sheet1.ColSaveName(Col) == "FILE_YN") {
  131. if (sheet1.GetCellValue(Row, "FILE_ID") != "") {
  132. viewFileListNew('SUB_STAMP_DUTY', sheet1.GetCellValue(Row,"STAMP_DUTY_ID"), "", "N", "", "", "", "", "N");
  133. }
  134. }
  135. }
  136. /**
  137. * IBSheet Event Change
  138. */
  139. function sheet1_OnChange(Row, Col, Value, OldValue, RaiseFlag) {
  140. var comboValue = sheet1.GetCellValue(Row,12);
  141. if(comboValue != "" ){
  142. sheet1.SetCellImage(Row ,13, "/img/buyer/button/bt_save_item.gif");
  143. return;
  144. }
  145. }
  146. /**
  147. * IBSheet size setting
  148. */
  149. function setGridSize() {sheet1.FitColWidth();}
  150. //자동로그인 기능
  151. function f_gologin(login_id,login_pw){
  152. var f = document.form1;
  153. if('<%= user.get("ACCT_TYPE_CODE")%>' != "ADMIN"){
  154. dlgAlert("User who logged in as administrator only can do automatic log-in.");
  155. return;
  156. }
  157. f.login_id.value = login_id;
  158. f.login_pw.value = login_pw;
  159. if( !submitXmlRequest("/sign_on_check", "", document.form1) ) {
  160. alert("Log-in is being processed.");
  161. };
  162. }
  163. function sheet1_OnSmartResize(Width, Height) {
  164. sheet1.FitColWidth();
  165. autoResize();
  166. }
  167. function autoResize(){
  168. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  169. var iframeHeight= document.body.scrollHeight - t1_height;
  170. var iframeWidth= document.body.scrollWidth;
  171. sheet1.SetSheetHeight(iframeHeight);
  172. }
  173. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  174. </SCRIPT>
  175. <modular:search id="form1">
  176. <modular:key id="fevent" />
  177. </modular:search>
  178. <form id="form1" name="form1" method="post" modular:type="search">
  179. <INPUT type="hidden" name="fevent" id="fevent" value="">
  180. <div align="left" id="title">
  181. <ul>
  182. <li>외주_인지세현황</li>
  183. </ul>
  184. </div>
  185. <!-- 검색조건 시작 -->
  186. <table id="search-table" class="search-form-table">
  187. <colgroup>
  188. <col width="100" />
  189. <col width="*" />
  190. <col width="100" />
  191. <col width="*" />
  192. <col width="100" />
  193. </colgroup>
  194. <tr height="25">
  195. <th>현장</th>
  196. <td>
  197. <%=InputText.getSiteCodeNew("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%>
  198. </td>
  199. <th>계약명</th>
  200. <!-- <td colspan="3"> -->
  201. <td>
  202. <INPUT type="text" name="p_build_name" class="input" value="<%= params.get("p_build_name") %>" style="width:90%">
  203. </td>
  204. <td class="button" rowspan="2">
  205. <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
  206. <span class="btnSearch center" id="btnExcel"><a href="javascript:void(0);">엑셀</a></span>
  207. </td>
  208. </tr>
  209. <tr>
  210. <th>업체명</th>
  211. <td>
  212. <INPUT type="text" name="p_member_name" class="input" value="<%= params.get("p_member_name") %>" style="width:90%">
  213. </td>
  214. <th>발행일자</th>
  215. <td>
  216. <%= InputText.get("DutyFromDt", params.get("DutyFromDt"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
  217. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('DutyFromDt');">
  218. ~
  219. <%= InputText.get("DutyToDt", params.get("DutyToDt"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
  220. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('DutyToDt');">
  221. <IMG name="dataClear" id="dataClear" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
  222. </td>
  223. <%-- <th>상태</th>
  224. <td>
  225. <%= HTMLMaker.getSelectTag(statusRow, "CODE", "NAME", "p_stamp_status", "width:150px;height=18;", "<option value=''>전체</option>", params.get("p_stamp_status")) %>
  226. </td> --%>
  227. </tr>
  228. </table>
  229. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 400px; overflow: auto;">
  230. <script>createIBSheet('sheet1','100%', '400px');</script>
  231. </div>
  232. </form>
  233. <iframe id="fileDown" name="fileDown" style="display:none"></iframe>
  234. <!-- <FORM id="form_filedown" name="form_filedown" method="get" action="/common/file/FileDownloadServlet" style="display:none">
  235. <input type="hidden" id="file_id" name="file_id"/>
  236. </FORM> -->