123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773 |
- <%--
- - FileName : resolutionFinishList.jsp
- - Author(s) : ok
- - Date : 2014.07.18
- - 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.*" %>
- <%@ 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 deptCd = user.get("site_code");
- //String deptName = user.get("site_name");
- //deptCd = params.get("buseo");
- //RowSet rowSet = storage.getRowSet("ROWSET");
- //RowSet acctTypeRowSet = storage.getRowSet("AcctTypeRowSet"); //계정 타입
- //System.out.println("acctyType:"+acctTypeRowSet);
-
- //상태
- String statusSheetComboListText = (String)storage.getObject("selectText");
- String statusSheetComboListValue = (String)storage.getObject("selectValue");
-
- %>
- <SCRIPT language="JavaScript">
- /*예약함수*/
- var sheet1;
- var sheet1Row;
- var sheet1PageNo = 1;
- var sheet2;
- var sheet2Row;
- var sheet2PageNo = 1;
- var pageLastRowIndex = 1;
- var validationResult = false;
- var filterShow = false;
-
- function _onReady(){
- /**
- * IBSheet object initialize
- */
- gridInit(sheet1);
- grid2Init(sheet2);
-
- autoResize();
-
- /**
- * Application Initialize
- */
- jQuery("#btnSearch").click(function() {
-
- if(jQuery("#searchDeptCd").val() == ""){
- alert("현장을 선택해주세요.");
- jQuery("#searchDeptCd").focus();
- return;
- }
-
- if($('#surtaxGb').val() == '1'){
- jQuery("#fevent").val("GET_DATA");
- var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/outside/ResolutionFinishList_sheet.screen";
- Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 10, "");
- } else {
- jQuery("#fevent").val("GET_DATA2");
- var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/outside/ResolutionFinishList_sheet.screen";
- Modular.view.IBSheet7.doSearch(sheet2, url, jQuery("#form1"), 10, "");
- }
- });
-
- pageinit();
-
- }
-
- function pageinit(){
-
- //달력 조건에 당해년도1월, 당해년도당월 셋팅
- setSearchDate();
-
- //jQuery("#btnSearch").click();
-
- }
-
- /**
- * IBSheet object initialize
- */
- function gridInit(sheetName){
- var init_sheet = {};
- init_sheet.Cfg = {SearchMode:2, Page:10, MergeSheet:7,PrevColumnMergeMode:0};
- init_sheet.Cols = [
- {Header:'상태|상태', Type:"Status", SaveName:"Status", Width:100, Align:"Left", Hidden:"True"},
- {Header:'현장명|현장명', Type:"Text", SaveName:"DEPT_NAME", Width:100, Align:"Left"},
- {Header:'계약번호|계약번호', Type:"Text", SaveName:"CON_DOC_NO", Width:120, Align:"Left", Hidden:"True"},
- {Header:'계약명|계약명', Type:"Text", SaveName:"BUILD_NAME", Width:110, Align:"Left"},
- {Header:'업체명|업체명', Type:"Text", SaveName:"MEMBER_NAME", Width:100, Align:"Left"},
- {Header:'공사기간|공사기간', Type:"Text", SaveName:"START_END_WORK_DATE", Width:130, Align:"Left"},
- {Header:'통화구분|통화구분', Type:"Text", SaveName:"CURRENCY_GB", Width:55, Align:"Center"},
- {Header:'통화구분자리|통화구분자리', Type:"Int", SaveName:"CURRENCY_DIGIT", Width:100, Align:"Left", Hidden:"True"},
- {Header:'계약금액|계약금액', Type:"Int", SaveName:"CON_SUPPLY_AMT", Width:80, Align:"Right"},
- {Header:'계약금액|합계', Type:"Int", SaveName:"CON_AMT", Width:40, Align:"Right", Hidden:"True"},
- {Header:'계약상선급금|계약상선급금', Type:"Int", SaveName:"PREPAY_SUPPLY_AMT", Width:80, Align:"Right"},
- {Header:'선급금발생|선급금발생', Type:"Int", SaveName:"REQ_PREPAY_SUPPLY_AMT", Width:80, Align:"Right"},
- {Header:'선급금\n신청날짜|선급금\n신청날짜',Type:"Text", SaveName:"PREPAY_DATE", Width:65, Align:"Right"},
- {Header:'기성년월|기성년월', Type:"Text", SaveName:"ACMP_YYYYMM", Width:50, Align:"Right"},
- {Header:'지급\n차수|지급\n차수', Type:"Int", SaveName:"ACMP_NO", Width:40, Align:"Right"},
- {Header:'기성액|금회기성', Type:"Int", SaveName:"FUND_AMT", Width:80, Align:"Right"},
- {Header:'기성액|선급금공제', Type:"Int", SaveName:"PAY_DEDUCT_AMT", Width:80, Align:"Right"},
- {Header:'기성액|실지불액', Type:"Int", SaveName:"REQU_SUPPLY_AMT", Width:80, Align:"Right"},
- {Header:'기성액|잔여기성', Type:"Int", SaveName:"MOD_FUND_AMT", Width:80, Align:"Right"},
- {Header:'기성율\n(%)|기성율\n(%)', Type:"Float", SaveName:"FUND_RATE", Width:40, Align:"Right", Format:"##0.00"},
- {Header:'상태|상태', Type:"Combo", SaveName:"STATUS_CD", Width:50, Align:"Center", ComboText:"<%=statusSheetComboListText%>", ComboCode:"<%=statusSheetComboListValue%>"}
-
- ];
- init_sheet.HeaderMode = {Sort:1};
- IBS_InitSheet(sheetName, init_sheet);
- sheetName.SetDataAutoTrim(0);
- sheetName.SetEditable(false);
-
- var info = [{StdCol:1, SumCols:"CON_AMT|FUND_AMT", ShowCumulate:0,Sort:0,CaptionCol:1}
- ,{StdCol:2, SumCols:"CON_AMT|FUND_AMT|PAY_DEDUCT_AMT|REQU_SUPPLY_AMT|FUND_RATE", ShowCumulate:0,Sort:0,CaptionCol:2}];
- sheetName.ShowSubSum(info);
- 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) {
-
- //sheet1.SetSumValue(0,"합 계");
- //sheet1.SetCellAlign(sheet1.LastRow(),0,"Center");
- //sheet1.SetMergeCell (sheet1.LastRow(), 0, 1,11);
-
- var lr = sheet1.LastRow();
- var str = "";
- var startrow = 2;
- var endrow = 0;
- var backColor = "";
- var totalConAmtValue = 0;
- var totalModAmtValue = 0;
- var totalRatAmtValue = 0.00;
- for(var i=2; i <= lr; i++){
- endrow = endrow + 1;
-
- str = sheet1.GetCellText(i,2);
- if(str.indexOf("소계:") > -1){
- var digit = sheet1.GetCellValue(i -1 , "CURRENCY_DIGIT");
- sheet1.SetCellAlign(i,3,"Center");
-
- sheet1.SetCellText(i,3, "소계");
-
- //sheet1.SetRangeBackColor(i,2,i,12,"#fffacd");
-
- sheet1.SetMergeCell(i,3,1,12);
-
- var conAmtValue = sheet1.GetCellValue(i - 1, "CON_AMT");
- var conAmtValue2 = sheet1.GetCellValue(i - 1, "CON_SUPPLY_AMT");
- totalConAmtValue = Number(totalConAmtValue) + Number(conAmtValue2);
- sheet1.SetCellValue(i, "CON_AMT", conAmtValue.toFixed(digit));
- var modAmtValue = sheet1.GetCellValue(i - 1, "MOD_FUND_AMT");
- totalModAmtValue = Number(totalModAmtValue) + Number(modAmtValue);
- sheet1.SetCellValue(i, "MOD_FUND_AMT", Number(modAmtValue).toFixed(digit));
- if( sheet1.GetCellValue(i, "MOD_FUND_AMT") == "0" ) { sheet1.SetCellValue(i, "FUND_RATE", "100"); }
-
- //var test = sheet1.GetCellValue(i - 1, "DEPT_NAME");
- //sheet1.SetCellValue(i, "DEPT_NAME", test);
-
- //endrow = i - startrow;
-
- if(digit == 0){
- var info = {Type: "Int" , Format:"Integer"};
- sheet1.InitCellProperty(i , "FUND_AMT", info);
- sheet1.InitCellProperty(i , "PAY_DEDUCT_AMT", info);
- sheet1.InitCellProperty(i , "REQU_SUPPLY_AMT", info);
- sheet1.InitCellProperty(i , "MOD_FUND_AMT", info);
- }else{
- var info = {Type: "Float" , PointCount:digit};
- sheet1.InitCellProperty(i , "FUND_AMT", info);
- sheet1.InitCellProperty(i , "PAY_DEDUCT_AMT", info);
- sheet1.InitCellProperty(i , "REQU_SUPPLY_AMT", info);
- sheet1.InitCellProperty(i , "MOD_FUND_AMT", info);
- }
- }
- str = sheet1.GetCellText(i,1);
- if(str.indexOf("소계:") > -1){
- sheet1.SetCellAlign(i,1,"Center");
-
- sheet1.SetCellText(i,1, "소계");
-
- //sheet1.SetRangeBackColor(i,1,i,12,"#e0ffff");
- //alert(startrow);
- //alert(endrow);
-
- sheet1.SetMergeCell(startrow, 1, endrow, 1);
- sheet1.SetMergeCell(i,1,1,14);
-
- var fundAmtValue = sheet1.GetCellValue(i, "FUND_AMT");
- totalRatAmtValue = Number(fundAmtValue) / Number(totalConAmtValue) * 100;
- sheet1.SetCellValue(i, "CON_AMT", totalConAmtValue);
- sheet1.SetCellValue(i, "MOD_FUND_AMT", totalModAmtValue);
- sheet1.SetCellValue(i, "FUND_RATE", totalRatAmtValue.toFixed(2));
-
- var info = {Type: "Int" , Format:"Integer"};
- sheet1.InitCellProperty(i , "CON_AMT", info);
- sheet1.InitCellProperty(i , "MOD_FUND_AMT", info);
-
-
- totalConAmtValue = 0;
- totalModAmtValue = 0;
- totalRatAmtValue = 0.00;
-
- startrow = i + 1;
- endrow = 0;
-
- }
-
- if(sheet1.GetCellValue(i , "CURRENCY_DIGIT") != ""){
- if(sheet1.GetCellValue(i , "CURRENCY_DIGIT") > 0){
- var digit = sheet1.GetCellValue(i, "CURRENCY_DIGIT");
- var info = {Type: "Float" , PointCount:digit};
- sheet1.InitCellProperty(i , "CON_SUPPLY_AMT", info);
- sheet1.InitCellProperty(i , "CON_AMT", info);
- sheet1.InitCellProperty(i , "PREPAY_SUPPLY_AMT", info);
- sheet1.InitCellProperty(i , "REQ_PREPAY_SUPPLY_AMT", info);
- sheet1.InitCellProperty(i , "PREPAY_DATE", info);
- sheet1.InitCellProperty(i , "FUND_AMT", info);
- sheet1.InitCellProperty(i , "PAY_DEDUCT_AMT", info);
- sheet1.InitCellProperty(i , "REQU_SUPPLY_AMT", info);
- sheet1.InitCellProperty(i , "MOD_FUND_AMT", info);
- }else{
- var info = {Type: "Int" , PointCount:digit};
- sheet1.InitCellProperty(i , "CON_SUPPLY_AMT", info);
- sheet1.InitCellProperty(i , "CON_AMT", info);
- sheet1.InitCellProperty(i , "PREPAY_SUPPLY_AMT", info);
- sheet1.InitCellProperty(i , "REQ_PREPAY_SUPPLY_AMT", info);
- sheet1.InitCellProperty(i , "PREPAY_DATE", info);
- sheet1.InitCellProperty(i , "FUND_AMT", info);
- sheet1.InitCellProperty(i , "PAY_DEDUCT_AMT", info);
- sheet1.InitCellProperty(i , "REQU_SUPPLY_AMT", info);
- sheet1.InitCellProperty(i , "MOD_FUND_AMT", info);
- }
- }
-
-
- /* var info = {Type: "Int", Align: "Right", Format:"Integer"};
- sheet1.InitCellProperty(i, "CON_AMT", info);
- info = {Type: "Int", Align: "Right", Format:"Integer"};
- sheet1.InitCellProperty(i, "MOD_FUND_AMT", info);
- */
-
-
-
- }
-
- setGridSize();
- } else {
- //조회 에러 수행
- alert(message);
- }
- }
-
- /**
- * IBSheet Event: Save End(IBSheet 데이터 저장 CallBack)
- */
- function sheet1_OnSaveEnd(code, msg) {
- if(code >= 0) {
- alert("저장 성공");
- } else {
- alert(msg);
- }
- }
-
- /**
- * 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 doResult(resultObj) {
- try {
- if( resultObj.getRequestEvent() == "" ) {
- if( resultObj.getSuccess() ) {
- var f = document.form1;
- f.action = "/main.screen";
- f.target = "_parent";
- f.submit();
- }
- else {
- dlgErrorMsg(resultObj);
- }
- document.form1.isSubmit = false;
- }else if( resultObj.getRequestEvent() == "GET_EHR_DATA" ) {
- if( resultObj.getSuccess() ) {
- alert("EHR Synchronize Complete");
- doSearch(document.all.sheet1);
- }
- else {
- dlgErrorMsg(resultObj);
- }
- document.form1.isSubmit = false;
- }
- }
- catch(errorObject) {
- showErrorDlg("doResult()", errorObject);
- }
- }
- function searchAccDept(p_dept_cd, p_dept_nm){
-
- result = window.showModalDialog(getDummyUrl('/lib/dlgSearchAccDept.screen'),'부서 찾기','dialogWidth:620px;dialogHeight:460px; center:yes; help:no; status:no; scroll:no; resizable:no');
-
- if( result == null ){
- document.form1.p_dept_cd.value = ""; //부서코드
- document.form1.p_dept_nm.value = ""; //부서명
- }else{
- document.form1.p_dept_cd.value = result[0]; //부서코드
- document.form1.p_dept_nm.value = result[1]; //부서명
- }
- }
- function doKeyPress() {
-
- if( event.keyCode == 13 ) {
- jQuery("#btnSearch").click();
- }
- }
- function calendar(thisDayObj){
- dlgMCalendar(thisDayObj);
-
- }
-
- //검색조건에 기성년월 초기 설정
- function setSearchDate(){
-
- var newDay = new Date( get_year(), get_month(), "");
- var lastDay = newDay.getDate();
- //var yyyymmbeginning = get_year() +'-'+ get_month() +'-'+ '01';
- //var yyyymmlast = get_year() +'-'+ get_month() +'-'+ lastDay;
- var searchFromDate = get_year() +'-'+ '01';
- var searchToDate = get_year() +'-'+ get_month();
-
- jQuery('#searchFromDate').val(searchFromDate);
- jQuery('#searchToDate').val(searchToDate);
- }
- function sheet1_OnSmartResize(Width, Height) {
- sheet1.FitColWidth();
- autoResize();
- }
-
- function autoResize(){
- var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("bugase").scrollHeight + document.getElementById("title").scrollHeight + 54;
- var iframeHeight= document.body.scrollHeight - t1_height;
- var iframeWidth= document.body.scrollWidth;
-
-
- sheet1.SetSheetHeight(iframeHeight);
- }
-
- function searchSite() {
-
- var win_id = "_searchSite";
- var link = "/lib/dlgSearchSpotDept_Unitcd.screen";
- link += "?pop_win_id="+win_id;
- fLayerPop(win_id, link, 550,500, '', '', 'NO');
-
- }
-
- function searchSiteClose(result) {
- if( result == null ){
- document.form1.searchDeptCd.value = ""; //부서코드
- document.form1.searchDeptNm.value = ""; //부서명
- }else{
- document.form1.searchDeptCd.value = result[0]; //부서코드
- document.form1.searchDeptNm.value = result[1]; //부서명
- }
- fLayerPopClose('_searchSite');
- }
- function chgSurtaxGb(val){
- if(val == '1'){
- $('#spnSurtaxGb').text('별도');
- jQuery('#sheet2_div').hide();
- jQuery('#sheet1_div').show();
- } else {
- $('#spnSurtaxGb').text('포함');
- jQuery('#sheet1_div').hide();
- jQuery('#sheet2_div').show();
- }
- }
-
- /**
- * IBSheet object initialize
- */
- function grid2Init(sheetName){
- var init_sheet = {};
- init_sheet.Cfg = {SearchMode:2, Page:10, MergeSheet:7,PrevColumnMergeMode:0};
- init_sheet.Cols = [
- {Header:'상태|상태|상태', Type:"Status", SaveName:"Status", Width:100, Align:"Left", Hidden:"True"},
- {Header:'현장명|현장명|현장명', Type:"Text", SaveName:"DEPT_NAME", Width:100, Align:"Left"},
- {Header:'계약번호|계약번호|계약번호', Type:"Text", SaveName:"CON_DOC_NO", Width:120, Align:"Left", Hidden:"True"},
- {Header:'계약명|계약명|계약명', Type:"Text", SaveName:"BUILD_NAME", Width:110, Align:"Left"},
- {Header:'업체명|업체명|업체명', Type:"Text", SaveName:"MEMBER_NAME", Width:100, Align:"Left"},
- {Header:'공사기간|공사기간|공사기간', Type:"Text", SaveName:"START_END_WORK_DATE", Width:130, Align:"Left"},
- {Header:'통화구분|통화구분|통화구분', Type:"Text", SaveName:"CURRENCY_GB", Width:55, Align:"Center"},
- {Header:'통화구분자리|통화구분자리|통화구분자리', Type:"Int", SaveName:"CURRENCY_DIGIT", Width:100, Align:"Left", Hidden:"True"},
- {Header:'계약금액|공급가|공급가', Type:"Int", SaveName:"CON_SUPPLY_AMT", Width:80, Align:"Right"},
- {Header:'계약금액|부가세|부가세', Type:"Int", SaveName:"CON_SURTAX_AMT", Width:80, Align:"Right"},
- {Header:'계약금액|합계|합계', Type:"Int", SaveName:"CON_AMT", Width:80, Align:"Right"},
- {Header:'계약상선급금|공급가|공급가', Type:"Int", SaveName:"PREPAY_SUPPLY_AMT", Width:80, Align:"Right"},
- {Header:'계약상선급금|부가세|부가세', Type:"Int", SaveName:"PREPAY_SURTAX_AMT", Width:80, Align:"Right"},
- {Header:'선급금발생|공급가|공급가', Type:"Int", SaveName:"REQ_PREPAY_SUPPLY_AMT", Width:80, Align:"Right"},
- {Header:'선급금발생|부가세|부가세', Type:"Int", SaveName:"REQ_PREPAY_SURTAX_AMT", Width:80, Align:"Right"},
- {Header:'선급금\n신청날짜|선급금\n신청날짜|선급금\n신청날짜',Type:"Text", SaveName:"PREPAY_DATE", Width:65, Align:"Right"},
- {Header:'기성년월|기성년월|기성년월', Type:"Text", SaveName:"ACMP_YYYYMM", Width:50, Align:"Right"},
- {Header:'지급\n차수|지급\n차수|지급\n차수', Type:"Int", SaveName:"ACMP_NO", Width:40, Align:"Right"},
- {Header:'기성액|금회기성|금회기성', Type:"Int", SaveName:"FUND_AMT", Width:80, Align:"Right"},
- {Header:'기성액|선급금공제|선급금공제', Type:"Int", SaveName:"PAY_DEDUCT_AMT", Width:80, Align:"Right"},
- {Header:'기성액|실지불액|공급가', Type:"Int", SaveName:"REQU_SUPPLY_AMT", Width:80, Align:"Right"},
- {Header:'기성액|실지불액|부가세', Type:"Int", SaveName:"REQU_SURTAX_AMT", Width:80, Align:"Right"},
- {Header:'기성액|실지불액|합계', Type:"Int", SaveName:"REQU_AMT", Width:80, Align:"Right"},
- {Header:'기성액|잔여기성|공급가', Type:"Int", SaveName:"MOD_FUND_AMT", Width:80, Align:"Right"},
- {Header:'기성액|잔여기성|부가세', Type:"Int", SaveName:"MOD_SURTAX_AMT", Width:80, Align:"Right"},
- {Header:'기성액|잔여기성|합계', Type:"Int", SaveName:"MOD_AMT", Width:80, Align:"Right"},
- {Header:'기성율\n(%)|기성율\n(%)|기성율\n(%)', Type:"Float", SaveName:"FUND_RATE", Width:40, Align:"Right", Format:"##0.00"},
- {Header:'상태|상태|상태', Type:"Combo", SaveName:"STATUS_CD", Width:50, Align:"Center", ComboText:"<%=statusSheetComboListText%>", ComboCode:"<%=statusSheetComboListValue%>"}
-
- ];
- init_sheet.HeaderMode = {Sort:1};
- IBS_InitSheet(sheetName, init_sheet);
- sheetName.SetDataAutoTrim(0);
- sheetName.SetEditable(false);
-
- var info = [{StdCol:1, SumCols:"CON_AMT|FUND_AMT", ShowCumulate:0,Sort:0,CaptionCol:1}
- ,{StdCol:2, SumCols:"CON_AMT|FUND_AMT|PAY_DEDUCT_AMT|REQU_SUPPLY_AMT|REQU_SURTAX_AMT|REQU_AMT|FUND_RATE", ShowCumulate:0,Sort:0,CaptionCol:2}];
- sheetName.ShowSubSum(info);
- sheetName.SetActionMenu("ExcelDown");
- setGrid2Size();
- }
-
- /**
- * IBSheet size setting
- */
- function setGrid2Size() {
- sheet2.FitColWidth();
- }
-
- function sheet2_OnSelectMenu(Text, Code) {
- // text 또는 code값으로 Action수행
- switch(Text) {
- case "ExcelDown":
- sheetExcelDown(sheet2,$('li').html());
- break;
- }
- }
-
- /**
- * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
- */
- function sheet2_OnSearchEnd(code, message) {
- if(code == 0) {
- //sheet1.SetSumValue(0,"합 계");
- //sheet1.SetCellAlign(sheet1.LastRow(),0,"Center");
- //sheet1.SetMergeCell (sheet1.LastRow(), 0, 1,11);
-
- var lr = sheet2.LastRow();
- var str = "";
- var startrow = 3;
- var endrow = 0;
- var backColor = "";
- var totalConAmtValue = 0;
- var totalModAmtValue = 0;
- var totalModSurtaxAmtValue = 0;
- var totalModValue = 0;
- var totalRatAmtValue = 0.00;
- for(var i=3; i <= lr; i++){
- endrow = endrow + 1;
- str = sheet2.GetCellText(i,2);
- if(str.indexOf("소계:") > -1){
- var digit = sheet2.GetCellValue(i -1 , "CURRENCY_DIGIT");
- sheet2.SetCellAlign(i,3,"Center");
-
- sheet2.SetCellText(i,3, "소계");
-
- //sheet1.SetRangeBackColor(i,2,i,12,"#fffacd");
-
- sheet2.SetMergeCell(i,3,1,15);
-
- var conAmtValue = sheet2.GetCellValue(i - 1, "CON_AMT");
- var conAmtValue2 = sheet2.GetCellValue(i - 1, "CON_SUPPLY_AMT");
- totalConAmtValue = Number(totalConAmtValue) + Number(conAmtValue2);
- sheet2.SetCellValue(i, "CON_AMT", conAmtValue.toFixed(digit));
- var modAmtValue = sheet2.GetCellValue(i - 1, "MOD_FUND_AMT");
- totalModAmtValue = Number(totalModAmtValue) + Number(modAmtValue);
- sheet2.SetCellValue(i, "MOD_FUND_AMT", Number(modAmtValue).toFixed(digit));
- var modSurtaxValue = sheet2.GetCellValue(i - 1, "MOD_SURTAX_AMT");
- totalModSurtaxAmtValue = Number(totalModSurtaxAmtValue) + Number(modSurtaxValue);
- sheet2.SetCellValue(i, "MOD_SURTAX_AMT", Number(modSurtaxValue).toFixed(digit));
- var modValue = sheet2.GetCellValue(i - 1, "MOD_AMT");
- totalModValue = Number(totalModValue) + Number(modValue);
- sheet2.SetCellValue(i, "MOD_AMT", Number(modValue).toFixed(digit));
- if( sheet2.GetCellValue(i, "MOD_FUND_AMT") == "0" ) { sheet2.SetCellValue(i, "FUND_RATE", "100"); }
-
- //var test = sheet1.GetCellValue(i - 1, "DEPT_NAME");
- //sheet1.SetCellValue(i, "DEPT_NAME", test);
-
- //endrow = i - startrow;
-
- if(digit == 0){
- var info = {Type: "Int" , Format:"Integer"};
- sheet2.InitCellProperty(i , "FUND_AMT", info);
- sheet2.InitCellProperty(i , "PAY_DEDUCT_AMT", info);
- sheet2.InitCellProperty(i , "REQU_SUPPLY_AMT", info);
- sheet2.InitCellProperty(i , "REQU_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "REQU_AMT", info);
- sheet2.InitCellProperty(i , "MOD_FUND_AMT", info);
- sheet2.InitCellProperty(i , "MOD_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "MOD_AMT", info);
- }else{
- var info = {Type: "Float" , PointCount:digit};
- sheet2.InitCellProperty(i , "FUND_AMT", info);
- sheet2.InitCellProperty(i , "PAY_DEDUCT_AMT", info);
- sheet2.InitCellProperty(i , "REQU_SUPPLY_AMT", info);
- sheet2.InitCellProperty(i , "REQU_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "REQU_AMT", info);
- sheet2.InitCellProperty(i , "MOD_FUND_AMT", info);
- sheet2.InitCellProperty(i , "MOD_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "MOD_AMT", info);
- }
- }
- str = sheet2.GetCellText(i,1);
- if(str.indexOf("소계:") > -1){
- sheet2.SetCellAlign(i,1,"Center");
-
- sheet2.SetCellText(i,1, "소계");
-
- //sheet1.SetRangeBackColor(i,1,i,12,"#e0ffff");
- //alert(startrow);
- //alert(endrow);
-
- sheet2.SetMergeCell(startrow, 1, endrow, 1);
- sheet2.SetMergeCell(i,1,1,17);
-
- var fundAmtValue = sheet2.GetCellValue(i, "FUND_AMT");
- totalRatAmtValue = Number(fundAmtValue) / Number(totalConAmtValue) * 100;
- //sheet2.SetCellValue(i, "CON_AMT", totalConAmtValue);
- sheet2.SetCellValue(i, "MOD_FUND_AMT", totalModAmtValue);
- sheet2.SetCellValue(i, "FUND_RATE", totalRatAmtValue.toFixed(2));
-
- var info = {Type: "Int" , Format:"Integer"};
- //sheet2.InitCellProperty(i , "CON_AMT", info);
- sheet2.InitCellProperty(i , "MOD_FUND_AMT", info);
-
-
- totalConAmtValue = 0;
- totalModAmtValue = 0;
- totalRatAmtValue = 0.00;
-
- startrow = i + 1;
- endrow = 0;
-
- }
-
- if(sheet2.GetCellValue(i , "CURRENCY_DIGIT") != ""){
- if(sheet2.GetCellValue(i , "CURRENCY_DIGIT") > 0){
- var digit = sheet2.GetCellValue(i, "CURRENCY_DIGIT");
- var info = {Type: "Float" , PointCount:digit};
- sheet2.InitCellProperty(i , "CON_SUPPLY_AMT", info);
- sheet2.InitCellProperty(i , "CON_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "CON_AMT", info);
- sheet2.InitCellProperty(i , "PREPAY_SUPPLY_AMT", info);
- sheet2.InitCellProperty(i , "PREPAY_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "REQ_PREPAY_SUPPLY_AMT", info);
- sheet2.InitCellProperty(i , "REQ_PREPAY_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "PREPAY_DATE", info);
- sheet2.InitCellProperty(i , "FUND_AMT", info);
- sheet2.InitCellProperty(i , "PAY_DEDUCT_AMT", info);
- sheet2.InitCellProperty(i , "REQU_SUPPLY_AMT", info);
- sheet2.InitCellProperty(i , "REQU_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "REQU_AMT", info);
- sheet2.InitCellProperty(i , "MOD_FUND_AMT", info);
- sheet2.InitCellProperty(i , "MOD_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "MOD_AMT", info);
- }else{
- var info = {Type: "Int" , PointCount:digit};
- sheet2.InitCellProperty(i , "CON_SUPPLY_AMT", info);
- sheet2.InitCellProperty(i , "CON_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "CON_AMT", info);
- sheet2.InitCellProperty(i , "PREPAY_SUPPLY_AMT", info);
- sheet2.InitCellProperty(i , "PREPAY_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "REQ_PREPAY_SUPPLY_AMT", info);
- sheet2.InitCellProperty(i , "REQ_PREPAY_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "PREPAY_DATE", info);
- sheet2.InitCellProperty(i , "FUND_AMT", info);
- sheet2.InitCellProperty(i , "PAY_DEDUCT_AMT", info);
- sheet2.InitCellProperty(i , "REQU_SUPPLY_AMT", info);
- sheet2.InitCellProperty(i , "REQU_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "REQU_AMT", info);
- sheet2.InitCellProperty(i , "MOD_FUND_AMT", info);
- sheet2.InitCellProperty(i , "MOD_SURTAX_AMT", info);
- sheet2.InitCellProperty(i , "MOD_AMT", info);
- }
- }
-
-
- /* var info = {Type: "Int", Align: "Right", Format:"Integer"};
- sheet2.InitCellProperty(i, "CON_AMT", info);
- info = {Type: "Int", Align: "Right", Format:"Integer"};
- sheet2.InitCellProperty(i, "MOD_FUND_AMT", info);
- */
-
-
-
- }
-
- setGrid2Size();
- } else {
- //조회 에러 수행
- alert(message);
- }
- }
-
- function sheet2_OnSmartResize(Width, Height) {
- sheet2.FitColWidth();
- auto2Resize();
- }
-
- function auto2Resize(){
- var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("bugase").scrollHeight + document.getElementById("title").scrollHeight + 24;
- var iframeHeight= document.body.scrollHeight - t1_height;
- var iframeWidth= document.body.scrollWidth;
-
-
- sheet2.SetSheetHeight(iframeHeight);
- }
- </SCRIPT>
- <modular:search id="form1">
- <modular:key id="fevent" />
- </modular:search>
- <BODY onresize="autoResize()" >
- <form id="form1" name="form1" method="post" modular:type="search">
- <INPUT type="hidden" name="fevent" id="fevent" value="">
- <INPUT type="hidden" name="formdata1" id="formdata1" value="formdata1Test">
-
- <div align="left" id="title">
- <ul>
- <li>외주_기성완료현황</li>
- </ul>
- </div>
- <!-- 검색조건 영역 : 시작 -->
- <table id="search-table" class="search-form-table">
- <colgroup>
- <col width="100px">
- <col width="*">
- <col width="100px">
- <col width="*">
- <col width="100px">
- <col width="*">
- <col width="100px">
- </colgroup>
- <TR>
- <Th>현장</Th>
- <TD>
- <%=InputText.getSiteCodeNew("searchDeptCd", "searchDeptNm", "", user, "", "")%>
- <%-- <%= InputText.get("searchDeptCd", "", 12, 10, "ID,ReadOnly,PerSize") %>
- <%= InputText.get("searchDeptNm", "", 17, 30, "ID,PerSize,ReadOnly") %>
- <IMG onclick="searchSite();" src="/img/buyer/button/bt_search_right.gif" alt="현장찾기" border="0" align="absmiddle" style="cursor:hand;"> --%>
- </TD>
- <TH>업체명</TH>
- <TD colspan="3">
- <INPUT type="text" id="searchCorp" name="searchCorp" value="" maxlength="50" class="input" style="IME-MODE : active; width:90%;" desc='업체명' onKeyPress="doKeyPress();">
- </TD>
- <TD class="button" rowspan="2">
- <!-- 검색버튼 영역 : 시작 -->
- <span class="btnSearch center"><a href="javascript:void(0);" id="btnSearch">검색</a></span>
- <!-- 검색버튼 영역 : 종료 -->
- </TD>
- </TR>
- <TR>
- <Th>계약명</Th>
- <TD>
- <INPUT type="text" id="searchBuldNm" name="searchBuldNm" value="" maxlength="50" class="input" style="IME-MODE : active; width:90%;" desc='계약명' onKeyPress="doKeyPress();">
- </TD>
- <Th>기성년월</Th>
- <TD>
- <%= InputText.get("searchFromDate", "", 10, 50, "hangule,center, desc=기성년월, ReadOnly") %>
- <IMG name="start_img" id="calender_from" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgMCalendar('searchFromDate');">
- ~
- <%= InputText.get("searchToDate", "", 10, 50, "hangule,center, desc=기성년월, ReadOnly") %>
- <IMG name="start_img" id="calender_to" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgMCalendar('searchToDate');">
-
- <!-- <input type="text" id="searchFromDate" name="searchFromDate" value="" readonly style="width:15%; text-align: center;" maxlength="7">
- <A href="JavaScript:calendar('searchFromDate');"><IMG src="/img/buyer/button/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
- ~
- <input type="text" id="searchToDate" name="searchToDate" value="" readonly style="width:15%; text-align: center;" maxlength="7">
- <A href="JavaScript:calendar('searchToDate');"><IMG src="/img/buyer/button/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A> -->
- </TD>
- <Th>부가세</Th>
- <TD>
- <select name="surtaxGb" id="surtaxGb" style="width: 70px;" onChange="chgSurtaxGb(this.value);">
- <option value="1">별도</option>
- <option value="2">포함</option>
- </select>
- </TD>
- </TR>
- </TABLE>
- <img src="/img/com/blank.gif" height="5px" />
- <div align="right" id="bugase">
- <ul>
- <li valign="bottom"><span style="color: red;">* 부가세<span id="spnSurtaxGb">별도</span></span></li>
- </ul>
- </div>
- <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 350px; overflow: auto;">
- <script>createIBSheet('sheet1','100%', '350px');</script>
- </div>
- <div id="sheet2_div" style="padding-top:5px; height: auto; min-height: 350px; overflow: auto; display:none;">
- <script>createIBSheet('sheet2','100%', '350px');</script>
- </div>
- </FORM>
- </body>
|