You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

379 lines
17 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:w2="http://www.inswave.com/websquare" xmlns:xf="http://www.w3.org/2002/xforms">
<head>
<w2:type>DEFAULT</w2:type>
<w2:buildDate/>
<xf:model>
<xf:instance>
<data xmlns="" />
</xf:instance>
<w2:dataCollection baseNode="map">
<w2:dataMap baseNode="map" id="statMap" style="">
<w2:keyInfo>
<w2:key dataType="text" id="fareOfficeId" name="요금소코드"></w2:key>
<w2:key id="kbn" name="구분" dataType="text"></w2:key>
<w2:key dataType="text" id="workStDate" name="근무시작일자"></w2:key>
<w2:key dataType="text" id="workEdDate" name="근무종료일자"></w2:key>
</w2:keyInfo>
</w2:dataMap>
<w2:dataList baseNode="list" repeatNode="map" id="tmpStatList" saveRemovedData="">
<w2:columnInfo>
<w2:column id="WORK_DATE" name="근무일자" dataType="date"></w2:column>
<w2:column id="WORKER_NAME" name="징수원" dataType="text"></w2:column>
</w2:columnInfo>
</w2:dataList>
<w2:dataList baseNode="list" repeatNode="map" id="workerList" saveRemovedData="true">
<w2:columnInfo>
<w2:column id="WORKER_ID" name="징수원ID" dataType="text"></w2:column>
<w2:column id="WORKER_NAME" name="징수원명" dataType="text"></w2:column>
</w2:columnInfo>
</w2:dataList>
</w2:dataCollection>
<w2:workflowCollection></w2:workflowCollection>
<xf:submission id="sbm_statList" ref='data:json,{"id":"statMap","key":"param"}' target='data:json,["workerList",{"id":"tmpStatList","key":"statList"}]' action="/cfs/income/findIncomeWorkerWorkStatList.do" method="post"
mediatype="application/json" encoding="UTF-8" instance="" replace="" errorHandler="" customHandler="" mode="asynchronous"
processMsg="조회중입니다." ev:submit="" ev:submitdone="scwin.sbm_statList_submitdone" ev:submiterror="" abortTrigger="">
</xf:submission>
</xf:model>
<script type="text/javascript" lazy="false"><![CDATA[
scwin.onpageload = function() {
//요금소(cfs01)
var sbxOptions = [{ code : "cfs01", compID : "sbx_fareOfficeId", option : sbx_fareOfficeId.getText() }];
com.setCfsCommonCode( sbxOptions );
//통행일자
var ymd = com.getToday();
ica_workStDate.setValue( ymd );
ica_workEdDate.setValue( ymd );
};
scwin.onpageunload = function() {
};
scwin.btn_search_onclick = function(e) {
//alert("조회");
if (com.validateGroup(grp_search) === false) {
return false;
}else{
if(ica_workEdDate.getValue() < ica_workStDate.getValue()){
com.alert("시작 일자가 종료 일자보다 큽니다. 날짜 형식을 확인해 주세요.");
return;
}
com.executeSubmission(sbm_statList);
}
};
scwin.sbm_statList_submitdone = function(e) {
//alert("조회후처리");
//-- 징수원 정보를 동적으로 보여준다.
var key = "", title = "";
var column = {};
var columnArr = [];
var gridHeader = "", gridBody = "", gridFooter = "";
var fixColumnIdx = "1";
if (statMap.get( "kbn" ) == "1") {
columnArr.push({id:"WORK_DATE",name:"근무일자",dataType:"date"});
columnArr.push(column);
gridHeader += '<w2:column id="header_WORK_DATE" inputType="text" width="140" blockSelect="false" value="근무일자"></w2:column>';
gridBody += '<w2:column id="WORK_DATE" inputType="text" width="140" style="" value="" blockSelect="false" removeBorderStyle="false" displayMode="label"></w2:column>'
gridFooter += '<w2:column id="footer_WORK_DATE" inputType="text" width="140" style="" value="합계" blockSelect="false" removeBorderStyle="false" displayMode="label"></w2:column>';
fixColumnIdx = "1";
}
else if (statMap.get( "kbn" ) == "2") {
columnArr.push({id:"WORK_YEAR",name:"년",dataType:"date"});
columnArr.push(column);
gridHeader += '<w2:column blockSelect="false" id="header_WORK_YEAR" inputType="text" width="70" value="년"></w2:column>';
gridBody += '<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="WORK_YEAR" value="" blockSelect="false" displayMode="label" customFormatter="scwin.fmtWorkYear" displayFormat="####년" colMerge="true"></w2:column>';
gridFooter += '<w2:column id="footer_WORK_DATE" inputType="text" width="140" style="" value="합계" blockSelect="false" removeBorderStyle="false" displayMode="label" colSpan="2"></w2:column>';
columnArr.push({id:"WORK_MONTH",name:"월",dataType:"date"});
columnArr.push(column);
gridHeader += '<w2:column blockSelect="false" id="header_WORK_MONTH" inputType="text" width="70" value="월"></w2:column>';
gridBody += '<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="WORK_MONTH" value="" blockSelect="false" displayMode="label" customFormatter="scwin.fmtWorkMonth" displayFormat="##월"></w2:column>';
//gridFooter -- colSpan
fixColumnIdx = "2";
}
for (var i=0; i<workerList.getRowCount(); i++) {
var worker = workerList.getDataRow(i);
key = "WORKER_ID_"+worker["WORKER_ID"];
title = worker["WORKER_NAME"];
column = {};
column["id"] = key;
column["name"] = title;
column["dataType"] = "text";
columnArr.push(column);
//gridView의 컬럼 정보 정의
gridHeader += '<w2:column id="'+'header_'+ key +'" value="'+ title +'" blockSelect="false" inputType="text" width="90" style=""></w2:column>';
gridBody += '<w2:column id="'+key+'" inputType="text" width="90" style="text-align: center;" value="" blockSelect="false" removeBorderStyle="false" displayMode="label" customFormatter="scwin.fmtWorkTime"></w2:column>'
gridFooter += '<w2:column id="'+'footer_'+ key +'" inputType="expression" excelEpression="SUM(\''+key+'\')" expression="SUM(\''+key+'\')" displayFormatter="scwin.fmtWorkTime" width="140" style="" value="" blockSelect="false" removeBorderStyle="false" displayMode="label" dataType="number"></w2:column>';
}
com.makeDataList("statList", columnArr);
var gridStr = '<w2:gridView xmlns:w2="http://www.inswave.com/websquare" xmlns:ev="http://www.w3.org/2001/xml-events" autoFitMinWidth="600" dataList="data:statList" scrollByColumn="false" id="grd_statList" style="height: 70px;" readOnly="true" fixedColumnWithHidden="true" useShiftKey="false" class="cm_grid" focusMode="row" visibleRowNum="all" rowNumVisible="true" rowNumWidth="70" rowNumHeaderValue="순번" fixedColumn="'+fixColumnIdx+'">'
+ '<w2:header id="header2" style="">'
+ '<w2:row id="row1" style="">'
+ gridHeader
+ '</w2:row>'
+ '</w2:header>'
+ '<w2:gBody id="gBody2" style="">'
+ '<w2:row id="row2" style="">'
+ gridBody
+ '</w2:row>'
+ '</w2:gBody>'
+ '<w2:footer id="footer2" style="">'
+ '<w2:row id="row3" style="">'
+ gridFooter
+ '</w2:row>'
+ '</w2:footer>'
+ '</w2:gridView>'
;
grd_statList.setGridStyle(WebSquare.xml.parse( gridStr , true ));
statList.setJSON(e.responseJSON["statList"]);
};
scwin.btn_print_onclick = function(e) {
//alert("인쇄");
var totalCnt = grd_statList.getTotalRow();
if (totalCnt > 0) {
alert("레포트를 인쇄합니다. ("+totalCnt+"건)");
var form_tag = document.getElementById("IC015M01");
form_tag.fareOfficeId.value = statMap.get("fareOfficeId");
form_tag.workStDate.value = statMap.get("workStDate");
form_tag.workEdDate.value = statMap.get("workEdDate");
var kbn = rad_kbn.getValue();
if(kbn == "1")
{
form_tag.crfName.value = "IC015M01_1";
} else if (kbn == "2") {
form_tag.crfName.value = "IC015M01_2";
}
var url = "/ClipReport4/reportView.jsp";
form_tag.action=url;
form_tag.method ="post";
form_tag.target="clipform";
form_tag.submit();
} else {
alert("인쇄할 정보가 없습니다.");
}
//scwin.sbm_statList_submitdone();
};
scwin.btn_excel_down_onclick = function(e) {
if (workerList.getRowCount() == 0) {
com.alert("엑셀다운로드할 정보가 없습니다.");
return;
}
//alert("엑셀다운로드");
var info = {};
var options = {};
options.fileName = "징수원별 근무 현황_"+com.getCurDtime()+".xlsx";
options.sheetName = "징수원별 근무 현황";
options.showProcess = "true"; //다운로드 시 프로세스 창을 보여줄지 여부 (true:보임)
//options.showConfirm = "true"; //다운로드 확인창을 띄울지 여부 (false:미확인)
options.useFooter = "true"; //다운로드시 Footer를 출력 할지 여부 (true:포함)
//options.useSubTotal = "false"; //다운로드시 SubTotal을 출력 할지 여부 (false:미포함)
options.printSet = {
fitToPage : "true" //엑셀 프린터 출력시 쪽맞춤 사용 유무 (false:미사용)
, landScape : "true" //엑셀 프린터 출력시 가로 방향 출력 유무 (false:세로)
, pageSize : "A4" //엑셀 프린터 출력시 인쇄용지 설정 (A4:A4용지)
};
options.autoSizeColumn = "false"; //너비자동맞춤 설정 유무 (false:미적용)
options.useStyle = "true"; //화면의 그리드 스타일을 엑셀파일로 내려받음
options.useFooterData = "true"; //footer 값을 서식없이 그대로 올린다.
options.rowNumVisible = "true";
options.type = "1";
//조회결과를 map 형태로 처리
//--hashmap 형태의 데이터 엑셀 저장시 필요
options.ismap = "true";
com.fncMakeExcelProvider("incomeService", "findIncomeWorkerWorkStatExcelList", "cfs.income.vo.IncomeParamsVO", statMap, grd_statList, options, info);
};
scwin.rad_kbn_onchange = function() {
var kbn = rad_kbn.getValue();
if (kbn == '1') {
//일별
ica_workStDate.setCalendarValueType( "yearMonthDate" );
ica_workEdDate.setCalendarValueType( "yearMonthDate" );
ica_workStDate.setValue( com.getToday( "yyyyMMdd" ) );
ica_workEdDate.setValue( com.getToday( "yyyyMMdd" ) );
} else if (kbn == '2') {
//월별
ica_workStDate.setCalendarValueType( "yearMonth" );
ica_workEdDate.setCalendarValueType( "yearMonth" );
ica_workStDate.setValue( com.getToday( "yyyyMM" ) );
ica_workEdDate.setValue( com.getToday( "yyyyMM" ) );
}
};
scwin.fmtWorkTime = function(data, formattedData, rowIndex, colIndex) {
if (data == 0) {
return "";
} else {
return com.fmtSecondsToYmKor(data, formattedData, rowIndex, colIndex);
}
};
scwin.fmtWorkYear = function(data, formattedData, rowIndex, colIndex) {
var workDate = tmpStatList.getCellData( rowIndex , "WORK_DATE" );
if (workDate.length >= 4) {
rtn = workDate.substr(0,4)+"년";
} else {
rtn = workDate;
}
return rtn;
};
scwin.fmtWorkMonth = function(data, formattedData, rowIndex, colIndex) {
var workDate = tmpStatList.getCellData( rowIndex , "WORK_DATE" );
if (workDate.length >= 6) {
rtn = Number(workDate.substr(4,2))+"월";
} else {
rtn = workDate;
}
return rtn;
};
]]></script>
</head>
<body ev:onpageload="scwin.onpageload" ev:onpageunload="scwin.onpageunload">
<xf:group class="contentWrap" id="" style="">
<form id="IC015M01" method="post" action ="/ClipReport4/reportView.jsp">
<input type ="hidden" name="crfName"></input>
<input type ="hidden" name="fareOfficeId"></input>
<input type ="hidden" name="workStDate"></input>
<input type ="hidden" name="workEdDate"></input>
</form>
<w2:wframe id="" initScript="scwin.wfTitleFavInit();" src="/cm/common/wf_titleFav.xml" style=""></w2:wframe>
<xf:group class="tbl_search" id="grp_search" style="">
<xf:group adaptive="layout" adaptiveThreshold="700" class="w2tb tbl_sc" id="" style="" tagname="table">
<w2:attributes>
<w2:summary></w2:summary>
</w2:attributes>
<xf:group tagname="colgroup">
<xf:group style="width:70px;" tagname="col"></xf:group>
<xf:group style="width:130px;" tagname="col"></xf:group>
<xf:group style="width:130px;" tagname="col"></xf:group>
<xf:group style="width:70px;" tagname="col"></xf:group>
<xf:group style="width:230.00px;" tagname="col"></xf:group>
<xf:group style="width:*;" tagname="col"></xf:group>
</xf:group>
<xf:group adaptive="" adaptiveThreshold="" style="" tagname="tr">
<xf:group class="w2tb_th" style="" tagname="th">요금소</xf:group>
<xf:group class="w2tb_td" style="" tagname="td"><xf:select1 allOption="" appearance="minimal" chooseOption="true" direction="auto" disabled="false"
disabledClass="w2selectbox_disabled" displayMode="label" id="sbx_fareOfficeId" ref="data:statMap.fareOfficeId"
style="width: 120px;" submenuSize="auto" chooseOptionLabel="-전체-">
<xf:choices></xf:choices>
</xf:select1></xf:group>
<xf:group class="w2tb_td" style="" tagname="td"><xf:select1 appearance="full" cols="" id="rad_kbn" ref="data:statMap.kbn"
renderType="table" rows="1" selectedIndex="0" style="" ev:onchange="scwin.rad_kbn_onchange">
<xf:choices>
<xf:item>
<xf:label><![CDATA[일별]]></xf:label>
<xf:value><![CDATA[1]]></xf:value>
</xf:item>
<xf:item>
<xf:label><![CDATA[월별]]></xf:label>
<xf:value><![CDATA[2]]></xf:value>
</xf:item>
</xf:choices>
</xf:select1></xf:group>
<xf:group class="w2tb_th" style="" tagname="th">근무일자</xf:group>
<xf:group class="w2tb_td" style="" tagname="td"><w2:inputCalendar calendarValueType="yearMonthDate" class="" dateValidCheck="" focusOnDateSelect="false"
footerDiv="false" id="ica_workStDate" ref="data:statMap.workStDate" renderDiv="true" renderType="component" style="" weekStartsOn="0" mandatory="true" validCheck="true">
</w2:inputCalendar><w2:span id="spa_span1" label="~" style=""></w2:span><w2:inputCalendar calendarValueType="yearMonthDate" class="" dateValidCheck="" focusOnDateSelect="false"
footerDiv="false" id="ica_workEdDate" ref="data:statMap.workEdDate" renderDiv="true" renderType="component" style="" weekStartsOn="0" mandatory="true" validCheck="true">
</w2:inputCalendar></xf:group>
<xf:group class="w2tb_td" style="" tagname="td">
<xf:group class="fr" id="">
<xf:trigger class="btn_sh" ev:onclick="scwin.btn_search_onclick" id="btn_search" style="" type="button">
<xf:label><![CDATA[조회]]></xf:label>
</xf:trigger>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
</xf:group>
<xf:group class="defaultbox" id="" style="">
<w2:textbox class="df_tt" id="" label="징수원 근무 현황(집계표)" style="" tagname="h2"></w2:textbox>
<xf:group class="fr" id="" style="">
<xf:trigger class="btn_act exceldown" ev:onclick="scwin.btn_excel_down_onclick" id="btn_excel_down" style=""
type="button">
<xf:label><![CDATA[엑셀다운로드]]></xf:label>
</xf:trigger>
</xf:group>
</xf:group>
<w2:gridView autoFit="lastColumn" autoFitMinWidth="600" class="cm_grid" dataList="data:tmpStatList" fixedColumnWithHidden="true"
focusMode="row" id="grd_statList" ignoreCellClick="false" ignoreToggleOnDisabled="false" scrollByColumn="false"
scrollByColumnAdaptive="false" style="height: 54px;" summaryAuto="false" useShiftKey="true" visibleRowNum="all" rowNumVisible="true"
rowNumWidth="70" rowNumHeaderValue="순번" fixedColumn="" readOnly="true">
<w2:caption style="" id="caption2" value="this is a grid caption."></w2:caption>
<w2:header style="" id="header2">
<w2:row style="" id="row3">
<w2:column removeBorderStyle="false" width="140" inputType="text" style="" id="column7" value="근무일자"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="90" inputType="text" style="" id="column11" value="징수원"
blockSelect="false" displayMode="label">
</w2:column>
</w2:row>
</w2:header>
<w2:gBody style="" id="gBody2">
<w2:row style="" id="row4">
<w2:column removeBorderStyle="false" width="140" inputType="text" style="" id="WORK_DATE" value=""
blockSelect="false" displayMode="label" excelExpression="" dataType="date">
</w2:column>
<w2:column removeBorderStyle="false" width="70" inputType="text" style="" id="WORKER_NAME" value=""
blockSelect="false" displayMode="label" dataType="text" customFormatter="com.fmtSecondsToYmKor">
</w2:column>
</w2:row>
</w2:gBody>
<w2:footer style="" id="footer2">
<w2:row style="" id="row6">
<w2:column removeBorderStyle="false" width="140" inputType="text" style="" id="column19" value="합계"
blockSelect="false" displayMode="label">
</w2:column>
<w2:column removeBorderStyle="false" width="90" inputType="text" style="" id="column18" value="" blockSelect="false"
displayMode="label">
</w2:column>
</w2:row>
</w2:footer>
</w2:gridView>
</xf:group>
</body>
</html>