SuppJoinRequestList.jsp 10 KB

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