QuotSuppChoicePop.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <%--
  2. - FileName : QuotSuppChoicePop.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.*" %>
  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 bid_kind = storage.get("BID_KIND");
  22. String menu = storage.get("MENU");
  23. %>
  24. <script type="text/javascript">
  25. <!--
  26. /*예약함수*/
  27. var sheet1 = new ibsheetObject();
  28. var sheet1Row;
  29. var sheet1PageNo = 1;
  30. var pageLastRowIndex = 1;
  31. var validationResult = false;
  32. var filterShow = false;
  33. $(document).on("keyup", "input:text[numberOnly]", function() {$(this).val( $(this).val().replace(/[^0-9]/gi,"") );});
  34. $(document).ready(function(){
  35. var init_sheet = {};
  36. init_sheet.Cfg = {SearchMode:2, Page:30, MergeSheet:msHeaderOnly};
  37. init_sheet.Cols = [
  38. {Header:"Status", Type:"Status", SaveName:"STATUS", Width:10, Align:"Center", Hidden:"True"},
  39. {Header:"선택", Type:"CheckBox", SaveName:"CHECK", Width:25, Align:"Center", ColMerge:"False"},
  40. {Header:"QUOT_REG_CORP_ID", Type:"Text", SaveName:"QUOT_REG_CORP_ID",Width:100, Align:"Center", Edit:"False", Hidden:"True"},
  41. {Header:"사업자번호", Type:"Text", SaveName:"CORP_REG_NO", Width:40, Align:"Center", Edit:"False", Format:"SaupNo"},
  42. {Header:"업체명", Type:"Text", SaveName:"CORP_KOR", Width:60, Align:"Left", Edit:"False", ToolTip:1},
  43. {Header:"의견", Type:"Text", SaveName:"REMARK", Width:60, Align:"Left", Edit:"False", ToolTip:1},
  44. {Header:"대표자명", Type:"Text", SaveName:"REP_NAME", Width:50, Align:"Center", Edit:"False"},
  45. {Header:"담당자명", Type:"Text", SaveName:"CHARGE_NAME", Width:50, Align:"Center", Edit:"False", ColMerge:"False"},
  46. {Header:"핸드폰", Type:"Text", SaveName:"CHARGE_HP", Width:50, Align:"Center", Edit:"False", ColMerge:"False"},
  47. {Header:"구분", Type:"Text", SaveName:"IN_OUT_DIV_NM", Width:50, Align:"Center", Edit:"False", ColMerge:"False"},
  48. {Header:"IN_OUT_DIV", Type:"Text", SaveName:"IN_OUT_DIV", Width:50, Align:"Center", Edit:"False", Hidden:"True", ColMerge:"False"},
  49. {Header:"연락처", Type:"Text", SaveName:"TEL_NUM", Width:50, Align:"Center", Edit:"False", Hidden:"True", ColMerge:"False"},
  50. {Header:"이메일", Type:"Text", SaveName:"CHARGE_EMAIL", Width:60, Align:"Left", Edit:"False", ColMerge:"False"}
  51. ];
  52. init_sheet.HeaderMode = {Sort:1};
  53. IBS_InitSheet(sheet1, init_sheet);
  54. sheet1.SetDataAutoTrim(0);
  55. // sheet1.SetEditable(true);
  56. //sheet1.SetMergeSheet(msAll);
  57. // sheet1.SetMergeSheet(msPrevColumnMerge);
  58. sheet1.SetDataLinkMouse("CORP_REG_NO");
  59. sheet1.SetDataLinkMouse("REMARK", 1);
  60. sheet1.SetColFontColor("REMARK", "#0000ff");
  61. sheet1.FitColWidth();
  62. var bidkind = "<%=bid_kind%>";
  63. var menu = "<%=menu%>";
  64. if(bidkind.length > 0){
  65. $("#corp_status").val(bidkind);
  66. $("#corp_status").attr("disabled","disabled");
  67. }
  68. if(menu.length > 0){
  69. $("#menu_type").val(menu);
  70. }
  71. });
  72. $(function(){
  73. $("#btn_search").click(function(){
  74. $("#fevent").val("GET_CORP_LIST");
  75. var url = Modular.model.PageContext.CONTEXT_ROOT + "/quot/purchase/QuotSuppChoicePop_sheet.screen";
  76. Modular.view.IBSheet7.doSearch(sheet1, url, $("#form1"), 30, "");
  77. });
  78. $("#corp_no").keydown(function (event)
  79. {
  80. var keycode = (event.keyCode ? event.keyCode : event.which);
  81. if(keycode == 13)$("#btn_search").click();
  82. });
  83. $("#corp_name").keydown(function (event)
  84. {
  85. var keycode = (event.keyCode ? event.keyCode : event.which);
  86. if(keycode == 13)$("#btn_search").click();
  87. });
  88. $("#btn_close").click(function(){
  89. parent.fLayerPopClose("corp");
  90. });
  91. $("#corp_status").change(function(){
  92. });
  93. $("#btn_select").click(function(){
  94. var len = sheet1.LastRow();
  95. var corp_id = new Array;
  96. var corp_reg_no = new Array;
  97. var corp_kor = new Array;
  98. var rep_name = new Array;
  99. var user_name = new Array;
  100. var tel_num = new Array;
  101. var h_phon = new Array;
  102. var email = new Array;
  103. var on_supp_yn = new Array;
  104. var in_out_div = new Array;
  105. var idx = 0;
  106. if(len>=1)
  107. {
  108. for(var i=1; i<=len; i++)
  109. {
  110. if(sheet1.GetCellValue(i,"CHECK") == "1")
  111. {
  112. corp_id[idx] = sheet1.GetCellValue(i, "QUOT_REG_CORP_ID");
  113. corp_reg_no[idx] = sheet1.GetCellValue(i, "CORP_REG_NO");
  114. corp_kor[idx] = sheet1.GetCellValue(i, "CORP_KOR");
  115. rep_name[idx] = sheet1.GetCellValue(i, "REP_NAME");
  116. user_name[idx] = sheet1.GetCellValue(i, "CHARGE_NAME");
  117. tel_num[idx] = sheet1.GetCellValue(i, "TEL_NUM");
  118. h_phon[idx] = sheet1.GetCellValue(i, "CHARGE_HP");
  119. email[idx] = sheet1.GetCellValue(i, "CHARGE_EMAIL");
  120. on_supp_yn[idx] = "N";
  121. in_out_div[idx] = sheet1.GetCellValue(i, "IN_OUT_DIV");
  122. idx++;
  123. }
  124. }
  125. var returnValue = new Array(corp_id, corp_reg_no, corp_kor, rep_name, user_name, tel_num, h_phon, email, on_supp_yn,in_out_div);
  126. // parent.resultFuntion(returnValue);
  127. window.parent.$.test2(returnValue);
  128. //parent.fLayerPopClose("corp");
  129. }
  130. });
  131. // $.test('qwe');
  132. });
  133. /*
  134. function sheet1_OnClick(Row, Col)
  135. {
  136. var s_name = sheet1.ColSaveName(Col);
  137. alert(sheet1.GetCellValue(i,"CHECK"));
  138. if(s_name == "CORP_REG_NO")
  139. {
  140. $("#fevent").val("GET_DETAIL");
  141. $("#p_corp_id").val(sheet1.GetCellValue(Row, "CORP_ID"));
  142. $("#p_charge_seq").val(sheet1.GetCellValue(Row, "CHARGE_SEQ"));
  143. $("#form1").attr("action", "/supplier/purchase/SuppJoinRequest.screen");
  144. $("#form1").attr("target", "_self");
  145. $("#form1").attr("method", "post");
  146. $("#form1").submit();
  147. }
  148. }
  149. */
  150. /**
  151. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  152. */
  153. function sheet1_OnSearchEnd(code, message) {
  154. if(code == 0) {
  155. sheet1.FitColWidth();
  156. if($("#corp_status").val() == "P"){
  157. if($("#menu_type").val() != "QUOT"){
  158. sheet1.SetColHidden("APPR_TOT_RATE",0);
  159. sheet1.SetColHidden("VALID_BID_YN_NM",0);
  160. }
  161. }
  162. } else {
  163. //조회 에러 수행
  164. alert(message);
  165. }
  166. }
  167. function sheet1_OnDblClick(Row, Col, Value)
  168. {
  169. var s_name = sheet1.ColSaveName(Col);
  170. if(s_name == "REMARK") {
  171. dlgAlert(sheet1.GetCellValue(Row, "REMARK"));
  172. }
  173. }
  174. function doResult(resultObj) {
  175. try {
  176. }
  177. catch(errorObject) {
  178. showErrorDlg("doResult()", errorObject);
  179. }
  180. }
  181. //-->
  182. </script>
  183. <modular:search id="form1">
  184. <modular:key id="fevent" />
  185. </modular:search>
  186. <form id="form1" name="form1" method="post" modular:type="search">
  187. <input type="hidden" name="fevent" id="fevent" value="">
  188. <input type="hidden" name="p_corp_id" id="p_corp_id" value="" />
  189. <input type="hidden" name="p_charge_seq" id="p_charge_seq" value="" />
  190. <input type="hidden" name="job_div" id="job_div" value="<%=params.get("job_div") %>" />
  191. <input type="hidden" name="materialgroup" id="materialgroup" value=""/>
  192. <input type="hidden" name="menu_type" id="menu_type" value=""/>
  193. <table border="0" cellspacing="0" cellpadding="0" width="100%" style="height: auto;">
  194. <!-- 검색조건 영역 : 시작 -->
  195. <tr>
  196. <td height="1">
  197. <table cellspacing="1" cellpadding="0" class="search-form-table">
  198. <col width="11%">
  199. <col width="15%">
  200. <col width="7%">
  201. <col width="30%">
  202. <col width="7%">
  203. <col width="7%">
  204. <col width="*">
  205. <tr height="25">
  206. <!-- 검색조건 타이틀 1 -->
  207. <th>
  208. 사업자번호
  209. </th>
  210. <td>
  211. <input type="text" name="corp_no" id="corp_no" maxlength="10" numberOnly="true" style="width: 90%;" value=""/>
  212. </td>
  213. <th>
  214. 검색어
  215. </th>
  216. <td>
  217. <select name="search_gb" id="search_gb" style="width: 29%; height=18;">
  218. <option value="2">업체명</option>
  219. <option value="1">업체명+의견</option>
  220. <option value="3">의견</option>
  221. </select>
  222. <input type="text" name="corp_name" id="corp_name" style="width: 59%;" value=""/>
  223. </td>
  224. <th>
  225. 구분
  226. </th>
  227. <td>
  228. <select name="IN_OUT_DIV" id="IN_OUT_DIV" style="width: 103px;">
  229. <option value="">전체</option>
  230. <option value="I">국내</option>
  231. <option value="O">국외</option>
  232. </select>
  233. </td>
  234. <td rowspan="3" style="text-align: center;">
  235. <!-- 검색버튼 영역 : 시작 -->
  236. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_search">검색</a></span>
  237. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_select">선택</a></span>
  238. <!-- <span class="btnSearch center"><a href="javascript:void(0);" id="btn_close">닫기</a></span> -->
  239. <!-- 검색버튼 영역 : 종료 -->
  240. </td>
  241. </tr>
  242. <!-- <tr height="25">
  243. 검색조건 타이틀 1
  244. </tr> -->
  245. </table>
  246. </td>
  247. </tr>
  248. <!-- 검색조건 영역 : 종료 -->
  249. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 시작 -->
  250. <tr>
  251. <td height="1">
  252. <table border="0" cellspacing="0" cellpadding="0" class="search_data_div_height">
  253. <tr>
  254. <td>
  255. </td>
  256. </tr>
  257. </table>
  258. </td>
  259. </tr>
  260. </table>
  261. </form>
  262. <div style="width: 100%;">
  263. <!-- 데이터 영역 : 시작 -->
  264. <!-- ibsheet7 그리드 생성 -->
  265. <script>createIBSheet("sheet1","100%", "300px");</script>
  266. <!-- 데이터 영역 : 종료 -->
  267. </div>