123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- <%--
- - FileName : prepayRequestList.jsp
- - Author(s) : chj
- - Date : 2014.07.28
- - Copyright : Copyright (c) 2014 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();
-
- //검색조건 현장 설정
- String initSearchDeptCd = params.get("searchDeptCd");
- String initSearchDeptNm = params.get("searchDeptNm");
-
- String dept_cd = params.get("searchDeptCd");
- String dept_nm = params.get("searchDeptNm");
-
- //검색조건 작성일
- //String initSearchDateStart = params.get("searchDateStart");
- //String initSearchDateEnd = params.get("searchDateEnd");
-
- String pageDiv = params.get("pageDiv"); //1:조달 2:포탈
-
- %>
- <SCRIPT language="JavaScript">
- /*예약함수*/
- var sheet1;
- var sheet1Row;
- var sheet1PageNo = 1;
- var pageLastRowIndex = 1;
- var validationResult = false;
- var filterShow = false;
-
- function _onReady(){
- /**
- * IBSheet object initialize
- */
- gridInit(sheet1);
-
-
- /**
- * Application Initialize
- */
-
- jQuery("#btnCreate").click(function() {
-
- if(sheet1.RowCount("U") == 0){
- alert("신규생성할 선급금 대상건을 선택하세요.");
- return;
- }
-
- if (confirm("선급금을 생성 하시겠습니까?")) {
- jQuery("#fevent").val("SAVE_DATA");
-
- var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/purchase/PrepayRequestList_sheet.screen";
- var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
- }
- });
-
- jQuery("#btnClose").click(function() {
- //setTimeout(function(){parent.searchAccDeptClose(null);},100);
- parent.PurchaseRequestPopupClose();
- });
- jQuery("#btnSearch").click(function() {
- searchData();
- });
-
- pageinit();
-
- }
-
- function pageinit(){
-
- //검색조건의 작성일 일자 설정
- setSearchDate();
-
- //데이터 조회
- searchData();
-
- //1:조달, 2:포탈
- if(jQuery("#pageDiv").val() == "2"){
- sheet1.SetColHidden(5, 1); //업체명 숨김
- }
- }
-
- /**
- * IBSheet object initialize
- */
- function gridInit(sheetName){
- var init_sheet = {};
- init_sheet.Cfg = {SearchMode:2, Page:30, MergeSheet:msHeaderOnly};
- init_sheet.Cols = [
- {Header:'상태', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
- {Header:'선택', Type:"CheckBox", SaveName:"CHECKBOX", Width:40, Align:"Center"},
- {Header:'현장코드', Type:"Text", SaveName:"DEPT_CD", Width:50, Align:"Left", Hidden:"True"},
- {Header:'현장명', Type:"Text", SaveName:"DEPT_NM", Width:110, Align:"Left", Edit:"False", Hidden:"True"},
- {Header:'계약번호', Type:"Text", SaveName:"ORD_DOC_NO", Width:100, Align:"Left", Edit:"False"},
- {Header:'차수', Type:"Text", SaveName:"MOD_NO", Width:20, Align:"Center", Edit:"False"},
- {Header:'계약명', Type:"Text", SaveName:"CST_DOC_NAME", Width:110, Align:"Left", Edit:"False"},
- {Header:'업체명', Type:"Text", SaveName:"CORP_KOR", Width:110, Align:"Left", Edit:"False"},
- {Header:'통화', Type:"Text", SaveName:"CURRENCY_GB", Width:40, Align:"Center", Edit:"False"},
- {Header:'계약금액', Type:"Text", SaveName:"ORD_SUPPLY_AMT", Width:80, Align:"Right", Edit:"False"},
- {Header:'PUR_CONT_ID', Type:"Text", SaveName:"PUR_CONT_ID", Width:80, Align:"Center", Hidden:"True"},
- {Header:'PUR_CONT_MOD_ID', Type:"Text", SaveName:"PUR_CONT_MOD_ID", Width:80, Align:"Center", Hidden:"True"},
- ];
- init_sheet.HeaderMode = {Sort:1};
- IBS_InitSheet(sheetName, init_sheet);
- sheetName.SetDataAutoTrim(0);
- sheetName.SetEditable(true);
- sheetName.SetActionMenu("ExcelDown");
- setGridSize();
- }
- function sheet1_OnSelectMenu(Text, Code) {
- // text 또는 code값으로 Action수행
- switch(Text) {
- case "ExcelDown":
- sheetExcelDown(sheet1,$('li').html());
- break;
- }
- }
-
- /**
- * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
- */
- function sheet1_OnSearchEnd(code, message) {
- if(code == 0) {
- setGridSize();
- } else {
- //조회 에러 수행
- alert(message);
- }
- }
-
- /**
- * IBSheet Event: Save End(IBSheet 데이터 저장 CallBack)
- */
- function sheet1_OnSaveEnd(code, msg) {
- if(code >= 0) {
- //alert("신규로 대금건이 생성되었습니다. \n\n 외주_기성현황에서 확인 하실수 있습니다.");
- alert("신규 선급금건이 생성되었습니다.");
- } else {
-
- alert("생성실패 하였습니다.");
- }
- //searchData();
- searchClose();
- }
-
- /**
- * IBSheet Event: Click
- */
- function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
- //masterSheetRow = Row;
- }
-
- /**
- * IBSheet size setting
- */
- function setGridSize() {
- sheet1.FitColWidth();
- }
-
- /**
- * IBSheet Event: DBLCLICK
- */
- function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
- }
-
- function doKeyPress() {
- if( event.keyCode == 13 ) {
- jQuery("#btnSearch").click();
- }
- }
-
- function calendar(thisDayObj){
- dlgCalendar(thisDayObj);
-
- }
-
- function searchData(){
- jQuery("#fevent").val("GET_LIST");
- var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/purchase/PrepayRequestList_sheet.screen";
- Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
- }
- function searchClose(){
- parent.PurchaseRequestPopupClose();
- }
-
- function sheet1_OnSmartResize(Width, Height) {
- sheet1.FitColWidth();
- }
-
- //검색 조건에 작성일 일자 설정
- function setSearchDate(){
-
- /* //검색조건 시작일
- var startDate = get_year() +'-'+ get_month() +'-'+ '01';
- if(jQuery('#searchDateStart').val() == ""){
- jQuery('#searchDateStart').val(startDate);
- }
-
- //검색조건 종료일
- var nowYearMonth = new Date( get_year(), get_month(), "");
- var lastDay = nowYearMonth.getDate();
- var endDate = get_year() +'-'+ get_month() +'-'+ lastDay;
- if(jQuery('#searchDateEnd').val() == ""){
- jQuery('#searchDateEnd').val(endDate);
- } */
- }
- </SCRIPT>
- <modular:search id="form1">
- <modular:key id="fevent" />
- </modular:search>
- <BODY>
- <form id="form1" name="form1" method="post" modular:type="search">
- <INPUT type="hidden" name="fevent" id="fevent" value="">
- <INPUT type="hidden" name="pageDiv" id="pageDiv" value="<%=params.get("pageDiv")%>"> <!-- //1:조달 2:포탈 -->
- <INPUT type="hidden" name="userCorpId" id="userCorpId" value="<%=user.get("CORP_ID")%>">
-
- <!-- 검색조건 영역 : 시작 -->
- <table class="search-form-table" style="width: 100%">
- <colgroup>
- <col width="8%" />
- <col width="35%" />
- <col width="8%" />
- <col width="*" />
- <col width="25%" />
- </colgroup>
- <TR height="25">
- <!-- 검색조건 타이틀 1 -->
- <TH>현장</TH>
- <TD>
- <%=InputText.getSiteCodeNew("searchDeptCd", "searchDeptNm", "", user, dept_cd, dept_nm)%>
- </TD>
- <th>계약명</th>
- <td>
- <input name="searchCstNm" class="input" id="searchCstNm" type="text" style="width: 95%; value="" onkeypress="javascript:doKeyPress() "/>
- </td>
- <TD class="button" rowspan="2">
- <!-- 검색버튼 영역 : 시작 -->
- <span class="btnSearch center"><a href="javascript:void(0);" id="btnSearch">검색</a></span>
- <span class="btnSearch center"><a href="javascript:void(0);" id="btnCreate">신규 선급금 생성</a></span>
- <span class="btnSearch center"><a href="javascript:void(0);" id="btnClose">닫기</a></span>
- <!-- 검색버튼 영역 : 종료 -->
- </TD>
- </TR>
- <TR height="25">
- <!-- 검색조건 타이틀 1 -->
- <th>업체명</th>
- <td colspan="3">
- <input name="searchCorpKor" class="input" id="searchCorpKor" type="text" style="width: 98%; value="" onkeypress="javascript:doKeyPress() "/>
- </td>
- </TR>
- </TABLE>
- <!-- 검색조건 영역 : 종료 -->
- <div id="sheet1_div" style="width: 100%; padding-top:5px; height: auto; min-height: 360px; overflow: auto;">
- <script>createIBSheet('sheet1','100%', '330px');</script>
- </div>
- </FORM>
- </body>
|