123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRNB00700" inheritanceid="" position="absolute 0 0 800 600" titletext="식당이용현황" onload="SMRNB00700_onload" ontimer="SMRNB00700_ontimer">
- <Layouts>
- <Layout>
- <Static id="cap_title" class="tit_1" position="absolute 0 0 180 25" text="식당이용현황"/>
- <Static id="cap_time" position="absolute 534 1 799 24" style="background:darkseagreen;padding:0 0 0 4;align:center middle;font:Dotum,10,bold;" anchor="top right"/>
- <Button id="btn_print" taborder="27" text="출력" class="btn6" position="absolute 617 26 673 48" anchor="top right" onclick="btn_print_onclick"/>
- <Button id="btn_close" taborder="30" text="종료" class="btn4" position="absolute 743 26 799 48" anchor="top right" onclick="btn_close_onclick"/>
- <Static id="cap_messege_title" position="absolute 4 573 121 596" anchor="left bottom" style="background:lightblue;padding:0 0 0 4;"/>
- <Static id="cap_messege" position="absolute 123 573 796 596" anchor="left bottom" style="background:lightblue;padding:0 0 0 4;font:Dotum,9,bold;"/>
- <Shape id="line7" class="line_6" position="absolute 0 47 799 53" anchor="left top right"/>
- <Grid id="grd_statlist" position="absolute 0 120 799 569" binddataset="ds_main_statlist" anchor="all" autofittype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="80"/>
- <Column size="40"/>
- <Column size="120"/>
- <Column size="80"/>
- <Column size="80"/>
- <Column size="159"/>
- <Column size="100"/>
- <Column size="120"/>
- <Column size="60"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- <Row size="24" band="summ"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" displaytype="normal" text="구분"/>
- <Cell col="2" text="시간"/>
- <Cell col="3" text="식사시간"/>
- <Cell col="4" text="식사장소"/>
- <Cell col="5" text="직원ID"/>
- <Cell col="6" text="소속"/>
- <Cell col="7" text="직급"/>
- <Cell col="8" text="이름"/>
- <Cell col="9" text="인원수"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow+1"/>
- <Cell col="1" displaytype="combo" style="padding:0 0 0 10;" text="bind:gubun" editautoselect="true" combodataset="ds_cmb_gubun" combocodecol="value" combodatacol="label"/>
- <Cell col="2" text="bind:tt"/>
- <Cell col="3" displaytype="date" text="bind:food_datetime" mask="yyyy-MM-dd HH:mm:ss"/>
- <Cell col="4" displaytype="combo" style="align:center;" text="bind:ocs_id" combodataset="ds_init_placelist" combocodecol="cdid" combodatacol="cdnm"/>
- <Cell col="5" displaytype="text" text="bind:id"/>
- <Cell col="6" displaytype="text" text="bind:departname" editautoselect="true"/>
- <Cell col="7" displaytype="text" text="bind:grade"/>
- <Cell col="8" displaytype="text" text="bind:name"/>
- <Cell col="9" displaytype="number" text="bind:cnt"/>
- </Band>
- <Band id="summary">
- <Cell/>
- <Cell col="1" style="font:Dotum,9,bold;" text="총건수"/>
- <Cell col="2" displaytype="number" style="font:Dotum,9,bold;"/>
- <Cell col="3" displaytype="number" style="font:Dotum,9,bold;"/>
- <Cell col="4"/>
- <Cell col="5" displaytype="number" style="font:Dotum,9,bold;"/>
- <Cell col="6" displaytype="number" style="font:Dotum,9,bold;" text="expr:rowcount"/>
- <Cell col="7" style="font:Dotum,9,bold;" text="합계"/>
- <Cell col="8" style="font:Dotum,9,bold;"/>
- <Cell col="9" displaytype="number" style="font:Dotum,9,bold;" text="expr:getSum('cnt')"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption1" text="조회리스트" class="tit_2" position="absolute 0 99 101 115"/>
- <Shape id="line1" class="line_10" position="absolute 0 115 799 121" anchor="left top right"/>
- <Button id="btn_saveExcel" taborder="33" text="Excel" class="btn7" position="absolute 676 26 740 48" anchor="top right" onclick="btn_saveExcel_onclick"/>
- <Div id="grp_search" taborder="34" class="div_SA2" position="absolute 0 51 799 91" anchor="left top right">
- <Layouts>
- <Layout>
- <Static id="cap_searchdd" text="조회일자" class="search_name" position="absolute 10 12 84 29" anchor="default"/>
- <Button id="btn_search" taborder="4" text="조회" onclick="grp_search_btn_search_onclick" class="btn1" position="absolute 729 9 785 31" style="align:center;" anchor="top right"/>
- <Shape id="line7" linetype="vertical" class="line_4" position="absolute 714 7 717 34" anchor="top right"/>
- <Calendar id="ipt_searchdd" taborder="5" autoselect="true" class="input_essential" position="absolute 91 9 209 30" anchor="default"/>
- <Combo id="cmb_instcd_search" taborder="6" innerdataset="ds_init_placelist_search" codecolumn="cdid" datacolumn="cdnm" position="absolute 327 9 475 29"/>
- <Static id="cap_instcd_search" text="식사장소" class="search_name" position="absolute 250 12 324 29"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Bind>
- <BindItem id="item19" compid="cap_messege" propid="text" datasetid="ds_messege" columnid="cmt"/>
- <BindItem id="item15" compid="grp_search.ipt_searchdd" propid="value" datasetid="ds_send" columnid="searchdd"/>
- <BindItem id="item0" compid="grp_search.cmb_instcd_search" propid="value" datasetid="ds_send" columnid="ocs_id"/>
- </Bind>
- <Objects>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="searchdd" type="STRING" size="256"/>
- <Column id="scrid" type="STRING" size="256"/>
- <Column id="ocs_id" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="searchdd"/>
- <Col id="scrid"/>
- <Col id="ocs_id"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_statlist" firefirstcount="0" firenextcount="0" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_cmb_gubun" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="value" type="STRING" size="256"/>
- <Column id="label" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="value">1</Col>
- <Col id="label">아침</Col>
- </Row>
- <Row>
- <Col id="value">2</Col>
- <Col id="label">점심</Col>
- </Row>
- <Row>
- <Col id="value">3</Col>
- <Col id="label">저녁</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_placelist_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdid" type="STRING" size="255"/>
- <Column id="cdnm" type="STRING" size="255"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_placelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdid" type="STRING" size="255"/>
- <Column id="cdnm" type="STRING" size="255"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2017-12-04
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2017-06-19 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- include "mis_miscommonxp::MIS.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var arErrorCode = new HashArray();
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument : N/A
- * Description : 초기화
- ****************************************************************************************/
- function lf_init() {
- var sInstcd = sysf_getUserInfo("dutplceinstcd");
- var sScrid = frmf_getMenuParam();
- ds_send.setColumn(0, "instcd", sInstcd);
- ds_send.setColumn(0, "searchdd", utlf_getCurrentDate());
- ds_send.setColumn(0, "scrid", sScrid);
-
- if(sScrid == "01") {
- this.titletext = "일별직원식당이용현황";
- cap_title.text = "일별직원식당이용현황";
- misfColHidden(grd_statlist, "tt,food_datetime,id,name", true);
- } else if(sScrid == "02") {
- grd_statlist.setCellProperty("Summ", grd_statlist.getBindCellIndex("body","tt"), "text", "expr:rowcount");
- grd_statlist.setCellProperty("Summ", grd_statlist.getBindCellIndex("body","departname"), "text", "");
- this.titletext = "시간별직원이용현황";
- cap_title.text = "시간별직원이용현황";
- misfColHidden(grd_statlist, "food_datetime,id,name", true);
- } else if(sScrid == "03") {
- this.titletext = "직원식당이용자리스트";
- cap_title.text = "직원식당이용자리스트";
- grd_statlist.setCellProperty("Summ", grd_statlist.getBindCellIndex("body","food_datetime"), "text", "expr:rowcount");
- grd_statlist.setCellProperty("Summ", grd_statlist.getBindCellIndex("body","departname"), "text", "");
- grd_statlist.setCellProperty("Summ", grd_statlist.getBindCellIndex("body","grade"), "text", "");
- grd_statlist.setCellProperty("Summ", grd_statlist.getBindCellIndex("body","cnt"), "text", "");
- misfColHidden(grd_statlist, "tt,cnt", true);
- }
-
- ds_main_statlist.clearData();
-
- cap_messege_title.style.background = "lightblue";
- cap_messege.text = "";
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 시간설정
- ****************************************************************************************/
- function lf_setTime() {
- var cTime = utlf_getCurrentDateTime();
- cap_time.text = cTime.substr(0,4)+"/"+cTime.substr(4,2)+"/"+cTime.substr(6,2)+" "+cTime.substr(9,2)+":"+cTime.substr(11,2)+":"+cTime.substr(13,2);
- }
- function lf_complete() {
- cap_messege_title.style.background = "lightblue";
- cap_messege.text = "출력이 완료되었습니다.";
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 조회함수
- ****************************************************************************************/
- function lf_userAuth() {
- if(sysf_getUserInfo("userid").substr(0,4).toUpperCase() == "EVER") {
- btn_print.enable = false;
- btn_saveExcel.enable = false;
- grp_search.enable = false;
- }
- }
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Description : 화면 처음 초기화시 폼초기화
- ****************************************************************************************/
- function SMRNB00700_onload(obj:Form, e:LoadEventInfo)
- {
- frmf_initForm(obj);
-
- grdf_setGridSort(grd_statlist);
-
- dsf_createDsRow("ds_req", [
- {col:"lrgcd", type:"STRING", size:256, val:"ES"}
- ]);
- var oParam = {};
- oParam.id = "TRRNB00015";
- oParam.service = "sicksuapp.SicksuMngt";
- oParam.method = "reqGetPlaceList";
- oParam.inds = "req=ds_req";
- oParam.outds = "ds_init_placelist=placelist";
- oParam.async = false;
- //oParam.callback = "cf_TRRNB00015";
- tranf_submit(oParam);
-
- ds_init_placelist_search.copyData(ds_init_placelist);
- frmf_addComboItem( "grp_search.cmb_instcd_search", "전체", "");
-
- lf_init();
- lf_userAuth();
-
- lf_setTime();
- this.setTimer(0, 1000);
- }
- /****************************************************************************************
- * Components : Form
- * Description : 화면 타이머 설정 시계표시
- ****************************************************************************************/
- function SMRNB00700_ontimer(obj:Form, e:TimerEventInfo)
- {
- if(e.timerid == 0) {
- lf_setTime();
- }
- }
- /****************************************************************************************
- * Components : Button
- * Description : 종료
- ****************************************************************************************/
- function btn_close_onclick(obj:Button, e:ClickEventInfo)
- {
- this.close();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 조회
- ****************************************************************************************/
- function grp_search_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- var oParam = {};
- oParam.id = "TRRNB00010";
- oParam.service = "sicksuapp.SicksuMngt";
- oParam.method = "reqGetFoodStatList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_statlist=foodstatlist";
- oParam.async = false;
- oParam.callback = "cf_TRRNB00010";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TRRNB00010") > -1) {
- //dsf_setTypeFormat(ds_main_statlist, "cnt:INT");
- cap_messege_title.style.background = "lightblue";
- cap_messege.text = "조회되었습니다.";
- }
- }
- function cf_TRRNB00010(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- /****************************************************************************************
- * Components : Button
- * Description : 엑셀저장
- ****************************************************************************************/
- function btn_saveExcel_onclick(obj:Button, e:ClickEventInfo)
- {
- if( ds_main_statlist.rowcount > 0 ){
- grdf_exportExcel(grd_statlist, "일별직원식당현황", "SheetName", false, "", "user", false);
- } else {
- sysf_messageBox("조회된 데이터가 ", "I004");
- }
- }
- /****************************************************************************************
- * Components : Button
- * Description : 출력
- ****************************************************************************************/
- function btn_print_onclick(obj:Button, e:ClickEventInfo)
- {
- var objDOM = rptf_createDOM(); // DOM 객체 설정
- rptf_setNodeListToDOM(objDOM, "/root/main/statlist" , ds_main_statlist);
- var objParam = new Object();
- objParam.xml_data_XML1 = objDOM.documentElement.source;
- objParam.searchdd = ds_send.getColumn(0,"searchdd");
-
- var option = "open=1;save=1;directprint=0;printdialog=1;print=1;zoom=1;callback=lf_complete";
-
- var sScrid = frmf_getMenuParam();
- var sRexid = "RPRNB007" + sScrid;
- rptf_exeReportPreview30([sRexid],[objParam], option);
- }
- ]]></Script>
- </Form>
- </FDL>
|