123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>직원식상세현황</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <emplidcard>
- <data>
- <eatdd/>
- <hngnm/>
- <emplno/>
- <cardid/>
- <breakmeal/>
- <breakmealtm/>
- <lunchmeal/>
- <lunchmealtm/>
- <dinnermeal/>
- <dinnermealtm/>
- </data>
- </emplidcard>
- <empletc>
- <data>
- <appdd/>
- <appmmdd/>
- <psnno1/>
- <psnno2/>
- <insum1/>
- <psnno3/>
- <psnno4/>
- <psnno5/>
- <psnno6/>
- <psnno7/>
- <outsum1/>
- <sum1/>
- <psnno8/>
- <psnno9/>
- <insum2/>
- <psnno10/>
- <psnno11/>
- <psnno12/>
- <psnno13/>
- <psnno14/>
- <outsum2/>
- <sum2/>
- <psnno15/>
- <psnno16/>
- <insum3/>
- <psnno17/>
- <psnno18/>
- <psnno19/>
- <psnno20/>
- <psnno21/>
- <outsum3/>
- <sum3/>
- <totalsum/>
- </data>
- </empletc>
- <empllist>
- <emplinfo>
- <instcd/>
- <emplinstcd/>
- <mealflag/>
- <seqno/>
- <emplno/>
- <cardid/>
- <eatdd/>
- <eattm/>
- <eatamt/>
- <readyn/>
- <emplflag/>
- <usrnm/>
- </emplinfo>
- </empllist>
- </main>
- <send>
- <searchitem>
- <eatfromdd/>
- <eattodd/>
- <mealflag/>
- <hngnm/>
- <emplno/>
- <yyyymm/>
- </searchitem>
- <data>
- <empletc/>
- </data>
- <data1>
- <emplinfo/>
- </data1>
- </send>
- <temp>
- </temp>
- <init>
- <basecode>
- <meal>
- <A0055>
- <cdid/>
- <cdnm/>
- </A0055>
- </meal>
- </basecode>
- </init>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- finit();
- btn_search1.disabled = !checkAuth("R");
- btn_search2.disabled = !checkAuth("R");
- btn_save.disabled = !checkAuth("X");
- btn_excel.disabled = !checkAuth("P");
- btn_save.visible = false;
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- //초기화
- function finit() {
- // 화면open시 공통코드 setting
- zbcfGetCodeList( new Array( "A0055" ), new Array( "/root/init/basecode/meal" ) );
- model.setValue("/root/send/searchitem/eatfromdd", getCurrentDate());
- model.setValue("/root/send/searchitem/eattodd", getCurrentDate());
- model.setValue("/root/send/searchitem/mealflag", "-");
- model.setValue("/root/send/searchitem/yyyymm", getCurrentDate().substr(0,6));
- model.resetInstanceNode("/root/send/data");
- model.removeNodeset("/root/main/emplidcard");
- model.removeNodeset("/root/main/empletc");
- model.toggle("case1");
- model.refresh();
- }
-
- //기타식수관리 그리드의 소계,합계,총계 구하기
- function fsum() {
- var val = 0;
- var temp = 0;
- var sum = 0;
- var totalsum = 0;
- for ( i=1; i<grd_empletc.rows-2; i++) {
- //조식
- for (var k = 1; k <= 7; k++) {
- val = model.getValue("/root/main/empletc/data["+ i +"]/psnno" + k);
- if (val > 0) {
- temp = parseInt(temp) + parseInt(val);
- }
- if (k == 2) {
- model.setValue("/root/main/empletc/data["+ i +"]/insum1", temp);
- sum = sum + temp;
- temp = 0;
- } else if (k == 7) {
- model.setValue("/root/main/empletc/data["+ i +"]/outsum1", temp);
- model.setValue("/root/main/empletc/data["+ i +"]/sum1", sum + temp);
- totalsum = totalsum + sum + temp;
- }
- }
- temp = 0;
- sum = 0;
- //중식
- for (var k = 8; k <= 14; k++) {
- val = model.getValue("/root/main/empletc/data["+ i +"]/psnno" + k);
- if (val > 0) {
- temp = parseInt(temp) + parseInt(val);
- }
- if (k == 9) {
- model.setValue("/root/main/empletc/data["+ i +"]/insum2", temp);
- sum = sum + temp;
- temp = 0;
- } else if (k == 14) {
- model.setValue("/root/main/empletc/data["+ i +"]/outsum2", temp);
- model.setValue("/root/main/empletc/data["+ i +"]/sum2", sum + temp);
- totalsum = totalsum + sum + temp;
- }
- }
- temp = 0;
- sum = 0;
- //석식
- for (var k = 15; k <= 21; k++) {
- val = model.getValue("/root/main/empletc/data["+ i +"]/psnno" + k);
- if (val > 0) {
- temp = parseInt(temp) + parseInt(val);
- }
- if (k == 16) {
- model.setValue("/root/main/empletc/data["+ i +"]/insum3", temp);
- sum = sum + temp;
- temp = 0;
- } else if (k == 21) {
- model.setValue("/root/main/empletc/data["+ i +"]/outsum3", temp);
- model.setValue("/root/main/empletc/data["+ i +"]/sum3", sum + temp);
- totalsum = totalsum + sum + temp;
- }
- }
- temp = 0;
- sum = 0;
- model.setValue("/root/main/empletc/data["+ i +"]/totalsum", totalsum);
- totalsum = 0;
- }
- grd_empletc.refresh();
- }
- ]]>
- </script>
- <submission id="TRZBC00101"/>
- <submission id="TRANT02601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main/emplidcard"/>
- <submission id="TRANT02602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main/empletc"/>
- <submission id="TRANT02603" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main/empllist"/>
- <submission id="TXANT02601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data/empletc"/>
- <submission id="TXANT02602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
- <bind id="bind_ward" ref="/root/main/data/ward" readonly="../ward!=''"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
- </xhtml:head>
- <xhtml:body guideline="1,1194;2,754;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">직원식상세현황</caption>
- </group>
- <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
- <switch id="switch1" style="left:0px; top:26px; width:1194px; height:718px; ">
- <case id="case1" selected="true">
- <group id="group2" style="left:5px; top:10px; width:1182px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1182px; height:35px; background-color:#fffbf2; "/>
- <caption id="caption2" class="search_name" style="left:866px; top:8px; width:89px; height:17px; ">사원번호 :</caption>
- <input id="ipt_emplno" ref="/root/send/searchitem/emplno" class="input_search" style="left:955px; top:8px; width:85px; height:19px; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- inputEnterKey("btn_search1", "DOMActivate");
- ]]>
- </script>
- </input>
- <button id="btn_search1" class="btn1_letter2" style="left:1122px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fromdd = model.getValue("/root/send/searchitem/eatfromdd");
- var todd = model.getValue("/root/send/searchitem/eattodd");
- if (getDateInterval(fromdd, todd) < 0) {
- messageBox("조회 시작일은 종료일보다 클 수", "I004");
- return;
- } else {
- submit("TRANT02601");
- }
- ]]>
- </script>
- </button>
- <line id="line13" style="x1:1106px; y1:7px; x2:1106px; y2:29px; "/>
- <caption id="caption3" class="search_name" style="left:31px; top:8px; width:64px; height:17px; ">일자 :</caption>
- <input id="ipt_eatfromdd" ref="/root/send/searchitem/eatfromdd" class="input_s_essential" inputtype="date" style="left:90px; top:7px; width:90px; height:19px; "/>
- <caption id="caption11" class="search_n_b" style="left:185px; top:9px; width:12px; height:17px; font-weight:bolder; ">~</caption>
- <input id="ipt_eattodd" ref="/root/send/searchitem/eattodd" class="input_s_essential" inputtype="date" style="left:200px; top:7px; width:90px; height:19px; "/>
- <caption id="caption4" class="search_name" style="left:336px; top:8px; width:64px; height:17px; ">끼니 :</caption>
- <select1 id="rdo_mealflag" ref="/root/send/searchitem/mealflag" class="radio_search" appearance="full" cellspacing="5" cols="4" rows="1" overflow="visible" style="left:398px; top:8px; width:197px; height:19px; ">
- <choices>
- <item>
- <label>전체</label>
- <value>-</value>
- </item>
- <item>
- <label>조식</label>
- <value>1</value>
- </item>
- <item>
- <label>중식</label>
- <value>2</value>
- </item>
- <item>
- <label>석식</label>
- <value>3</value>
- </item>
- </choices>
- </select1>
- <caption id="caption12" class="search_name" style="left:650px; top:8px; width:86px; height:17px; ">사원명 :</caption>
- <input id="ipt_hngnm" ref="/root/send/searchitem/hngnm" class="input_search" style="left:725px; top:8px; width:80px; height:19px; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- inputEnterKey("btn_search1", "DOMActivate");
- ]]>
- </script>
- </input>
- </group>
- <line id="line1" class="line_1" style="x1:5px; y1:69px; x2:1188px; y2:69px; "/>
- <datagrid id="grd_emplidcard" nodeset="/root/main/emplidcard/data" caption="일자^사원명^사원번호^카드ID^조식^조식식수시간^중식^중식식수시간^석식^석식식수시간" colsep="^" colwidth="100, 100, 100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:5px; top:74px; width:1183px; height:636px; text-align:center; ">
- <col ref="eatdd" format="yyyy-mm-dd"/>
- <col ref="hngnm"/>
- <col ref="emplno" style="text-align:left; "/>
- <col ref="cardid" visibility="hidden"/>
- <col ref="breakmeal"/>
- <col ref="breakmealtm" visibility="hidden" format="hh:nn:ss"/>
- <col ref="lunchmeal"/>
- <col ref="lunchmealtm" visibility="hidden" format="hh:nn:ss"/>
- <col ref="dinnermeal"/>
- <col ref="dinnermealtm" visibility="hidden" format="hh:nn:ss"/>
- </datagrid>
- <button id="button1" class="btn1_letter6" style="left:1037px; top:46px; width:104px; height:22px; ">
- <caption>자료가져오기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fromdd = model.getValue("/root/send/searchitem/eatfromdd");
- var todd = model.getValue("/root/send/searchitem/eattodd");
- if (getDateInterval(fromdd, todd) < 0) {
- messageBox("조회 시작일은 종료일보다 클 수", "I004");
- return;
- } else {
- model.removeNodeset("/root/main/empllist/emplinfo");
- if (submit("TRANT02603")){
- var updateData = datagrid1.getUpdateDataAll("i");
- model.setValue("/root/send/data1/emplinfo", updateData);
- submit("TXANT02602");
- submit("TRANT02601");
- }
- }
- ]]>
- </script>
- </button>
- <datagrid id="datagrid1" nodeset="/root/main/empllist/emplinfo" visibility="hidden" caption="caption1^caption2^caption3^caption4^caption5^caption6^caption7^caption8^caption9^caption10^emplflag^usrnm" colsep="^" colwidth="100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 60, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:20px; top:200px; width:1150px; height:435px; ">
- <col ref="instcd"/>
- <col ref="emplinstcd"/>
- <col ref="mealflag"/>
- <col ref="seqno"/>
- <col ref="emplno"/>
- <col ref="cardid"/>
- <col ref="eatdd"/>
- <col ref="eattm"/>
- <col ref="eatamt"/>
- <col ref="readyn"/>
- <col ref="emplflag"/>
- <col ref="usrnm"/>
- </datagrid>
- </case>
- <case id="case2">
- <group id="group3" style="left:5px; top:10px; width:1182px; height:35px; vertical-align:top; ">
- <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1182px; height:35px; background-color:#fffbf2; "/>
- <caption id="caption5" class="search_name" style="left:31px; top:8px; width:89px; height:17px; ">조회년월 :</caption>
- <input id="ipt_yyyymm" ref="/root/send/searchitem/yyyymm" format="yyyy-mm" style="left:120px; top:8px; width:85px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- inputEnterKey("btn_search2", "DOMActivate");
- ]]>
- </script>
- </input>
- <button id="btn_before" class="icon_pre" style="left:208px; top:10px; width:13px; height:15px; ">
- <caption/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var dd = model.getValue("/root/send/searchitem/yyyymm") + "01";
- dd = dd.toDate().getAddDate(-1, "M");
- dd = dd.getDateFormat("YYYYMM");
- model.setValue("/root/send/searchitem/yyyymm", dd);
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_next" class="icon_pre" style="left:223px; top:10px; width:13px; height:15px; ">
- <caption/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var dd = model.getValue("/root/send/searchitem/yyyymm") + "01";
- dd = dd.toDate().getAddDate(1, "M");
- dd = dd.getDateFormat("YYYYMM");
- model.setValue("/root/send/searchitem/yyyymm", dd);
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_search2" class="btn1_letter2" style="left:1112px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if (isValidDateTime(model.getValue("/root/send/searchitem/yyyymm"), "YYYYMM") == false) {
- messageBox("조회년월의 형식이", "E016");
- model.setFocus("ipt_yyyymm");
- return;
- }
- else {
- submit("TRANT02602");
- //row status가 null이기 때문에 무조건 'insert'로 초기화
- for ( i=3; i<grd_empletc.rows; i++) {
- grd_empletc.addStatus(i, "insert");
- }
-
- fsum(); //소계,합계,총계 구하기
-
- grd_empletc.subtotalPosition = "below";
- for (var i = 3; i <= 33; i++) {
- grd_empletc.subtotal("sum", -1, i, "#,###", "", 2, "계");
- }
- }
- ]]>
- </script>
- </button>
- <line id="line2" style="x1:1096px; y1:7px; x2:1096px; y2:29px; "/>
- </group>
- <line id="line3" class="line_1" style="x1:5px; y1:69px; x2:1188px; y2:69px; "/>
- <datagrid id="grd_empletc" nodeset="/root/main/empletc/data" caption="년월일^일자^조식^조식^조식^조식^조식^조식^조식^조식^조식^조식^중식^중식^중식^중식^중식^중식^중식^중식^중식^중식^석식^석식^석식^석식^석식^석식^석식^석식^석식^석식^총계|년월일^일자^본원^본원^본원^외부^외부^외부^외부^외부^외부^합계^본원^본원^본원^외부^외부^외부^외부^외부^외부^합계^본원^본원^본원^외부^외부^외부^외부^외부^외부^합계^총계|년월일^일자^현금^공용^소계^성의^성모^의정부^부천^기타^소계^합계^현금^공용^소계^성의^성모^의정부^부천^기타^소계^합계^현금^공용^소계^성의^성모^의정부^부천^기타^소계^합계^총계" colsep="^" colwidth="10, 70, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 70" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:5px; top:74px; width:1183px; height:635px; text-align:center; ">
- <col ref="appdd" visibility="hidden"/>
- <col ref="appmmdd" format="mm-dd"/>
- <col ref="psnno1" type="input"/>
- <col ref="psnno2" type="input"/>
- <col ref="insum1"/>
- <col ref="psnno3" type="input"/>
- <col ref="psnno4" type="input"/>
- <col ref="psnno5" type="input"/>
- <col ref="psnno6" type="input"/>
- <col ref="psnno7" type="input"/>
- <col ref="outsum1"/>
- <col ref="sum1"/>
- <col ref="psnno8" type="input"/>
- <col ref="psnno9" type="input"/>
- <col ref="insum2"/>
- <col ref="psnno10" type="input"/>
- <col ref="psnno11" type="input"/>
- <col ref="psnno12" type="input"/>
- <col ref="psnno13" type="input"/>
- <col ref="psnno14" type="input"/>
- <col ref="outsum2"/>
- <col ref="sum2"/>
- <col ref="psnno15" type="input"/>
- <col ref="psnno16" type="input"/>
- <col ref="insum3"/>
- <col ref="psnno17" type="input"/>
- <col ref="psnno18" type="input"/>
- <col ref="psnno19" type="input"/>
- <col ref="psnno20" type="input"/>
- <col ref="psnno21" type="input"/>
- <col ref="outsum3"/>
- <col ref="sum3"/>
- <col ref="totalsum"/>
- </datagrid>
- </case>
- </switch>
- <button id="btn_empldietidcard" class="btn_sw" group="tab" selected="true" style="left:0px; top:5px; width:85px; height:22px; ">
- <caption>ID카드식수</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.toggle("case1");
- btn_save.visible = false;
- ]]>
- </script>
- </button>
- <button id="btn_empldietetc" class="btn_sw" group="tab" style="left:85px; top:5px; width:95px; height:22px; ">
- <caption>기타식수관리</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.toggle("case2");
- btn_save.visible = true;
- ]]>
- </script>
- </button>
- <button id="btn_excel" class="btn2_letter2" style="left:1145px; top:75px; width:42px; height:19px; ">
- <caption>엑셀</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( btn_empldietidcard.selected == true ) {
- var filename = window.fileDialog("save", ",", false, "직원식ID카드현황", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (filename != "") {
- grd_emplidcard.saveExcel(filename, "grd_emplidcard", true, false, "", "", "");
- }
- } else if ( btn_empldietetc.selected == true ) {
- var filename = window.fileDialog("save", ",", false, "직원식기타현황", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (filename != "") {
- grd_empletc.saveExcel(filename, "grd_empletc", true, false, "", "", "");
- }
- }
- ]]>
- </script>
- </button>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
- <button id="btn_save" class="btn4_letter2" style="left:1138px; top:4px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var temp = getGridUpdateData(grd_empletc);
- if ( temp == "" ) {
- messageBox("저장할 데이터가", "I004");
- return;
- } else {
- if ( messageBox("", "Q002") == 6 ) {
- model.setValue("/root/send/data/empletc", grd_empletc.getUpdateData());
- submit("TXANT02601");
- btn_search2.dispatch("DOMActivate"); //저장후 재조회
- } else { return; }
- }
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|