SuppDeptRequestList.jsp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. <%--
  2. - FileName : SuppDeptRequestList.jsp
  3. - Author(s) : mklee
  4. - Date : 2017.02.20
  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.udapsoft.common.code.*" %>
  13. <%@ page import="kr.co.hsnc.common.sql.*" %>
  14. <%@ include file="/jsp/work/taglib.jsp" %>
  15. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  16. <%
  17. ctx.init(request, response);
  18. HandlerStorage storage = ctx.getHandlerStorage();
  19. ValueObject params = storage.getParams();
  20. ValueObject user = storage.getUser();
  21. String event = storage.getEvent();
  22. String job_gubun = "외주";
  23. if(params.get("corp_status").isEmpty()){
  24. if (user.get("RIGHT_NAME").equals("OUTSIDE")){
  25. params.set("corp_status","00");
  26. }else{
  27. params.set("corp_status","AA");
  28. }
  29. }else if(params.get("corp_status").equals("A")){
  30. params.set("corp_status","");
  31. }
  32. %>
  33. <script language="javascript">
  34. /*예약함수*/
  35. var sheet1 = new ibsheetObject();
  36. var sheet1Row;
  37. var sheet1PageNo = 1;
  38. var pageLastRowIndex = 1;
  39. var validationResult = false;
  40. var filterShow = false;
  41. $(document).on("keyup", "input:text", function(e) {
  42. if($(this).attr("numberOnly") == "true")
  43. {
  44. $(this).val( $(this).val().replace(/[^0-9]/gi,"") );
  45. }
  46. if (e.keyCode == 13)
  47. {
  48. $.searchList();
  49. }
  50. });
  51. $(function(){
  52. $("#btn_reg").click(function(){
  53. $("#fevent").val("");
  54. $("#form1").attr("action", "/supplier/outside/SuppDeptRequest.screen");
  55. $("#form1").attr("target", "_self");
  56. $("#form1").attr("method", "post");
  57. $("#form1").submit();
  58. });
  59. $("#btn_search").click(function(){
  60. $.searchList();
  61. });
  62. $("#popTest").click(function(){
  63. var win_id = "corp";
  64. var link = "/common/corp/SuppChoicePop.screen";
  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/outside/SuppDeptRequestList_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/outside/SuppDeptRequestList_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/outside/SuppDeptRequestList_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:"Date", SaveName:"REQ_DATE", Width:60, Format:"Ymd", Align:"Center", Edit:"False"},
  126. {Header:"추천사유", Type:"Text", SaveName:"REQ_REMARK", Width:160, Align:"Left", Edit:"False"},
  127. {Header:"상태", Type:"Text", SaveName:"STATUS_CODE", Width:60, Align:"Center", Hidden:"True", Edit:"False"},
  128. {Header:"상태", Type:"Text", SaveName:"STATUS_NM", Width:60, Align:"Center", Edit:"False"},
  129. {Header:"작성자", Type:"Text", SaveName:"cre_by", Width:60, Align:"Center", Hidden:"True", Edit:"False"}
  130. ];
  131. init_sheet.HeaderMode = {Sort:1};
  132. IBS_InitSheet(sheetName, init_sheet);
  133. sheetName.SetDataAutoTrim(0);
  134. sheetName.SetDataLinkMouse("CORP_KOR", 1);
  135. sheetName.SetColFontColor("CORP_KOR", "#0000ff");
  136. sheetName.FitColWidth();
  137. }
  138. });
  139. $(document).ready(function(){
  140. $.gridInit(sheet1);
  141. $.searchList();
  142. autoResize();
  143. });
  144. function sheet1_OnSmartResize(Width, Height) {
  145. sheet1.FitColWidth();
  146. autoResize();
  147. }
  148. function autoResize(){
  149. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  150. var iframeHeight= document.body.scrollHeight - t1_height;
  151. var iframeWidth= document.body.scrollWidth;
  152. sheet1.SetSheetHeight(iframeHeight);
  153. }
  154. function sheet1_OnDblClick(Row, Col)
  155. {
  156. var s_name = sheet1.ColSaveName(Col);
  157. if(s_name == "CORP_KOR")
  158. {
  159. $("#fevent").val("GET_DETAIL");
  160. $("#p_corp_id").val(sheet1.GetCellValue(Row, "CORP_ID"));
  161. $("#form1").attr("action", "/supplier/outside/SuppDeptRequest.screen");
  162. $("#form1").attr("target", "_self");
  163. $("#form1").attr("method", "post");
  164. $("#form1").submit();
  165. }
  166. }
  167. function sheet1_OnSearchEnd(Row, Col)
  168. {
  169. sheet1.FitColWidth();
  170. }
  171. function sheet1_OnSaveEnd(code, msg)
  172. {
  173. var event = $("#fevent").val();
  174. var f = document.form1;
  175. document.form1.isSubmit = false;
  176. if(event == "DELETE_DATA")
  177. {
  178. if(code >= "0")
  179. {
  180. alert("삭제되었습니다.");
  181. $("#btn_search").click();
  182. }
  183. else
  184. {
  185. alert("삭제에 실패하였습니다. 관리자에게 문의하시기 바랍니다.");
  186. }
  187. }
  188. else if(event == "ALL_CONFIRM")
  189. {
  190. if(code >= "0")
  191. {
  192. alert("요청이 완료되었습니다.");
  193. $("#btn_search").click();
  194. }
  195. else
  196. {
  197. alert("요청에 실패하였습니다. 관리자에게 문의하시기 바랍니다.");
  198. }
  199. }
  200. }
  201. function sheet1_OnSearchEnd(code, message) {
  202. if(code == 0 || code == "0"){
  203. var rowcnt = sheet1.RowCount();
  204. for(var r=1; r < rowcnt+1; r++){
  205. if(sheet1.GetCellValue(r,"STATUS_CODE")== '00' || sheet1.GetCellValue(r,"STATUS_CODE")== '03'){
  206. sheet1.SetRowEditable(r,false);
  207. }
  208. //2020.04.13 외주담당자 추가
  209. if(sheet1.GetCellValue(r,"cre_by") != "<%= user.get("acct_id")%>" && "<%= user.get("RIGHT_NAME")%>" != "OUTSIDE"){
  210. sheet1.SetRowEditable(r,false);
  211. }
  212. }
  213. }else{
  214. alert(message);
  215. }
  216. }
  217. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  218. </script>
  219. <modular:search id="form1">
  220. <modular:key id="fevent" />
  221. </modular:search>
  222. <form id="form1" name="form1" method="post" modular:type="search">
  223. <INPUT type="hidden" name="fevent" id="fevent" value="">
  224. <input type="hidden" name="p_corp_id" id="p_corp_id" value="" />
  225. <input type="hidden" name="p_charge_seq" id="p_charge_seq" value="" />
  226. <input type="hidden" name="job_div" id="job_div" value="O" />
  227. <div align="left" id="title">
  228. <ul>
  229. <li><%=job_gubun %>_협력업체가입요청 </li>
  230. </ul>
  231. </div>
  232. <table border="0" cellspacing="0" cellpadding="0" width="100%" id="search-table">
  233. <!-- 검색조건 영역 : 시작 -->
  234. <tr>
  235. <td height="1">
  236. <table cellspacing="1" cellpadding="0" class="search-form-table">
  237. <col width="100"/>
  238. <col/>
  239. <col width="100"/>
  240. <col/>
  241. <col width="100"/>
  242. <col/>
  243. <col width="300"/>
  244. <tr height="25">
  245. <!-- 검색조건 타이틀 1 -->
  246. <th>
  247. 사업자번호
  248. </th>
  249. <td>
  250. <input type="text" name="corp_no" id="corp_no" SIZE="10" value="<%=params.get("corp_no") %>" numberOnly="true" maxlength="10" />
  251. </td>
  252. <th>
  253. 업체명
  254. </th>
  255. <td>
  256. <input type="text" name="corp_name" id="corp_name" style="width: 85%;IME-MODE : active;" value="<%=params.get("corp_name") %>" />
  257. </td>
  258. <th>
  259. 상태
  260. </th>
  261. <td>
  262. <%=CommCodeManager.getSelectCodeList("OUT_SUPP_REQ_STATUS","corp_status","height=18;","<option value=''>--전체--</option>",params.get("corp_status")) %>&nbsp;
  263. </td>
  264. <td class="search_button" style="text-align: center;">
  265. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_search">검색</a></span>
  266. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_reg">신규등록</a></span>
  267. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_delete">삭제</a></span>
  268. </td>
  269. </tr>
  270. </table>
  271. </td>
  272. </tr>
  273. <!-- 검색조건 영역 : 종료 -->
  274. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 시작 -->
  275. <tr>
  276. <td height="1">
  277. </td>
  278. </tr>
  279. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 종료 -->
  280. </table>
  281. <div id="sheet1_div" style="padding-top:5px; height: 400px">
  282. <script>createIBSheet("sheet1","100%", "400px");</script>
  283. </div>
  284. </form>