PuSupplierPlanApprList.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. <%--
  2. - FileName : PuSupplierPlanApprList.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="kr.co.hsnc.common.config.WAFConfig"%>
  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. // String defaultDS = WAFConfig.get("waf.sql.Default.DS");
  24. //검색조건 현장 설정
  25. String initSearchDeptCd = params.get("searchDeptCd");
  26. String initSearchDeptNm = params.get("searchDeptNm");
  27. String sToday = DateUtil.getSystemDate().substring(0,8);
  28. %>
  29. <script type="text/javascript" src="/js/creditEvaluationPop.js"></script>
  30. <script language="javascript">
  31. /*예약함수*/
  32. var sheet1 = new ibsheetObject();
  33. var sheet1Row;
  34. var sheet1PageNo = 1;
  35. var pageLastRowIndex = 1;
  36. var validationResult = false;
  37. var filterShow = false;
  38. $(document).on("keyup", "input:text", function(e) {
  39. if($(this).attr("numberOnly") == "true")
  40. {
  41. $(this).val( $(this).val().replace(/[^0-9]/gi,"") );
  42. }
  43. if (e.keyCode == 13)
  44. {
  45. $.searchList();
  46. }
  47. });
  48. $.gridInit = function(sheetName)
  49. {
  50. var init_sheet = {};
  51. init_sheet.Cfg = {SearchMode:2, Page:30, MergeSheet:msHeaderOnly};
  52. init_sheet.Cols = [
  53. {Header:"Status", Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  54. {Header:"현장명", Type:"Text", SaveName:"DEPT_NAME", Width:100, Align:"Left"},
  55. {Header:"현장코드", Type:"Text", SaveName:"DEPT_CD", Width:0, Align:"Left", Hidden:"True"},
  56. {Header:"계약번호", Type:"Text", SaveName:"ORD_DOC_NO" , Width:110, Align:"Center"},
  57. {Header:"☞계약명", Type:"Text", SaveName:"CST_DOC_NAME", Width:150, Align:"Left"},
  58. {Header:"업체명", Type:"Text", SaveName:"MEMBER_NAME", Width:150, Align:"Left"},
  59. {Header:"지급구분", Type:"Text", SaveName:"DEPOSIT_NM", Width:100, Align:"Center"},
  60. {Header:"평가자", Type:"Text", SaveName:"WRITE_NM", Width:80, Align:"Center"},
  61. {Header:"평가점수", Type:"Text", SaveName:"APPR_TOT_RATE", Width:60, Align:"Center"},
  62. {Header:"평가일", Type:"Text", SaveName:"APPR_DY", Width:80, Align:"Center"},
  63. {Header:"종합평가", Type:"Text", SaveName:"ITEM_STD_CD", Width:180, Align:"Left"},
  64. {Header:"상태코드", Type:"Text", SaveName:"PLAN_APPR_STATUS", Width:100, Align:"Center", Hidden:"True"},
  65. {Header:"상태", Type:"Text", SaveName:"PLAN_APPR_STATUS_NM", Width:60, Align:"Center"},
  66. {Header:"평가의견", Type:"Text", SaveName:"APPR_NOTE", Width:150, Align:"Center"},
  67. {Header:"PUR_CONT_ID", Type:"Text", SaveName:"PUR_CONT_ID", Width:100, Align:"Center", Hidden:"True"},
  68. {Header:"PAYREQ_ID", Type:"Text", SaveName:"PAYREQ_ID", Width:100, Align:"Center", Hidden:"True"},
  69. {Header:"CORP_ID", Type:"Text", SaveName:"CORP_ID", Width:0, Align:"Center", Hidden:"True"},
  70. {Header:"PLAN_APPR_CHK_EMPNO", Type:"Text", SaveName:"PLAN_APPR_CHK_EMPNO", Width:0, Align:"Center", Hidden:"True"}
  71. ];
  72. init_sheet.HeaderMode = {Sort:1};
  73. IBS_InitSheet(sheetName, init_sheet);
  74. sheetName.SetDataAutoTrim(0);
  75. sheetName.SetEditable(false);
  76. sheetName.FitColWidth();
  77. sheet1.SetDataLinkMouse("CST_DOC_NAME", 1);
  78. sheet1.SetColFontColor("CST_DOC_NAME", "#0000ff");
  79. // var obj = { Format: "Ymd", X:300, Y:600, CallBack: "Test" };
  80. }
  81. $(function(){
  82. $.searchList = function()
  83. {
  84. $("#fevent").val("GET_LIST");
  85. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/purchase/PuSupplierPlanApprList_sheet.screen";
  86. Modular.view.IBSheet7.doSearch(sheet1, url, $("#form1"), 30, "");
  87. }
  88. $("#btn_search").click(function(){
  89. $.searchList();
  90. });
  91. /* $("#btn_excel").click(function(){
  92. var params = {FileName:"협력업체 평가현황.xls",SheetName:"협력업체 평가현황",Merge:1,SheetDesign:1, HiddenColumn:1};
  93. sheet1.Down2Excel (params);
  94. }); */
  95. });
  96. $(document).ready(function(){
  97. setSearchDate();
  98. $.gridInit(sheet1);
  99. //$.searchList();
  100. autoResize();
  101. });
  102. function autoResize(){
  103. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  104. var iframeHeight= document.body.scrollHeight - t1_height;
  105. var iframeWidth= document.body.scrollWidth;
  106. sheet1.SetSheetHeight(iframeHeight);
  107. }
  108. function setSearchDate(){
  109. var newDay = new Date( get_year(), get_month(), "");
  110. var lastDay = newDay.getDate();
  111. //var yyyymmbeginning = get_year() +'-'+ get_month() +'-'+ '01';
  112. //var yyyymmlast = get_year() +'-'+ get_month() +'-'+ lastDay;
  113. var searchFromDate = get_year() +'-'+ '01';
  114. var searchToDate = get_year() +'-'+ get_month();
  115. jQuery('#searchFromDate').val(searchFromDate);
  116. jQuery('#searchToDate').val(searchToDate);
  117. }
  118. function doResult(resultObj) {
  119. try {
  120. if ( resultObj.getRequestEvent() == "GET_MATL_KIND_CODE_LV2" )
  121. {
  122. if ( resultObj.getSuccess() == true )
  123. {
  124. } else {
  125. dlgErrorMsg(resultObj);
  126. }
  127. }
  128. }
  129. catch(errorObject) {
  130. showErrorDlg("doResult()", errorObject);
  131. }
  132. }
  133. /**
  134. * IBSheet Event: DBLCLICK
  135. */
  136. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  137. var f = document.form1;
  138. if (sheet1.ColSaveName(Col) == "APPR_TOT_RATE") {
  139. var reportInfo = new ReportInfo();
  140. if(sheet1.GetCellValue(Row, "APPR_TOT_RATE").trim() != "")
  141. {
  142. if(sheet1.GetCellValue(Row, "DOC_CD") == "03")
  143. {
  144. reportInfo.title = "기자재공급업체 현장평가표(Manufacturer)";
  145. if(sheet1.GetCellValue(Row, "ADM_YEAR") == "2014")
  146. { reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3.mrd";}
  147. else if(sheet1.GetCellValue(Row, "ADM_YEAR") == "2016")
  148. { reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3_2016.mrd";}
  149. else if(sheet1.GetCellValue(Row, "ADM_YEAR") == "2019")
  150. { reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3_2019.mrd";}
  151. else
  152. { reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3_2020.mrd";}
  153. reportInfo.set(sheet1.GetCellValue(Row, "CORP_ID")); // $1
  154. reportInfo.set(sheet1.GetCellValue(Row, "ARR_ID")); // $2
  155. reportInfo.set(sheet1.GetCellValue(Row, "DOC_CD")); // $3
  156. reportInfo.set(sheet1.GetCellValue(Row, "APPR_DY").substring(0,4));
  157. }
  158. else if(sheet1.GetCellValue(Row, "DOC_CD") == "04")
  159. {
  160. reportInfo.title = "기자재공급업체 현장평가표(Agent)";
  161. if(sheet1.GetCellValue(Row, "ADM_YEAR") == "2014")
  162. { reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4.mrd";}
  163. else if(sheet1.GetCellValue(Row, "ADM_YEAR") == "2016")
  164. { reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4_2016.mrd";}
  165. else if(sheet1.GetCellValue(Row, "ADM_YEAR") == "2019")
  166. { reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4_2019.mrd";}
  167. else
  168. { reportInfo.reportName = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4_2020.mrd";}
  169. reportInfo.set(sheet1.GetCellValue(Row, "CORP_ID")); // $1
  170. reportInfo.set(sheet1.GetCellValue(Row, "ARR_ID")); // $2
  171. reportInfo.set(sheet1.GetCellValue(Row, "DOC_CD")); // $3
  172. reportInfo.set(sheet1.GetCellValue(Row, "APPR_DY").substring(0,4));
  173. }
  174. reportInfo.width = 1000; // Default: 1024
  175. reportInfo.height = 700; // Default: 768
  176. // reportInfo.reportOption = "/rf /rsn ["+f.defaultDS.value+"]"; // Default: '/rf'
  177. reportInfo.showPopup();
  178. }
  179. }
  180. else if (sheet1.ColSaveName(Col) == "CST_DOC_NAME"){
  181. var p_payreq_id = sheet1.GetCellValue(Row, "PAYREQ_ID");
  182. var p_corp_id = sheet1.GetCellValue(Row, "CORP_ID");
  183. var p_dept_cd = sheet1.GetCellValue(Row, "DEPT_CD");
  184. var p_ord_doc_no = sheet1.GetCellValue(Row, "ORD_DOC_NO");
  185. var p_pur_cont_id = sheet1.GetCellValue(Row, "PUR_CONT_ID");
  186. var p_user_sabun = "<%=user.get("USER_SABUN")%>";
  187. var p_status = sheet1.GetCellValue(Row, "REGU_STATUS_CD");
  188. var p_plan_appr_status = sheet1.GetCellValue(Row, "PLAN_APPR_STATUS");
  189. var p_plan_appr_chk_empno = sheet1.GetCellValue(Row, "PLAN_APPR_CHK_EMPNO");
  190. var argObj = new Object();
  191. argObj.p_payreq_id = p_payreq_id;
  192. argObj.p_plan_appr_status = p_plan_appr_status;
  193. argObj.p_plan_appr_chk_empno = p_plan_appr_chk_empno;
  194. argObj.p_corp_id = p_corp_id;
  195. argObj.p_dept_cd = p_dept_cd;
  196. argObj.p_ord_doc_no = p_ord_doc_no;
  197. argObj.p_pur_cont_id = p_pur_cont_id;
  198. argObj.p_user_sabun = p_user_sabun;
  199. argObj.P_CHARGE_CD = "C";
  200. argObj.title = '설계 평가표 생성';
  201. /*var dialogHeight = 900;
  202. if(sheet1.GetCellValue(Row, "ADM_YEAR") == "2020"){
  203. dialogHeight = 500;
  204. } */
  205. var url = "/payment/purchase/PuSuppPlanApprPop.screen?p_corp_id="+p_corp_id+"&p_dept_cd="+p_dept_cd+"&p_pur_cont_id="+p_pur_cont_id+"&p_user_sabun="+p_user_sabun+"&p_status="+p_status+"&p_payreq_id="+p_payreq_id+"&p_plan_appr_status="+p_plan_appr_status+"&p_plan_appr_chk_empno="+p_plan_appr_chk_empno+"&P_CHARGE_CD=C&sModule=LM";
  206. var win_id = "PlanApprPop";
  207. //result = window.showModalDialog(url, argObj,'dialogWidth:800px;dialogHeight:' + dialogHeight + 'px; center:yes; help:no; status:no; scroll:yes; resizable:no');
  208. //$.searchList();
  209. result = fLayerPop(win_id, url, 800 ,900, '', '', 'NO');
  210. }
  211. }
  212. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  213. </script>
  214. <modular:search id="form1">
  215. <modular:key id="fevent" />
  216. </modular:search>
  217. <form id="form1" name="form1" method="post" modular:type="search">
  218. <INPUT type="hidden" name="fevent" id="fevent" value=""/>
  219. <INPUT type="hidden" name="materialgroup" id="materialgroup" value=""/>
  220. <INPUT type="hidden" name="p_corp_reg_no" id="p_corp_reg_no" value="" />
  221. <div align="left" id="title">
  222. <ul>
  223. <li>구매_기자재 공급업체 설계평가 현황</li>
  224. </ul>
  225. </div>
  226. <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="search-table">
  227. <!-- 검색조건 영역 : 시작 -->
  228. <tr>
  229. <td height="1">
  230. <table cellspacing="1" cellpadding="0" class="search-form-table">
  231. <col width="10%">
  232. <col width="30%">
  233. <col width="10%">
  234. <col width="30%">
  235. <col width="20%">
  236. <tr height="25">
  237. <!-- 검색조건 타이틀 1 -->
  238. <th>
  239. 현장명
  240. </th>
  241. <td>
  242. <%=InputText.getSiteCodeNew("searchDeptCd", "searchDeptNm", "", user, initSearchDeptCd, initSearchDeptNm)%>
  243. </td>
  244. <th>
  245. 계약명
  246. </th>
  247. <td>
  248. <input type="text" name="build_name" id="build_name" style="width: 86%;" value="<%=params.get("build_name")%>"/>
  249. </td>
  250. <td rowspan="2" class="button" style="text-align: center;">
  251. <!-- 검색버튼 영역 : 시작 -->
  252. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_search">검색</a></span>
  253. <!-- <span class="btnSearch center"><a href="javascript:void(0);" id="btn_excel">엑셀</a></span> -->
  254. <!-- 검색버튼 영역 : 종료 -->
  255. </td>
  256. </tr>
  257. <tr height="25">
  258. <!-- 검색조건 타이틀 1 -->
  259. <th>
  260. 업체명
  261. </th>
  262. <td >
  263. <input type="text" name="corp_kor" id="corp_kor" style="width: 70%;" value="<%=params.get("corp_kor")%>"/>
  264. </td>
  265. <th>
  266. 상태
  267. </th>
  268. <td>
  269. <select name="plan_appr_status" id="plan_appr_status" style="width: 30%;" class="input_select" height=18>
  270. <option value="">--전체--</option>
  271. <option value="00" >평가대상</option>
  272. <option value="01" >작성중</option>
  273. <option value="02" >평가완료</option>
  274. </select>
  275. </td>
  276. <%-- <th>평가년월
  277. </th>
  278. <TD>
  279. <%= InputText.get("searchFromDate", "", 10, 50, "hangule,center, desc=평가년월, ReadOnly") %>
  280. <IMG name="start_img" id="calender_from" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgMCalendar('searchFromDate');">
  281. ~
  282. <%= InputText.get("searchToDate", "", 10, 50, "hangule,center, desc=평가년월, ReadOnly") %>
  283. <IMG name="start_img" id="calender_to" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgMCalendar('searchToDate');">
  284. </TD> --%>
  285. </tr>
  286. </table>
  287. </td>
  288. </tr>
  289. <!-- 검색조건 영역 : 종료 -->
  290. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 시작 -->
  291. <tr>
  292. <td height="1">
  293. <table border="0" cellspacing="0" cellpadding="0" class="search_data_div_height">
  294. <tr>
  295. <td>
  296. </td>
  297. </tr>
  298. </table>
  299. </td>
  300. </tr>
  301. </table>
  302. <div style="width: 100%; height: 100%; padding-top: 5px;">
  303. <!-- 데이터 영역 : 시작 -->
  304. <!-- ibsheet7 그리드 생성 -->
  305. <script>createIBSheet("sheet1","100%", "250px;");</script>
  306. <!-- 데이터 영역 : 종료 -->
  307. </div>
  308. </form>