PuSupplierList.jsp 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  1. <%--
  2. - FileName : PuSupplierList.jsp
  3. - Author(s) : Sung Min Lee
  4. - Date : 2014.06.17
  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="com.udapsoft.waf.common.util.DateUtil"%>
  12. <%@ page import="kr.co.hsnc.common.util.*"%>
  13. <%@ page import="kr.co.hsnc.common.sql.*" %>
  14. <%@ page import = "blowfishj.*"%>
  15. <%@ page import = "java.text.SimpleDateFormat"%>
  16. <%@ page import = "java.util.Date"%>
  17. <%@ page import = "java.util.*"%>
  18. <%@ include file="/jsp/work/taglib.jsp" %>
  19. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  20. <%
  21. ctx.init(request, response);
  22. HandlerStorage storage = ctx.getHandlerStorage();
  23. ValueObject params = storage.getParams();
  24. ValueObject user = storage.getUser();
  25. String event = storage.getEvent();
  26. RowSet materialKindCodeLv1 = storage.getRowSet("materialKindCodeLv1");
  27. RowSet materialKindCodeLv2 = new RowSetImpl();
  28. RowSet materialKindCodeLv3 = new RowSetImpl();
  29. RowSet nationRowSet = new RowSetImpl();
  30. RowSet suppStatusRowSet = storage.getRowSet("SuppStatusRowSet"); //상태값
  31. String sToday = DateUtil.getSystemDate().substring(0,8);
  32. %>
  33. <script type="text/javascript" src="/js/creditEvaluationPop.js"></script>
  34. <script language="javascript">
  35. /*예약함수*/
  36. var sheet1 = new ibsheetObject();
  37. var sheet1Row;
  38. var sheet1PageNo = 1;
  39. var pageLastRowIndex = 1;
  40. var validationResult = false;
  41. var filterShow = false;
  42. $(document).on("keyup", "input:text", function(e) {
  43. if($(this).attr("numberOnly") == "true")
  44. {
  45. $(this).val( $(this).val().replace(/[^0-9]/gi,"") );
  46. }
  47. if (e.keyCode == 13)
  48. {
  49. $.searchList();
  50. }
  51. });
  52. $.gridInit = function(sheetName)
  53. {
  54. var init_sheet = {};
  55. init_sheet.Cfg = {SearchMode:2, Page:30, MergeSheet:msHeaderOnly};
  56. init_sheet.Cols = [
  57. {Header:"Status", Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Edit:"False", Hidden:"True"},
  58. {Header:"선택|선택", Type:"CheckBox", SaveName:"checkBox", Width:60, Align:"Left", Edit:"True"},
  59. {Header:"대표 ITEM|대분류", Type:"Text", SaveName:"GUBUN_1", Width:100, Align:"Left", Edit:"False"},
  60. {Header:"대표 ITEM|중분류", Type:"Text", SaveName:"GUBUN_2", Width:100, Align:"Left", Edit:"False" },
  61. {Header:"대표 ITEM|소분류", Type:"Text", SaveName:"GUBUN_3", Width:100, Align:"Left", Edit:"False"},
  62. {Header:"사업자번호|사업자번호", Type:"Text", SaveName:"CORP_REG_NO", Width:150, Align:"Left", Edit:"False", Format:"SaupNo"},
  63. {Header:"☞업체명|☞업체명", Type:"Text", SaveName:"CORP_KOR", Width:150, Align:"Left", Edit:"False"},
  64. {Header:"의견|의견", Type:"Text", SaveName:"COMMENT", Width:150, Align:"Left", Edit:"False", ToolTip:1},
  65. {Header:"국내외구분코드|국내외구분코드", Type:"Text", SaveName:"IN_OUT_DIV_CODE", Width:100, Align:"Center", Edit:"False", Hidden:"True"},
  66. {Header:"국내외구분|국내외구분", Type:"Text", SaveName:"IN_OUT_DIV", Width:100, Align:"Center", Edit:"False"},
  67. {Header:"대표자명|대표자명", Type:"Text", SaveName:"REP_NAME", Width:100, Align:"Left", Edit:"False"},
  68. // {Header:"사업자구분|사업자구분", Type:"Text", SaveName:"CORP_DIV_CD", Width:100, Align:"Center"},
  69. {Header:"등록신청일|등록신청일", Type:"Text", SaveName:"REG_DT", Width:100, Align:"Center", Edit:"False"},
  70. {Header:"등록승인일/\n거래취소일|등록승인일/\n거래취소일", Type:"Text", SaveName:"APPR_CAN_DT", Width:100, Align:"Center", Edit:"False"},
  71. {Header:"평가기관코드|평가기관코드", Type:"Text", SaveName:"CREDIT_CORP_CD", Width:0, Align:"Center", Edit:"False", Hidden:"True"},
  72. {Header:"☞경영평가|☞경영평가", Type:"Text", SaveName:"APPR_TOT_RATE", Width:100, Align:"Center", Edit:"False"},
  73. {Header:"☞신용등급|☞신용등급", Type:"Text", SaveName:"CREDIT_GRADE", Width:100, Align:"Center", Edit:"False"},
  74. {Header:"신용만료일|신용만료일", Type:"Text", SaveName:"CREDIT_END_DY", Width:80, Align:"Center" , Edit:"False"},
  75. {Header:"상태|상태", Type:"Text", SaveName:"CORP_STATUS", Width:100, Align:"Center", Edit:"False"},
  76. {Header:"CORP_ID|CORP_ID", Type:"Text", SaveName:"CORP_ID", Width:0, Align:"Center", Edit:"False", Hidden:"True"},
  77. {Header:"EVAL_CMP|EVAL_CMP", Type:"Text", SaveName:"EVAL_CMP", Width:0, Align:"Center", Edit:"False", Hidden:"True"},
  78. {Header:"DOC_CD|DOC_CD", Type:"Text", SaveName:"DOC_CD", Width:0, Align:"Center", Edit:"False", Hidden:"True"},
  79. {Header:"ARR_ID|ARR_ID", Type:"Text", SaveName:"ARR_ID", Width:0, Align:"Center", Edit:"False", Hidden:"True"},
  80. {Header:"ADM_YEAR|ADM_YEAR", Type:"Text", SaveName:"ADM_YEAR", Width:0, Align:"Center", Edit:"False", Hidden:"True"},
  81. {Header:"APPR_DY|APPR_DY", Type:"Text", SaveName:"APPR_DY", Width:0, Align:"Center", Edit:"False", Hidden:"True"}
  82. ];
  83. init_sheet.HeaderMode = {Sort:1};
  84. IBS_InitSheet(sheetName, init_sheet);
  85. sheetName.SetDataAutoTrim(0);
  86. //sheetName.SetEditable(false);
  87. sheetName.SetDataLinkMouse("CORP_KOR", 1);
  88. sheetName.SetColFontColor("CORP_KOR", "#0000ff");
  89. sheetName.SetDataLinkMouse("APPR_TOT_RATE", 1);
  90. sheetName.SetColFontColor("APPR_TOT_RATE", "#0000ff");
  91. sheetName.SetDataLinkMouse("CREDIT_GRADE", 1);
  92. sheetName.SetColFontColor("CREDIT_GRADE", "#0000ff");
  93. sheetName.SetDataLinkMouse("COMMENT", 1);
  94. sheetName.SetColFontColor("COMMENT", "#0000ff");
  95. sheetName.FitColWidth();
  96. }
  97. $(function(){
  98. $("#chk_all").click(function() {
  99. if($("#chk_all").is(":checked") == true){
  100. $("#chk_all").val("true");
  101. }else{
  102. $("#chk_all").val("false");
  103. }
  104. });
  105. $("#btn_search").click(function(){
  106. $.searchList();
  107. });
  108. $("#btn_excel").click(function(){
  109. var params = {FileName:"구매 협력업체현황.xls",SheetName:"구매 협력업체현황",Merge:1,SheetDesign:1, HiddenColumn:1};
  110. sheet1.Down2Excel (params);
  111. });
  112. $("#btn_regist").click(function(){
  113. $("#fevent").val("REG_DATA");
  114. $("#p_doc_cd").val("11");
  115. $("#p_in_out_div").val("O");
  116. $("#form1").attr("action", "/supplier/purchase/PuSupplier.screen");
  117. $("#form1").attr("target", "_self");
  118. $("#form1").attr("method", "post");
  119. $("#form1").submit();
  120. });
  121. $.searchList = function()
  122. {
  123. $("#fevent").val("GET_LIST");
  124. var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplierList_sheet.screen";
  125. Modular.view.IBSheet7.doSearch(sheet1, url, $("#form1"), 30, "");
  126. }
  127. $("#btn_email").click(function (){
  128. var win_id = "Subemail";
  129. var link = "/supplier/purchase/PurSupplierEmail.screen";
  130. link += "?pop_win_id="+win_id;
  131. //link += "&searchDateStart=" + jQuery("#searchDateStart").val();
  132. //link += "&searchDateEnd=" + jQuery("#searchDateEnd").val();
  133. link += "&pageDiv=1"; //1:조달, 2:포탈
  134. fLayerPop(win_id, link, 980, 250, '', '', 'NO');
  135. });
  136. $("#btn_send").click(function(){
  137. if(!confirm("평가안내문을 전송하시겠습니까?")) return;
  138. $("#fevent").val("EMAIL_SEND");
  139. var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplierList_sheet.screen";
  140. var result = Modular.view.IBSheet7.doSave(sheet1, url, $("#form1"), false);
  141. });
  142. $("#btn_test").click(function(){
  143. if(!confirm("평가를 진행 하시겠습니까?")) return;
  144. $("#fevent").val("TEST_ALL");
  145. var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplierList_sheet.screen";
  146. var result = Modular.view.IBSheet7.doSave(sheet1, url, $("#form1"), false);
  147. });
  148. $("#btn_erp").click(function(){
  149. if(!confirm("ERP거래처 연동을 실행 하시겠습니까?")) return;
  150. var f = document.form1;
  151. f.procName.value = "IF_GET_ACZ10800";
  152. submitXmlRequest("/common/util/getErpData.screen", "PROC", f, "SUCCESS");
  153. });
  154. $("#btn_erp_send").click(function(){
  155. if(!confirm("ERP로 거래처 전송 하시겠습니까?")) return;
  156. $("#fevent").val("ERP_SEND");
  157. var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplierList_sheet.screen";
  158. var result = Modular.view.IBSheet7.doSave(sheet1, url, $("#form1"), false);
  159. });
  160. $("#material_Kind_Code_Lv1").change(function(){
  161. var f = document.form1;
  162. if($("#material_Kind_Code_Lv1").val().trim() == "")
  163. {
  164. $("#material_Kind_Code_Lv2").empty().data("options");
  165. $("#material_Kind_Code_Lv2").append("<option value=''>-- 전체 --</option>");
  166. $("#material_Kind_Code_Lv3").empty().data("options");
  167. $("#material_Kind_Code_Lv3").append("<option value=''>-- 전체 --</option>");
  168. }
  169. else
  170. {
  171. $("#fevent").val("GET_MATL_KIND_CODE_LV2");
  172. $("#materiallevel").val("2");
  173. $("#materialgroup").val($("#material_Kind_Code_Lv1").val());
  174. $("#material_Kind_Code_Lv3").empty().data("options");
  175. $("#material_Kind_Code_Lv3").append("<option value=''>-- 전체 --</option>");
  176. submitXmlRequest("/supplier/purchase/PuSupplierList_form.screen", "GET_MATL_KIND_CODE_LV2", f, "ROWSET");
  177. }
  178. });
  179. $("#material_Kind_Code_Lv2").change(function(){
  180. var f = document.form1;
  181. if($("#material_Kind_Code_Lv2").val().trim() == "")
  182. {
  183. $("#material_Kind_Code_Lv3").empty().data("options");
  184. $("#material_Kind_Code_Lv3").append("<option value=''>-- 전체 --</option>");
  185. $.searchList();
  186. }
  187. else
  188. {
  189. $("#fevent").val("GET_MATL_KIND_CODE_LV3");
  190. $("#materiallevel").val("3");
  191. $("#materialgroup").val($("#material_Kind_Code_Lv2").val());
  192. submitXmlRequest("/supplier/purchase/PuSupplierList_form.screen", "GET_MATL_KIND_CODE_LV3", f, "ROWSET");
  193. }
  194. });
  195. $("#material_Kind_Code_Lv3").change(function(){
  196. $.searchList();
  197. });
  198. $("#in_out_gubun").change(function(){
  199. var f = document.form1;
  200. if($("#in_out_gubun").val() == "O")
  201. {
  202. $("#fevent").val("GET_NATION");
  203. submitXmlRequest("/supplier/purchase/PuSupplierList_form.screen", "GET_NATION", f, "ROWSET");
  204. }
  205. else
  206. {
  207. $("#nation_cd").empty().data("options");
  208. $("#nation_cd").append("<option value=''>-- 전체 --</option>");
  209. }
  210. $("#btn_search").click();
  211. });
  212. });
  213. $(document).ready(function(){
  214. $.gridInit(sheet1);
  215. autoResize();
  216. var material_Kind_Code_Lv1 = "<%=params.get("material_Kind_Code_Lv1")%>";
  217. if(material_Kind_Code_Lv1.trim() != "")
  218. {
  219. $("#material_Kind_Code_Lv1").change();
  220. }
  221. else
  222. {
  223. //$.searchList();
  224. }
  225. });
  226. function SubemailClose(){
  227. setTimeout(function(){fLayerPopClose('Subemail');},100);
  228. }
  229. function autoResize(){
  230. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  231. var iframeHeight= document.body.scrollHeight - t1_height;
  232. var iframeWidth= document.body.scrollWidth;
  233. sheet1.SetSheetHeight(iframeHeight);
  234. }
  235. function sheet1_OnDblClick(Row, Col, Value)
  236. {
  237. var s_name = sheet1.ColSaveName(Col);
  238. if(s_name == "CORP_KOR")
  239. {
  240. if(sheet1.GetCellValue(Row, "IN_OUT_DIV_CODE") == "I")
  241. {
  242. $("#fevent").val("GET_DETAIL");
  243. $("#p_in_out_div").val("I");
  244. }
  245. else
  246. {
  247. $("#fevent").val("GET_OUT_DETAIL");
  248. $("#p_in_out_div").val("O");
  249. }
  250. $("#p_corp_id").val(sheet1.GetCellValue(Row, "CORP_ID"));
  251. $("#p_corp_reg_no").val(sheet1.GetCellValue(Row, "CORP_REG_NO"));
  252. $("#p_eval_cmp").val(sheet1.GetCellValue(Row, "EVAL_CMP"));
  253. //$("#p_doc_cd").val("01");
  254. $("#p_doc_cd").val(sheet1.GetCellValue(Row, "DOC_CD"));
  255. $("#form1").attr("action", "/supplier/purchase/PuSupplier.screen");
  256. $("#form1").attr("target", "_self");
  257. $("#form1").attr("method", "post");
  258. $("#form1").submit();
  259. }
  260. else if (sheet1.ColSaveName(Col) == "APPR_TOT_RATE") {
  261. var reportInfo = new ReportInfo();
  262. if(sheet1.GetCellValue(Row, "APPR_TOT_RATE").trim() != "")
  263. {
  264. if(sheet1.GetCellValue(Row, "DOC_CD") == "01")
  265. {
  266. reportInfo.title = "협력업체 경영평가표(Manufacturer)";
  267. if (sheet1.GetCellValue(Row, "ADM_YEAR") == "2023"){
  268. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport_2023.mrd";
  269. }else{
  270. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport.mrd";
  271. }
  272. reportInfo.set(sheet1.GetCellValue(Row, "CORP_ID")); // $1
  273. reportInfo.set(sheet1.GetCellValue(Row, "ARR_ID")); // $2
  274. reportInfo.set(sheet1.GetCellValue(Row, "APPR_DY").substring(0,4));
  275. }
  276. else if(sheet1.GetCellValue(Row, "DOC_CD") == "02")
  277. {
  278. reportInfo.title = "협력업체 경영평가표(Agent)";
  279. if (sheet1.GetCellValue(Row, "ADM_YEAR") == "2023"){
  280. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport2_2023.mrd";
  281. }else{
  282. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport2.mrd";
  283. }
  284. reportInfo.set(sheet1.GetCellValue(Row, "CORP_ID")); // $1
  285. reportInfo.set(sheet1.GetCellValue(Row, "ARR_ID")); // $2
  286. reportInfo.set(sheet1.GetCellValue(Row, "APPR_DY").substring(0,4));
  287. }
  288. else if(sheet1.GetCellValue(Row, "DOC_CD") == "03")
  289. {
  290. reportInfo.title = "협력업체 준공평가표(Manufacturer)";
  291. if (sheet1.GetCellValue(Row, "ADM_YEAR") == "2023"){
  292. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3_2023.mrd";
  293. }else{
  294. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3.mrd";
  295. }
  296. reportInfo.set(sheet1.GetCellValue(Row, "CORP_ID")); // $1
  297. reportInfo.set(sheet1.GetCellValue(Row, "ARR_ID")); // $2
  298. reportInfo.set(sheet1.GetCellValue(Row, "DOC_CD")); // $3
  299. reportInfo.set(sheet1.GetCellValue(Row, "APPR_DY").substring(0,4));
  300. }
  301. else if(sheet1.GetCellValue(Row, "DOC_CD") == "04")
  302. {
  303. reportInfo.title = "협력업체 준공평가표(Agent)";
  304. if (sheet1.GetCellValue(Row, "ADM_YEAR") == "2023"){
  305. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4_2023.mrd";
  306. }else{
  307. reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4.mrd";
  308. }
  309. reportInfo.set(sheet1.GetCellValue(Row, "CORP_ID")); // $1
  310. reportInfo.set(sheet1.GetCellValue(Row, "ARR_ID")); // $2
  311. reportInfo.set(sheet1.GetCellValue(Row, "DOC_CD")); // $3
  312. reportInfo.set(sheet1.GetCellValue(Row, "APPR_DY").substring(0,4));
  313. }
  314. reportInfo.width = 1000; // Default: 1024
  315. reportInfo.height = 700; // Default: 768
  316. // reportInfo.reportOption = "/rf /rsn ["+f.defaultDS.value+"]"; // Default: '/rf'
  317. reportInfo.showPopup();
  318. }
  319. }
  320. else if(s_name == "CREDIT_GRADE")
  321. {
  322. var code = sheet1.GetCellValue(Row, "EVAL_CMP");
  323. var reg_no = sheet1.GetCellValue(Row, "CORP_REG_NO");
  324. /*
  325. 이크레더블 : E
  326. 서울신용평가 : S
  327. 나이스디앤비 : N
  328. 한국기업데이터 : K
  329. 나이스평가정보:M
  330. */
  331. if(code == "E")
  332. {
  333. var u = "2d2d424547494e204349504845522d2d313131310000000b3030303030303030eef0492ff42855bbffb697d670d4e3d109dafed98f4d7900293e8d4b9c1dcebd28eb9d58fd4c815c4d4829f1415fdfb730302d2d454e44204349504845522d2d";
  334. var p = "2d2d424547494e204349504845522d2d313131310000000830303030303030301bb8ae01f161a326e30cc8d45f3844afd1bd2d39f5da22e9405f40dff013966445d4ea4029f89ad1385c4624cf679cc230302d2d454e44204349504845522d2d";
  335. var i = reg_no; //협력업체사업자번호
  336. var k = ""; //협력업체법인번호
  337. var m ='3';
  338. var link ='http://www.esrm.co.kr/esrm/SrmplusLogin?u='+ u +'&p='+ p +'&i='+ i +'&k='+ k +'&c=7&m='+ m +'&g=2';
  339. var features ='height=768, width=1024, status=no, scrollbars=auto, resizable=yes';
  340. window.open(link, 'watchwin', features);
  341. }
  342. else if(code == "S")
  343. {
  344. var link = "http://www.bizrating.co.kr/url/urlPage.do?param1=ZXRlY2g=&param2=YWV0ZWNo&param3=" + reg_no;
  345. window.open(link, "pop", "width=975,height=600, resizable=yes, scrollbars=yes");
  346. }
  347. else if(code == "N")
  348. {
  349. var f = document.form1;
  350. $("#p_corp_reg_no").val(reg_no);
  351. $("#fevent").val("GET_CREADIT_REG_CHK");
  352. submitXmlRequest("/supplier/purchase/PuSupplierList_form.screen", "GET_CREADIT_REG_CHK", f, "VALUEOBJECT");
  353. }
  354. else if(code == "K")
  355. {
  356. var f = document.form1;
  357. $("#p_corp_reg_no").val(reg_no);
  358. $("#fevent").val("GET_CREADIT_REG_CHK2");
  359. submitXmlRequest("/supplier/purchase/PuSupplierList_form.screen", "GET_CREADIT_REG_CHK2", f, "VALUEOBJECT");
  360. }
  361. else if(code == "M")
  362. {
  363. var vnk = "<%= sToday%>" * 677;
  364. var link = "http://service.ecredit.co.kr/p01/A0001M001.nice?bizno=" + reg_no + "&eid=ETECENC&nk=" + vnk;
  365. window.open(link, "pop", "width=975,height=600, resizable=yes, scrollbars=yes");
  366. }
  367. } else if(s_name == "COMMENT") {
  368. dlgAlert(sheet1.GetCellValue(Row, "COMMENT"));
  369. }
  370. }
  371. function doResult(resultObj) {
  372. try {
  373. if ( resultObj.getRequestEvent() == "GET_MATL_KIND_CODE_LV2" )
  374. {
  375. if ( resultObj.getSuccess() == true )
  376. {
  377. var rowSet = resultObj.getRowSet();
  378. $("#material_Kind_Code_Lv2").empty().data("options");
  379. $("#material_Kind_Code_Lv2").append("<option value=''>-- 전체 --</option>");
  380. for ( var i = 0; i < rowSet.getRowSize(); i++ )
  381. {
  382. $("#material_Kind_Code_Lv2").append("<option value='"+rowSet.getColValue( i, 0 )+"'>"+rowSet.getColValue( i, 1 ) + "</option>");
  383. }
  384. document.form1.isSubmit = false;
  385. var material_Kind_Code_Lv2 = "<%=params.get("material_Kind_Code_Lv2")%>";
  386. if(material_Kind_Code_Lv2.trim() != "")
  387. {
  388. // $("#material_Kind_Code_Lv2 option:eq("+material_Kind_Code_Lv2+")").attr("selected", "selected");
  389. $("#material_Kind_Code_Lv2").val(material_Kind_Code_Lv2).attr("selected", "selected");
  390. $("#material_Kind_Code_Lv2").change();
  391. }
  392. $.searchList();
  393. } else {
  394. dlgErrorMsg(resultObj);
  395. }
  396. }
  397. else if ( resultObj.getRequestEvent() == "GET_MATL_KIND_CODE_LV3" )
  398. {
  399. if ( resultObj.getSuccess() == true )
  400. {
  401. var rowSet = resultObj.getRowSet();
  402. $("#material_Kind_Code_Lv3").empty().data("options");
  403. $("#material_Kind_Code_Lv3").append("<option value=''>-- 전체 --</option>");
  404. for ( var i = 0; i < rowSet.getRowSize(); i++ )
  405. {
  406. $("#material_Kind_Code_Lv3").append("<option value='"+rowSet.getColValue( i, 0)+"'>"+rowSet.getColValue( i, 1 ) + "</option>");
  407. }
  408. document.form1.isSubmit = false;
  409. var material_Kind_Code_Lv3 = "<%=params.get("material_Kind_Code_Lv3")%>";
  410. if(material_Kind_Code_Lv3.trim() != "")
  411. {
  412. // $("#material_Kind_Code_Lv3 option:eq("+material_Kind_Code_Lv3+")").attr("selected", "selected");
  413. $("#material_Kind_Code_Lv3").val(material_Kind_Code_Lv3).attr("selected", "selected");
  414. }
  415. $.searchList();
  416. }
  417. else if(resultObj.getRequestEvent() == "GET_MATL_KIND_CODE_LV3")
  418. {
  419. dlgErrorMsg(resultObj);
  420. }
  421. }
  422. else if(resultObj.getRequestEvent() == "GET_CREADIT_REG_CHK")
  423. {
  424. document.form1.isSubmit = false;
  425. var url = resultObj.getValueObject().get("returnUrl");
  426. window.open(url, "pop", "width=1024,height=600, resizable=yes, scrollbars=yes");
  427. }
  428. else if(resultObj.getRequestEvent() == "GET_CREADIT_REG_CHK2")
  429. {
  430. document.form1.isSubmit = false;
  431. var url = resultObj.getValueObject().get("return_url");
  432. var open = window.open('',"go_ksrm","width=836,height=700,scrollbar=auto");
  433. var f = document.form1;
  434. f.action = url;
  435. f.target = "go_ksrm";
  436. f.method = "post";
  437. f.submit();
  438. }
  439. else if(resultObj.getRequestEvent() == "GET_NATION")
  440. {
  441. if ( resultObj.getSuccess() == true )
  442. {
  443. $("#nation_cd").empty().data("options");
  444. $("#nation_cd").append("<option value=''>-- 전체 --</option>");
  445. var rowSet = resultObj.getRowSet();
  446. for ( var i = 0; i < rowSet.getRowSize(); i++ )
  447. {
  448. $("#nation_cd").append("<option value='"+rowSet.getColValue( i, 0)+"'>"+rowSet.getColValue( i, 1 ) + "</option>");
  449. }
  450. }
  451. }
  452. else if( resultObj.getRequestEvent() == "PROC") {
  453. if( resultObj.getSuccess() ) {
  454. alert("완료되었습니다.");
  455. } else {
  456. dlgErrorMsg(resultObj);
  457. }
  458. }
  459. else if( resultObj.getRequestEvent() == "ERP_SEND") {
  460. if( resultObj.getSuccess() ) {
  461. alert("완료되었습니다.");
  462. } else {
  463. dlgErrorMsg(resultObj);
  464. }
  465. }
  466. }
  467. catch(errorObject) {
  468. showErrorDlg("doResult()", errorObject);
  469. }
  470. }
  471. function sheet1_OnSaveEnd(code, msg) {
  472. if(code >= 0) {
  473. sheet1.CheckAll("checkBox",0, 0);
  474. for(var i = 2 ; i <= sheet1.RowCount(); i ++){
  475. sheet1.SetCellValue(i ,"STATUS","", 0);
  476. }
  477. $.searchList();
  478. alert("완료되었습니다."); // 저장 성공 메시지
  479. }
  480. else{
  481. alert(msg);
  482. }
  483. }
  484. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  485. </script>
  486. <modular:search id="form1">
  487. <modular:key id="fevent" />
  488. </modular:search>
  489. <form id="form1" name="form1" method="post" modular:type="search">
  490. <input type="hidden" name="fevent" id="fevent" value="">
  491. <input type="hidden" name="p_corp_id" id="p_corp_id" value="" />
  492. <input type="hidden" name="p_corp_reg_no" id="p_corp_reg_no" value="" />
  493. <input type="hidden" name="p_eval_cmp" id="p_eval_cmp" value="" />
  494. <input type="hidden" name="p_doc_cd" id="p_doc_cd" value="" />
  495. <input type="hidden" name="materialgroup" id="materialgroup" value=""/>
  496. <input type="hidden" name="p_in_out_div" id="p_in_out_div" value="" />
  497. <input type="hidden" name="procName" id="procName" value="" />
  498. <div align="left" id="title">
  499. <ul>
  500. <li>구매_협력업체현황</li>
  501. </ul>
  502. </div>
  503. <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="search-table">
  504. <tr>
  505. <td height="1">
  506. <table cellspacing="1" cellpadding="0" class="search-form-table">
  507. <colgroup>
  508. <col style="width:100px"/>
  509. <col style="width:30%"/>
  510. <col style="width:100px"/>
  511. <col style="width:20%"/>
  512. <col style="width:100px"/>
  513. <col style="width:150px"/>
  514. <col style="width:20%"/>
  515. </colgroup>
  516. <tr height="25">
  517. <!-- 검색조건 타이틀 1 -->
  518. <th>
  519. 대표ITEM
  520. </th>
  521. <td>
  522. <%= HTMLMaker.getSelectTag(materialKindCodeLv1, "materialgroup", "materialgroupname" , "material_Kind_Code_Lv1", "style='width:28%;height=18;'", "<OPTION value=''>-- 전체 --</OPTION>", params.get("material_Kind_Code_Lv1"), 0) %>
  523. <%= HTMLMaker.getSelectTag(materialKindCodeLv2, "materialgroup", "materialgroupname" , "material_Kind_Code_Lv2", "style='width:28%;height=18;'", "<OPTION value=''>-- 전체 --</OPTION>", params.get("material_Kind_Code_Lv2"), 0) %>
  524. <%= HTMLMaker.getSelectTag(materialKindCodeLv3, "materialgroup", "materialgroupname" , "material_Kind_Code_Lv3", "style='width:28%;height=18;'", "<OPTION value=''>-- 전체 --</OPTION>", params.get("material_Kind_Code_Lv3"), 0) %>
  525. </td>
  526. <th>
  527. 사업자번호
  528. </th>
  529. <td >
  530. <input type="text" name="corp_no" id="corp_no" size="10" value="<%=params.get("corp_no") %>" numberOnly="true" maxlength="10"/>
  531. <input type="checkbox" id="chk_all" name="chk_all" value="false">계약업체 (잔금이 남아있는 기준)
  532. </td>
  533. <th>
  534. 국내/해외
  535. </th>
  536. <td>
  537. <select name="in_out_gubun" id="in_out_gubun" style="width: 70%;" class="input_select" height=18>
  538. <option value=''>--전체--</option>
  539. <option value="I" <%=params.get("in_out_gubun").equals("I") ? "selected=\"selected\" " : "" %>>국내</option>
  540. <option value="O" <%=params.get("in_out_gubun").equals("O") ? "selected=\"selected\" " : "" %>>해외</option>
  541. </select>
  542. </td>
  543. <td rowspan="2" style="text-align: center;">
  544. <!-- 검색버튼 영역 : 시작 -->
  545. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_search">검색</a></span>
  546. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_excel">엑셀저장</a></span>
  547. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_regist">해외업체 신규등록</a></span>
  548. <span class="btnSearch center" id="span_btn_email" ><a href="javascript:void(0);" id="btn_email">이메일</a></span>
  549. <span class="btnSearch center" id="span_btn_send" ><a href="javascript:void(0);" id="btn_send">이메일 보내기</a></span>
  550. <span class="btnSearch center" id="span_btn_test" ><a href="javascript:void(0);" id="btn_test">신평사적용/평가</a></span>
  551. <span class="btnSearch center" id="span_btn_erp" ><a href="javascript:void(0);" id="btn_erp">ERP연동</a></span>
  552. <!-- 검색버튼 영역 : 종료 -->
  553. </td>
  554. </tr>
  555. <tr height="25">
  556. <!-- 검색조건 타이틀 1 -->
  557. <th>
  558. 검색어
  559. </th>
  560. <td >
  561. <select name="search_gb" id="search_gb" style="width: 20%;height=18;">
  562. <option value="2" <%=params.get("search_gb").equals("2") ? "selected=\"selected\" " : "" %>>업체명</option>
  563. <option value="1" <%=params.get("search_gb").equals("1") ? "selected=\"selected\" " : "" %>>업체명+의견</option>
  564. <option value="3" <%=params.get("search_gb").equals("3") ? "selected=\"selected\" " : "" %>>의견</option>
  565. </select>
  566. <input type="text" name="corp_name" id="corp_name" style="width: 66%;" value="<%=params.get("corp_name")%>"/>
  567. </td>
  568. <th>
  569. 상태
  570. </th>
  571. <td>
  572. <%= HTMLMaker.getSelectTag(suppStatusRowSet, "DETAILCD", "DETAILNM", "corp_status", "width:100px;height=18;", "<option value=''>--전체--</option>", params.get("corp_status")) %>
  573. </td>
  574. <th>
  575. 국가명
  576. </th>
  577. <td>
  578. <%= HTMLMaker.getSelectTag(nationRowSet, "detailcd", "detailnm" , "nation_cd", "style='width:70%;height=18;'", "<OPTION value=''>-- 전체 --</OPTION>", params.get("nation_cd"), 0) %>
  579. </td>
  580. </tr>
  581. </table>
  582. </td>
  583. </tr>
  584. <!-- 검색조건 영역 : 종료 -->
  585. </table>
  586. <div style="width: 100%; height: 100%; margin-top: 5px;">
  587. <!-- 데이터 영역 : 시작 -->
  588. <!-- ibsheet7 그리드 생성 -->
  589. <script>createIBSheet("sheet1","100%", "300px");</script>
  590. <!-- 데이터 영역 : 종료 -->
  591. </div>
  592. </form>