123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449 |
- <?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>
- <data1>
- <userid/>
- <usernm/>
- <posdeptnm/>
- <tel/>
- <mobiletel/>
- <memo/>
- </data1>
- <list1/>
- </send>
- <main>
- <list1>
- <judg>
- <userid/>
- <usernm/>
- <posdeptnm/>
- <tel/>
- <mobiletel/>
- <memo/>
- </judg>
- </list1>
- <list2>
- <user/>
- </list2>
- </main>
- <hidden>
- <appflag/>
- <approw/>
- </hidden>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
-
- // 초기화
- function fInitialize()
- {
- // 심사자정보 초기화
- model.resetInstanceNode("/root/send/data1");
- // 그리드 초기화
- model.removenode("/root/main/list1");
- model.makeNode("/root/main/list1");
- // 입력수정상태 초기화
- model.setValue("/root/hidden/appflag", "I");
- model.setValue("/root/hidden/approw", 0);
- // 사용자ID 입력상태 초기화
- ipt_userid.disabled = false;
- // 유저리스트 초기화
- grd_userlist.visible = false;
-
- model.refresh();
- }
-
- // 심사자 정보 입력
- function fInsertJudg() {
-
- // 데이터 검사(사용자ID)
- var userid = model.getValue("/root/send/data1/userid");
- var usernm = model.getValue("/root/send/data1/usernm");
- var posdeptnm = model.getValue("/root/send/data1/posdeptnm");
- var tel = model.getValue("/root/send/data1/tel");
- var mobiletel = model.getValue("/root/send/data1/mobiletel");
- var memo = model.getValue("/root/send/data1/memo");
- if (userid == "") {
- messageBox("사용자ID를","C001");
- return false;
- }
-
- var appflag = model.getValue("/root/hidden/appflag");
- var approw = model.getValue("/root/hidden/approw");
-
- // 1. 신규 입력
- if (appflag == "I") {
- // 사용자ID 검증(올바른 사용자ID 인지 체크, 중복된 ID가 아닌지 체크)
- if (fGetJudgInfo() && fCheckDuplicate()) {
- var name = model.getValue("/root/send/data1/usernm");
- var dept = model.getValue("/root/send/data1/posdeptnm");
- // 그리드에 데이터 넣기
- grd_judglist.AddRow();
- var add_row = grd_judglist.row;
- model.setValue("/root/main/list1/judg[" + add_row + "]/userid", userid);
- model.setValue("/root/main/list1/judg[" + add_row + "]/usernm", name);
- model.setValue("/root/main/list1/judg[" + add_row + "]/posdeptnm", dept);
- model.setValue("/root/main/list1/judg[" + add_row + "]/tel", tel);
- model.setValue("/root/main/list1/judg[" + add_row + "]/mobiletel", mobiletel);
- model.setValue("/root/main/list1/judg[" + add_row + "]/memo", memo);
- // 그리드 정렬
- grd_judglist.select(grd_judglist.row, grd_judglist.colRef("userid")) = true;
- }
- // 심사자정보 초기화
- model.resetInstanceNode("/root/send/data1");
- // 2. 수정
- } else if (appflag == "U") {
- // 수정한 값 세팅
- grd_judglist.valueMatrix(approw, grd_judglist.colRef("userid")) = userid;
- grd_judglist.valueMatrix(approw, grd_judglist.colRef("usernm")) = usernm;
- grd_judglist.valueMatrix(approw, grd_judglist.colRef("posdeptnm")) = posdeptnm;
- grd_judglist.valueMatrix(approw, grd_judglist.colRef("tel")) = tel;
- grd_judglist.valueMatrix(approw, grd_judglist.colRef("mobiletel")) = mobiletel;
- grd_judglist.valueMatrix(approw, grd_judglist.colRef("memo")) = memo;
-
- // 그리드 상태 변경
- grd_judglist.rowstatus(approw) = "2";
-
- // 입력 수정 상태 초기화
- model.setValue("/root/hidden/appflag", "I");
- model.setValue("/root/hidden/approw", 0);
-
- // 심사자정보 초기화
- model.resetInstanceNode("/root/send/data1");
- ipt_userid.disabled = false;
- }
- model.refresh();
- }
-
- // 심사자 삭제
- function fDeleteJudg() {
- // 멀티라인 삭제
- var rows = grd_judglist.selectedRows;
- for (var i = 0; i < rows; i++) {
- var sel = grd_judglist.selectedRow(i);
- grd_judglist.rowstatus(sel) = 4;
- }
- }
-
- // 사용자ID를 입력하기 전에 올바른 사용자ID인지 검사한다.
- function fGetJudgInfo() {
-
- var userid = model.getValue("/root/send/data1/userid");
- var id = model.getValue("/root/main/list2/user[userid="+userid+"]/userid");
-
- if (userid == id) {
- model.setValue("/root/send/data1/usernm", model.getValue("/root/main/list2/user[userid="+userid+"]/usernm"));
- model.setValue("/root/send/data1/posdeptnm", model.getValue("/root/main/list2/user[userid="+userid+"]/posdeptnm"));
- } else {
- // 올바르지 않은 사용자ID 입니다.
- messageBox("올바르지 않은 사용자ID", "E008");
- model.resetInstanceNode("/root/hidden/data1/judginfo");
- return false;
- }
- model.refresh();
- return true;
- }
-
- // 사용자명을 입력후 엔터를 치면 조회 리스트가 떠야 한다.
- function fGetJudgInfo2() {
-
- var userid = model.getValue("/root/send/data1/userid");
- var id = model.getValue("/root/main/list2/user[userid="+userid+"]/userid");
-
- // 심사자정보 초기화
- //model.resetInstanceNode("/root/send/data1");
-
- if (userid == id) {
- model.setValue("/root/send/data1/usernm", model.getValue("/root/main/list2/user[userid="+userid+"]/usernm"));
- model.setValue("/root/send/data1/posdeptnm", model.getValue("/root/main/list2/user[userid="+userid+"]/posdeptnm"));
- } else {
- // 사용자 조회 그리드 띄우기
- for (var i = 1; i < grd_userlist.rows; i++) {
- var usernm = model.getValue("/root/main/list2/user[" + i + "]/usernm");
- if (userid != usernm) {
- grd_userlist.rowHidden(i) = true;
- } else {
- grd_userlist.rowHidden(i) = false;
- }
- }
-
- grd_userlist.visible = true;
- }
- model.refresh();
- }
-
- // 입력전에 기등록된 심사자와 중복되는지 체크한다.
- function fCheckDuplicate() {
- var newuserid = model.getValue("/root/send/data1/userid");
-
- // 1. 그리드 내에서 검사(그리드는 DB에 전체 심사자 리스트를 갖고 있으므로 여기서만 중복검사를 하면 된다)
- var row = grd_judglist.rows;
- for(i = 1; i < row; i++) {
- // 삭제된 row는 중복대상에서 제외
- if (grd_judglist.rowstatus(i) != "4") {
- var olduserid = model.getValue("/root/main/list1/judg["+i+"]/userid");
-
- if (newuserid == olduserid) {
- messageBox("이미 등록된 심사자", "E008");
- return false;
- }
- }
- }
-
- // 2. DB에서 검사
- // submit("02003");
- // if (newpid == model.getValue("/root/hidden/data2/pid")) {
- // messageBox("이미 등록된 간질환 환자정보", "E008");
- // return false;
- // }
-
- return true;
- }
-
- // 저장
- function fSaveJudgList() {
- var rtn = window.alert("저장하시겠습니까?", "선택", "4");
- if (rtn != 6) return;
-
- model.removeNodeset("/root/send/list1");
- var updtdata = getGridUpdateData(grd_judglist); // (tfHelper.js) 그리드 업데이트 데이터 반환, 업데이트 정보가 없을경우 "" 반환
-
- if (updtdata) {
- model.makeValue("/root/send/list1/judg", updtdata);
-
- if(submit("TXPIB02101")) {
- // 심사자정보 초기화
- model.resetInstanceNode("/root/send/data1");
- ipt_userid.disabled = false;
- // 심사자 리스트 조회
- submit("TRPIB02101");
- } else {
- messageBox("예기치 않은 오류", "E008");
- }
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- // 심사자 리스트 조회
- submit("TRPIB02101");
- ]]>
- </script>
- <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/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <submission id="TRPIB02101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
- <submission id="TXPIB02101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/list1"/>
- <submission id="TXPIB02103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/list1"/>
- </model>
- </xhtml:head>
- <xhtml:body pagewidth="720" pageheight="530" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:700px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:194px; height:14px; ">심사자정보 관리</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:13px; width:700px; height:500px; ">
- <group id="group5" scroll="auto" style="left:0px; top:0px; width:700px; height:500 px; ">
- <line id="line17" class="line_2" style="x1:0px; y1:54px; x2:675px; y2:54px; "/>
- <caption id="caption22" class="tit_2" style="left:5px; top:10px; width:165px; height:13px; ">심사자 정보</caption>
- <line id="line19" class="line_1" style="x1:0px; y1:25px; x2:675px; y2:25px; "/>
- <caption id="caption23" class="cell_1" style="left:0px; top:30px; width:85px; height:23px; text-align:center; ">사용자ID</caption>
- <caption id="caption34" class="cell_1" style="left:240px; top:30px; width:85px; height:23px; text-align:center; ">이름</caption>
- <caption id="caption48" class="tit_2" style="left:5px; top:121px; width:188px; height:13px; ">심사자 리스트</caption>
- <line id="line20" class="line_1" style="x1:0px; y1:136px; x2:675px; y2:136px; "/>
- <datagrid id="grd_judglist" nodeset="/root/main/list1/judg" caption="사용자ID^이름^소속부서^전화번호^휴대폰번호^메모^특례명칭" colsep="^" colwidth="70, 65, 115, 87, 89, 200" dataheight="23" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" navindex="7" style="left:0px; top:141px; width:675px; height:299px; ">
- <col ref="userid" style="text-align:center; "/>
- <col ref="usernm" style="text-align:center; "/>
- <col ref="posdeptnm"/>
- <col ref="tel" style="text-align:center; "/>
- <col ref="mobiletel" style="text-align:center; "/>
- <col ref="memo"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- // 수정하기 위해 그리드의 한 row 를 클릭한다.
- var cur_row = grd_judglist.row;
- var status = grd_judglist.rowstatus(cur_row);
- if (status == "0" || status == "2") {
- model.setValue("/root/send/data1/userid", grd_judglist.valueMatrix(cur_row, grd_judglist.colRef("userid")));
- model.setValue("/root/send/data1/usernm", grd_judglist.valueMatrix(cur_row, grd_judglist.colRef("usernm")));
- model.setValue("/root/send/data1/posdeptnm", grd_judglist.valueMatrix(cur_row, grd_judglist.colRef("posdeptnm")));
- model.setValue("/root/send/data1/tel", grd_judglist.valueMatrix(cur_row, grd_judglist.colRef("tel")));
- model.setValue("/root/send/data1/mobiletel", grd_judglist.valueMatrix(cur_row, grd_judglist.colRef("mobiletel")));
- model.setValue("/root/send/data1/memo", grd_judglist.valueMatrix(cur_row, grd_judglist.colRef("memo")));
-
- model.setValue("/root/hidden/appflag", "U");
- model.setValue("/root/hidden/approw", cur_row);
-
- // 심사자ID는 변경 불가
- ipt_userid.disabled = true;
-
- model.refresh();
- }
- ]]>
- </script>
- </datagrid>
- <line id="line24" class="line_3" style="x1:2px; y1:102px; x2:677px; y2:102px; "/>
- <button id="btn_save" class="btn4_letter2" navindex="11" style="left:485px; top:445px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSaveJudgList();
- model.resetInstanceNode("/root/send/data1");
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_init" class="btn4_letter3" navindex="12" style="left:546px; top:445px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInitialize();
- // 심사자 리스트 조회
- submit("TRPIB02101");
- ]]>
- </script>
- </button>
- <button id="btn_srcpid2" class="icon_search" navindex="9" style="left:219px; top:32px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- // 사용자 조회 화면 띄우기
- modal("SPZSU10100", 1,150, 150, "SPZSU10100", "", "", "", "");
-
- // 사용자 조회팝업으로부터 넘어온 userid 검증
-
- // 사용자 조회팝업으로부터 userid, usernm, posdeptnm 설정하기
-
-
- // var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
- // var patnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
- // var sex = model.getValue("/root/main/patinfo/patinfolist/sex");
- // var age = model.getValue("/root/main/patinfo/patinfolist/age");
- // if (srch_pid) { // SPPMC02500_환자조회 화면에서 조회한 경우임
- // model.removeNodeset("/root/main/patinfo/patinfolist");
- // model.makeNode("/root/main/patinfo/patinfolist");
- // model.setValue("/root/main/data1/pid", srch_pid);
- // model.setValue("/root/main/data1/patnm", patnm);
- // model.setValue("/root/main/data1/sex", sex);
- // model.setValue("/root/main/data1/age", age);
- //
- // model.refresh();
- // }
- ]]>
- </script>
- </button>
- <button id="btn_delete" class="btn2_letter2" navindex="8" visibility="visible" style="left:632px; top:114px; width:42px; height:19px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDeleteJudg();
- ]]>
- </script>
- </button>
- <input id="ipt_userid" ref="/root/send/data1/userid" class="input_essential" navindex="1" maxlength="10" style="left:87px; top:31px; width:126px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if (event.keyCode == "13") {
- setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
-
- fGetJudgInfo2();
- }
- ]]>
- </script>
- </input>
- <caption id="caption1" class="cell_1" style="left:458px; top:30px; width:85px; height:23px; text-align:center; ">소속부서</caption>
- <input id="ipt_deptnm" ref="/root/send/data1/posdeptnm" class="input_default" navindex="2" style="left:545px; top:31px; width:126px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- // if (event.keyCode == "13") {
- // setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
- // fInsertJudg();
- // }
- ]]>
- </script>
- </input>
- <input id="ipt_phone1" ref="/root/send/data1/tel" class="input_default" navindex="3" imemode="disabled" maxlength="11" format="####" style="left:87px; top:57px; width:149px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- // if (event.keyCode == "13") {
- // setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
- // fInsertJudg();
- // }
- ]]>
- </script>
- </input>
- <caption id="caption2" class="cell_1" style="left:0px; top:54px; width:85px; height:23px; text-align:center; ">전화번호</caption>
- <line id="line1" class="line_2" style="x1:2px; y1:77px; x2:300px; y2:77px; "/>
- <caption id="caption3" class="cell_1" style="left:240px; top:55px; width:85px; height:47px; text-align:center; ">메모</caption>
- <caption id="caption4" class="cell_1" style="left:0px; top:79px; width:85px; height:23px; text-align:center; ">휴대폰번호</caption>
- <input id="ipt_phone2" ref="/root/send/data1/mobiletel" class="input_default" navindex="4" maxlength="11" format="####" style="left:87px; top:80px; width:149px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- // if (event.keyCode == "13") {
- // setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
- // fInsertJudg();
- // }
- ]]>
- </script>
- </input>
- <textarea id="txa_memo" ref="/root/send/data1/memo" class="txa_default" navindex="5" style="left:327px; top:57px; width:344px; height:41px; "/>
- <button id="btn_insert" class="btn2_letter2" navindex="6" visibility="visible" style="left:632px; top:4px; width:42px; height:19px; ">
- <caption>입력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInsertJudg();
- model.resetInstanceNode("/root/send/data1");
- model.refresh();
- ]]>
- </script>
- </button>
- <output id="output1" ref="/root/send/data1/usernm" class="output_fix" style="left:327px; top:31px; width:128px; height:19px; "/>
- <button id="btn_close" class="btn4_letter2" navindex="11" style="left:619px; top:445px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <datagrid id="grd_userlist" nodeset="/root/main/list2/user" caption="사용자ID^이름^소속부서^특례명칭" colsep="^" colwidth="70, 65, 115" dataheight="23" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" navindex="7" style="left:180px; top:40px; width:300px; height:95px; ">
- <col ref="userid" style="text-align:center; "/>
- <col ref="usernm" style="text-align:center; "/>
- <col ref="posdeptnm"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- // 선택된 사용자를 심사자ID, 이름, 부서명에 넣는다.
- var cur_row = grd_userlist.row;
- if (cur_row > 0 && grd_userlist.isCell(event.target)) {
- model.setValue("/root/send/data1/userid", grd_userlist.valueMatrix(cur_row, grd_judglist.colRef("userid")));
- model.setValue("/root/send/data1/usernm", grd_userlist.valueMatrix(cur_row, grd_judglist.colRef("usernm")));
- model.setValue("/root/send/data1/posdeptnm", grd_userlist.valueMatrix(cur_row, grd_judglist.colRef("posdeptnm")));
- model.refresh();
- }
- grd_userlist.visible = false;
-
- ]]>
- </script>
- </datagrid>
- <button id="button1" class="btn4_letter2" navindex="11" style="left:300px; top:450px; width:56px; height:22px; ">
- <caption>배치</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- submit("TXPIB02103");
- ]]>
- </script>
- </button>
- </group>
- </group>
- </xhtml:body>
- </xhtml:html>
|