PurStampList.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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. //상태 SelectBox 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/PurStampList_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_cst_doc_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 : "PurStampList.xls", SheetName : "PurStampList", SheetDesign:0, Merge:1, DownCols:"DEPT_NAME|ORD_DOC_NO|MOD_NO|CST_DOC_NAME|VENDCD|MEMBER_NAME"+
  55. "|ORD_AMT|CURRENCY_GB|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:"PUR_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:"ORD_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:"CST_DOC_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:"CURRENCY_GB", Width:40, Align:"Center" , Edit:"false"},
  77. {Header:'계약금액', Type:"Text", SaveName:"ORD_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('PUR_STAMP_DUTY', sheet1.GetCellValue(Row,"STAMP_DUTY_ID"), "", "N", "", "", "", "", "N");
  133. }
  134. }
  135. /* if (sheet1.ColSaveName(Col) == "FILE_YN") {
  136. if(sheet1.GetCellValue(Row, "FILE_ID") != ""){
  137. var url="/common/file/FileDownloadServlet";
  138. url += "?file_id=" + sheet1.GetCellValue(Row, "FILE_ID");
  139. document.getElementById("fileDown").src=url;
  140. }
  141. } */
  142. }
  143. /**
  144. * IBSheet Event Change
  145. */
  146. function sheet1_OnChange(Row, Col, Value, OldValue, RaiseFlag) {
  147. var comboValue = sheet1.GetCellValue(Row,12);
  148. if(comboValue != "" ){
  149. sheet1.SetCellImage(Row ,13, "/img/buyer/button/bt_save_item.gif");
  150. return;
  151. }
  152. }
  153. /**
  154. * IBSheet size setting
  155. */
  156. function setGridSize() {sheet1.FitColWidth();}
  157. //자동로그인 기능
  158. function f_gologin(login_id,login_pw){
  159. var f = document.form1;
  160. if('<%= user.get("ACCT_TYPE_CODE")%>' != "ADMIN"){
  161. dlgAlert("User who logged in as administrator only can do automatic log-in.");
  162. return;
  163. }
  164. f.login_id.value = login_id;
  165. f.login_pw.value = login_pw;
  166. if( !submitXmlRequest("/sign_on_check", "", document.form1) ) {
  167. alert("Log-in is being processed.");
  168. };
  169. }
  170. function sheet1_OnSmartResize(Width, Height) {
  171. sheet1.FitColWidth();
  172. autoResize();
  173. }
  174. function autoResize(){
  175. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  176. var iframeHeight= document.body.scrollHeight - t1_height;
  177. var iframeWidth= document.body.scrollWidth;
  178. sheet1.SetSheetHeight(iframeHeight);
  179. }
  180. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  181. </SCRIPT>
  182. <modular:search id="form1">
  183. <modular:key id="fevent" />
  184. </modular:search>
  185. <form id="form1" name="form1" method="post" modular:type="search">
  186. <INPUT type="hidden" name="fevent" id="fevent" value="">
  187. <div align="left" id="title">
  188. <ul>
  189. <li>구매_인지세현황</li>
  190. </ul>
  191. </div>
  192. <!-- 검색조건 시작 -->
  193. <table id="search-table" class="search-form-table">
  194. <colgroup>
  195. <col width="100" />
  196. <col width="*" />
  197. <col width="100" />
  198. <col width="*" />
  199. <col width="100" />
  200. </colgroup>
  201. <tr height="25">
  202. <th>현장</th>
  203. <td>
  204. <%=InputText.getSiteCodeNew("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%>
  205. </td>
  206. <th>계약명</th>
  207. <!-- <td colspan="3"> -->
  208. <td>
  209. <INPUT type="text" name="p_cst_doc_name" class="input" value="<%= params.get("p_cst_doc_name") %>" style="width:90%">
  210. </td>
  211. <td class="button" rowspan="2">
  212. <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
  213. <span class="btnSearch center" id="btnExcel"><a href="javascript:void(0);">엑셀</a></span>
  214. </td>
  215. </tr>
  216. <tr>
  217. <th>업체명</th>
  218. <td>
  219. <INPUT type="text" name="p_member_name" class="input" value="<%= params.get("p_member_name") %>" style="width:90%">
  220. </td>
  221. <th>발행일자</th>
  222. <td>
  223. <%= InputText.get("DutyFromDt", params.get("DutyFromDt"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
  224. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('DutyFromDt');">
  225. ~
  226. <%= InputText.get("DutyToDt", params.get("DutyToDt"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
  227. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('DutyToDt');">
  228. <IMG name="dataClear" id="dataClear" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
  229. </td>
  230. <%-- <th>상태</th>
  231. <td>
  232. <%= HTMLMaker.getSelectTag(statusRow, "CODE", "NAME", "p_stamp_status", "width:150px;height=18;", "<option value=''>전체</option>", params.get("p_stamp_status")) %>
  233. </td> --%>
  234. </tr>
  235. </table>
  236. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 400px; overflow: auto;">
  237. <script>createIBSheet('sheet1','100%', '400px');</script>
  238. </div>
  239. </form>
  240. <iframe id="fileDown" name="fileDown" style="display:none"></iframe>
  241. <!-- <FORM id="form_filedown" name="form_filedown" method="get" action="/common/file/FileDownloadServlet" style="display:none">
  242. <input type="hidden" id="file_id" name="file_id"/>
  243. </FORM> -->