123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- <?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="">
- <send>
- <savedata/>
- </send>
- <main>
- <holisource>
- <voluntrid/>
- <holijobrespflag/>
- <fromdd/>
- <todd/>
- <holicd/>
- <jobrespcd/>
- <holijobrem/>
- <status/>
- <reflag/>
- </holisource>
- <returnsts>
- <statusinfo>
- <restatus/>
- <voluntrid/>
- <actstatflag/>
- <restatusdd/>
- </statusinfo>
- </returnsts>
- </main>
- <init>
- </init>
- <hidden>
- <init>
- <comcd/>
- </init>
- </hidden>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInit();
- ]]>
- </script>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TXAAA02701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/returnsts"/>
- <submission id="TRZBC00105" mediatype="application/x-www-form-urlencoded" method="post"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- </xhtml:head>
- <script type="javascript">
- <![CDATA[
- // 초기값
- function fInit()
- {
- //bcfGetCodeList( new Array("A0506"),new Array("/root/hidden/init/comcd")); // 관계코드 설정
-
- zbcfGetKindCodeList(new Array("A0020"), new Array("A0506"),new Array("/root/hidden/init/comcd"),true,'','');
-
- //opener.model.removeNodeset("/root/main/holisource/status");
- // opener.model.refresh();
-
- model.refresh();
- }
-
- //확인
- function fSendParam()
- {
- var fromdd=model.getValue("/root/main/holisource/fromdd"); //휴가시작일
- var todd=model.getValue("/root/main/holisource/todd"); //휴가종료일
- var holicd=model.getValue("/root/main/holisource/holicd"); //휴가 구분
-
- if(model.getValue("/root/main/holisource/fromdd")=="")
- {
- //저장시 휴가시작일이나 휴가종료일이 비어있으면
- messageBox("휴가시작일은","I003");
- return;
- }
- if(model.getValue("/root/main/holisource/todd")=='')
- { //저장시 휴가시작일이나 휴가종료일이 비어있으면
- messageBox("휴가종료일은","I003");
- return;
- }
- if(todd<fromdd)
- { // 휴가 종료일이 휴가 시작일 보다 빠른 날짜로 선택시
- messageBox("휴가종료일이 시작일보다 작을 수","I004");
- return;
- }
-
- if(holicd='') //휴가 구분이 공백 일 때
- {
- messageBox("휴가구분은","I003");
- return;
-
- }
- model.removeNodeset("/root/send/savedata");
- model.makeNode("/root/send/savedata");
-
- model.copyNode("/root/send/savedata","/root/main/holisource");
-
- if(submit("TXAAA02701")==true)
- {
- if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="H") // 휴가 구간이 겹칠 때
- {
- messageBox("휴가 구간이","E006");
- return;
- }
- if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="B") // 출결 정보가 있는 기간을 벗어나 수정을 했을 때
- {
- var btn=messageBox("이전 휴가 기간내에 출결 내역이 존재합니다. 수정 ","S001");
-
- if(btn=='6')
- {
- model.makeValue("/root/main/holisource/reflag","B"); // 기간내에 휴가 출결 처리한 정보가 있어도 휴가 내역 수정 하겠다는 플래그 B저장
- model.copyNode("/root/send/savedata","/root/main/holisource");
-
- if(submit("TXAAA02701")==true)
- {
- messageBox("휴가 처리가","I002");
- //opener.model.makeValue("/root/holisource/status","u");
- opener.model.makeValue("/root/holisource/reflag","c");
- opener.model.refresh();
- window.close();
- return;
- }
- }
- else
- {
- model.makeValue("/root/main/holisource/status","u"); //?
- return;
- }
- }
-
- if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="D") // 활동기간 정보가 존재 하지 않을 때
- {
- messageBox("활동기간 정보가","I004");
- return;
- }
- else
- {
- messageBox("휴가 처리가","I002");
- //opener.model.makeValue("/root/holisource/status","u");
- opener.model.makeValue("/root/holisource/reflag","c");
- opener.model.refresh();
- window.close();
- }
- }
-
- }
- function fDelHoli()
- {
- var btn=messageBox("휴가내역을","Q001");
- if(btn=='6')
- {
- if(model.getValue("/root/main/holisource/status")=="i") // 등록을 위해 팝업창을 열었을 경우에는 삭제할 수 없다.
- {
- messageBox("삭제할 휴가 처리 내역이","I004");
- return;
- }
- model.makeValue("/root/main/holisource/status","d"); //상태값에 d저장
- model.removeNodeset("/root/send/savedata");
- model.makeNode("/root/send/savedata");
-
- model.copyNode("/root/send/savedata","/root/main/holisource");
-
- if(submit("TXAAA02701")==true)
- {
- if(model.getValue("/root/main/returnsts/statusinfo/restatus")=="F") // 휴가 구간이 겹칠 때
- {
- var btn=messageBox("해당기간에 출석처리한 정보가 있습니다.","Q001");
-
- if(btn=='6')
- {
- model.makeValue("/root/main/holisource/reflag","A"); // 휴가 출결 처리한 정보가 있어도 휴가 내역 삭제하겠다는 플래그 A저장
- model.copyNode("/root/send/savedata","/root/main/holisource");
-
- if(submit("TXAAA02701")==true)
- {
- messageBox("휴가 삭제가","I002");
- //opener.model.makeValue("/root/holisource/status","u");
- opener.model.makeValue("/root/holisource/reflag","c");
- opener.model.refresh();
- }
- }
- else
- {
- model.makeValue("/root/main/holisource/status","u");
- return;
- }
-
- }
- else
- {
- messageBox("휴가 삭제가","I002");
- //opener.model.makeValue("/root/holisource/status","u");
- opener.model.makeValue("/root/holisource/reflag","c");
- opener.model.refresh();
- }
- }
- window.close();
- }
- else if(btn=='7')
- {
- return;
- }
-
- }
- ]]>
- </script>
- <xhtml:body pagewidth="465" pageheight="132" guideline="1,500;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="grp_btn" scroll="auto" style="left:0px; top:105px; width:449px; height:27px; ">
- <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:448px; y2:0px; "/>
- <button id="btn_confirm" class="btn4_letter2" style="left:332px; top:5px; width:56px; height:22px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDelHoli();
- ]]>
- </script>
- </button>
- <button id="btn_cancel" class="btn4_letter2" style="left:391px; top:5px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //opener.javascript.setParameter("flag", "N");
- //opener.model.makeValue("/root/holisource/status","r"); //취소를 뜻하는 r 플래그 저장
- model.close();
- ]]>
- </script>
- </button>
- <button id="button1" class="btn4_letter2" style="left:273px; top:5px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSendParam();
- //model.close();
- ]]>
- </script>
- </button>
- </group>
- <group id="group1" scroll="auto" style="left:0px; top:0px; width:449px; height:105px; ">
- <line id="line8" class="line_2" style="x1:0px; y1:22px; x2:448px; y2:22px; "/>
- <line id="line1" class="line_2" style="x1:0px; y1:46px; x2:448px; y2:46px; "/>
- <caption id="caption5" class="cell_1" style="left:0px; top:0px; width:85px; height:23px; vertical-align:middle; ">휴가시작일</caption>
- <caption id="caption6" class="cell_1" style="left:0px; top:24px; width:85px; height:23px; vertical-align:middle; ">구분</caption>
- <caption id="caption7" class="cell_1" style="left:0px; top:48px; width:85px; height:53px; vertical-align:middle; ">휴가사유</caption>
- <caption id="caption8" class="cell_1" style="left:210px; top:0px; width:85px; height:23px; vertical-align:middle; ">휴가종료일</caption>
- <input id="ipt_benfdd" ref="/root/main/holisource/fromdd" class="input_default" disabled="false" inputtype="date" style="left:88px; top:2px; width:120px; height:19px; "/>
- <select1 id="cmb_benfcd" ref="/root/main/holisource/holicd" class="combo_default" appearance="minimal" style="left:88px; top:25px; width:120px; height:19px; ">
- <choices>
- <itemset nodeset="/root/hidden/init/comcd/A0020A0506">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <textarea id="tar_rem" ref="/root/main/holisource/holijobrem" maxlength="33" style="left:88px; top:48px; width:360px; height:53px; "/>
- <input id="input1" ref="/root/main/holisource/todd" class="input_default" disabled="false" inputtype="date" style="left:300px; top:2px; width:120px; height:19px; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|