contOutWarrPopup.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. <%--
  2. - FileName : conOutWarrPopup.jsp
  3. - Author(s) : ok
  4. - Date : 2014.06.26
  5. - Copyright : Copyright (c) 2013 www.udapsoft.co.kr, Inc.
  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="kr.co.hsnc.common.util.*"%>
  12. <%@ page import="kr.co.hsnc.common.sql.*" %>
  13. <%@ page import="kr.co.hsnc.common.util.Formatter"%>
  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. RowSet WarrGofficeComboList = storage.getRowSet("WarrGofficeComboList"); //보증기관 ComboList Data
  23. ValueObject WarrGubunNm = storage.getValueObject("WarrGubunNm"); //제증권구분
  24. ValueObject contOutWarr = storage.getValueObject("contOutWarr"); //보증정보
  25. ValueObject attfile = storage.getValueObject(params.get("warrGubun")); //첨부파일
  26. String check1 = "";
  27. String check2 = "";
  28. if("1".equals(contOutWarr.get("GUAR_ONOFF_YN"))){
  29. check1 = "checked";
  30. }else{
  31. check2 = "checked";
  32. }
  33. %>
  34. <SCRIPT language="JavaScript">
  35. /*예약함수*/
  36. var sheet1;
  37. var sheet1Row;
  38. var sheet1PageNo = 1;
  39. var pageLastRowIndex = 1;
  40. var validationResult = false;
  41. var filterShow = false;
  42. function _onReady(){
  43. jQuery("#btnSave").click(function() {
  44. var f = document.form1;
  45. jQuery("#fevent").val("SAVE_DATA");
  46. //필수 입력항목 check
  47. if(requiredItemsCheck() == false){
  48. return;
  49. }
  50. //입력데이터 저장
  51. if (confirm("저장 하시겠습니까?")) {
  52. //if(jQuery("#warrGubun").val() == "1"){ // 01:선급금보증 저장
  53. submitXmlRequest("/payment/outside/ContOutWarrPopup_form.screen", "SAVE_DATA", f, "SUCCESS");
  54. //}
  55. }
  56. });
  57. jQuery("#btnSend").click(function() {
  58. var f = document.form1;
  59. jQuery("#fevent").val("REQ_DATA");
  60. //필수 입력항목 check
  61. if(requiredItemsCheck() == false){
  62. return;
  63. }
  64. //입력데이터 저장
  65. if (confirm("선급금신청요청 하시겠습니까?")) {
  66. submitXmlRequest("/payment/outside/AdvencePayment_form.screen", "REQ_DATA", f, "SUCCESS");
  67. }
  68. });
  69. jQuery("#btnClose").click(function() {
  70. alert();
  71. parent.callback_getContWarr();
  72. });
  73. pageinit();
  74. }
  75. //페이지 초기처리
  76. function pageinit(){
  77. inputDataSet();
  78. }
  79. //저장 및 선급금전송 시 필수항목 Check
  80. function requiredItemsCheck(){
  81. return true;
  82. }
  83. function doResult(resultObj) {
  84. try {
  85. if( resultObj.getRequestEvent() == "SAVE_DATA" ) {
  86. if( resultObj.getSuccess() ) {
  87. alert("저장되었습니다.");
  88. document.form1.isSubmit = false;
  89. /* jQuery("#btnSearch").click(); */
  90. searchData();
  91. }else {
  92. dlgErrorMsg(resultObj);
  93. }
  94. document.form1.isSubmit = false;
  95. }
  96. if( resultObj.getRequestEvent() == "GET_DATA" ) {
  97. if( resultObj.getSuccess() ) {
  98. var subContId = resultObj.getValueObject().get("SUB_CONT_ID");
  99. jQuery("#subContId").val(subContId);
  100. }else {
  101. dlgErrorMsg(resultObj);
  102. }
  103. document.form1.isSubmit = false;
  104. }
  105. }
  106. catch(errorObject) {
  107. showErrorDlg("doResult()", errorObject);
  108. }
  109. }
  110. function doKeyPress() {
  111. if( event.keyCode == 13 ) {
  112. doSearch(document.all.sheet1)
  113. }
  114. }
  115. function calendar(thisDayObj){
  116. dlgCalendar(thisDayObj);
  117. }
  118. //첨부파일
  119. function doAttachFile(obj,No) {
  120. if(obj.value == ''){
  121. alert("데이터를 저장 후, 파일을 첨부할 수가 있습니다.");
  122. }
  123. else if(obj.value != ''){
  124. var gubunStr = jQuery("#warrGubun").val();
  125. viewFileList(gubunStr, obj.value, document.form1.p_AttachFile1, "N", "N", "Y", "N");
  126. }
  127. }
  128. function searchData(){
  129. var f = document.form1;
  130. jQuery("#fevent").val("GET_DATA");
  131. submitXmlRequest("/payment/outside/ContOutWarrPopup_form.screen", "GET_DATA", f, "VALUEOBJECT");
  132. }
  133. function inputDataSet(){
  134. if(jQuery("#warrGoffice option:selected").val() == "9"){ //기타
  135. jQuery("#warrGofficeEtc").attr("readonly",false);
  136. jQuery("#warrGofficeEtc").css({'background-color' : '#ffffff'});
  137. jQuery("#warrGofficeEtc").css({'border' : '1px solid #595a5a'});
  138. }else{
  139. jQuery("#warrGofficeEtc").attr("readonly",true);
  140. jQuery("#warrGofficeEtc").css({'background-color' : '#dedede'});
  141. jQuery("#warrGofficeEtc").css({'border' : '1px solid #bcbcbc'});
  142. }
  143. }
  144. </SCRIPT>
  145. <modular:search id="form1">
  146. <modular:key id="fevent" />
  147. </modular:search>
  148. <form id="form1" name="form1" method="post" modular:type="search">
  149. <TABLE border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
  150. <INPUT type="hidden" name="fevent" id="fevent" value="">
  151. <INPUT type="hidden" name="warrContId" id="warrContId" value="<%=params.get("subContId") %>"> <!-- 보증증권 ID -->
  152. <INPUT type="hidden" name="warrGubun" id="warrGubun" value="<%=params.get("warrGubun") %>"> <!-- 보증증권 구분 -->
  153. <INPUT type="hidden" name="warrSeq" id="warrSeq" value="<%=params.get("warrSeq") %>"> <!-- 보증증권 일련번호 -->
  154. <INPUT type="hidden" name="subContId" id="subContId" value="<%=contOutWarr.get("SUB_CONT_ID") %>">
  155. <TR height="1">
  156. <TD>
  157. <TABLE class="screen_title_table" border="0">
  158. <TR height="25">
  159. <TD width="16" valign="middle"><IMG src="/img/buyer/button/subtitle_bullet.gif" ></TD>
  160. <TD width="55%" class="screen_title_text">보증정보</TD>
  161. <TD width="*" rowspan="3" class="search_button">
  162. <!-- 검색버튼 영역 : 시작 -->
  163. <TABLE border="0" cellpadding="0" cellspacing="0" align="center">
  164. <TR>
  165. <TD>
  166. <DIV id="btnSave" class="button_style">
  167. <TABLE border="0" cellpadding="0" cellspacing="0">
  168. <TR>
  169. <TD class="button_left1"></TD>
  170. <TD class="button_text1">저장&nbsp;</TD>
  171. <TD class="button_right"></TD>
  172. </TR>
  173. </TABLE>
  174. </DIV>
  175. </TD>
  176. <TD width="5"></TD>
  177. <TD>
  178. <DIV id="btnSend" class="button_style">
  179. <TABLE border="0" cellpadding="0" cellspacing="0">
  180. <TR>
  181. <TD class="button_left1"></TD>
  182. <TD class="button_text1">보증서전송&nbsp;</TD>
  183. <TD class="button_right"></TD>
  184. </TR>
  185. </TABLE>
  186. </DIV>
  187. </TD>
  188. <TD width="5"></TD>
  189. <TD>
  190. <DIV id="btnClose" class="button_style">
  191. <TABLE border="0" cellpadding="0" cellspacing="0">
  192. <TR>
  193. <TD class="button_left1"></TD>
  194. <TD class="button_text1">닫기&nbsp;</TD>
  195. <TD class="button_right"></TD>
  196. </TR>
  197. </TABLE>
  198. </DIV>
  199. </TD>
  200. </TR>
  201. </TABLE>
  202. <!-- 검색버튼 영역 : 종료 -->
  203. </TD>
  204. </TR>
  205. </TABLE>
  206. </TD>
  207. </TR>
  208. <!-- 데이터 상세 : 시작 -->
  209. <TR height="1">
  210. <TD>
  211. <!-- 보증정보 : 시작 -->
  212. <TABLE cellspacing="1" cellpadding="0" class="search_table" border="0" width="100%" height="100%">
  213. <colgroup>
  214. <col width="30%">
  215. <col width="35%">
  216. <col width="*">
  217. </colgroup>
  218. <TR height="25">
  219. <TD class="insert_table_title required">&nbsp;발행방법</TD>
  220. <TD class="insert_table_data" colspan="2">
  221. <input type="radio" name="chk_info" value="1" onclick="" <%= check1 %> >온라인
  222. <input type="radio" name="chk_info" value="2" onclick="" <%= check2 %> >오프라인
  223. </TD>
  224. </TR>
  225. <TR height="25">
  226. <TD class="insert_table_title">&nbsp;발행구분</TD>
  227. <TD class="insert_table_data" colspan="2">&nbsp;<%= InputText.get("warrGubunNm", WarrGubunNm.get("DETAILNM") , 30, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %></TD>
  228. </TR>
  229. <TR height="25">
  230. <TD class="insert_table_title required">&nbsp;보증기관명</TD>
  231. <TD class="insert_table_data" colspan="2">&nbsp;<%= HTMLMaker.getSelectTag(WarrGofficeComboList, "DETAILCD", "DETAILNM", "warrGoffice", "width:30%;height=18;' onChange='inputDataSet();", "", contOutWarr.get("WARR_GOFFICE")) %>&nbsp;
  232. <%= InputText.get("warrGofficeEtc", "", 40, 40, "string, left", "string") %>
  233. </TD>
  234. </TR>
  235. <TR height="25">
  236. <TD class="insert_table_title">&nbsp;변경구분</TD>
  237. <TD class="insert_table_data" colspan="2">&nbsp;<%= InputText.get("xxxxxxxx", "당초", 30, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %></TD>
  238. </TR>
  239. <TR height="1">
  240. <TD>
  241. <TABLE border="0" cellspacing="0" cellpadding="0" class="search_data_div_height">
  242. <TR>
  243. <TD></TD>
  244. </TR>
  245. </TABLE>
  246. </TD>
  247. </TR>
  248. <TR height="25">
  249. <TD class="insert_table_title required">&nbsp;증권번호</TD>
  250. <TD class="insert_table_data" colspan="2">&nbsp;<%= InputText.get("warrWgon", contOutWarr.get("WARR_WGNO"), 50, 38, "string, left", "string") %></TD>
  251. </TR>
  252. <TR height="25">
  253. <TD class="insert_table_title required">&nbsp;보증기간</TD>
  254. <TD class="insert_table_data" colspan="2">&nbsp;
  255. <%= InputText.get("dateStart", Formatter.formatDate(contOutWarr.get("WARR_SDATE"), "-"), 40, 10, "Center, date, PerSize, readonly", "date", "") %>
  256. <A href="JavaScript:calendar('dateStart');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>&nbsp;
  257. ~
  258. &nbsp;<%= InputText.get("dateEnd", Formatter.formatDate(contOutWarr.get("WARR_EDATE"), "-"), 40, 10, "Center, date, PerSize, readonly", "date", "") %>
  259. <A href="JavaScript:calendar('dateEnd');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
  260. </TD>
  261. </TR>
  262. <TR height="25">
  263. <TD class="insert_table_title required">&nbsp;보증금액</TD>
  264. <TD class="insert_table_data" colspan="2">&nbsp;<%= InputText.get("warrWamt", Formatter.formatCurrency(contOutWarr.get("WARR_WAMT")), 36, 14, "class=input byteChk ,number, right", "number") %></TD>
  265. </TR>
  266. <TR height="25">
  267. <TD class="insert_table_title">&nbsp;발급일</TD>
  268. <TD class="insert_table_data" colspan="2">&nbsp;
  269. <%= InputText.get("paperDate", Formatter.formatDate(contOutWarr.get("PAPERDATE"), "-"), 40, 10, "Center, date, PerSize, readonly", "date", "") %>
  270. <A href="JavaScript:calendar('paperDate');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
  271. </TD>
  272. </TR>
  273. <TR height="25">
  274. <TD class="insert_table_title">&nbsp;첨부파일</TD>
  275. <TD class="insert_table_data" colspan="2">&nbsp;<TEXTAREA name="p_AttachFile1" id="p_AttachFile1" style="width:90%;height:90%;" rows="4" class="input" readOnly><%=attfile.get(params.get("warrGubun")) %></TEXTAREA>
  276. <IMG id='search_spot_button' onClick="doAttachFile(document.form1.subContId,1);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:hand;'>
  277. </TD>
  278. </TR>
  279. </TABLE>
  280. </TD>
  281. </TR>
  282. </TABLE>
  283. </FORM>