SalStampList.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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. %>
  20. <SCRIPT language="JavaScript">
  21. /*예약함수*/
  22. var sheet1;
  23. var sheet1Row;
  24. var sheet1PageNo = 1;
  25. var pageLastRowIndex = 1;
  26. var validationResult = false;
  27. var filterShow = false;
  28. function _onReady(){
  29. /**
  30. * IBSheet object initialize
  31. */
  32. gridInit(sheet1);
  33. /**
  34. * Application Initialize
  35. */
  36. $("#btnSearch").click(function() {
  37. jQuery("#fevent").val("SHEET_SELECT");
  38. var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/stamptax/SalStampList_sheet.screen";
  39. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  40. });
  41. $("#p_corp_name").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
  42. $("#p_cont_no").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
  43. $("#p_cont_name").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
  44. //$("#btnSearch").click();
  45. $("#dataClear").click(function(){$("#DutyFromDt").val("");$("#DutyToDt").val("");});
  46. jQuery("#btnExcel").click(function() {
  47. if(sheet1.RowCount() == 0) {
  48. alert("내역이 없습니다.");
  49. return;
  50. }
  51. var params = { FileName : "PurStampList.xls", SheetName : "PurStampList", SheetDesign:0, Merge:1, DownCols:"STAMP_DUTY_ISSUE_GB"+
  52. "|CORP_REG_NO|CORP_NAME|CONT_NO|MOD_NO|CONT_NAME|CURRENCY_GB|CONT_AMT|STAMP_DUTY_NO|STAMP_DUTY_TAX|STAMP_DUTY_DATE|REMARK",
  53. TitleText:"영업_인지세현황", UserMerge:"0,0,1,12", AutoSizeColumn:1 } ;
  54. sheet1.Down2Excel(params);
  55. });
  56. //신규등록 페이지 이동
  57. $("#btnNew").click(function() {
  58. if(confirm("신규등록 하시겠습니까?")){
  59. var win_id = "_SalStampPop";
  60. var link = "/cont/stamptax/SalNewPop.screen";
  61. link += "?pop_win_id="+win_id;
  62. fLayerPop(win_id, link, 700,450, '', '', 'NO');
  63. }
  64. });
  65. autoResize();
  66. }
  67. /**
  68. * IBSheet object initialize
  69. */
  70. function gridInit(sheetName){
  71. var init_sheet = {};
  72. init_sheet.Cfg = {SearchMode:2, Page:100};
  73. init_sheet.Cols = [
  74. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center", Hidden:"True"},
  75. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  76. {Header:'인지세ID', Type:"Text", SaveName:"STAMP_DUTY_ID", Width:60, Align:"Center", Hidden:"True"},
  77. {Header:'인지세구분', Type:"Text", SaveName:"STAMP_DUTY_TYPE", Width:80, Align:"Center" , Hidden:"True"},
  78. {Header:'발행주체구분', Type:"Text", SaveName:"STAMP_DUTY_ISSUE_GB", Width:80, Align:"Center", Edit:"false"},
  79. {Header:'사업자등록번호', Type:"Text", SaveName:"CORP_REG_NO", Width:100, Align:"Center" , Format:"SaupNo", Edit:"false"},
  80. {Header:'발주처', Type:"Text", SaveName:"CORP_NAME", Width:100, Align:"Left" , Edit:"false"},
  81. {Header:'계약번호', Type:"Text", SaveName:"CONT_NO", Width:120, Align:"Left" , Edit:"false"},
  82. {Header:'변경차수', Type:"Text", SaveName:"MOD_NO", Width:60, Align:"Center" , Edit:"false"},
  83. {Header:'☞계약명', Type:"Text", SaveName:"CONT_NAME", Width:150, Align:"Left" , Edit:"false", Cursor:'pointer'},
  84. {Header:'통화', Type:"Text", SaveName:"CURRENCY_GB", Width:60, Align:"Center" , Edit:"false"},
  85. {Header:'계약금액', Type:"Text", SaveName:"CONT_AMT", Width:80, Align:"right", Edit:"false"},
  86. {Header:'고유식별번호', Type:"Text", SaveName:"STAMP_DUTY_NO", Width:80, Align:"Center", Edit:"false"},
  87. {Header:'인지세액', Type:"Text", SaveName:"STAMP_DUTY_TAX", Width:70, Align:"right", Edit:"false"},
  88. {Header:'발행일자', Type:"Text", SaveName:"STAMP_DUTY_DATE", Width:70, Align:"center", Edit:"false"},
  89. {Header:'비고', Type:"Text", SaveName:"REMARK", Width:80, Align:"Left", Edit:"false"},
  90. ];
  91. init_sheet.HeaderMode = {Sort:1};
  92. IBS_InitSheet(sheetName, init_sheet);
  93. sheetName.SetDataAutoTrim(0);
  94. //sheetName.SetImageList(1,"/img/buyer/button/bt_change.gif");
  95. sheetName.SetActionMenu("ExcelDown");
  96. setGridSize();
  97. }
  98. //팝업창 종료후 새로고침 위한 function
  99. function doSearch(){
  100. jQuery("#fevent").val("SHEET_SELECT");
  101. var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/stamptax/SalStampList_sheet.screen";
  102. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  103. }
  104. //팝업창에 첨부파일창 parent로 불러오기위한 function
  105. function doAttachStampFilePop(fileGB, obj, fObj, editFile, fileDir){
  106. if(obj != ''){
  107. viewFileListNew(fileGB, obj, fObj, editFile, fileDir, "_SalStampPop", "", "", "N");
  108. }
  109. }
  110. /*
  111. IBSheet Event : Mouse Right Menu
  112. */
  113. function sheet1_OnSelectMenu(Text, Code) {
  114. // text 또는 code값으로 Action수행
  115. switch(Text) {
  116. case "ExcelDown":
  117. jQuery("#btnExcel").click();
  118. break;
  119. }
  120. }
  121. /**
  122. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  123. */
  124. function sheet1_OnSearchEnd(code, message) {
  125. if(code == 0) {
  126. setGridSize();
  127. sheet1.SetColFontColor("CONT_NAME", "#0000ff");
  128. } else {
  129. //조회 에러 수행
  130. alert(message);
  131. }
  132. }
  133. /**
  134. * IBSheet Event: Click
  135. */
  136. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  137. if(Row == 0)return;
  138. if (sheet1.ColSaveName(Col) == "CONT_NAME") {
  139. var win_id = "_SalStampPop";
  140. var p_move = "d";
  141. var link = "/cont/stamptax/SalNewPop.screen";
  142. link += "?pop_win_id="+win_id;
  143. link += "&p_stamp_duty_id="+sheet1.GetCellValue(Row, "STAMP_DUTY_ID");
  144. link += "&p_move="+p_move;
  145. fLayerPop(win_id, link, 700, 450, '', '', 'NO');
  146. }
  147. /*if (sheet1.ColSaveName(Col) == "FILE_YN") {
  148. var url="/common/file/FileDownloadServlet";
  149. url += "?file_id=" + sheet1.GetCellValue(Row, "FILE_ID");
  150. window.open(url, "_fileDown", "toolbar=no, width=400, height=100, top=500, left=400, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new")
  151. var fd = document.getElementById("form_filedown");
  152. fd.target = "_fileDown";
  153. fd.file_id.value = sheet1.GetCellValue(Row, "FILE_ID");
  154. fd.submit();
  155. } */
  156. }
  157. /**
  158. * IBSheet size setting
  159. */
  160. function setGridSize() {sheet1.FitColWidth();}
  161. //자동로그인 기능
  162. function f_gologin(login_id,login_pw){
  163. var f = document.form1;
  164. if('<%= user.get("ACCT_TYPE_CODE")%>' != "ADMIN"){
  165. dlgAlert("User who logged in as administrator only can do automatic log-in.");
  166. return;
  167. }
  168. f.login_id.value = login_id;
  169. f.login_pw.value = login_pw;
  170. if( !submitXmlRequest("/sign_on_check", "", document.form1) ) {
  171. alert("Log-in is being processed.");
  172. };
  173. }
  174. function sheet1_OnSmartResize(Width, Height) {
  175. sheet1.FitColWidth();
  176. autoResize();
  177. }
  178. function autoResize(){
  179. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  180. var iframeHeight= document.body.scrollHeight - t1_height;
  181. var iframeWidth= document.body.scrollWidth;
  182. sheet1.SetSheetHeight(iframeHeight);
  183. }
  184. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  185. </SCRIPT>
  186. <modular:search id="form1">
  187. <modular:key id="fevent" />
  188. </modular:search>
  189. <form id="form1" name="form1" method="post" modular:type="search">
  190. <INPUT type="hidden" name="fevent" id="fevent" value="">
  191. <INPUT type="hidden" name=p_stamp_duty_id value="">
  192. <div align="left" id="title">
  193. <ul>
  194. <li>영업_인지세현황</li>
  195. </ul>
  196. </div>
  197. <!-- 검색조건 시작 -->
  198. <table id="search-table" class="search-form-table">
  199. <colgroup>
  200. <col width="100" />
  201. <col width="*" />
  202. <col width="100" />
  203. <col width="*" />
  204. <col width="200" />
  205. </colgroup>
  206. <tr height="25">
  207. <th>발주처</th>
  208. <td>
  209. <INPUT type="text" name="p_corp_name" class="input" value="<%= params.get("p_corp_name") %>" style="width:90%">
  210. </td>
  211. <th>발행일자</th>
  212. <td>
  213. <%= InputText.get("DutyFromDt", params.get("DutyFromDt"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
  214. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('DutyFromDt');">
  215. ~
  216. <%= InputText.get("DutyToDt", params.get("DutyToDt"), 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('DutyToDt');">
  218. <IMG name="dataClear" id="dataClear" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
  219. </td>
  220. <td class="button" rowspan="2">
  221. <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
  222. <span class="btnSearch center" id="btnExcel"><a href="javascript:void(0);">엑셀</a></span>
  223. <span class="btnSearch center" id="btnNew"><a href="javascript:void(0);">신규등록</a></span>
  224. </td>
  225. </tr>
  226. <tr>
  227. <th>계약번호</th>
  228. <td>
  229. <INPUT type="text" name="p_cont_no" class="input" value="<%= params.get("p_cont_no") %>" style="width:90%">
  230. </td>
  231. <th>계약명</th>
  232. <td>
  233. <INPUT type="text" name="p_cont_name" class="input" value="<%= params.get("p_cont_name") %>" style="width:90%">
  234. </td>
  235. </tr>
  236. </table>
  237. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 400px; overflow: auto;">
  238. <script>createIBSheet('sheet1','100%', '400px');</script>
  239. </div>
  240. </form>