dlgSearchBizRegNo.jsp 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <%--
  2. - FileName : dlgSearchBizRegNo.jsp
  3. - Author : gyeongmo an
  4. - Date : 2014.07.15
  5. - Copyright : Copyright (c) 2014 www.udapsoft.co.kr, Inc.
  6. - All rights reserved.
  7. - Description: 거래처 찾기
  8. --%>
  9. <%@ page contentType="text/html; charset=utf-8" %>
  10. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  11. <%@ page import="kr.co.hsnc.common.util.*"%>
  12. <%@ page import="kr.co.hsnc.common.sql.*" %>
  13. <%@ include file="/jsp/work/taglib.jsp" %>
  14. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  15. <%
  16. ctx.init(request, response);
  17. HandlerStorage storage = ctx.getHandlerStorage();
  18. ValueObject params = storage.getParams();
  19. %>
  20. <SCRIPT language="JavaScript" src="/js/common.js"></SCRIPT>
  21. <SCRIPT language="JavaScript">
  22. /*예약함수*/
  23. var sheet1;
  24. var sheet1Row;
  25. var sheet1PageNo = 1;
  26. var pageLastRowIndex = 1;
  27. var validationResult = false;
  28. var filterShow = false;
  29. function _onReady(){
  30. gridInit(sheet1);
  31. jQuery("#btnSearch").click(function() {
  32. var value = $(':radio[name=condition]:checked').val();
  33. f.condition2.value = value;
  34. jQuery("#fevent").val("BizRegNo.Search");
  35. var url = Modular.model.PageContext.CONTEXT_ROOT + "/lib/dlgSearchBizRegNo_sheet.screen";
  36. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 10, "");
  37. });
  38. jQuery("#btnClose").click(function() {
  39. parent.searchBizRegNoClose(null, '<%=params.get("obj_corp_id")%>', '<%=params.get("obj_corp_name")%>');
  40. });
  41. var f = document.form1;
  42. if(ent_corp_NM != "" && ent_corp_NM != undefined ){
  43. f.desc.value = ent_corp_NM;
  44. jQuery("#btnSearch").click();
  45. } else {
  46. f.desc.value = "";
  47. f.desc.focus();
  48. }
  49. desc = document.getElementById('desc');
  50. }
  51. function gridInit(sheetName){
  52. var init_sheet = {};
  53. init_sheet.Cfg = {SearchMode:2, Page:10};
  54. init_sheet.Cols = [
  55. {Header:'사업자번호', Type:"Text", SaveName:"reg_no", Width:120, Align:"Center"},
  56. {Header:'업체명', Type:"Text", SaveName:"name", Width:250, Align:"Left"},
  57. {Header:'구분', Type:"Text", SaveName:"gb", Width:100, Align:"Center"},
  58. {Header:'id', Type:"Text", SaveName:"id", Width:100, Align:"Center", Hidden:"True"},
  59. {Header:'acct_id', Type:"Text", SaveName:"acct_id", Width:100, Align:"Center", Hidden:"True"}
  60. ];
  61. init_sheet.HeaderMode = {Sort:1};
  62. IBS_InitSheet(sheetName, init_sheet);
  63. sheetName.SetDataAutoTrim(0);
  64. sheetName.SetEditable(false);
  65. setGridSize();
  66. }
  67. function sheet1_OnSearchEnd(code, message) {
  68. if(code == 0) {
  69. //sheet1.MessageText("UserMsg14") = "검색어를 입력하세요. (전체 검색은 '%')";
  70. setGridSize();
  71. } else {
  72. //조회 에러 수행
  73. alert("조회 실패");
  74. }
  75. }
  76. /**
  77. * IBSheet size setting
  78. */
  79. function setGridSize() {
  80. sheet1.FitColWidth();
  81. }
  82. //키처리
  83. document.onkeydown = function(){
  84. //F5 새로고침
  85. if(event.keyCode == "116"){
  86. jQuery("#btnSearch").click();
  87. }
  88. //ESC 창닫기
  89. if(event.keyCode == "27"){
  90. window.close();
  91. }
  92. };
  93. function doClose()
  94. {
  95. parent.searchBizRegNoClose(null, '<%=params.get("obj_corp_id")%>', '<%=params.get("obj_corp_name")%>');
  96. }
  97. function prcKeyPress()
  98. {
  99. if( event.keyCode == 13 )
  100. {
  101. //doSubmit();
  102. jQuery("#btnSearch").click();
  103. }
  104. }
  105. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  106. var result = new Array();
  107. result[0] = sheet1.GetCellValue(Row, "reg_no");
  108. result[1] = sheet1.GetCellValue(Row, "name");
  109. parent.searchBizRegNoClose(result, '<%=params.get("obj_corp_id")%>', '<%=params.get("obj_corp_name")%>');
  110. }
  111. </SCRIPT>
  112. <modular:search id="form1">
  113. <modular:key id="fevent" />
  114. </modular:search>
  115. <form id="form1" name="form1" method="post" modular:type="search" style="width:100%;height:100%;">
  116. <INPUT type="text" value="자동 Submit을 막기 위해서 있는 필드" size="0" style="display:none;">
  117. <INPUT type="hidden" name="fevent" >
  118. <INPUT type="hidden" name="ent_corp_id" >
  119. <INPUT type="hidden" name="site_gb" value="<%=params.get("site_gb") %>">
  120. <INPUT type="hidden" name="reg_gb" value="<%=params.get("reg_gb") %>" >
  121. <INPUT type="hidden" name="work_id" >
  122. <INPUT type="hidden" name="all_gb" value="<%=params.get("all_gb") %>">
  123. <INPUT type="hidden" name="condition2">
  124. <TABLE border="0" cellspacing="0" cellpadding="0" width="100%">
  125. <TR>
  126. <TD height="1">
  127. <TABLE cellspacing="1" cellpadding="0" class="search_table">
  128. <TR>
  129. <TD width="20%" class="search_table_title">
  130. <IMG src="/img/buyer/button/bullet_01.gif">구&nbsp;&nbsp;분
  131. </TD>
  132. <TD width="*" class="search_table_data">
  133. <LABEL for="cond_1"><INPUT id="cond_1" type="radio" name="condition" value="0" checked >업체명</LABEL>
  134. <LABEL for="cond_2"><INPUT id="cond_2" type="radio" name="condition" value="1" >사업자번호</LABEL>
  135. </TD>
  136. <TD width="20%" class="search_button" rowspan="2">
  137. <DIV class="button_style">
  138. <IMG id="btnSearch" src="/img/buyer/button/bt_search.gif" alt="검색하기" border="0" style='cursor:hand'>
  139. <IMG id="btnClose" src="/img/buyer/button/bt_close.gif" border="0" style="cursor:hand;" >
  140. </DIV>
  141. </TD>
  142. </TR>
  143. <TR>
  144. <TD class="search_table_title">
  145. <IMG src="/img/buyer/button/bullet_01.gif">검색어
  146. </TD>
  147. <TD class="search_table_data">
  148. <INPUT class="input" type="text" name="desc" id="desc" onKeyPress="prcKeyPress()" style="font-family:'굴림'; font-size:10pt; IME-MODE : active; width:99%;">
  149. </TD>
  150. </TR>
  151. </TABLE>
  152. </TD>
  153. </TR>
  154. <TR>
  155. <TD height="5"></TD>
  156. </TR>
  157. </TABLE>
  158. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 500px; overflow: auto;">
  159. <script>createIBSheet('sheet1','100%', '500px');</script>
  160. </div>
  161. </FORM>