QuotPurSuppRegList.jsp 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <%--
  2. - FileName : QuotPurSuppRegList.jsp
  3. - Author(s) : Hoon Seok Choi
  4. - Date : 2023.11
  5. -
  6. - Description: 견적용 협력업체 목록
  7. --%>
  8. <%@ page contentType="text/html; charset=utf-8" %>
  9. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  10. <%@ page import="com.udapsoft.waf.common.ui.InitCombo" %>
  11. <%@ page import="kr.co.udapsoft.common.code.CommCodeManager" %>
  12. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  13. <%@ page import="kr.co.hsnc.common.util.*"%>
  14. <%@ page import="kr.co.hsnc.common.sql.*" %>
  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. String job_gubun = "";
  24. if(params.get("job_div").equals("P"))
  25. {
  26. job_gubun = "구매";
  27. }
  28. else
  29. {
  30. job_gubun = "외주";
  31. }
  32. //RowSet suppStatusRowSet = storage.getRowSet("SuppStatusRowSet"); //상태값
  33. //공통코드
  34. CommCodeManager commCodeManager = new CommCodeManager();
  35. InitCombo initCombo = new InitCombo();
  36. %>
  37. <script language="javascript">
  38. /*예약함수*/
  39. var sheet1 = new ibsheetObject();
  40. var sheet1Row;
  41. var sheet1PageNo = 1;
  42. var pageLastRowIndex = 1;
  43. var validationResult = false;
  44. var filterShow = false;
  45. $(document).on("keyup", "input:text", function(e) {
  46. if($(this).attr("numberOnly") == "true")
  47. {
  48. $(this).val( $(this).val().replace(/[^0-9]/gi,"") );
  49. }
  50. if (e.keyCode == 13)
  51. {
  52. $.searchList();
  53. }
  54. });
  55. $(function(){
  56. $("#btn_reg").click(function(){
  57. $("#fevent").val("QUOT_REG_SUPP");
  58. $("#form1").attr("action", "/quot/purchase/QuotPurSuppReg.screen");
  59. $("#form1").attr("target", "_self");
  60. $("#form1").attr("method", "post");
  61. $("#form1").submit();
  62. });
  63. $("#btn_search").click(function(){
  64. $.searchList();
  65. });
  66. $("#popTest").click(function(){
  67. var win_id = "corp";
  68. var link = "/common/corp/SuppChoicePop.screen";
  69. // link += "?pop_win_id="+win_id;
  70. fLayerPop(win_id, link, 800,400, '', '', 'NO');
  71. });
  72. $("#btn_delete").click(function(){
  73. $("#fevent").val("DELETE_DATA");
  74. if(confirm("삭제 하시겠습니까?"))
  75. {
  76. var url = Modular.model.PageContext.CONTEXT_ROOT + "/quot/purchase/QuotPurSuppRegList_sheet.screen";
  77. var result = Modular.view.IBSheet7.doSave(sheet1, url, $("#form1"), false);
  78. }
  79. });
  80. $.test = function(resultVal)
  81. {
  82. for(var i=0; i < resultVal[0].length; i++)
  83. {
  84. alert(resultVal[0][i]);
  85. alert(resultVal[1][i]);
  86. alert(resultVal[2][i]);
  87. alert(resultVal[3][i]);
  88. alert(resultVal[4][i]);
  89. alert(resultVal[5][i]);
  90. alert(resultVal[6][i]);
  91. alert(resultVal[7][i]);
  92. }
  93. };
  94. $.searchList = function()
  95. {
  96. $("#fevent").val("GET_LIST");
  97. var url = Modular.model.PageContext.CONTEXT_ROOT + "/quot/purchase/QuotPurSuppRegList_sheet.screen";
  98. Modular.view.IBSheet7.doSearch(sheet1, url, $("#form1"), 30, "");
  99. }
  100. $.gridInit = function(sheetName)
  101. {
  102. var init_sheet = {};
  103. init_sheet.Cfg = {SearchMode:2, Page:30, MergeSheet:msHeaderOnly};
  104. init_sheet.Cols = [
  105. {Header:"Status", Type:"Status", SaveName:"STATUS", Width:10, Align:"Center", Hidden:"True"},
  106. {Header:"선택", Type:"DelCheck", SaveName:"DEL_CHK", Width:20, Align:"Center", Edit:"True"},
  107. {Header:"번호", Type:"Seq", SaveName:"NO", Width:20, Align:"Center", Edit:"False"},
  108. {Header:"사업자번호", Type:"Text", SaveName:"CORP_REG_NO", Width:40, Align:"Center", Edit:"False", Format:"SaupNo"},
  109. {Header:"☞업체명", Type:"Text", SaveName:"CORP_KOR", Width:150, Align:"Left", Edit:"False"},
  110. {Header:"대표자명", Type:"Text", SaveName:"REP_NAME", Width:50, Align:"Center", Edit:"False"},
  111. {Header:"담당자명", Type:"Text", SaveName:"CHARGE_NAME", Width:50, Align:"Center", Edit:"False"},
  112. {Header:"연락처", Type:"Text", SaveName:"CHARGE_HP", Width:50, Align:"Center", Edit:"False"},
  113. {Header:"이메일", Type:"Text", SaveName:"CHARGE_EMAIL", Width:50, Align:"Center", Edit:"False"},
  114. {Header:"구분", Type:"Text", SaveName:"IN_OUT_DIV_NM", Width:50, Align:"Center", Edit:"False"},
  115. // {Header:"사업자구분", Type:"Text", SaveName:"CORP_DIV_CD", Width:60, Align:"Center", Edit:"False"},
  116. {Header:"상태", Type:"Text", SaveName:"STATUS_CD", Width:60, Align:"Center", Hidden:"True", Edit:"False"},
  117. {Header:"상태", Type:"Text", SaveName:"STATUS_NM", Width:60, Align:"Center", Edit:"False"},
  118. {Header:"QUOT_REG_CORP_ID", Type:"Text", SaveName:"QUOT_REG_CORP_ID",Width:100, Align:"Center", Hidden:"True"}
  119. ];
  120. init_sheet.HeaderMode = {Sort:1};
  121. IBS_InitSheet(sheetName, init_sheet);
  122. sheetName.SetDataAutoTrim(0);
  123. // sheetName.SetEditable(false);
  124. sheetName.SetDataLinkMouse("CORP_KOR", 1);
  125. sheetName.SetColFontColor("CORP_KOR", "#0000ff");
  126. sheetName.FitColWidth();
  127. }
  128. });
  129. $(document).ready(function(){
  130. $.gridInit(sheet1);
  131. $.searchList();
  132. autoResize();
  133. });
  134. function sheet1_OnSmartResize(Width, Height) {
  135. sheet1.FitColWidth();
  136. autoResize();
  137. }
  138. function autoResize(){
  139. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  140. var iframeHeight= document.body.scrollHeight - t1_height;
  141. var iframeWidth= document.body.scrollWidth;
  142. sheet1.SetSheetHeight(iframeHeight);
  143. }
  144. function sheet1_OnDblClick(Row, Col)
  145. {
  146. var s_name = sheet1.ColSaveName(Col);
  147. if(s_name == "CORP_KOR")
  148. {
  149. $("#fevent").val("GET_DETAIL");
  150. $("#p_corp_id").val(sheet1.GetCellValue(Row, "QUOT_REG_CORP_ID"));
  151. $("#form1").attr("action", "/quot/purchase/QuotPurSuppReg.screen");
  152. $("#form1").attr("target", "_self");
  153. $("#form1").attr("method", "post");
  154. $("#form1").submit();
  155. }
  156. }
  157. function sheet1_OnSearchEnd(Row, Col)
  158. {
  159. sheet1.FitColWidth();
  160. }
  161. function sheet1_OnSaveEnd(code, msg)
  162. {
  163. var event = $("#fevent").val();
  164. var f = document.form1;
  165. document.form1.isSubmit = false;
  166. if(event == "DELETE_DATA")
  167. {
  168. if(code >= "0")
  169. {
  170. alert("삭제되었습니다.");
  171. $("#btn_search").click();
  172. }
  173. else
  174. {
  175. alert("삭제에 실패하였습니다. 관리자에게 문의하시기 바랍니다.");
  176. }
  177. }
  178. }
  179. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  180. </script>
  181. <modular:search id="form1">
  182. <modular:key id="fevent" />
  183. </modular:search>
  184. <form id="form1" name="form1" method="post" modular:type="search">
  185. <INPUT type="hidden" name="fevent" id="fevent" value="">
  186. <input type="hidden" name="p_corp_id" id="p_corp_id" value="" />
  187. <input type="hidden" name="p_charge_seq" id="p_charge_seq" value="" />
  188. <input type="hidden" name="job_div" id="job_div" value="<%=params.get("job_div") %>" />
  189. <div align="left" id="title">
  190. <ul>
  191. <li><%=job_gubun %>_견적용 협력업체 관리 <!-- <a href="#" id="popTest">dsadsadasdasdasdsa</a> --></li>
  192. </ul>
  193. </div>
  194. <table border="0" cellspacing="0" cellpadding="0" width="100%" id="search-table">
  195. <!-- 검색조건 영역 : 시작 -->
  196. <tr>
  197. <td height="1">
  198. <table cellspacing="1" cellpadding="0" class="search-form-table">
  199. <col width="100"/>
  200. <col/>
  201. <col width="100"/>
  202. <col/>
  203. <col width="100"/>
  204. <col/>
  205. <col width="300"/>
  206. <tr height="25">
  207. <!-- 검색조건 타이틀 1 -->
  208. <th>
  209. 사업자번호
  210. </th>
  211. <td>
  212. <input type="text" name="corp_no" id="corp_no" SIZE="10" value="<%=params.get("corp_no") %>" numberOnly="true" maxlength="10" />
  213. </td>
  214. <th>
  215. 업체명
  216. </th>
  217. <td>
  218. <input type="text" name="corp_name" id="corp_name" style="width: 85%;IME-MODE : active;" value="<%=params.get("corp_name") %>" />
  219. </td>
  220. <th>
  221. 상태
  222. </th>
  223. <td>
  224. <%=CommCodeManager.getSelectCodeSearchList("QUOT_SUPP_REG_STATUS","corp_status","height=18;width:80px;","<option value=''>--전체--</option>",params.get("corp_status"),"","DETAILCD") %>
  225. </td>
  226. <td class="search_button" style="text-align: center;">
  227. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_search">검색</a></span>
  228. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_reg">신규등록</a></span>
  229. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_delete">삭제</a></span>
  230. </td>
  231. </tr>
  232. </table>
  233. </td>
  234. </tr>
  235. <!-- 검색조건 영역 : 종료 -->
  236. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 시작 -->
  237. <tr>
  238. <td height="1">
  239. </td>
  240. </tr>
  241. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 종료 -->
  242. </table>
  243. <div id="sheet1_div" style="padding-top:5px; height: 400px">
  244. <script>createIBSheet("sheet1","100%", "400px");</script>
  245. </div>
  246. </form>