123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- <%--
- - Author(s) : kyj
- - Date : 2015.01.21
- - 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.udapsoft.common.code.CommCodeManager" %>
- <%@ 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();
-
- RowSet statusRow = CommCodeManager.getCodeRowsetStatic("CONT_STATUS_CD", "CHG_CODE01", "2");
-
- ValueObject sign_info = storage.getValueObject("SIGN_INFO");
- String gwurl = "http://gw.sgcenc.co.kr/";
-
- if(params.get("p_cont_req_status").isEmpty()){
- params.set("p_cont_req_status","00, 01, 03");
- }
- %>
- <SCRIPT language="JavaScript">
- /*예약함수*/
- var sheet1 = new ibsheetObject();
- var sheet1Row;
- var sheet1PageNo = 1;
- var pageLastRowIndex = 1;
- var validationResult = false;
- var filterShow = false;
-
- function _onReady(){
- /**
- * IBSheet object initialize
- */
- gridInit(sheet1);
-
- /**
- * Application Initialize
- */
- $("#btnSearch").click(function() {
- jQuery("#fevent").val("SHEET_SELECT");
- var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/purchase/ContChgRcvList_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();});
- $("#p_build_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("");});
- jQuery("#btnExcel").click(function() {
- if(sheet1.RowCount() == 0) {
- alert("내역이 없습니다.");
- return;
- }
- var params = { FileName : "ContChgRcvList.xls", SheetName : "ContChgRcvList", SheetDesign:0, Merge:1, DownCols:"CON_DOC_NO|MOD_NO|BUILD_NAME|MEMBER_NAME|AFT_SUPP_AMT|CON_CUR_CD"+
- "|CON_DATE|AFT_CONT_DATE|MOD_GB|STATUS_CD", TitleText:"외주_변경계약접수", UserMerge:"0,0,1,10", AutoSizeColumn:1 } ;
- sheet1.Down2Excel(params);
- });
-
- autoResize();
- }
-
- /**
- * IBSheet object initialize
- */
- function gridInit(sheetName){
- var init_sheet = {};
- init_sheet.Cfg = {SearchMode:2, Page:100};
- init_sheet.Cols = [
- {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center", Hidden:"True"},
- {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
- {Header:'변경계약요청ID', Type:"Text", SaveName:"DEMANDED_ID", Width:0, Align:"Center", Hidden:"True"},
- {Header:'외주계약변경ID', Type:"Text", SaveName:"PUR_CONT_MOD_ID", Width:0, Align:"Center", Hidden:"True"},
- {Header:'현장명', Type:"Text", SaveName:"DEPT_NAME", Width:200, Align:"Left" , Edit:"false"},
- {Header:'계약번호', Type:"Text", SaveName:"ORD_DOC_NO", Width:120, Align:"Left", Edit:"false"},
- {Header:'변경차수', Type:"Text", SaveName:"MOD_NO", Width:50, Align:"Center" , Edit:"false"},
- {Header:'☞계약명', Type:"Text", SaveName:"CST_DOC_NAME", Width:200, Align:"Left" , Edit:"false", Cursor:'pointer'},
- {Header:'업체ID', Type:"Text", SaveName:"CORP_ID", Width:50, Align:"Center" , Hidden:"True"},
- {Header:'업체명', Type:"Text", SaveName:"MEMBER_NAME", Width:100, Align:"Left" , Edit:"false"},
- {Header:'계약금액(VAT별도)',Type:"Text", SaveName:"ORD_SUPPLY_AMT", Width:80, Align:"right", Edit:"false"},
- {Header:'통화', Type:"Text", SaveName:"CURRENCY_GB", Width:50, Align:"Center" , Edit:"false"},
- {Header:'계약일자', Type:"Text", SaveName:"ORD_CON_DATE", Width:80, Align:"Center" , Edit:"false"},
- {Header:'계약기간', Type:"Text", SaveName:"ORD_END_DATE", Width:80, Align:"Center", Edit:"false"},
- {Header:'요청구분', Type:"Text", SaveName:"MOD_GB", Width:100, Align:"Left", Edit:"false", Hidden:"True"},
- {Header:'상태', Type:"Text", SaveName:"STATUS_CD", Width:80, Align:"center", Edit:"false", Hidden:"True"},
- {Header:'요청구분', Type:"Text", SaveName:"MOD_NM", Width:100, Align:"Left", Edit:"false"},
- {Header:'상태', Type:"Text", SaveName:"STATUS_NM", Width:80, Align:"center", Edit:"false"},
- ];
- init_sheet.HeaderMode = {Sort:1};
- IBS_InitSheet(sheetName, init_sheet);
- sheetName.SetDataAutoTrim(0);
- sheetName.SetImageList(1,"/img/buyer/button/bt_change.gif");
- sheetName.SetActionMenu("ExcelDown");
- setGridSize();
- }
- /*
- IBSheet Event : Mouse Right Menu
- */
- function sheet1_OnSelectMenu(Text, Code) {
- // text 또는 code값으로 Action수행
- switch(Text) {
- case "ExcelDown":
- jQuery("#btnExcel").click();
- break;
- }
- }
-
- /**
- * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
- */
- function sheet1_OnSearchEnd(code, message) {
- if(code == 0) {
- setGridSize();
- sheet1.SetColFontColor("CST_DOC_NAME", "#0000ff");
- } else {
- //조회 에러 수행
- alert(message);
- }
- }
-
- /**
- * IBSheet Event: Click
- */
- function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
- if(Row == 0)return;
- if (sheet1.ColSaveName(Col) == "CST_DOC_NAME") {
- $("#DEMANDED_ID").val(sheet1.GetCellValue(Row, "DEMANDED_ID"));
- $("#PUR_CONT_MOD_ID").val(sheet1.GetCellValue(Row, "PUR_CONT_MOD_ID"));
- $("#fevent").val("FORM_SELECT");
- $("#form1").attr("action", "/cont/purchase/ContChgRcvDetail.screen");
- $("#form1").attr("target", "_self");
- $("#form1").attr("method", "post");
- $("#form1").submit();
- }
- if (sheet1.ColSaveName(Col) == "IMG_GB") {
- var doc_id = sheet1.GetCellValue(Row, "DOC_ID");
- if(doc_id == ""){
- alert("결재 정보가 없습니다.");
- return;
- }
-
- var doc_chk = doc_id.substring(doc_id.length-3, doc_id.length);
-
- doc_chk = doc_chk * 1;
-
- var link = "";
- var year = sheet1.GetCellValue(Row, "year");
- if ( year > "20151213"){
- link = "<%=gwurl%>upload_approval/TEC/doc/"+ year.substr(0,4) + "/" + doc_chk+"/"+doc_id+".mht";
- }
- else{
- link = "<%=gwurl%>upload_approval/TEC/doc/"+doc_chk+"/"+doc_id+".mht";
- }
-
- window.open(link,"_viewDraft","");
- }
- }
- /**
- * IBSheet size setting
- */
- function setGridSize() {sheet1.FitColWidth();}
-
- function sheet1_OnSmartResize(Width, Height) {
- sheet1.FitColWidth();
- autoResize();
-
- }
- function autoResize(){
- var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
- var iframeHeight= document.body.scrollHeight - t1_height;
- var iframeWidth= document.body.scrollWidth;
-
- sheet1.SetSheetHeight(iframeHeight);
- }
- document.body.onresize = addEvent( document.body.onresize, "autoResize()");
- </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="PUR_CONT_MOD_ID" value="">
- <INPUT type="hidden" name="DEMANDED_ID" value="">
- <INPUT type='hidden' name="acct_id" value="<%= params.get("acct_id") %>">
- <div align="left" id="title">
- <ul>
- <li>구매_변경계약접수</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" />
- <col width="*" />
- <col width="100" />
- </colgroup>
- <tr height="25">
- <th>현장</th>
- <td>
- <%=InputText.getSiteCodeNew("p_dept_cd", "p_dept_nm", "", user, params.get("p_dept_cd"), params.get("p_dept_nm"))%>
- </td>
- <th>계약명</th>
- <td colspan="3">
- <INPUT type="text" name="p_build_nm" class="input" value="<%= params.get("p_build_nm") %>" style="width:95%">
- </td>
- <td class="button" rowspan="2">
- <span class="btnSearch center" id="btnSearch"><a href="javascript:void(0);">검색</a></span>
- <span class="btnSearch center" id="btnExcel"><a href="javascript:void(0);">엑셀</a></span>
- </td>
- </tr>
- <tr>
- <th>업체명</th>
- <td>
- <INPUT type="text" name="p_dealer_nm" class="input" value="<%= params.get("p_dealer_nm") %>" style="width:95%">
- </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>
- <th>상태</th>
- <td>
- <%= HTMLMaker.getSelectTag(statusRow, "DETAILCD", "DETAILNM", "p_cont_req_status", "width:100px;height=18;", "<option value='00, 01, 03'>--전체--</option>", params.get("p_cont_req_status")) %>
- </td>
- </tr>
- </table>
- </form>
- <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 400px; overflow: auto;">
- <script>createIBSheet('sheet1','100%', '400px');</script>
- </div>
|