QuotAmtPop.jsp 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <%--
  2. - Author(s) : Hoonseok choi
  3. - Date : 2023.02.10
  4. - Description: 견적업체 입찰금액 상세팝업
  5. --%>
  6. <%@ page contentType="text/html; charset=utf-8" %>
  7. <%@ page import="kr.co.hsnc.common.sql.RowSet" %>
  8. <%@ page import="kr.co.hsnc.common.util.ValueObject" %>
  9. <%@ page import="com.udapsoft.waf.system.*" %>
  10. <%@ page import="com.udapsoft.waf.common.*" %>
  11. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  12. <%@ page import="kr.co.udapsoft.common.*" %>
  13. <%@ page import="com.udapsoft.waf.common.ui.HTMLMaker" %>
  14. <%@ page import="com.udapsoft.waf.common.util.Formatter2"%>
  15. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  16. <%@ page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager"%>
  17. <%@ include file="/jsp/work/taglib.jsp" %>
  18. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  19. <%
  20. ctx.init(request, response);
  21. HandlerStorage storage = ctx.getHandlerStorage();
  22. ValueObject user = ctx.getUser();
  23. ValueObject params = storage.getParams();
  24. String event = storage.getEvent();
  25. ValueObject Order = storage.getValueObject("Order");
  26. ValueObject attid = storage.getValueObject("ATT_ID");
  27. String ROW = (String) storage.get("ROW");
  28. String VENDOR_CD = (String) storage.get("VENDOR_CD");
  29. String QUOT_ID = (String) storage.get("QUOT_ID");
  30. String QUOT_BID_NO = (String) storage.get("QUOT_BID_NO");
  31. String QUOT_BID_DEG = (String) storage.get("QUOT_BID_DEG");
  32. String pop_win_id = (String) storage.get("pop_win_id");
  33. String FILE_GB = (String) storage.get("FILE_GB");
  34. String fevent = (String) storage.get("fevent");
  35. ValueObject file = storage.getValueObject(storage.get("FILE_GB"));
  36. String DEMANDED_ID = (String) storage.get("DEMANDED_ID");
  37. String SITE_ATTEND_YN = (String) storage.get("SITE_ATTEND_YN");
  38. String ON_SUPP_YN = (String) storage.get("ON_SUPP_YN");
  39. String IN_OUT_DIV = (String) storage.get("IN_OUT_DIV");
  40. String STATUS_CD = (String) storage.get("STATUS_CD");
  41. if(Order.get("PointCount").isEmpty()){
  42. Order.set("PointCount", storage.get("PointCount"));
  43. }
  44. String PointCount = Order.get("PointCount");
  45. %>
  46. <SCRIPT language="JavaScript">
  47. var must_msg = "(은)는 필수 입력 항목입니다.";
  48. function _onReady(){
  49. //doSearchSheet();
  50. $("#SITE_ATTEND_YN").val("<%=Order.get("SITE_ATTEND_YN")%>");
  51. $("#ON_SUPP_YN").val("<%=Order.get("ON_SUPP_YN")%>");
  52. $("#IN_OUT_DIV").val("<%=Order.get("IN_OUT_DIV")%>");
  53. $("#SITE_ATTEND_YN").change(function() {
  54. if($("#SITE_ATTEND_YN").val() == "N"){
  55. $("#SITE_ATTEND_N").show();
  56. $("#SITE_ATTEND_Y").hide();
  57. }else{
  58. $("#SITE_ATTEND_Y").show();
  59. $("#SITE_ATTEND_N").hide();
  60. }
  61. });
  62. $("#SITE_ATTEND_YN").change();
  63. $("#ON_SUPP_YN").change(function() {
  64. if(( $("#IN_OUT_DIV").val() == "O" || $("#ON_SUPP_YN").val() == "N" ) && <%=Order.get("STATUS_CD")%>!="10"){
  65. $("#btn_save").show();
  66. }else{
  67. $("#btn_save").hide();
  68. }
  69. });
  70. $("#ON_SUPP_YN").change();
  71. $("#btn_save").click(function() {
  72. if(confirm("저장하시겠습니까?")){
  73. if(save_must_ck()){
  74. jQuery("#fevent").val("UPDATE_QUOT_DETAIL");
  75. var f = document.form1;
  76. submitXmlRequest("/quot/outside/QuotAmtPop_form.screen", "UPDATE_QUOT_DETAIL", f);
  77. }
  78. }
  79. });
  80. $("#btn_close").click(function(){
  81. window.close();
  82. });
  83. }
  84. function save_must_ck(){
  85. if(must_ck_val("ESTI_TOT_AMT","견적금액"))return false;
  86. return true;
  87. }
  88. // value 값 체크
  89. function must_ck_val(obj,desc){
  90. if($("#"+obj).val().length == 0){
  91. if(desc.length> 0){
  92. alert(desc+must_msg);
  93. }else{
  94. alert($("#"+obj).attr("desc")+must_msg);
  95. }
  96. $("#"+obj).focus();
  97. return true;
  98. }
  99. return false;
  100. }
  101. function numberFormat(num) {
  102. var pattern = /(-?[0-9]+)([0-9]{3})/;
  103. while(pattern.test(num)) {
  104. num = num.replace(pattern,"$1,$2");
  105. }
  106. return num;
  107. }
  108. function doResult(resultObj){
  109. if( resultObj.getRequestEvent() == "UPDATE_QUOT_DETAIL") {
  110. if( resultObj.getSuccess() ) {
  111. alert("저장 되었습니다.");
  112. }
  113. else {
  114. dlgErrorMsg(resultObj);
  115. }
  116. }
  117. }
  118. /**
  119. * 첨부파일 예약 함수
  120. */
  121. function fileDown(file_id){
  122. var url="/common/file/FileDownloadServlet";
  123. url += "?file_id=" + file_id;
  124. window.open(url, "_fileDown", "toolbar=no, width=400, height=100, top=500, left=400, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new");
  125. }
  126. function doAttachFileDiv(obj) {
  127. var file_div = "quot/outside/"+"<%=QUOT_BID_NO%>"+"/";
  128. if(obj==''){
  129. alert("저장을 한 후 파일을 첨부할 수 있습니다.");
  130. }
  131. else if(obj != ''){
  132. viewFileListNew('<%=FILE_GB%>', obj.value, document.form1.p_AttachFile, "N", file_div);
  133. }
  134. }
  135. //첨부파일
  136. function doAttachFile(obj,No) {
  137. var file_div = "quot/purchase/"+"<%=Order.get("QUOT_BID_NO")%>"+"/";
  138. var file_div2 = "quot/purchase/"+"<%=Order.get("QUOT_BID_NO")%>"+"/"+"<%=Order.get("VENDOR_CD")%>"+"/";
  139. var upLoadFlg = "N";
  140. if($("#ON_SUPP_YN").val() == "N" && <%=Order.get("STATUS_CD")%>!="10") upLoadFlg = "Y"; //오프라인 업체이나 견적마감인 경우도 파일첨부 불가
  141. if(obj != ''){
  142. var fileName = "첨부자료";
  143. viewFileListNew("QUOT_SUPP_"+"<%=Order.get("VENDOR_CD")%>"+obj.value, obj.value, document.form1.p_AttachFile2, upLoadFlg, file_div2, null, null, null, null, "N", fileName);
  144. }
  145. }
  146. document.onkeydown = closePopupWindow;
  147. //document.body.onload = _onReady;
  148. </SCRIPT>
  149. <modular:search id="form1">
  150. <modular:key id="fevent" />
  151. </modular:search>
  152. <FORM id="form1" name="form1" method="post" modular:type="search">
  153. <INPUT type="hidden" name="fevent" id="fevent" value="<%=fevent %>">
  154. <INPUT type="hidden" name="VENDOR_CD" value="<%=VENDOR_CD%>">
  155. <INPUT type="hidden" name="QUOT_BID_NO" value="<%=QUOT_BID_NO%>">
  156. <INPUT type="hidden" name="QUOT_BID_DEG" value="<%=QUOT_BID_DEG%>">
  157. <INPUT type="hidden" name="FILE_GB" value="<%=FILE_GB%>">
  158. <INPUT type="hidden" name="SITE_ATTEND_YN" value="<%=SITE_ATTEND_YN%>">
  159. <INPUT type="hidden" name="ON_SUPP_YN" value="<%=ON_SUPP_YN%>">
  160. <INPUT type="hidden" name="IN_OUT_DIV" value="<%=IN_OUT_DIV%>">
  161. <INPUT type='hidden' name="ATT_ID" value="<%=Order.get("ATT_ID")%>">
  162. <INPUT type="hidden" name="quot_id" value="<%=QUOT_ID %>">
  163. <INPUT type="hidden" name="BID_STATUS_CD" value="10">
  164. <table cellspacing="1" cellpadding="0" width="100%">
  165. <colgroup>
  166. <col width="350" />
  167. <col />
  168. </colgroup>
  169. <tr height="100%">
  170. <td valign="top">
  171. <table class="form-table">
  172. <colgroup>
  173. <col width="140" />
  174. <col />
  175. </colgroup>
  176. <tr height="25">
  177. <th>사업자번호</th>
  178. <td><%=Order.get("VENDOR_NO")%></td>
  179. </tr>
  180. <tr height="25">
  181. <th>업체명</th>
  182. <td><%=Order.get("VENDOR_NAME")%></td>
  183. </tr>
  184. </table>
  185. <TABLE class="form-table" id=SITE_ATTEND_N>
  186. <colgroup>
  187. <col width="140" />
  188. <col />
  189. </colgroup>
  190. <TR height="25">
  191. <th>불참 사유</th>
  192. <TD colspan="2">
  193. <textarea name="SITE_ATTEND_REASON" id="SITE_ATTEND_REASON" style="width:98%; height:80px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget" onkeyup="textareaResize(this)"><%=Order.get("SITE_ATTEND_REASON")%></textarea>
  194. </TD>
  195. </tr>
  196. </TABLE>
  197. <TABLE class="form-table" id=SITE_ATTEND_Y>
  198. <colgroup>
  199. <col width="140" />
  200. <col />
  201. </colgroup>
  202. <tr height="25">
  203. <th>견적금액</th>
  204. <td>
  205. <%= InputText.get("ESTI_TOT_AMT", Formatter2.currency(Order.get("ESTI_TOT_AMT"),0), 30, 15, "desc=견적금액,Number,right","Number") %>원
  206. </td>
  207. </tr>
  208. <tr height="25">
  209. <th>최종 견적 제출 일시</th>
  210. <td><%=Order.get("SUBMIT_DT")%></td>
  211. </tr>
  212. <tr height="100">
  213. <th>업체 의견</th>
  214. <TD colspan="2">
  215. <textarea name="REMARK" id="REMARK" style="width:98%; height:80px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget" onkeyup="textareaResize(this)"><%=Order.get("REMARK")%></textarea>
  216. </TD>
  217. </tr>
  218. <tr height="100">
  219. <th>첨부파일</th>
  220. <td valign="top">
  221. <%-- <div id="attach_file_view" class="attach_file_view" >
  222. <%=FileManager.getFileListForDiv(FILE_GB, DEMANDED_ID) %>
  223. </div> --%>
  224. <TEXTAREA name="p_AttachFile2" id="p_AttachFile2" style="width:85%;height:80px" rows="1" class="input" readOnly><%=attid.get("ATT_ID") %></TEXTAREA>
  225. <IMG id='search_spot_button' onClick="doAttachFile(document.form1.quot_id,2);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
  226. </td>
  227. <%-- <TH class="required">첨부자료</TH>
  228. <TD>
  229. <TEXTAREA name="p_AttachFile2" id="p_AttachFile2" style="width:85%;height:80px" rows="1" class="input" readOnly><%=fileout.get("DOC_ETC_OUT") %></TEXTAREA>
  230. <IMG id='search_spot_button' onClick="doAttachFile(document.form1.quot_id,2);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
  231. </TD> --%>
  232. </tr>
  233. <tr height="25">
  234. <td colspan="2" style="text-align: center;">
  235. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_save">저장</a></span>
  236. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_close">닫기</a></span>
  237. </td>
  238. </tr>
  239. </table>
  240. </td>
  241. </tr>
  242. </table>
  243. </form>