123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411 |
- <%--
- - FileName : conOutWarrPopup.jsp
- - Author(s) : ok
- - Date : 2014.06.26
- - Copyright : Copyright (c) 2013 www.udapsoft.co.kr, Inc.
- - Description: 협력업체포탈 보증증권정보 입력 팝업
- --%>
- <%@ page contentType="text/html; charset=utf-8" %>
- <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
- <%@ page import="com.udapsoft.waf.common.ui.*" %>
- <%@ page import="kr.co.hsnc.common.util.*"%>
- <%@ page import="kr.co.hsnc.common.sql.*" %>
- <%@ page import="kr.co.hsnc.common.util.Formatter"%>
- <%@ include file="/jsp/work/taglib.jsp" %>
- <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
- <%
- ctx.init(request, response);
- HandlerStorage storage = ctx.getHandlerStorage();
- ValueObject params = storage.getParams();
- ValueObject user = storage.getUser();
- String event = storage.getEvent();
-
- RowSet WarrGofficeComboList = storage.getRowSet("WarrGofficeComboList"); //보증기관 ComboList Data
- ValueObject contOutWarr = storage.getValueObject("contOutWarr"); //보증정보
- ValueObject attfile = storage.getValueObject(params.get("warrGubun")); //첨부파일
-
- String check1 = "";
- String check2 = "";
- if("1".equals(contOutWarr.get("GUAR_ONOFF_YN"))){
- check1 = "checked";
- }else{
- check2 = "checked";
- }
-
- %>
- <SCRIPT language="JavaScript">
- /*예약함수*/
- var sheet1;
- var sheet1Row;
- var sheet1PageNo = 1;
- var pageLastRowIndex = 1;
- var validationResult = false;
- var filterShow = false;
-
- function _onReady(){
- jQuery("#btnSave").click(function() {
-
- var f = document.form1;
- jQuery("#fevent").val("SAVE_DATA");
- //필수 입력항목 check
- if(requiredItemsCheck() == false){
- return;
- }
- //입력데이터 저장
- if (confirm("저장 하시겠습니까?")) {
-
- //if(jQuery("#warrGubun").val() == "1"){ // 01:선급금보증 저장
- submitXmlRequest("/portal/payment/ContOutWarrPopup_form.screen", "SAVE_DATA", f, "SUCCESS");
- //}
- }
- });
-
- jQuery("#btnSend").click(function() {
-
- var f = document.form1;
- jQuery("#fevent").val("REQ_DATA");
- //필수 입력항목 check
- if(requiredItemsCheck() == false){
- return;
- }
-
- //입력데이터 저장
- if (confirm("보증서전송 하시겠습니까?")) {
- submitXmlRequest("/portal/payment/ContOutWarrPopup_form.screen", "REQ_DATA", f, "SUCCESS");
- }
-
-
- });
- jQuery("#btnClose").click(function() {
-
- parent.callback_getContWarr();
-
- });
-
- pageinit();
-
- }
-
- //페이지 초기처리
- function pageinit(){
- //기성신청상세의 상태값에 따른 버튼 컨트롤
- btnCtr();
-
- //보증기관명이 기타일때 사용자 입력 항목 활성화
- inputDataSet();
-
- }
-
- //화면에 버튼 항목 컨트롤
- function btnCtr(){
-
- if(jQuery("#viewOnly").val() == "Y"){
-
- jQuery("#btnSave").hide(); //저장 버튼 숨김
- jQuery("#btnSend").hide(); //보증서전송 버튼 숨김
- }
-
- }
-
- //저장 및 선급금전송 시 필수항목 Check
- function requiredItemsCheck(){
-
- var warrGoffice = jQuery("#warrGoffice option:selected").val();
- if(warrGoffice == "9"){ //기타일때
- if(jQuery("#warrGofficeEtc").val() == ""){
- alert("필수입력입니다.");
- jQuery("#warrGofficeEtc").focus();
- return false;
- }
- }
-
- if(jQuery("#warrWgon").val() == ""){ //증권번호
- alert("필수입력입니다.");
- jQuery("#warrWgon").focus();
- return false;
- }
-
- if(jQuery("#dateStart").val() == ""){ //보증기간 시작일
- alert("필수입력입니다.");
- jQuery("#dateStart").focus();
- return false;
- }
- if(jQuery("#dateEnd").val() == ""){ //보증기간 종료일
- alert("필수입력입니다.");
- jQuery("#dateEnd").focus();
- return false;
- }
- if(jQuery("#warrWamt").val() == ""){ //보증금액
- alert("필수입력입니다.");
- jQuery("#warrWamt").focus();
- return false;
- }
- if(jQuery("#paperDate").val() == ""){ //발급일
- alert("필수입력입니다.");
- jQuery("#paperDate").focus();
- return false;
- }
- if(jQuery("#fevent").val() == "REQ_DATA"){ //보증서전송일때는
- if(jQuery("#p_AttachFile1").val() == ""){ //첨부파일
- alert("보증정보 첨부파일은 필수입력입니다.");
- jQuery("#search_spot_button").click();
- return false;
- }
- }
-
- return true;
-
- }
-
- function doResult(resultObj) {
- try {
-
- if( resultObj.getRequestEvent() == "SAVE_DATA" ) {
- if( resultObj.getSuccess() ) {
- alert("저장되었습니다.");
-
- document.form1.isSubmit = false;
- //searchData();
-
- }else {
-
- dlgErrorMsg(resultObj);
- }
- document.form1.isSubmit = false;
- }
-
- if( resultObj.getRequestEvent() == "GET_DATA" ) {
-
- if( resultObj.getSuccess() ) {
-
- /* var subContModId = resultObj.getValueObject().get("SUB_CONT_MOD_ID");
- jQuery("#subContModId").val(subContModId); */
-
- }else {
- dlgErrorMsg(resultObj);
- }
- document.form1.isSubmit = false;
- }
- }
- catch(errorObject) {
- showErrorDlg("doResult()", errorObject);
- }
- }
- function doKeyPress() {
-
- if( event.keyCode == 13 ) {
- doSearch(document.all.sheet1)
- }
- }
- function calendar(thisDayObj){
- dlgCalendar(thisDayObj);
- }
- //첨부파일
- function doAttachFile(obj,No) {
-
- /* alert("obj.value="+obj.value);
- alert("No="+No); */
-
- if(obj.value == ''){
- alert("데이터를 저장 후, 파일을 첨부할 수가 있습니다.");
- }
- else if(obj.value != ''){
- var gubunStr = jQuery("#warrGubun").val();
- var upLoadFlg = "Y";
- if(jQuery("#viewOnly").val() == "Y"){ //기성정보가 03기성시청상태, 10기성완료상태일때는 첨부파일 읽기전용
- upLoadFlg = "N";
- }
- viewFileListNew(gubunStr, obj.value, document.form1.p_AttachFile1, upLoadFlg, "cont/cont-1001");
- }
-
- }
-
- function searchData(){
-
- var f = document.form1;
- jQuery("#fevent").val("GET_DATA");
- submitXmlRequest("/portal/payment/ContOutWarrPopup_form.screen", "GET_DATA", f, "VALUEOBJECT");
- }
- function inputDataSet(){
-
- if(jQuery("#warrGoffice option:selected").val() == "9"){ //기타
- jQuery("#warrGofficeEtc").attr("readonly",false);
- jQuery("#warrGofficeEtc").css({'background-color' : '#ffffff'});
- jQuery("#warrGofficeEtc").css({'border' : '1px solid #595a5a'});
- }else{
- jQuery("#warrGofficeEtc").attr("readonly",true);
- jQuery("#warrGofficeEtc").css({'background-color' : '#dedede'});
- jQuery("#warrGofficeEtc").css({'border' : '1px solid #bcbcbc'});
-
- }
- }
-
-
-
- </SCRIPT>
- <modular:search id="form1">
- <modular:key id="fevent" />
- </modular:search>
- <form id="form1" name="form1" method="post" modular:type="search">
- <TABLE border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
- <INPUT type="hidden" name="fevent" id="fevent" value="">
- <INPUT type="hidden" name="warrContId" id="warrContId" value="<%=params.get("subContModId") %>"> <!-- 보증증권 ID -->
- <INPUT type="hidden" name="warrGubun" id="warrGubun" value="<%=params.get("warrGubun") %>"> <!-- 보증증권 구분 -->
- <INPUT type="hidden" name="warrSeq" id="warrSeq" value="<%=params.get("warrSeq") %>"> <!-- 보증증권 일련번호 -->
- <INPUT type="hidden" name="viewOnly" id="viewOnly" value="<%=params.get("viewOnly") %>"> <!-- 보증팝업 읽기전용Flg -->
- <%-- <INPUT type="hidden" name="subContModId" id="subContModId" value="<%=contOutWarr.get("SUB_CONT_MOD_ID") %>"> --%>
- <TR height="1">
- <TD>
- <TABLE class="screen_title_table" border="0">
- <TR height="25">
- <TD width="16" valign="middle"><IMG src="/img/buyer/button/subtitle_bullet.gif" ></TD>
- <TD width="55%" class="screen_title_text">협력업체포탈 보증정보</TD>
- <TD width="*" rowspan="3" class="search_button">
- <!-- 검색버튼 영역 : 시작 -->
- <TABLE border="0" cellpadding="0" cellspacing="0" align="center">
- <TR>
- <TD>
- <DIV id="btnSave" class="button_style">
- <TABLE border="0" cellpadding="0" cellspacing="0">
- <TR>
- <TD class="button_left1"></TD>
- <TD class="button_text1">저장 </TD>
- <TD class="button_right"></TD>
- </TR>
- </TABLE>
- </DIV>
- </TD>
- <TD width="5"></TD>
- <TD>
- <DIV id="btnSend" class="button_style">
- <TABLE border="0" cellpadding="0" cellspacing="0">
- <TR>
- <TD class="button_left1"></TD>
- <TD class="button_text1">보증서전송 </TD>
- <TD class="button_right"></TD>
- </TR>
- </TABLE>
- </DIV>
- </TD>
- <TD width="5"></TD>
- <TD>
- <DIV id="btnClose" class="button_style">
- <TABLE border="0" cellpadding="0" cellspacing="0">
- <TR>
- <TD class="button_left1"></TD>
- <TD class="button_text1">닫기 </TD>
- <TD class="button_right"></TD>
- </TR>
- </TABLE>
- </DIV>
- </TD>
- </TR>
- </TABLE>
- <!-- 검색버튼 영역 : 종료 -->
- </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- <!-- 데이터 상세 : 시작 -->
- <TR height="1">
- <TD>
- <!-- 보증정보 : 시작 -->
- <TABLE cellspacing="1" cellpadding="0" class="search_table" border="0" width="100%" height="100%">
- <colgroup>
- <col width="25%">
- <col width="40%">
- <col width="*">
- </colgroup>
- <TR height="25">
- <TD class="insert_table_title required"> 발행방법</TD>
- <TD class="insert_table_data" colspan="2">
- <input type="radio" name="chk_info" value="1" onclick="" <%= check1 %> >온라인
- <input type="radio" name="chk_info" value="2" onclick="" <%= check2 %> >오프라인
- </TD>
- </TR>
- <TR height="25">
- <TD class="insert_table_title"> 발행구분</TD>
- <TD class="insert_table_data" colspan="2"> <%= InputText.get("warrGubunNm", "선급금보증", 50, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %></TD>
- </TR>
- <TR height="25">
- <TD class="insert_table_title required"> 보증기관명</TD>
- <TD class="insert_table_data" colspan="2"> <%= HTMLMaker.getSelectTag(WarrGofficeComboList, "DETAILCD", "DETAILNM", "warrGoffice", "width:35%;height=18;' onChange='inputDataSet();", "", contOutWarr.get("WARR_GOFFICE")) %>
- <%= InputText.get("warrGofficeEtc", "", 30, 40, "string, left", "string") %>
- </TD>
- </TR>
- <TR height="25">
- <TD class="insert_table_title"> 변경구분</TD>
- <TD class="insert_table_data" colspan="2"> <%= InputText.get("xxxxxxxx", "당초", 50, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %></TD>
- </TR>
- <TR height="1">
- <TD>
- <TABLE border="0" cellspacing="0" cellpadding="0" class="search_data_div_height">
- <TR>
- <TD></TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- <TR height="25">
- <TD class="insert_table_title required"> 증권번호</TD>
- <TD class="insert_table_data" colspan="2"> <%= InputText.get("warrWgon", contOutWarr.get("WARR_WGNO"), 55, 38, "string, left", "string") %></TD>
- </TR>
- <TR height="25">
- <TD class="insert_table_title required"> 보증기간</TD>
- <TD class="insert_table_data" colspan="2">
- <%= InputText.get("dateStart", Formatter.formatDate(contOutWarr.get("WARR_SDATE"), "-"), 29, 10, "Center, date, PerSize, readonly", "date", "") %>
- <A href="JavaScript:calendar('dateStart');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
- ~
- <%= InputText.get("dateEnd", Formatter.formatDate(contOutWarr.get("WARR_EDATE"), "-"), 29, 10, "Center, date, PerSize, readonly", "date", "") %>
- <A href="JavaScript:calendar('dateEnd');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
- </TD>
- </TR>
- <TR height="25">
- <TD class="insert_table_title required"> 보증금액</TD>
- <TD class="insert_table_data" colspan="2"> <%= InputText.get("warrWamt", Formatter.formatCurrency(contOutWarr.get("WARR_WAMT")), 55, 14, "class=input byteChk ,number, right", "number") %></TD>
- </TR>
- <TR height="25">
- <TD class="insert_table_title"> 발급일</TD>
- <TD class="insert_table_data" colspan="2">
- <%= InputText.get("paperDate", Formatter.formatDate(contOutWarr.get("PAPERDATE"), "-"), 29, 10, "Center, date, PerSize, readonly", "date", "") %>
- <A href="JavaScript:calendar('paperDate');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
- </TD>
- </TR>
- <TR height="25">
- <TD class="insert_table_title"> 첨부파일</TD>
- <TD class="insert_table_data" colspan="2"> <TEXTAREA name="p_AttachFile1" id="p_AttachFile1" style="width:82%;height:90%;" rows="4" class="input" readOnly><%=attfile.get(params.get("warrGubun")) %></TEXTAREA>
- <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;'>
- </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- </TABLE>
- </FORM>
|