BidDeferPop.jsp 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <%--
  2. - Author(s) : Hyung min Son
  3. - Date : 2014.07.07
  4. - Description: 연기 사유 팝업
  5. --%>
  6. <%@page import="monfox.toolkit.snmp.agent.modules.SnmpV2Mib.SysOREntry"%>
  7. <%@ page contentType="text/html; charset=utf-8" %>
  8. <%@ page import="java.text.SimpleDateFormat" %>
  9. <%@ page import="java.util.Date" %>
  10. <%@ page import="kr.co.udapsoft.common.*" %>
  11. <%@ page import="kr.co.udapsoft.common.code.*" %>
  12. <%@ page import="com.udapsoft.waf.system.*" %>
  13. <%@ page import="com.udapsoft.waf.common.*" %>
  14. <%@ page import="com.udapsoft.waf.common.ui.HTMLMaker" %>
  15. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  16. <%@ page import="kr.co.hsnc.common.util.*"%>
  17. <%@ page import="kr.co.hsnc.common.util.ValueObject" %>
  18. <%@ page import="kr.co.hsnc.common.sql.*" %>
  19. <%@ page import="kr.co.hsnc.common.sql.RowSet" %>
  20. <%@ page import="kr.co.hsnc.common.sql.util.*" %>
  21. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  22. <%@ page import="kr.co.udapsoft.common.code.*" %>
  23. <%-- <%@ include file="/jsp/work/taglib.jsp" %> --%>
  24. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  25. <%
  26. ctx.init(request, response);
  27. HandlerStorage storage = ctx.getHandlerStorage();
  28. ValueObject params = storage.getParams();
  29. ValueObject user = ctx.getUser();
  30. String BID_NO = (String) storage.get("BID_NO");
  31. String BID_DEG = (String) storage.get("BID_DEG");
  32. String BID_FROM_DT = (String) storage.get("BID_FROM_DT");
  33. String BID_TO_DT = (String) storage.get("BID_TO_DT");
  34. String pop_win_id = (String) storage.get("pop_win_id");
  35. SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
  36. String str = sd.format(new Date());
  37. %>
  38. <%@ page contentType="text/html; charset=utf-8" %>
  39. <SCRIPT language="JavaScript">
  40. var from_dt = "<%=BID_FROM_DT%>";
  41. var from_date = from_dt.substring(0,10);
  42. var from_hh = from_dt.substring(11,13);
  43. var from_mi = from_dt.substring(14,16);
  44. function doPageInit() {
  45. $("#BID_TO_DT").change(function() {
  46. To_Date_ck();
  47. });
  48. $("#BID_TO_HH").change(function() {
  49. To_Date_ck();
  50. });
  51. $("#BID_TO_MI").change(function() {
  52. To_Date_ck();
  53. });
  54. }
  55. function To_Date_ck(){
  56. if($("#BID_TO_DT").val() < from_date){//적을경우
  57. alert("견적제출 마감일시는 제출 시작일시 보다 커야 합니다.");
  58. $("#BID_TO_DT").val("");
  59. $("#BID_TO_DT").focus();
  60. return;
  61. }else if($("#BID_TO_DT").val() == from_date){//같은 경우
  62. if($("#BID_TO_HH").val().length > 0){
  63. if($("#BID_TO_HH").val() < from_hh){
  64. alert("견적제출 마감일시는 제출 시작일시 보다 커야 합니다.");
  65. $("#BID_TO_HH").val("");
  66. $("#BID_TO_HH").focus();
  67. return;
  68. }else if($("#BID_TO_HH").val() == from_hh){
  69. if($("#BID_TO_MI").val().length > 0){
  70. if($("#BID_TO_MI").val() < from_mi){
  71. alert("견적제출 마감일시는 제출 시작일시 보다 커야 합니다.");
  72. $("#BID_TO_MI").val("");
  73. $("#BID_TO_MI").focus();
  74. return;
  75. }
  76. }
  77. }
  78. }
  79. }
  80. }
  81. function doClose()
  82. {
  83. returnValue = null;
  84. parent.PopClose("<%=pop_win_id%>",returnValue);
  85. }
  86. function postpone(){
  87. if($("#BID_TO_DT").val().length == 0 ||$("#BID_TO_HH").val().length == 0 || $("#BID_TO_MI").val().length == 0){
  88. alert("변경 견적마감일시는 필수 입니다.");
  89. return;
  90. }
  91. if(time_ck("BID_TO_HH","HH"))return;
  92. if(time_ck("BID_TO_MI","MI"))return;
  93. if($("#POSTPONE_REASON").val().length > 0){
  94. replace();
  95. if(confirm("견적제출마감시간을 변경하시겠습니까?")){
  96. var f = document.form1;
  97. submitXmlRequest("/bid/purchase/BidDeferPop_form.screen", "FORM_POSTPONE_UPDATE", f);
  98. }
  99. }else{
  100. alert("연기사유는 필수 입니다.");
  101. }
  102. }
  103. function replace(){
  104. var content = $("#POSTPONE_REASON").val();
  105. $("#POSTPONEREASON").val(content);
  106. }
  107. function doResult(resultObj) {
  108. try {
  109. if( resultObj.getRequestEvent() == "FORM_POSTPONE_UPDATE") {
  110. if( resultObj.getSuccess() ) {
  111. returnValue = new Array(0,"연기 되었습니다.");
  112. parent.PopClose("<%=pop_win_id%>",returnValue);
  113. }
  114. else {
  115. dlgErrorMsg(resultObj);
  116. }
  117. }
  118. }
  119. catch(errorObject) {
  120. showErrorDlg("doResult()", errorObject);
  121. }
  122. }
  123. function time_ck(obj,type){
  124. if(must_ck_val(obj,""))return true;
  125. if(!isNumber($("#"+obj).val())){
  126. alert("숫자만 입력 가능합니다.");
  127. $("#"+obj).focus();
  128. return true;
  129. }else{
  130. var time = Number($("#"+obj).val());
  131. if(type == "HH"){
  132. if(time < -1 || time > 23){
  133. alert("0~23 까지 입력 가능합니다.");
  134. $("#"+obj).focus();
  135. return true;
  136. }
  137. }else if(type == "MI"){
  138. if(time < -1 || time > 59){
  139. alert("0~59 까지 입력 가능합니다.");
  140. $("#"+obj).focus();
  141. return true;
  142. }
  143. }
  144. }
  145. if($("#"+obj).val().length == 1){
  146. var timelength = $("#"+obj).val();
  147. $("#"+obj).val("0"+timelength);
  148. }
  149. return false;
  150. }
  151. // value 값 체크
  152. function must_ck_val(obj,desc){
  153. if($("#"+obj).val().length == 0){
  154. if(desc.length > 0){
  155. alert(desc+must_msg);
  156. }else{
  157. alert($("#"+obj).attr("desc")+must_msg);
  158. }
  159. $("#"+obj).focus();
  160. return true;
  161. }
  162. return false;
  163. }
  164. document.body.onload = doPageInit;
  165. setInterval("dpTime()",1000);
  166. </SCRIPT>
  167. <modular:search id="form1">
  168. <modular:key id="fevent" />
  169. </modular:search>
  170. <FORM name="form1" method="post">
  171. <INPUT type="hidden" name="BID_NO" value="<%=BID_NO%>">
  172. <INPUT type="hidden" name="BID_DEG" value="<%=BID_DEG%>">
  173. <INPUT type="hidden" name="STATUS_CD" value="04">
  174. <INPUT type="hidden" name="fevent" id="fevent" value="FROM_POSTPONE_UPDATE">
  175. <INPUT type="hidden" name="POSTPONEREASON" id="POSTPONEREASON" value="">
  176. <INPUT type="hidden" name="BID_FROM_DT" value="<%=BID_FROM_DT %>">
  177. <TABLE class="screen_title_table">
  178. <TR height="2"><TD colspan="2"></TD>
  179. </TR>
  180. <TR height="25"><TD>
  181. <!-- 제목 및 버튼 -->
  182. <table id="t1" width="100%" class="ftit_table">
  183. <colgroup>
  184. <col width="*" />
  185. <col width="150" />
  186. </colgroup>
  187. <tr>
  188. <th>
  189. </th>
  190. <td align="right">
  191. <span class="btnSearch center"><a href="javascript:postpone();">연기</a></span>
  192. </td>
  193. </tr>
  194. </table>
  195. </TD>
  196. </TR>
  197. <tr>
  198. <td>
  199. <!-- 버튼 영역 : 시작 -->
  200. <!-- 발주의뢰정보 : 시작 -->
  201. <TABLE class="form-table">
  202. <colgroup>
  203. <col width="150" />
  204. <col width="*" />
  205. </colgroup>
  206. <TR height="25">
  207. <TH >서버시간</TH>
  208. <TD >
  209. &nbsp;&nbsp; <font color='red'><b><%=str %> <span id="dpTime"></b></font></span>
  210. </TD>
  211. </TR>
  212. <TR height="25">
  213. <TH >견적제출기간</TH>
  214. <TD >
  215. &nbsp;&nbsp; <%=BID_FROM_DT %> ~ <%=BID_TO_DT %>
  216. </TD>
  217. </TR>
  218. <TR height="25">
  219. <TH class=" required">변경 견적마감일시</TH>
  220. <TD >
  221. &nbsp;&nbsp;
  222. <%= InputText.get("BID_TO_DT", "", 13, 10, "center,desc=견적마감일시,readOnly") %>
  223. <IMG name="calendar_sitedescdate" id="calendar_sitedescdate" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('BID_TO_DT');">
  224. <%= InputText.get("BID_TO_HH", "", 2, 2, "center,desc=견적마감일시,Time") %> : <%= InputText.get("BID_TO_MI", "", 2, 2, "center,desc=견적마감일시,Time") %>
  225. </TD>
  226. </TR>
  227. <TR height="25">
  228. <th width="15%" class="required">공지여부</th>
  229. <TD width="35%">
  230. &nbsp;&nbsp;
  231. <LABEL for="obc_ind_type_1"><INPUT id="obc_ind_type_1" type="radio" name="DELAY_NOTI_YN" value="Y" desc="Notice여부" checked>예</LABEL>
  232. <LABEL for="obc_ind_type_2"><INPUT id="obc_ind_type_2" type="radio" name="DELAY_NOTI_YN" value="N" desc="Notice여부" >아니오</LABEL>
  233. </TD>
  234. </TR>
  235. <TR height="80">
  236. <TH class=" required">연기사유</TH>
  237. <TD >
  238. &nbsp;&nbsp; <textarea name="POSTPONE_REASON" id="POSTPONE_REASON" style="width:95%; height:150px; overflow-y:auto" maxlength="100" class="input byteChk ctrlTarget"></textarea>
  239. </TD>
  240. </TR>
  241. </TABLE>
  242. </td>
  243. </tr>
  244. </TABLE>
  245. </FORM>