contOutWarrPopup.jsp 14 KB

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