OutSupplierCompList.jsp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. <%--
  2. - FileName : OutSupplierCompList.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. <%@ 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. //검색조건 현장 설정
  23. String initSearchDeptCd = params.get("searchDeptCd");
  24. String initSearchDeptNm = params.get("searchDeptNm");
  25. String sToday = DateUtil.getSystemDate().substring(0,8);
  26. String delHidden = ", Hidden:\"True\"";
  27. if( user.get("RIGHT_NAME").equals("ADMIN NEW")) { //관리자만 삭제버튼 보이도록(2021.03.30)
  28. delHidden = "";
  29. }
  30. %>
  31. <script type="text/javascript" src="/js/creditEvaluationPop.js"></script>
  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. $.gridInit = function(sheetName)
  51. {
  52. var init_sheet = {};
  53. init_sheet.Cfg = {SearchMode:2, Page:30, MergeSheet:msHeaderOnly};
  54. init_sheet.Cols = [
  55. {Header:"Status", Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  56. {Header:"DOC_CD", Type:"Text", SaveName:"DOC_CD", Width:0, Align:"Center", Hidden:"True"},
  57. {Header:"CORP_ID", Type:"Text", SaveName:"CORP_ID", Width:0, Align:"Center", Hidden:"True"},
  58. {Header:"DEPT_CD", Type:"Text", SaveName:"DEPT_CD", Width:0, Align:"Center", Hidden:"True"},
  59. {Header:"ADM_YEAR", Type:"Text", SaveName:"ADM_YEAR", Width:0, Align:"Center", Hidden:"True"},
  60. {Header:"현장명", Type:"Text", SaveName:"DEPT_NAME", Width:220, Align:"Left" },
  61. {Header:"계약명", Type:"Text", SaveName:"BUILD_NAME", Width:220, Align:"Left" },
  62. {Header:"업체명", Type:"Text", SaveName:"CORP_KOR", Width:220, Align:"Left" },
  63. {Header:"시작일", Type:"Text", SaveName:"START_WORK_DATE", Width:100, Align:"Center" },
  64. {Header:"종료일", Type:"Text", SaveName:"END_WORK_DATE", Width:100, Align:"Center" },
  65. {Header:"평가자", Type:"Text", SaveName:"USER_NAME", Width:100, Align:"Center" },
  66. {Header:"평가자ID", Type:"Text", SaveName:"APPR_BY_ID", Width:100, Align:"Center", Hidden:"True"},
  67. {Header:"☞준공평가점수", Type:"Text", SaveName:"APPR_TOT_RATE", Width:70, Align:"Center" },
  68. {Header:"평가등급", Type:"Text", SaveName:"ITEM_STD_CD", Width:70, Align:"Center" },
  69. {Header:"평가결과", Type:"Text", SaveName:"STATUS_CODE", Width:70, Align:"Center" },
  70. {Header:"평가차수", Type:"Text", SaveName:"ARR_ID", Width:100, Align:"Center", Hidden:"True"},
  71. {Header:"평가일자", Type:"Text", SaveName:"APPR_DY", Width:100, Align:"Center"},
  72. {Header:'평가삭제', Type:"Image", SaveName:"IMG_GB", Width:100, Align:"Center" , Edit:"false", Cursor:'pointer' <%=delHidden%>}
  73. ];
  74. init_sheet.HeaderMode = {Sort:1};
  75. IBS_InitSheet(sheet1, init_sheet);
  76. sheet1.SetDataAutoTrim(0);
  77. sheet1.SetImageList(1,"/img/buyer/btn/btn_del.gif");
  78. sheet1.SetEditable(false);
  79. sheet1.SetDataLinkMouse("APPR_TOT_RATE", 1);
  80. sheet1.SetColFontColor("APPR_TOT_RATE", "#0000ff");
  81. sheet1.SetDataLinkMouse("CREDIT_GRADE", 1);
  82. sheet1.SetColFontColor("CREDIT_GRADE", "#0000ff");
  83. sheet1.SetDataLinkMouse("CASH_GRADE", 1);
  84. sheet1.SetColFontColor("CASH_GRADE", "#0000ff");
  85. sheet1.FitColWidth();
  86. var obj = { Format: "Ymd", X:300, Y:600, CallBack: "Test" };
  87. }
  88. $(function(){
  89. $.searchList = function()
  90. {
  91. $("#fevent").val("GET_LIST");
  92. var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/outside/OutSupplierCompList_sheet.screen";
  93. Modular.view.IBSheet7.doSearch(sheet1, url, $("#form1"), 30, "");
  94. }
  95. $("#btn_search").click(function(){
  96. $.searchList();
  97. });
  98. $("#btn_excel").click(function(){
  99. var params = {FileName:"협력업체 평가현황.xls",SheetName:"협력업체 평가현황",Merge:1,SheetDesign:1, HiddenColumn:1 };
  100. sheet1.Down2Excel (params);
  101. });
  102. });
  103. $(document).ready(function(){
  104. $.gridInit(sheet1);
  105. //$.searchList();
  106. autoResize();
  107. });
  108. function sheet1_OnSearchEnd(code, message)
  109. {
  110. sheet1.FitColWidth();
  111. }
  112. function autoResize(){
  113. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  114. var iframeHeight= document.body.scrollHeight - t1_height;
  115. var iframeWidth= document.body.scrollWidth;
  116. sheet1.SetSheetHeight(iframeHeight);
  117. }
  118. function doResult(resultObj) {
  119. try {
  120. if ( resultObj.getRequestEvent() == "GET_MATL_KIND_CODE_LV2" )
  121. {
  122. if ( resultObj.getSuccess() == true )
  123. {
  124. var rowSet = resultObj.getRowSet();
  125. $("#material_Kind_Code_Lv2").empty().data("options");
  126. $("#material_Kind_Code_Lv2").append("<option value=''>-- 전체 --</option>");
  127. for ( var i = 0; i < rowSet.getRowSize(); i++ )
  128. {
  129. $("#material_Kind_Code_Lv2").append("<option value='"+rowSet.getColValue( i, 0 )+"'>"+rowSet.getColValue( i, 1 ) +"</option>");
  130. }
  131. document.form1.isSubmit = false;
  132. } else {
  133. dlgErrorMsg(resultObj);
  134. }
  135. }
  136. else if ( resultObj.getRequestEvent() == "GET_MATL_KIND_CODE_LV3" )
  137. {
  138. if ( resultObj.getSuccess() == true )
  139. {
  140. var rowSet = resultObj.getRowSet();
  141. $("#material_Kind_Code_Lv3").empty().data("options");
  142. $("#material_Kind_Code_Lv3").append("<option value=''>-- 전체 --</option>");
  143. for ( var i = 0; i < rowSet.getRowSize(); i++ )
  144. {
  145. $("#material_Kind_Code_Lv3").append("<option value='"+rowSet.getColValue( i, 0 )+"'>"+rowSet.getColValue( i, 1 )+"</option>");
  146. }
  147. document.form1.isSubmit = false;
  148. }
  149. else
  150. {
  151. dlgErrorMsg(resultObj);
  152. }
  153. }
  154. else if(resultObj.getRequestEvent() == "GET_CREADIT_REG_CHK")
  155. {
  156. document.form1.isSubmit = false;
  157. var url = resultObj.getValueObject().get("returnUrl");
  158. window.open(url, "pop", "width=1024,height=600, resizable=yes, scrollbars=yes");
  159. }
  160. else if(resultObj.getRequestEvent() == "GET_CREADIT_REG_CHK2")
  161. {
  162. document.form1.isSubmit = false;
  163. var url = resultObj.getValueObject().get("return_url");
  164. var open = window.open('',"go_ksrm","width=900,height=600,scrollbar=auto");
  165. var f = document.form1;
  166. f.action = url;
  167. f.target = "go_ksrm";
  168. f.method = "post";
  169. f.submit();
  170. }
  171. }
  172. catch(errorObject) {
  173. showErrorDlg("doResult()", errorObject);
  174. }
  175. }
  176. /**
  177. * IBSheet Event: DBLCLICK
  178. */
  179. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  180. var f = document.form1;
  181. var year_std = sheet1.GetCellValue(Row, "ADM_YEAR");
  182. if (sheet1.ColSaveName(Col) == "APPR_TOT_RATE")
  183. {
  184. var reportInfo = new ReportInfo();
  185. if(sheet1.GetCellValue(Row, "APPR_TOT_RATE").trim() != "" )
  186. {
  187. if(sheet1.GetCellValue(Row, "DOC_CD").trim() == "12" )
  188. {
  189. reportInfo.title = "협력업체 현장평가표(공사)";
  190. if (year_std == "2022"){
  191. reportInfo.reportName = "/report/mrd/buyer/supplier/outside/OutSuppFixApprReport_2022.mrd";
  192. }else{
  193. reportInfo.reportName = "/report/mrd/buyer/supplier/outside/OutSuppFixApprReport.mrd";
  194. }
  195. }
  196. else
  197. {
  198. reportInfo.title = "협력업체 현장평가표(설계,인허가)";
  199. if (year_std == "2022"){
  200. reportInfo.reportName = "/report/mrd/buyer/supplier/outside/OutSuppFixApprReport16_2022.mrd";
  201. }else{
  202. reportInfo.reportName = "/report/mrd/buyer/supplier/outside/OutSuppFixApprReport16.mrd";
  203. }
  204. }
  205. reportInfo.width = 1000; // Default: 1024
  206. reportInfo.height = 700; // Default: 768
  207. reportInfo.set(sheet1.GetCellValue(Row, "CORP_ID")); // $1
  208. reportInfo.set(sheet1.GetCellValue(Row, "ARR_ID")); // $2
  209. reportInfo.set(sheet1.GetCellValue(Row, "APPR_DY").substring(0,4)); // $3
  210. reportInfo.set(sheet1.GetCellValue(Row, "ADM_YEAR")); // $4
  211. reportInfo.showPopup();
  212. }
  213. }
  214. // else if (sheet1.ColSaveName(Col) == "APPR_TOT_RATE2") {
  215. // var reportInfo = new ReportInfo();
  216. // if(sheet1.GetCellValue(Row, "APPR_TOT_RATE2").trim() != "" )
  217. // {
  218. // reportInfo.title = "협력업체 현장평가표";
  219. // reportInfo.reportName = "/report/mrd/buyer/supplier/outside/OutSuppFixApprReport.mrd";
  220. // reportInfo.width = 1000; // Default: 1024
  221. // reportInfo.height = 700; // Default: 768
  222. // reportInfo.set(sheet1.GetCellValue(Row, "CORP_ID")); // $1
  223. // reportInfo.set(sheet1.GetCellValue(Row, "ARR_ID")); // $2
  224. // reportInfo.set(sheet1.GetCellValue(Row, "APPR_DY").substring(0,4));
  225. // reportInfo.showPopup();
  226. // }
  227. // }
  228. else if (sheet1.ColSaveName(Col) == "CREDIT_GRADE" || sheet1.ColSaveName(Col) == "CASH_GRADE" )
  229. {
  230. var code = sheet1.GetCellValue(Row, "CREDIT_CORP_CD");
  231. var reg_no = sheet1.GetCellValue(Row, "CORP_REG_NO");
  232. /*
  233. 이크레더블 : E
  234. 서울신용평가 : S
  235. 나이스디앤비 : N
  236. 한국기업데이터 : K
  237. 나이스평가정보:M
  238. */
  239. if(code == "E")
  240. {
  241. var u = "2d2d424547494e204349504845522d2d313131310000000b3030303030303030eef0492ff42855bbffb697d670d4e3d109dafed98f4d7900293e8d4b9c1dcebd28eb9d58fd4c815c4d4829f1415fdfb730302d2d454e44204349504845522d2d";
  242. var p = "2d2d424547494e204349504845522d2d313131310000000830303030303030301bb8ae01f161a326e30cc8d45f3844afd1bd2d39f5da22e9405f40dff013966445d4ea4029f89ad1385c4624cf679cc230302d2d454e44204349504845522d2d";
  243. var i = reg_no; //협력업체사업자번호
  244. var k = ""; //협력업체법인번호
  245. var m ='3';
  246. var link ='http://www.esrm.co.kr/esrm/SrmplusLogin?u='+ u +'&p='+ p +'&i='+ i +'&k='+ k +'&c=7&m='+ m +'&g=2';
  247. var features ='height=768, width=1024, status=no, scrollbars=auto, resizable=yes';
  248. window.open(link, 'watchwin', features);
  249. }
  250. else if(code == "S")
  251. {
  252. var link = "http://www.bizrating.co.kr/url/urlPage.do?param1=ZXRlY2g=&param2=YWV0ZWNo&param3=" + reg_no;
  253. window.open(link, "pop", "width=975,height=600, resizable=yes, scrollbars=yes");
  254. }
  255. else if(code == "N")
  256. {
  257. var f = document.form1;
  258. $("#p_corp_reg_no").val(reg_no);
  259. $("#fevent").val("GET_CREADIT_REG_CHK");
  260. submitXmlRequest("/supplier/purchase/PuSupplierList_form.screen", "GET_CREADIT_REG_CHK", f, "VALUEOBJECT");
  261. }
  262. else if(code == "K")
  263. {
  264. var f = document.form1;
  265. $("#p_corp_reg_no").val(reg_no);
  266. $("#fevent").val("GET_CREADIT_REG_CHK2");
  267. submitXmlRequest("/supplier/purchase/PuSupplierList_form.screen", "GET_CREADIT_REG_CHK2", f, "VALUEOBJECT");
  268. }
  269. else if(code == "M")
  270. {
  271. var vnk = "<%= sToday%>" * 677;
  272. var link = "http://service.ecredit.co.kr/p01/A0001M001.nice?bizno=" + reg_no + "&eid=ETECENC&nk=" + vnk;
  273. window.open(link, "pop", "width=975,height=600, resizable=yes, scrollbars=yes");
  274. }
  275. }else if (sheet1.ColSaveName(Col) == "IMG_GB")
  276. {
  277. var status = sheet1.GetCellValue(Row,8);
  278. $("#DOC_CD").val(sheet1.GetCellValue(Row, "DOC_CD"));
  279. $("#CORP_ID").val(sheet1.GetCellValue(Row, "CORP_ID"));
  280. $("#ARR_ID").val(sheet1.GetCellValue(Row, "ARR_ID"));
  281. $("#DEPT_CD").val(sheet1.GetCellValue(Row, "DEPT_CD"));
  282. if (confirm("준공평가 삭제 하시겠습니까")){
  283. submitXmlRequest("/test/ModStatusList_form.screen", "DEL_OUT_COMP_APPR", f);
  284. }
  285. }
  286. }
  287. function doResult(resultObj) {
  288. try {
  289. document.form1.isSubmit = false;
  290. if( resultObj.getRequestEvent() == "DEL_OUT_COMP_APPR") {
  291. if( resultObj.getSuccess() )
  292. {
  293. alert("삭제되었습니다.");
  294. jQuery("#btn_search").click();
  295. }else{
  296. alert("오류발생");
  297. }
  298. }
  299. }
  300. catch(errorObject) {
  301. showErrorDlg("doResult()", errorObject);
  302. }
  303. }
  304. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  305. </script>
  306. <modular:search id="form1">
  307. <modular:key id="fevent" />
  308. </modular:search>
  309. <form id="form1" name="form1" method="post" modular:type="search">
  310. <INPUT type="hidden" name="fevent" id="fevent" value="" />
  311. <INPUT type="hidden" name="p_user_sabun" value="">
  312. <INPUT type="hidden" name="DOC_CD" value="">
  313. <INPUT type="hidden" name="CORP_ID" value="">
  314. <INPUT type="hidden" name="ARR_ID" value="">
  315. <INPUT type="hidden" name="DEPT_CD" value="">
  316. <input type="hidden" name="ADM_YEAR" value="">
  317. <div align="left" id="title">
  318. <ul>
  319. <li>외주_협력업체 준공평가현황</li>
  320. </ul>
  321. </div>
  322. <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="search-table">
  323. <!-- 검색조건 영역 : 시작 -->
  324. <tr>
  325. <td height="1">
  326. <table cellspacing="1" cellpadding="0" class="search-form-table">
  327. <col width="10%">
  328. <col width="30%">
  329. <col width="10%">
  330. <col width="30%">
  331. <col width="20%">
  332. <tr height="25">
  333. <!-- 검색조건 타이틀 1 -->
  334. <th>
  335. 현장명
  336. </th>
  337. <td>
  338. <%=InputText.getSiteCodeNew("searchDeptCd", "searchDeptNm", "", user, initSearchDeptCd, initSearchDeptNm)%>
  339. <%if( user.get("RIGHT_NAME").equals("SITE_CONT") ){%>
  340. <IMG id='_btn_clear' onClick="dlgClearNew('searchDeptCd', 'searchDeptNm')" src='/img/buyer/button/bt_eraser1.gif' border='0' align='absmiddle' alt='[초기화]' style='cursor:pointer;'>
  341. <%}%>
  342. </td>
  343. <th>
  344. 계약명
  345. </th>
  346. <td>
  347. <input type="text" name="build_name" id="build_name" style="width: 86%;" value="<%=params.get("build_name")%>"/>
  348. </td>
  349. <td rowspan="2" class="button" style="text-align: center;">
  350. <!-- 검색버튼 영역 : 시작 -->
  351. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_search">검색</a></span>
  352. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_excel">엑셀</a></span>
  353. <!-- 검색버튼 영역 : 종료 -->
  354. </td>
  355. </tr>
  356. <tr height="25">
  357. <!-- 검색조건 타이틀 1 -->
  358. <th>
  359. 업체명
  360. </th>
  361. <td>
  362. <input type="text" name="corp_kor" id="corp_kor" style="width: 36%;" value="<%=params.get("corp_kor")%>"/>
  363. </td>
  364. <th>
  365. 평가기준년도
  366. </th>
  367. <td>
  368. <select name="APPR_SEL" id="APPR_SEL" style="width: 40%;" class="input_select" height=18>
  369. <option value=''>--전체--</option>
  370. <option value="A" <%=params.get("APPR_SEL").equals("A") ? "selected=\"selected\" " : "" %>>신규평가기준</option>
  371. <option value="B" <%=params.get("APPR_SEL").equals("B") ? "selected=\"selected\" " : "" %>>이전평가기준</option>
  372. </select>
  373. </td>
  374. </tr>
  375. </table>
  376. </td>
  377. </tr>
  378. <!-- 검색조건 영역 : 종료 -->
  379. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 시작 -->
  380. <tr>
  381. <td height="1">
  382. <table border="0" cellspacing="0" cellpadding="0" class="search_data_div_height">
  383. <tr>
  384. <td>
  385. </td>
  386. </tr>
  387. </table>
  388. </td>
  389. </tr>
  390. </table>
  391. </form>
  392. <div style="width: 100%; height: 100%; margin-top: 5px;">
  393. <!-- 데이터 영역 : 시작 -->
  394. <!-- ibsheet7 그리드 생성 -->
  395. <script>createIBSheet("sheet1","100%", "250px");</script>
  396. <!-- 데이터 영역 : 종료 -->
  397. </div>