123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471 |
- <%--
- - Author(s) : Kim Myung Ho
- - Date : 2014.08.11
- - 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.*" %>
- <%@ include file="/jsp/work/taglib.jsp" %>
- <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
- <%@ page import="kr.co.hsnc.common.config.WAFConfig %>
- <%
- String guarUrl = WAFConfig.get("waf.guar.url");
- ctx.init(request, response);
- HandlerStorage storage = ctx.getHandlerStorage();
- ValueObject params = storage.getParams();
- ValueObject user = storage.getUser();
- %>
- <SCRIPT language="JavaScript">
- /*예약함수*/
- var sheet1 = new ibsheetObject();
- var sheet2 = new ibsheetObject();
- var sheet3 = new ibsheetObject();
- var sheet1Row;
- var sheet1PageNo = 1;
- var sheet2Row;
- var sheet2PageNo = 1;
- var pageLastRowIndex = 1;
- var validationResult = false;
- var filterShow = false;
-
- function _onReady(){
- /**
- * IBSheet object initialize
- */
- grid1Init(sheet1);
- grid2Init(sheet2);
- grid3Init(sheet3);
- /**
- * Application Initialize
- */
- $("#btnSearch").click(function() {
- jQuery("#fevent").val("SHEET_SELECT");
- var url = Modular.model.PageContext.CONTEXT_ROOT + "/portal/cont/PayGuarSearch_sheet.screen";
- Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
- });
- $("#p_dept_nm").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == 8){$("#p_dept_cd").val("");$("#p_dept_nm").val("");}});
- $("#p_cont_status").change(function(){$("#btnSearch").click();});
- $("#p_build_nm").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
- $("#p_dealer_nm").keydown(function (event){var keycode = (event.keyCode ? event.keyCode : event.which);if(keycode == 13)$("#btnSearch").click();});
- $("#btnSearch").click();
- $("#dataClear").click(function(){$("#ContFromDt").val("");$("#ContToDt").val("");});
-
- //auto1Resize();
- }
-
- /**
- * IBSheet object initialize
- */
- function grid1Init(sheetName){
- var init_sheet = {};
- init_sheet.Cfg = {SearchMode:2, Page:100};
- init_sheet.Cols = [
- {Header:'현장명', Type:"Text", SaveName:"DEPT_NAME", Width:200, Align:"Left" , Edit:"false"},
- {Header:'☞계약명', Type:"Text", SaveName:"BUILD_NAME", Width:200, Align:"Left" , Edit:"false"},
- {Header:'업체명', Type:"Text", SaveName:"MEMBER_NAME", Width:80, Align:"Left" , Edit:"false", ColMerge:"1", Hidden:"True"},
- {Header:'공사기간', Type:"Text", SaveName:"WORK_START_END_DATE", Width:80, Align:"Center", Edit:"false", ColMerge:"0"},
- {Header:'계약금액', Type:"Text", SaveName:"CON_AMT", Width:80, Align:"right", Edit:"false", ColMerge:"0"},
- {Header:'☞계약번호', Type:"Text", SaveName:"CON_DOC_NO", Width:120, Align:"Left", Edit:"false", Cursor:"pointer"},
- {Header:'변경차수', Type:"Text", SaveName:"MOD_NO", Width:50, Align:"Center", Hidden:"True"},
- {Header:'계약일자', Type:"Text", SaveName:"CON_DATE", Width:80, Align:"Center" , Edit:"false", ColMerge:"0"},
- {Header:'상태', Type:"Combo", SaveName:"STATUS_CD", Width:80, Align:"center", Edit:"false", ComboText:"계약완료", ComboCode:"50", Hidden:"True"},
- {Header:'변경구분', Type:"Text", SaveName:"CAUSECODE_NM", Width:100, Align:"Left", Edit:"false", ColMerge:"0"},
- {Header:'SUB_CONT_MOD_ID', Type:"Text", SaveName:"SUB_CONT_MOD_ID", Width:0, Align:"Center", Hidden:"True"},
- {Header:'SUB_CONT_ID', Type:"Text", SaveName:"SUB_CONT_ID", Width:0, Align:"Center", Hidden:"True"},
-
- ];
- init_sheet.HeaderMode = {Sort:1};
- IBS_InitSheet(sheetName, init_sheet);
- sheetName.SetDataAutoTrim(0);
- sheetName.SetMergeSheet(4);
- setGrid1Size();
- }
-
- /**
- * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
- */
- function sheet1_OnSearchEnd(code, message) {
- if(code == 0) {
- setGrid1Size();
- sheet1.SetColFontColor("CON_DOC_NO", "#0000ff");
- } else {
- //조회 에러 수행
- alert(message);
- }
- }
-
- /**
- * IBSheet Event: Click
- */
- function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
- if ((sheet1.ColSaveName(Col) == "CON_DOC_NO")) {
- var f = document.form1;
- f.isSubmit = false;
- $("#SUB_CONT_MOD_ID").val(sheet1.GetCellValue(Row, "SUB_CONT_MOD_ID"));
- $("#SUB_CONT_ID").val(sheet1.GetCellValue(Row, "SUB_CONT_ID"));
- $("#MOD_NO").val(sheet1.GetCellValue(Row, "MOD_NO"));
- jQuery("#fevent").val("SHEET_WARR");
- var url = Modular.model.PageContext.CONTEXT_ROOT + "/portal/cont/PayGuarSearch_sheet.screen";
- Modular.view.IBSheet7.doSearch(sheet2, url, jQuery("#form1"), 10, "");
- }
- }
-
- /**
- * IBSheet object initialize
- */
- function grid2Init(sheetName){
- var init_sheet = {};
- init_sheet.Cfg = {SearchMode:2, Page:100};
- init_sheet.Cols = [
- {Header:'변경구분', Type:"Text", SaveName:"CAUSECODE_NM", Width:100, Align:"Left" , Edit:"false"},
- {Header:'증서번호', Type:"Text", SaveName:"WARR_WGNO", Width:150, Align:"Left" , Edit:"false"},
- {Header:'발급기관', Type:"Text", SaveName:"WARR_GOFFICE", Width:150, Align:"Left" , Edit:"false"},
- {Header:'보증금액', Type:"Text", SaveName:"WARR_WAMT", Width:100, Align:"right", Edit:"false"},
- {Header:'수수료', Type:"Text", SaveName:"WARR_COMMSN", Width:100, Align:"right", Edit:"false"},
- {Header:'보증기간', Type:"Text", SaveName:"WARR_START_END_DATE", Width:150, Align:"Center", Edit:"false"},
- {Header:'발급일', Type:"Text", SaveName:"PAPERDATE", Width:80, Align:"Center", Edit:"false"},
- {Header:'발급구분', Type:"Combo", SaveName:"GUAR_ONOFF_YN", Width:80, Align:"Center" , Edit:"true", ComboText:"선택|온라인|오프라인|비대상", ComboCode:"|Y|N|F"},
- {Header:'진행상태', Type:"Text", SaveName:"GUAR_STATUS_NM", Width:80, Align:"center", Edit:"false"},
- {Header:'보증신청계약번호', Type:"Text", SaveName:"GRTREQNO", Width:100, Align:"Left", Edit:"false"},
- {Header:'SUB_CONT_MOD_ID', Type:"Text", SaveName:"SUB_CONT_MOD_ID", Width:0, Align:"Center", Hidden:"True"},
- {Header:'WARR_GUBUN', Type:"Text", SaveName:"WARR_GUBUN", Width:0, Align:"Center", Hidden:"True"},
- {Header:'WARR_SEQ', Type:"Text", SaveName:"WARR_SEQ", Width:0, Align:"Center", Hidden:"True"},
- {Header:'CAUSECODE', Type:"Text", SaveName:"CAUSECODE", Width:0, Align:"Center", Hidden:"True"},
- {Header:'보증등록', Type:"Image", SaveName:"BTN", Width:80, Align:"Center", Edit:"false", Cursor:"Pointer"},
- {Header:'비고', Type:"Text", SaveName:"WARR_GREM", Width:100, Align:"Left", Edit:"false"},
- {Header:'Status', Type:"Status", SaveName:"STATUS", Width:50, Align:"Center", Hidden:"True"},
- {Header:'진행상태', Type:"Text", SaveName:"GUAR_STATUS", Width:50, Align:"Center", Hidden:"True"},
- {Header:'수신기관', Type:"Text", SaveName:"WARR_GOFFICE_ID", Width:50, Align:"Center", Hidden:"True"},
-
- ];
-
- init_sheet.HeaderMode = {Sort:1};
- IBS_InitSheet(sheetName, init_sheet);
- sheetName.SetDataAutoTrim(0);
- sheetName.SetImageList(1,"/img/buyer/btn/btn_write.gif");
- sheetName.SetImageList(2,"/img/buyer/btn/error_detail_plus.gif");
- setGrid2Size();
- }
-
- function sheet2_OnSearchEnd(code, message) {
- if(code == 0) {
- for(var i=1; i<=sheet2.RowCount(); i++){
- if((sheet2.GetCellValue(i,"GUAR_STATUS")=="08") || (sheet2.GetCellValue(i,"GUAR_STATUS")=="09")){
- sheet2.SetCellEditable(i,"GUAR_ONOFF_YN",0);
- }
- }
- } else {
- //조회 에러 수행
- //alert(message);
- //alert("상세조회 실패");
- }
- }
- /**
- * IBSheet Event: Click
- */
- function sheet2_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
- popContWarr(sheet2.GetCellValue(Row, "WARR_GUBUN"),sheet2.GetCellValue(Row, "WARR_SEQ"),sheet2.GetCellValue(Row, "CAUSECODE"),sheet2.GetCellValue(Row, "GUAR_ONOFF_YN"),sheet2.GetCellValue(Row, "GUAR_STATUS"),sheet2.GetCellValue(Row, "WARR_GOFFICE_ID"),sheet2.GetCellValue(Row, "GRTREQNO"))
- }
- function sheet2_OnSaveEnd(code, msg)
- {
- var event = $("#fevent").val();
- if(event == "NOT_GUAR_SAVE"){
- if(code>= "0"){
- alert("저장 되었습니다.")
- }
- }else{
- if(code>= "0"){
- alert("저장되었습니다.");
- refresh();
- }else{
- alert("저장실패.");
- }
- }
- }
- /**
- * IBSheet Event Change
- */
- function sheet2_OnChange(Row, Col, Value, OldValue, RaiseFlag) {
- var comboValue = sheet2.GetCellValue(Row,"GUAR_ONOFF_YN");
- if(comboValue == "F" ){
- sheet2.SetCellImage(Row ,"BTN", "/img/buyer/btn/btn_write.gif");
- sheet2.SetCellEditable(Row,"WARR_GREM",1);
- return;
- }else{
- sheet2.SetCellImage(Row ,"BTN", "/img/buyer/btn/btn_grd_add.gif");
- sheet2.SetCellValue(Row,"WARR_GREM","");
- sheet2.SetCellEditable(Row,"WARR_GREM",0);
- }
- }
-
- function grid3Init(sheetName){
- var init_sheet = {};
- init_sheet.Cfg = {SearchMode:2, Page:100};
- init_sheet.Cols = [
- {Header:'현장명', Type:"Text", SaveName:"DEPT_NAME", Width:150, Align:"Left" , Edit:"false"},
- {Header:'공종명', Type:"Text", SaveName:"OUT_ITEM", Width:150, Align:"Left" , Edit:"false"},
- {Header:'업체명', Type:"Text", SaveName:"CONT_NAME", Width:100, Align:"Left", Edit:"false"},
- {Header:'계약금액(VAT포함)', Type:"Text", SaveName:"CON_AMT", Width:100, Align:"right", Edit:"false"},
- {Header:'수수료금액', Type:"Text", SaveName:"WARR_AMT", Width:150, Align:"right", Edit:"false"},
- {Header:'계약기간', Type:"Text", SaveName:"DUR_DATE", Width:180, Align:"Center", Edit:"false"},
- {Header:'발행날짜', Type:"Text", SaveName:"WARR_DATE", Width:80, Align:"Center" , Edit:"false"},
-
- ];
- init_sheet.HeaderMode = {Sort:1};
- IBS_InitSheet(sheetName, init_sheet);
- sheetName.SetDataAutoTrim(0);
- setGrid3Size();
- }
-
- function sheet3_OnSearchEnd(code, message) {
- if(code == 0) {
-
- } else {
- //조회 에러 수행
- alert("상세조회 실패");
- }
- }
- function setGrid3Size() {sheet3.FitColWidth();}
- function sheet3_OnSmartResize(Width, Height) {
- sheet3.FitColWidth();
- //auto3Resize();
- }
- function auto3Resize(){
- var t1_height = document.getElementById("t1").scrollHeight + 10;
- var iframeHeight= document.body.scrollHeight - t1_height;
- var iframeWidth= document.body.scrollWidth;
- sheet3.SetSheetHeight(iframeHeight);
- }
- /**
- * IBSheet size setting
- */
- function setGrid1Size() {sheet1.FitColWidth();}
- function setGrid2Size() {sheet2.FitColWidth();}
- function sheet1_OnSmartResize(Width, Height) {
- sheet1.FitColWidth();
- //auto1Resize();
-
- }
- function auto1Resize(){
- var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 180;
- var iframeHeight= document.body.scrollHeight - t1_height;
- var iframeWidth= document.body.scrollWidth;
-
- sheet1.SetSheetHeight(iframeHeight);
- }
-
- function sheet2_OnSmartResize(Width, Height) {
- sheet2.FitColWidth();
- //auto2Resize();
-
- }
- function auto2Resize(){
- var t1_height = document.getElementById("t1").scrollHeight + 10;
- var iframeHeight= document.body.scrollHeight - t1_height;
- var iframeWidth= document.body.scrollWidth;
-
- sheet2.SetSheetHeight(iframeHeight);
- }
- //자동로그인 기능
- function f_gologin(login_id,login_pw){
- var f = document.form1;
- if('<%= user.get("ACCT_TYPE_CODE")%>' != "ADMIN"){
- dlgAlert("User who logged in as administrator only can do automatic log-in.");
- return;
- }
-
- f.login_id.value = login_id;
- f.login_pw.value = login_pw;
-
- if( !submitXmlRequest("/sign_on_check", "", document.form1) ) {
- alert("Log-in is being processed.");
- };
-
- }
- function doAttachFilePop(obj, No, fObj, fileGB, fileDir) {
- var editFile = "";
- if(obj==''){
- alert("After you have saved, you can attach a file.");
- }
- else if(obj != ''){
- if(fObj.guarStatus.value != "02"){editFile="N";}else{editFile="N";}
- if(No=="1"){
- viewFileListNew(fileGB, obj.value, fObj.p_AttachFileGuar1, editFile, fileDir, "subconPayOutOffPopup");
- }else{
- viewFileListNew(fileGB, obj.value, fObj.p_AttachFileGuar2, editFile, fileDir, "subconPayOutOffPopup");
- }
- }
- }
- //보증정보팝업 호출
- function popContWarr(wG, wSeq, wCauseCd, wOnOff, wGStatus, wOffid, wConRefNo) {
- var win_id = "subconPayOutOffPopup";
- var param = "";
- var param = "?subContModId=" + jQuery("#SUB_CONT_MOD_ID").val();
- var param = param + "&warrGubun=" + wG;
- var param = param + "&warrSeq=" + wSeq;
- var param = param + "&causeCode=" + wCauseCd;
- var param = param + "&viewDiv=SUBCONPAY";
- var param = param + "&pop_win_id=" + win_id;
- var url = "";
- if (wOnOff == ""){
- alert("발급구분을 선택해 주세요.");return;
- }
- if(wOnOff=="N"){
- var param = param + "&fevent=WARR_OFF&USER=CORP"; //업체는 조회만.
- url = "/portal/guar/subconPayOutOffPopup.screen"+param;
- fLayerPop(win_id, url, 560,500, '','', 'YES');
- }else if(wOnOff=="Y"){
- if((wGStatus=="08") || (wGStatus=="09")){
- var sGuarKind = wG; //보증서종류
- var sGuarSeq = wSeq; //일련번호
- var sGuarOnoffYn = wOnOff; //온오프여부
- var sGuarStatus = wGStatus; //보증진행상태
- var sChgNo = jQuery("#MOD_NO").val(); //계약차수
- var style = "";
- var src = "";
- var sGrtType = "006"; // 보증종목구분 : 지급
- //검토대기나 완료일경우
- if(sGuarOnoffYn == "Y" && sGuarStatus.length > 0 && (sGuarStatus == "08" || sGuarStatus == "09")){
- var sOffId = wOffid; // 수신기관 ID
- var conRefNo = wConRefNo; // 계약번호
- var sGrtSeq = wSeq; // 보증차수
- var sMsgFuncCode = "53"; // 문서기능
- var sModule = "EB"; // 모듈구분코드
-
- if(sChgNo == "")
- sChgNo = "00";
- else if(sChgNo.length == 1)
- sChgNo = "0" + sChgNo;
-
- if(sGrtSeq.length == 1)
- sGrtSeq = "0" + sGrtSeq;
-
- //parameter 확인 요함
- src = "<%=guarUrl%>/transure/view/KSCFCView.jsp?offID="+sOffId+"&conRefNo="+conRefNo+"&conSeqNo="+sChgNo+"&grtSeq="+sGrtSeq+"&grtType="+sGrtType+"&msgFuncCode="+sMsgFuncCode+"&module="+sModule;
- style = "width=720,height=800, loactionbar=visible, menubar=visible, scrollbars=no";
- }
- //alert(src);
- var id = "WARR";
- var clNew = window.open(src,id,style);
-
- if(clNew == null){
- alert(" ▒【보증신청】페이지는 팝업창으로 구성되어 있습니다. ▒\n\n\n'팝업이 차단되었습니다. 팝업 또는 추가 옵션을 보려면 여기를 클릭하십시오.' 라는\n\n 메세지가 보일경우에는 그 메세지를 클릭하셔서 '현재 사이트의 팝업을 항상 허용'이나\n\n'임시로 팝업허용'으로 설정해주시기 바랍니다.");
- }else{
- clNew.focus();
- }
- }else{ //온라인 처음 등록
- var param = param + "&fevent=WARR_ON";
- var param = param + "&SUB_CONT_ID=" + jQuery("#SUB_CONT_ID").val();
- var param = param + "&MOD_NO=" + jQuery("#MOD_NO").val();
- url = "/portal/guar/subconPayOutOnPopup.screen"+param;
- fLayerPop(win_id, url, 800,700, '','', 'YES');
- }
- }
- }
- //보증정보팝업 종료후 액션
- function popContWarrClose(returnValue){
- if(returnValue == null){
- fLayerPopClose('subconPayOutOffPopup');
- }else{
- if(returnValue[0] == 0){
- fLayerPopClose('subconPayOutOffPopup');
- var f = document.form1;
- f.isSubmit = false;
- $("#SUB_CONT_MOD_ID").val(returnValue[2]);
- jQuery("#fevent").val("SHEET_WARR");
- var url = Modular.model.PageContext.CONTEXT_ROOT + "/portal/cont/PayGuarSearch_sheet.screen";
- Modular.view.IBSheet7.doSearch(sheet2, url, jQuery("#form1"), 10, "");
- }
- }
- }
-
- document.body.onresize = addEvent( document.body.onresize, "auto1Resize()");
- </SCRIPT>
- <modular:search id="form1">
- <modular:key id="fevent" />
- </modular:search>
- <form id="form1" name="form1" method="post" modular:type="search">
- <INPUT type="hidden" name="fevent" id="fevent" value="">
- <INPUT type="hidden" name="SUB_CONT_MOD_ID" value="">
- <INPUT type="hidden" name="SUB_CONT_ID" value="">
- <INPUT type="hidden" name="MOD_NO" value="">
- <INPUT type='hidden' name="acct_id" value="<%= params.get("acct_id") %>">
- <INPUT type='hidden' name="p_cont_status" value="50">
- <div align="left" id="title">
- <ul>
- <li><%= storage.getPgmName() %></li>
- </ul>
- </div>
- <!-- 검색조건 시작 -->
- <table id="search-table" class="search-form-table">
- <colgroup>
- <col width="100" />
- <col width="*" />
- <col width="100" />
- <col width="*" />
- <col width="100" />
- </colgroup>
- <tr height="25">
- <th>현장</th>
- <td>
- <INPUT type="text" name="p_dept_nm" id="p_dept_nm" class="input" value="<%=params.get("p_dept_nm") %>" style="width:90%">
- </td>
- <th>계약명</th>
- <td>
- <INPUT type="text" name="p_build_nm" id="p_build_nm" class="input" value="<%= params.get("p_build_nm") %>" style="width:90%">
- </td>
- <th>계약기간</th>
- <td>
- <%= InputText.get("ContFromDt", params.get("ContFromDt"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
- <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('ContFromDt');">
- ~
- <%= InputText.get("ContToDt", params.get("ContToDt"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
- <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('ContToDt');">
- <IMG name="dataClear" id="dataClear" src="/img/buyer/button/bt_eraser1.gif" border="0" align="absmiddle" style="cursor:pointer;">
- </td>
- <td class="button">
- <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
- </td>
- </tr>
- </table>
- </form>
- <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 315px; overflow: auto;">
- <script>createIBSheet('sheet1','100%', '300px');</script>
- </div>
- <div class="application-info magT15">
- <div class="application-sub-title">
- <span class="title">하도급대금 지급보증 정보</span>
- </div>
- <div style="text-align:right;">
- <!-- span class="btnSearch center"><a href="javascript:void(0);" id="btnAdd">추가</a></span> -->
- </div>
- </div>
- <div id="sheet2_div" style="padding-top:5px; height: auto; min-height: 130px; overflow: auto;">
- <script>createIBSheet('sheet2','100%', '130px');</script>
- </div>
- <div id="sheet3_div" style="padding-top:5px; height: auto; min-height: 130px; overflow: auto; display:none;">
- <script>createIBSheet('sheet3','100%', '130px');</script>
- </div>
|