OutSupplierList.jsp 31 KB

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