123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>
- <reqdata>
- <doctrinecd/>
- <attdfromdd/>
- <attdtodd/>
- <doctrinetrgtmanposcd/>
- <trgtmannm/>
- <lactrnm/>
- </reqdata>
- <savedata/>
- <conslrpastor/>
- </send>
- <main>
- <doatinfo>
- <doatlist>
- <chk/>
- <doctrinetrgtmanposnm/>
- <trgtmannm/>
- <attdncdd/>
- <brthdatedd/>
- <lactrnm/>
- <lactrid/>
- <outerlactryn/>
- <doctrineprogrs/>
- <trgtmanid/>
- <rgstdd/>
- <seqno/>
- <status/>
- </doatlist>
- </doatinfo>
- </main>
- <init>
- <cmblist>
- <doctrineinfo/>
- <doctrinetrgtmanposinfo/>
- </cmblist>
- </init>
- <hidden>
- <errmsg/>
- <conslrpastor/>
- </hidden>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInit();
- ]]>
- </script>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRZBC00105" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRAYA03301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/doatinfo"/>
- <submission id="TXAYA03301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root"/>
- <submission id="TRAYA01303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/conslrpastor" resultref="/root/hidden/conslrpastor"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript">
- <![CDATA[
- // 초기값 셋팅
- function fInit()
- {
- //출석 저장 체크박스 설정
- grd_list.fixedcellcheckbox(0,1) = true;
- //조회조건 콤보리스트 셋팅(교리명, 대상자소속, 상태구분)
- zbcfGetCodeList(new Array("A0211"), new Array("/root/init/cmblist/doctrineinfo"), true);
- //조회부 콤보 셋팅(상태구분)
- zbcfGetKindCodeList(
- new Array("A0008"), //업무규칙
- new Array("A0212"), //코드군
- new Array("/root/init/cmblist/doctrinetrgtmanposinfo"), //노드
- true, //minimum : true TRZBC00105
- new Array("cdid"), //sorting 항목
- new Array("asc")
- );
-
- addComboItem("cmb_doctrinetrgtmanposcd", "", "", "above");
-
- rdo_doctrinecd.select(0);
-
- cmb_doctrinetrgtmanposcd.select(0);
-
- //등록일자를 오늘 기준으로 세팅
- var CurrentDate = getCurrentDate();
- model.setValue("/root/send/reqdata/attdfromdd", CurrentDate.substr(0, 6) + "01");
- model.setValue("/root/send/reqdata/attdtodd", CurrentDate);
-
- model.removeNodeset("/root/main/doatinfo/doatlist");
-
- model.refresh();
- }
-
- // 조회
- function fSearch()
- {
-
- if (ipt_trgtmannm.currentText.length > 0 && ipt_trgtmannm.currentText.length < 2) {
- messageBox("대상자명은 2글자 이상으로 해주십시요!","E999","");
- model.setFocus("ipt_trgtmannm");
- return;
- }
-
- if (ipt_lactrnm.currentText.length > 0 && ipt_lactrnm.currentText.length < 2) {
- messageBox("강사명은 2글자 이상으로 해주십시요!","E999","");
- model.setFocus("ipt_lactrnm");
- return;
- }
-
- // reqGetAttdncList
- // getAttdncList
- if (submit("TRAYA03301", false) == true)
- {
- grd_list.fixedcellischeck(0, 1) = false;
- //grd_list.fixedcellcheckbox(0,0) = false;
- //node 복사
- model.removeNodeset("/root/temp/doatinfo");
- model.makeNode("/root/temp/doatinfo");
- model.copyNode("/root/temp/doatinfo","/root/main/doatinfo");
- }
- else
- {
- messageBox("조회를", "E009");
- }
- }
-
- // 저장
- function fSave(status)
- {
- if (status == "u")
- {
- if (instance1.selectSingleNode("/root/main/doatinfo").xml == instance1.selectSingleNode("/root/temp/doatinfo").xml) {
- messageBox("변경된 데이터가 ","I004");
- return;
- }
- }
-
- var checkyn = "N";
- for (var i=0; i<grd_list.rows; i++)
- {
- var chk = model.getValue("/root/main/doatinfo/doatlist[" + i + "]/chk");
- var outerlactryn = model.getValue("/root/main/doatinfo/doatlist[" + i + "]/outerlactryn");
- var lactrnm = model.getValue("/root/main/doatinfo/doatlist[" + i + "]/lactrnm");
- var lactrid = model.getValue("/root/main/doatinfo/doatlist[" + i + "]/lactrid");
- if (chk == "Y")
- {
- model.setValue("/root/main/doatinfo/doatlist[" + i + "]/status", status);
- checkyn = "Y";
- if(lactrid ==""){
- if (outerlactryn =="N" || lactrnm == "" ){
- messageBox("강사정보를","C002" );
- model.refresh();
- return;
- }
- }
- }
- }
-
- if (checkyn == "N")
- {
- messageBox("선택한 대상자가", "I004");
- return;
- }
-
- if (status == "d")
- {
- var btn = messageBox("선택한 대상자를", "Q001");
- if (btn == '7')
- {
- return;
- }
- }
-
- model.resetInstanceNode("/root/send/savedata");
- model.setValue("/root/send/savedata", grd_list.getUpdateDataAll("u"));
-
- if (submit("TXAYA03301", false) == true)
- {
- messageBox("저장이","I002");
- grd_list.clearStatus();
- fSearch();
- }
- else
- {
- //messageBox("저장에", "E009");
- }
- }
-
-
- //강사 팝업
- function fSearchLactr() {
- var lrow = grd_list.row;
-
- if (grd_list.rows <= 1) return;
- if (lrow < 1) return;
-
- var colname = grd_list.colAttribute(grd_list.col, "ref");
- //alert(colname);
- if (colname == "lactrid")
- {
- if (model.getValue("/root/main/doatinfo/doatlist[" + lrow +"]/outerlactryn") != "Y")
- {
- model.resetInstanceNode("/root/popdata");
- modal("SPAYA02800", 1, 200, 100);
- //modal("SPAYA02800",null,null,null, "SPAYA02800", "/root/actsource", "/root/main/actsource");
-
- if (model.getValue("/root/popdata/conslrid") != "")
- {
- model.setValue("/root/main/doatinfo/doatlist[" + lrow + "]/lactrid", model.getValue("/root/popdata/conslrid"));
- model.setValue("/root/main/doatinfo/doatlist[" + lrow + "]/lactrnm", model.getValue("/root/popdata/conslrnm"));
- model.setValue("/root/main/doatinfo/doatlist[" + lrow + "]/outerlactryn", "N");
- }
- }
-
- model.refresh();
- }else if (colname == "outerlactryn")
- {
- //alert("aa");
- model.resetInstanceNode("/root/main/doatinfo/doatlist[" + lrow +"]/lactrnm");
- model.resetInstanceNode("/root/main/doatinfo/doatlist[" + lrow +"]/lactrid");
- model.refresh();
- }
-
- /*
- var chkflag = setParameter("chkflag", 'doctrinelactr');
- modal("SPAYA02800", 1, 200, 100);
-
- if (model.getValue("/root/main/attdabsnrgst/attdabsnrgstinfo/lactrid") != "") {
- model.resetInstanceNode("/root/main/attdabsnrgst/attdabsnrgstinfo/outer_chk");
- ipt_lactrnm.disabled = true;
- } else {
- ipt_lactrnm.disabled = false;
- }
- model.refresh();
- */
- }
-
- // 강사명 삭제시 코드 삭제
- function fGrdValueChanged()
- {
- var lrow = grd_list.row;
-
- if (grd_list.rows <= 1) return;
- if (lrow < 1) return;
-
- var colname = grd_list.colAttribute(grd_list.col, "ref");
- //alert(colname);
- if (colname == "lactrnm")
- {
- if (grd_list.labelMatrix(lrow, grd_list.col) == "")
- {
- model.resetInstanceNode("/root/main/doatinfo/doatlist[" + lrow +"]/lactrnm");
- model.resetInstanceNode("/root/main/doatinfo/doatlist[" + lrow +"]/lactrid");
- model.refresh();
- }
- }
-
- }
-
- //외부 강사를 체크했을 경우
- function fClickOuter_Chk() {
- var lrow = grd_list.row;
- var lcol = grd_list.col;
- if (lrow < 1) return;
-
- var colname = grd_list.colAttribute(lcol, "ref");
- //alert(colname);
- if (colname == "outerlactryn")
- {
- //alert("aa");
- model.resetInstanceNode("/root/main/doatinfo/doatlist[" + lrow +"]/lactrnm");
- model.resetInstanceNode("/root/main/doatinfo/doatlist[" + lrow +"]/lactrid");
- model.refresh();
- }
- }
-
- // entercell
- function fGrdEnterCell()
- {
- if (grd_list.colType(grd_list.col) == "input")
- grd_list.editCell();
-
- //alert(grd_list.colType(grd_list.col));
- //if (grd_list.colType(grd_list.col) == "inputdate")
- //grd_list.editCell();
- }
-
- function fGrdKeyDown()
- {
- var lrow = grd_list.row;
- var lcol = grd_list.col;
- if (lrow < 1) return;
-
- var colname = grd_list.colAttribute(lcol, "ref");
- //alert(colname);
- if (colname == "lactrnm")
- {
- if (model.getValue("/root/main/doatinfo/doatlist[" + lrow +"]/outerlactryn") != "Y")
- {
- if(event.keyCode==13)
- {
- model.resetInstanceNode("/root/popdata");
- var pastor = "N";
-
-
- var pastornm = grd_list.textMatrix(lrow, lcol);
-
- //alert(pastornm);
- fGetConslrID(pastornm);
- model.refresh();
- }
- }
- }
- }
-
-
- // 담당원목자명/주례자명으로 찾기
- function fGetConslrID(pastornm)
- {
- var lrow = grd_list.row;
-
- model.removeNodeset('/root/send/conslrpastor');
- model.resetInstanceNode("/root/hidden/conslrpastor/chrgconslrlistinfo");
-
- model.makeNode('/root/send/conslrpastor/conslrpastornm');
- model.setValue('/root/send/conslrpastor/conslrpastornm', pastornm);
-
- if (pastornm == "")
- {
- model.setValue("/root/main/doatinfo/doatlist[" + lrow +"]/lactrnm", "");
- model.setValue("/root/main/doatinfo/doatlist[" + lrow +"]/lactrid", "");
- model.setValue("/root/main/doatinfo/doatlist[" + lrow +"]/outerlactryn", "N");
- return;
- }
- if(submit('TRAYA01303', false) == true)
- {
- var nodecnt = model.instances(0).selectNodes("/root/hidden/conslrpastor/chrgconslrlistinfo").length;
-
- // 두건 이상일때는 팝업
- if (nodecnt > 1)
- {
- fSearchLactr()
- }
- else
- {
- var conslrid = model.getValue('/root/hidden/conslrpastor/chrgconslrlistinfo/conslrpastorid');
-
- // 찾는 사람이 없을 때도 팝업
- if (conslrid == "")
- {
- fSearchLactr()
- }
- else
- {
- model.setValue("/root/main/doatinfo/doatlist[" + lrow +"]/lactrid", model.getValue("/root/hidden/conslrpastor/chrgconslrlistinfo/conslrpastorid"));
- model.setValue("/root/main/doatinfo/doatlist[" + lrow +"]/lactrnm", model.getValue("/root/hidden/conslrpastor/chrgconslrlistinfo/conslrpastornm"));
- model.setValue("/root/main/doatinfo/doatlist[" + lrow +"]/outerlactryn", "N");
- }
- }
- }
-
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="950" pageheight="543" guideline="1,944;2,543;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group3" scroll="auto" style="left:15px; top:0px; width:915px; height:515px; ">
- <group id="group2" style="left:0px; top:0px; width:915px; height:65px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:915px; height:60px; "/>
- <caption id="caption2" class="search_name" style="left:280px; top:10px; width:101px; height:17px; ">출석일자 :</caption>
- <button id="btn_search" class="btn1_letter2" style="left:845px; top:20px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSearch();
- model.refresh();
- ]]>
- </script>
- </button>
- <caption id="caption9" class="search_no_b" style="left:474px; top:9px; width:12px; height:17px; ">~</caption>
- <caption id="caption3" class="search_name" style="left:610px; top:10px; width:99px; height:17px; ">대상자구분 :</caption>
- <line id="line13" class="line_4" style="x1:829px; y1:10px; x2:829px; y2:53px; "/>
- <caption id="caption4" class="search_name" style="left:15px; top:10px; width:98px; height:17px; ">교 리 명 :</caption>
- <select1 id="rdo_doctrinecd" ref="/root/send/reqdata/doctrinecd" class="radio_search" overflow="visible" appearance="full" cellspacing="5" cols="2" rows="1" style="left:105px; top:10px; width:150px; height:20px; border-style:none; ">
- <choices>
- <itemset nodeset="/root/init/cmblist/doctrineinfo/A0211">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <input id="ipt_attdfromdd" ref="/root/send/reqdata/attdfromdd" class="input_default" inputtype="date" style="left:370px; top:9px; width:100px; height:19px; "/>
- <input id="ipt_attdtodd" ref="/root/send/reqdata/attdtodd" class="input_default" inputtype="date" style="left:490px; top:9px; width:100px; height:19px; "/>
- <select1 id="cmb_doctrinetrgtmanposcd" ref="/root/send/reqdata/doctrinetrgtmanposcd" class="combo_search" appearance="minimal" style="left:715px; top:9px; width:100px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/cmblist/doctrinetrgtmanposinfo/A0008A0212">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <input id="ipt_trgtmannm" ref="/root/send/reqdata/trgtmannm" class="input_default" imemode="hangul" appearance="input" style="left:105px; top:35px; width:100px; height:19px; "/>
- <input id="ipt_lactrnm" ref="/root/send/reqdata/lactrnm" class="input_default" imemode="hangul" appearance="input" style="left:370px; top:35px; width:100px; height:19px; "/>
- <caption id="caption7" class="search_name" style="left:15px; top:35px; width:94px; height:17px; ">대상자명 :</caption>
- <caption id="caption8" class="search_name" style="left:280px; top:35px; width:94px; height:17px; ">강 사 명 :</caption>
- </group>
- <caption id="caption1" class="tit_2" style="left:5px; top:75px; width:126px; height:14px; ">교리출결자 조회</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:90px; x2:915px; y2:90px; "/>
- <datagrid id="grd_list" nodeset="/root/main/doatinfo/doatlist" autoresize="true" caption="^대상자소속^대상자명^출석일자^생년월일^강사명^강사명^외부강사^교리진도^caption1^caption2^caption3^caption4" colsep="^" colwidth="36, 81, 100, 95, 88, 90, 103, 57, 250, 100, 100, 100, 100" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:95px; width:915px; height:415px; ">
- <col checkvalue="Y,N" ref="chk" type="checkbox"/>
- <col ref="doctrinetrgtmanposnm"/>
- <col ref="trgtmannm"/>
- <col ref="attdncdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="brthdatedd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col imemode="hangul" ref="lactrnm" type="input" maxlength="10"/>
- <col disabled="true" imemode="hangul" ref="lactrid" type="inputbutton"/>
- <col checkvalue="Y,N" ref="outerlactryn" type="checkbox"/>
- <col imemode="hangul" ref="doctrineprogrs" type="input"/>
- <col ref="trgtmanid" visibility="hidden"/>
- <col ref="rgstdd" visibility="hidden"/>
- <col ref="seqno" visibility="hidden"/>
- <col ref="status" visibility="hidden"/>
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- //fGrdKeyDown();
- //model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- //fClickOuter_Chk();
- ]]>
- </script>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- fGrdEnterCell();
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- fSearchLactr();
- ]]>
- </script>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- fGrdKeyDown();
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fGrdValueChanged();
- //model.refresh();
- ]]>
- </script>
- </datagrid>
- <button id="btn_save" class="btn5_letter2" style="left:825px; top:70px; width:42px; height:19px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var status = "u";
- fSave(status);
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_del" class="btn5_letter2" style="left:870px; top:70px; width:42px; height:19px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var status = "d";
- fSave(status);
- model.refresh();
- ]]>
- </script>
- </button>
- </group>
- <group id="group1" scroll="auto" style="left:0px; top:516px; width:930px; height:27px; ">
- <button id="btn_cancel" class="btn4_letter2" style="left:871px; top:5px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <close ev:event="DOMActivate"/>
- </button>
- <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:915px; y2:0px; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|