TBECheckPop.jsp 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <%--
  2. - Author(s) : Hyung min Son
  3. - Date : 2014.07.25
  4. - Description: 기술검토서팝업
  5. --%>
  6. <%@page import="monfox.toolkit.snmp.agent.modules.SnmpV2Mib.SysOREntry"%>
  7. <%@page import="monfox.toolkit.snmp.agent.modules.SnmpV2Mib.SysOREntry"%>
  8. <%@ page contentType="text/html; charset=utf-8" %>
  9. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  10. <%@ page import="com.udapsoft.waf.system.*" %>
  11. <%@ page import="com.udapsoft.waf.common.*" %>
  12. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  13. <%@ page import="com.udapsoft.waf.common.util.StringUtils"%>
  14. <%@ page import="kr.co.hsnc.common.util.*"%>
  15. <%@ page import="kr.co.hsnc.common.sql.*" %>
  16. <%@ page import="kr.co.udapsoft.common.*" %>
  17. <%@ page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager"%>
  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 user = ctx.getUser();
  24. ValueObject params = storage.getParams();
  25. String event = storage.getEvent();
  26. String BID_NO = (String) storage.get("BID_NO");
  27. String BID_DEG = (String) storage.get("BID_DEG");
  28. String RTN_YN = (String) storage.get("RTN_YN");
  29. String pop_win_id = (String) storage.get("pop_win_id");
  30. ValueObject Order = storage.getValueObject("Order");
  31. ValueObject filetot = storage.getValueObject(Order.get("TOT_FILE_GB"));
  32. RowSet Tbe_info = storage.getRowSet("TBE_INFO");
  33. %>
  34. <SCRIPT language="JavaScript">
  35. document.onkeydown = closePopupWindow;
  36. document.body.onload = _onReady;
  37. var act_rtn = false;
  38. function _onReady(){
  39. $("#table_rtn").hide();
  40. $("#btn_cancel").hide();
  41. $("#t1").hide();
  42. if("<%=RTN_YN%>" == "Y"){
  43. $("#t1").show();
  44. }
  45. }
  46. function rtn_calcel(){
  47. $("#table_rtn").hide();
  48. $("#btn_cancel").hide();
  49. act_rtn = false;
  50. }
  51. function rtn_table(){
  52. if(act_rtn){//반려
  53. rtn_save();
  54. return;
  55. }else{
  56. $("#table_rtn").show();
  57. $("#btn_cancel").show();
  58. act_rtn = true;
  59. return;
  60. }
  61. }
  62. function btn_mail(){
  63. var query = 'input[name="mail_chk"]:checked';
  64. var query2 = 'input[name="VENDOR_NO"]';
  65. var selectedEls = document.querySelectorAll(query);
  66. var selectedEls2 = document.querySelectorAll(query2);
  67. // 선택된 목록에서 value 찾기
  68. var result = '';
  69. var result2 = '';
  70. selectedEls.forEach((el) => {
  71. result += el.value + ',';
  72. });
  73. selectedEls2.forEach((el) => {
  74. result2 += el.value + ',';
  75. });
  76. if(result == ''){
  77. alert("메일 발송할 업체를 선택해 주십시오.")
  78. return;
  79. }else{
  80. var chk = result.split(',');
  81. var vendor = result2.split(',');
  82. var len = chk.length - 1;
  83. var isValue = "";
  84. for(var i=0; i<len; i++){
  85. isValue += "'"+vendor[chk[i]]+"'";
  86. if(i < len - 1){
  87. isValue += ",";
  88. }
  89. }
  90. document.form1.vendorno.value = isValue;
  91. if(confirm("업체에 TBE결과 메일을 발송 하시겠습니까?")){
  92. var f = document.form1;
  93. submitXmlRequest("/bid/purchase/TBECheckPop_from.screen", "BTN_SEND_MAIL", f);
  94. }
  95. }
  96. }
  97. function rtn_save(){
  98. if($("#RTN_REASON").val().length > 0){
  99. if(confirm("반려 하시겠습니까?")){
  100. var f = document.form1;
  101. submitXmlRequest("/bid/purchase/TBECheckPop_from.screen", "RTN_UPDATE", f);
  102. }
  103. }else{
  104. alert("반려사유는 필수 입니다.");
  105. $("#RTN_REASON").focus();
  106. }
  107. }
  108. function doAttachFileListSet(){
  109. }
  110. //첨부파일
  111. function doAttachFile(obj,No) {
  112. var file_div = "bid/purchase/<%=BID_NO%>/TBE";
  113. if(obj==''){
  114. alert("After you have saved, you can attach a file.");
  115. }
  116. else if(obj != ''){
  117. viewFileListNew('<%=Order.get("TOT_FILE_GB")%>', obj.value, document.form1.p_AttachFile1, "N", file_div);
  118. //viewFileList('<%=Order.get("TOT_FILE_GB")%>', obj.value, document.form1.p_AttachFile1, "N", file_div,'_viewFileList');
  119. }
  120. }
  121. function doResult(resultObj) {
  122. try {
  123. if( resultObj.getRequestEvent() == "RTN_UPDATE") {
  124. document.form1.isSubmit = false;
  125. returnValue = new Array(1,"반려 되었습니다.");
  126. parent.PopClose("<%=pop_win_id%>",returnValue);
  127. }else if( resultObj.getRequestEvent() == "BTN_SEND_MAIL") {
  128. document.form1.isSubmit = false;
  129. alert("메일이 발송되었습니다.");
  130. }
  131. } catch(errorObject) {
  132. showErrorDlg("doResult()", errorObject);
  133. }
  134. }
  135. </SCRIPT>
  136. <modular:search id="form1">
  137. <modular:key id="fevent" />
  138. </modular:search>
  139. <form id="form1" name="form1" method="post" modular:type="search">
  140. <INPUT type='hidden' name="fevent" id="fevent" value="">
  141. <INPUT type='hidden' name="BID_NO" value="<%=BID_NO%>">
  142. <INPUT type='hidden' name="BID_DEG" value="<%=BID_DEG%>">
  143. <INPUT type='hidden' name="STATUS_CD" value="<%=Order.get("STATUS_CD")%>">
  144. <INPUT type='hidden' name="TOT_FILE_ID" value="<%=Order.get("TOT_FILE_ID")%>">
  145. <INPUT type='hidden' name="TBE_FILE_GB" value="<%=Order.get("TOT_FILE_GB")%>">
  146. <INPUT type='hidden' name="vendorno" value="">
  147. <TABLE class="screen_title_table">
  148. <TR height="2"><TD colspan="2"></TD>
  149. </TR>
  150. <TR height="25"><TD>
  151. <!-- 제목 및 버튼 -->
  152. <table id="t1" width="100%" class="ftit_table">
  153. <colgroup>
  154. <col width="*" />
  155. <col width="150" />
  156. </colgroup>
  157. <tr>
  158. <th align="left">기술검토 상태 : <%=Order.get("STATUS_NM") %></th>
  159. <td align="right">
  160. <span class="btnSearch center" id="btn_mail"><a href="javascript:btn_mail();">의견발송</a></span>
  161. <span class="btnSearch center" id="btn_cancel"><a href="javascript:rtn_calcel();">반려취소</a></span>
  162. <%if("10".equals(Order.get("STATUS_CD"))){ %>
  163. <span class="btnSearch center" id="btn_rtn"><a href="javascript:rtn_table();">반려</a></span>
  164. <%} %>
  165. </td>
  166. </tr>
  167. </table>
  168. </TD>
  169. </TR>
  170. </TABLE>
  171. <!-- 발주의뢰정보 : 시작 -->
  172. <TABLE class="form-table" id="table_rtn" style="margin-bottom:15px" >
  173. <colgroup>
  174. <col width="145"/>
  175. <col />
  176. </colgroup>
  177. <TR height="50">
  178. <TH class="required">반려사유</TH>
  179. <TD>
  180. <textarea name="RTN_REASON" id="RTN_REASON" style="width:98%; height:50px; overflow-y:auto" maxlength="100" class="input byteChk ctrlTarget"></textarea>
  181. </TD>
  182. </TR>
  183. </TABLE>
  184. <TABLE class="list-form-table">
  185. <colgroup>
  186. <col width="145"/>
  187. <col width="145"/>
  188. <col width="200"/>
  189. <col />
  190. </colgroup>
  191. <TR height="25">
  192. <th>사업자번호</TD>
  193. <th>업체명</TD>
  194. <th>평과결과</TD>
  195. <th>평가의견</TD>
  196. <th>의견발송</TD>
  197. </TR>
  198. <%
  199. if(Tbe_info.size() > 0){
  200. for(int i=0;i < Tbe_info.size();i++){
  201. %>
  202. <TR height="25">
  203. <TD class="search_table_data" style="text-align:center"><%=StringUtils.getBizNo(Tbe_info.getRow(i).get("VENDOR_NO"))%><INPUT type="hidden" id="VENDOR_NO" name="VENDOR_NO" value="<%=Tbe_info.getRow(i).get("VENDOR_NO")%>"></TD>
  204. <TD class="search_table_data" style="text-align:center"><%=Tbe_info.getRow(i).get("VENDOR_NAME")%><INPUT type="hidden" id="VENDOR_NAME" name="VENDOR_NAME" value="<%=Tbe_info.getRow(i).get("VENDOR_NAME")%>"></TD>
  205. <TD class="search_table_data" style="text-align:center"><%=Tbe_info.getRow(i).get("EVAL_RESULT_NM")%><INPUT type="hidden" id="EVAL_RESULT_NM" name="EVAL_RESULT_NM" value="<%=Tbe_info.getRow(i).get("EVAL_RESULT_NM")%>"></TD>
  206. <TD class="search_table_data" style="vertical-align: top"><%=StringUtils.cvtHTML(Tbe_info.getRow(i).get("EVAL_OPIN"))%><INPUT type="hidden" id="EVAL_OPIN" name="EVAL_OPIN" value="<%=StringUtils.cvtHTML(Tbe_info.getRow(i).get("EVAL_OPIN"))%>"></TD>
  207. <TD class="search_table_data" style="text-align:center">
  208. <%-- <span class="btnSearch center" id="btn_mail_<%=i %>"><a href="javascript:rtn_mail();">발송_<%=i %></a></span> --%>
  209. <input type="checkbox" name="mail_chk" value="<%=i %>" style="cursor:pointer;" >
  210. </TD>
  211. </TR>
  212. <% } %>
  213. <TR height="30">
  214. <th>종합의견</TH>
  215. <TD class="search_table_data" colspan="2"><TEXTAREA name="p_AttachFile1" id="p_AttachFile1" style="width:85%;height:40px" rows="1" class="input" readOnly><%=filetot.get(Order.get("TOT_FILE_GB")) %></TEXTAREA>
  216. <IMG id='search_spot_button' onClick="doAttachFile(document.form1.TOT_FILE_ID,3);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'></TD>
  217. <TD class="search_table_data" colspan="2" style="vertical-align: top"><%=StringUtils.cvtHTML(Order.get("TOT_OPIN"))%></TD>
  218. <% }else{%>
  219. <TR height="25">
  220. <TD class="search_table_data" colspan="5" style="text-align:center">기술 검토 대상 업체가 없습니다.</TD>
  221. </TR>
  222. <%}%>
  223. </TABLE>
  224. </form>