123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?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="">
- <init>
- <setflag/>
- </init>
- <hidden>
- <attach>
- <file/>
- <delyn/>
- </attach>
- </hidden>
- <send>
- <flag/>
- <searchitem/>
- <reqdata>
- <setflag/>
- <authno/>
- <clinicauth>
- <instcd/>
- <authno/>
- <orddrid/>
- <orddrnm/>
- <orddeptcd/>
- <orddeptnm/>
- <valifromdd/>
- <valitodd/>
- <appuserid/>
- <appdt/>
- <histstat/>
- </clinicauth>
- <attachlist>
- <attach>
- <attauthno/>
- <attfileseq/>
- <attfilenm/>
- <status/>
- <delyn/>
- <file/>
- </attach>
- </attachlist>
- <attach_bck>
- <delyn/>
- </attach_bck>
- <updlist>
- <attach>
- <attauthno/>
- <attfileseq/>
- <attfilenm/>
- <status/>
- <delyn/>
- </attach>
- </updlist>
- </reqdata>
- </send>
- <main>
- <attachlist>
- <attach>
- <attfilenm/>
- <attfileseq/>
- <authno/>
- <status/>
- <delyn/>
- </attach>
- </attachlist>
- <clinicauth>
- <instcd/>
- <authno/>
- <orddrid/>
- <orddrnm/>
- <orddeptcd/>
- <orddeptnm/>
- <valifromdd/>
- <valitodd/>
- <appuserid/>
- <appdt/>
- <histstat/>
- </clinicauth>
- <copyset/>
- </main>
- <temp>
- <count/>
- <setflag/>
- </temp>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript">
- <![CDATA[
- function fRowDelete( grdName, grdPath ){
- var iRow = grdName.row - grdName.fixedRows + 1;
- if(iRow < 1){
- return;
- }
- var status = grdName.rowStatus(iRow);
- //alert("grd status : " + status);
- if(status == 1){
- grdName.deleteRow(iRow, false);
- }else{
- grdName.rowStatus(iRow)= 4;
- }
- model.makeValue(grdPath, "D");
- if(grdName.row - grdName.fixedRows <= 0 ){
- //model.setValue("/root/main/hospinfcinfo/hospinfc/info/woundclssflag", "");
- //model.setValue("/root/main/hospinfcinfo/hospinfc/info/asaclssflag", "");
- //model.setValue("/root/main/hospinfcinfo/hospinfc/info/riskindxpnt", "");
- //model.setValue("/root/main/hospinfcinfo/hospinfc/info/generalanesthesiayn", "");
- //model.setValue("/root/main/hospinfcinfo/hospinfc/info/endoscopicopyn", "");
- //model.setValue("/root/main/hospinfcinfo/hospinfc/info/anstkind", "");
-
- }
- model.refresh();
- }
-
- function fGetUserInfo(userid,usernm,deptcd,deptnm) {
-
- // 검색결과 부서명과 부서코드 매핑설정
- model.setValue("/root/main/clinicauth/orddeptnm", deptnm);
- model.setValue("/root/main/clinicauth/orddeptcd", deptcd);
- model.setValue("/root/main/clinicauth/orddrnm", usernm);
- model.setValue("/root/main/clinicauth/orddrid", userid);
-
- if ( usernm == "" || userid == "" || deptnm == "" || deptcd == "" ) {
- messageBox("검색하신 사번에 해당하는 교직원이", "E014");
- model.setValue("/root/main/clinicauth/orddeptnm", "");
- model.setValue("/root/main/clinicauth/orddeptcd", "");
- model.setValue("/root/main/clinicauth/orddrnm", "");
- model.setValue("/root/main/clinicauth/orddrid", "");
- model.refresh();
- return;
- }
-
- model.refresh();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- // fInit();
- // 부모창에서 수정을 위한 조회로 팝업창을 띄웠는지, 신규등록을 위해서 팝업창을 띄웠는지 구분값 확인
- model.removeNodeset("/root/main/attachlist");
- model.removeNodeset("/root/send/reqdata/attachlist/attach");
-
- var newyn = opener.model.getValue("/root/send/reqdata/newyn");
- var viewyn = opener.model.getValue("/root/send/reqdata/viewyn");
- var authno = opener.model.getValue("/root/send/reqdata/authno");
- var orddrid = opener.model.getValue("/root/send/reqdata/orddrid");
-
- if ( viewyn == "Y" ) {
-
- button1.text = "수정";
- ipt_empno.disabled = true;
- ipt_empnm.disabled = true;
-
- model.makeValue("/root/temp/setflag", "set");
- model.makeValue("/root/send/reqdata/authno", authno);
- model.makeValue("/root/send/reqdata/orddrid", orddrid);
-
- submit("TRMRJ00802");
-
- model.copyNode("/root/send/reqdata/attachlist", "/root/main/attachlist");
- model.refresh();
-
- }
-
- if ( newyn == "Y" ) {
- model.makeValue("/root/temp/setflag", "ins");
- button3.attribute("visibility") = "hidden";
- }
-
- model.refresh();
-
- ]]>
- </script>
- <!-- SUBMISSION 시작 -->
- <submission id="TRMRJ00802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main"/>
- <submission id="TXMRJ00801" mediatype="multipart/form-data" method="form-data-post" ref="/root/send/reqdata" resultref="/root/temp"/>
- <!--
- <submission id="TXMRJ00801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/temp"/>
- -->
- <submission id="TRZSU10104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
- <!-- SUBMISSION 종료 -->
- </model>
- </xhtml:head>
- <xhtml:body pagewidth="604" pageheight="510" guideline="1,722;" style="margin-left:8; margin-right:8; ">
- <!-- 입력항목 1열 시작 -->
- <caption id="caption1" class="tit_2" style="left:5px; top:11px; width:175px; height:13px; ">의사임상권한 등록/수정</caption>
- <line id="line1" class="line_1" style="x1:5px; y1:29px; x2:580px; y2:30px; "/>
- <caption id="caption2" class="cell_1" style="left:5px; top:35px; width:80px; height:23px; text-align:center; vertical-align:middle; ">사번</caption>
- <input id="ipt_empno" ref="/root/main/clinicauth/orddrid" style="left:89px; top:37px; width:86px; height:19px; text-align:left; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == "13") {
-
- var orddrid = ipt_empno.currentText;
-
- model.setValue("/root/main/clinicauth/orddeptnm", "");
- model.setValue("/root/main/clinicauth/orddeptcd", "");
- model.setValue("/root/main/clinicauth/orddrnm", "");
- model.setValue("/root/main/clinicauth/orddrid", "");
- model.refresh();
-
- setParameter("reqflag", "userid");
- setParameter("userid", orddrid);
- setParameter("autortnyn","Y");
- modal("SPMRF03200");
-
- }
- ]]>
- </script>
- </input>
- <caption id="caption3" class="cell_1" style="left:179px; top:35px; width:56px; height:23px; text-align:center; vertical-align:middle; ">성명</caption>
- <input id="ipt_empnm" ref="/root/main/clinicauth/orddrnm" style="left:240px; top:37px; width:90px; height:19px; text-align:left; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == "13") {
-
- var orddrnm = ipt_empnm.currentText;
-
- model.setValue("/root/main/clinicauth/orddeptnm", "");
- model.setValue("/root/main/clinicauth/orddeptcd", "");
- model.setValue("/root/main/clinicauth/orddrnm", "");
- model.setValue("/root/main/clinicauth/orddrid", "");
- model.refresh();
-
- setParameter("reqflag", "usernm");
- setParameter("usernm", orddrnm);
- setParameter("autortnyn","Y");
- modal("SPMRF03200");
-
- }
- ]]>
- </script>
- </input>
- <caption id="caption4" class="cell_1" style="left:335px; top:35px; width:105px; height:23px; text-align:center; vertical-align:middle; ">부서명</caption>
- <button id="btn_addfile" class="btn2_letter4" style="left:445px; top:63px; width:64px; height:19px; ">
- <caption>파일추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var maxBytes = 1572864;
- files = window.fileDialog("open", "|", true);
- //window.fileDialog("open","","","","","All Files (*.*)|*.*|JPEG Files(*.jpg)|*.jpg|GIF Files(*.gif)|*.gif|BMP Files(*.bmp)|*.bmp");//openImageFileDialog(1572864);
- filelist = files.split("|");
- for(var i = 0 ; i < filelist.length ; i++ ) {
- if(filelist[i] != "") {
-
- // 파일 용량 체크
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var f = fso.GetFile(filelist[i]);
- if (f.size > maxBytes) {
- messageBox( ( i+1 ) + "번째 파일 크기가 최대치("+(maxBytes/1024)+"K)를","E003");
- }
- else {
-
- fileextnt = filelist[i].split(".");
-
- // 파일 확장자 체크
- // 제일 마지막 "." 뒤의 문자가 확장자 이다.
- var strextnt = fileextnt[fileextnt.length-1];
- if ( strextnt.toUpperCase() != "JPG" && strextnt.toUpperCase() != "JPEG" &&
- strextnt.toUpperCase() != "BMP" ) { // 이미지 업로드 허용 유형 추가시 여기에 확장자명 추가하면 됨
- messageBox("허용되지 않는 확장자입니다. 이미지 파일의 유형이 JPEG, BMP인지", "I007");
- return;
- }
-
- grd_attach.addRow(false);
-
- grd_attach.valueMatrix(grd_attach.rows - 1, 1) = "신규";
- grd_attach.rowStatus(grd_attach.rows - 1) = 1;
- grd_attach.valueMatrix(grd_attach.rows - 1, grd_attach.colRef("attfilenm")) = filelist[i];
- grd_attach.valueMatrix(grd_attach.rows - 1, grd_attach.colRef("file")) = filelist[i];
- grd_attach.valueMatrix(grd_attach.rows - 1, grd_attach.colRef("status")) = "N";
-
- }
-
- }
-
- }
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_delfile" class="btn5_letter4" style="left:514px; top:63px; width:64px; height:19px; ">
- <caption>파일삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var iRow = grd_attach.row - grd_attach.fixedRows + 1;
- fRowDelete(grd_attach, "/root/send/reqdata/attachlist/attach[" + iRow + "]/status");
- ]]>
- </script>
- </button>
- <upload id="upload1" nodeset="/root/send/reqdata/attachlist/attach/file" style="left:325px; top:10px; width:95px; height:20px; "/>
- <button id="button1" class="btn1_letter2" style="left:464px; top:5px; width:56px; height:22px; ">
- <caption>등록</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- // 사번, 성명, 부서코드, 유효기간 체크(권한 첨부파일 여부 체크는 현업의사 문의 후 추가 예정)
- var orddrid = model.getValue("/root/main/clinicauth/orddrid");
- if ( orddrid == null || orddrid == "" ) {
- messageBox("임상권한 진료의를 검색하여", "C002");
- return;
- }
- var orddeptcd = model.getValue("/root/main/clinicauth/orddeptcd");
- if ( orddeptcd == null || orddeptcd == "" ) {
- messageBox("임상권한 진료의의 소속 진료과 코드가 존재하지", "I011");
- return;
- }
-
- var valifromdd = model.getValue("/root/main/clinicauth/valifromdd");
- if ( valifromdd == null || valifromdd == "" ) {
- messageBox("권한 유효기간 시작일자는", "I003");
- return;
- }
-
- var valitodd = model.getValue("/root/main/clinicauth/valitodd");
- if ( valitodd == null || valitodd == "" ) {
- messageBox("권한 유효기간 종료일자는", "I003");
- return;
- }
-
- // 첨부파일 리스트 copyset 노드와 변동유무 체크 필요 (변동될수 있는 항목은 정상건이 삭제로 상태 변경되는 것 뿐이다)
- model.copyNode("/root/send/reqdata/clinicauth", "/root/main/clinicauth");
- model.makeValue("/root/send/reqdata/setflag", model.getValue("/root/temp/setflag"));
-
- // 수정(삭제포함)된 첨부 파일만 따로 인스턴스에 저장( 신규 파일 등록이 있을 경우, 동시에 전송하지 못하기 때문임)
- model.removeNode("/root/send/reqdata/updlist");
-
- for ( var i = 1 ; i < grd_attach.rows ; i++ ) {
- var status = grd_attach.valueMatrix(i, grd_attach.colRef("status")) ;
-
- if ( status != "" && status != "N" ) { // 수정되고 신규건이 아닌 경우에 한함.
-
- grd_upd_attach.addRow(false);
- grd_upd_attach.valueMatrix(grd_upd_attach.rows - 1, grd_upd_attach.colRef("attauthno")) = grd_attach.valueMatrix(i, grd_attach.colRef("attauthno"));
- grd_upd_attach.valueMatrix(grd_upd_attach.rows - 1, grd_upd_attach.colRef("attfileseq")) = grd_attach.valueMatrix(i, grd_attach.colRef("attfileseq"));
- grd_upd_attach.valueMatrix(grd_upd_attach.rows - 1, grd_upd_attach.colRef("attfilenm")) = grd_attach.valueMatrix(i, grd_attach.colRef("attfilenm"));
- grd_upd_attach.valueMatrix(grd_upd_attach.rows - 1, grd_upd_attach.colRef("status")) = grd_attach.valueMatrix(i, grd_attach.colRef("status"));
- grd_upd_attach.valueMatrix(grd_upd_attach.rows - 1, grd_upd_attach.colRef("delyn")) = grd_attach.valueMatrix(i, grd_attach.colRef("delyn"));
-
- }
-
- }
-
- // 첨부파일 신규건이 있는 경우, 신규건만 업로드시킨다.
- // 만약 기존 존재 파일을 삭제하고, 신규추가를 동시에 한 경우, 신규추가만 반영 된다.
- var newExistYn = "N";
- for ( var i = 1 ; i < grd_attach.rows ; i++ ) {
- var status = grd_attach.valueMatrix(i, grd_attach.colRef("status")) ;
- if ( status == "N" ) {
- newExistYn = "Y";
- }
- }
-
- if ( newExistYn == "Y" ) {
- for ( var i = grd_attach.rows ; i > 0 ; i-- ) {
- var status = grd_attach.valueMatrix(i, grd_attach.colRef("status")) ;
-
- if ( status != "N" ) {
-
- grd_attach.deleteRow(i, false);
- model.refresh();
- }
- }
- }
-
- submit("TXMRJ00801");
-
- // 부모창 검색 함수 실행(부모인스턴스의 authno 무효처리)
- opener.model.makeValue("/root/send/reqdata/authno", "");
- opener.model.makeValue("/root/send/reqdata/fileseq", "");
- opener.javascript.fClinicAuthSearch();
- // 윈도우 창 닫기
- window.close();
-
- ]]>
- </script>
- </button>
- <button id="button2" class="btn1_letter2" style="left:522px; top:5px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <!-- 입력항목 1열 종료 -->
- <!-- 입력항목 2열 시작 -->
- <caption id="caption5" class="cell_1" style="left:5px; top:61px; width:80px; height:23px; text-align:center; vertical-align:middle; ">유효기간</caption>
- <input id="ipt_reqfromstnddd" ref="/root/main/clinicauth/valifromdd" inputtype="date" format="yyyy-mm-dd" style="left:88px; top:63px; width:90px; height:19px; "/>
- <caption id="caption11" class="search_n_b" style="left:181px; top:65px; width:12px; height:17px; font-weight:bolder; ">~</caption>
- <input id="ipt_reqtostnddd" ref="/root/main/clinicauth/valitodd" inputtype="date" format="yyyy-mm-dd" style="left:194px; top:63px; width:90px; height:19px; "/>
- <caption id="caption6" class="cell_1" style="left:335px; top:61px; width:105px; height:23px; text-align:center; vertical-align:middle; ">임상권한 업로드</caption>
- <!-- 입력항목 2열 종료 -->
- <!-- 임상권한 첨부 파일 리스트 시작 -->
- <datagrid id="grd_attach" nodeset="/root/send/reqdata/attachlist/attach" class="datagrid2" caption="삭제유무^임상권한 파일명^파일정보^파일순번^승인번호^상태" colwidth="54, 500, 10, 10, 10, 10" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" style="left:5px; top:88px; width:576px; height:392px; ">
- <col ref="delyn" style="text-align:center; "/>
- <col ref="attfilenm"/>
- <col ref="file" visibility="hidden"/>
- <col ref="attfileseq" visibility="hidden"/>
- <col ref="attauthno" visibility="hidden"/>
- <col ref="status" visibility="hidden"/>
- </datagrid>
- <!-- 임상권한 첨부 파일 리스트 종료 -->
- <!-- 입력폼 테두리 처리 시작 -->
- <line id="line2" style="x1:5px; y1:59px; x2:581px; y2:59px; border-color:#c0c0c0; "/>
- <line id="line3" style="x1:5px; y1:85px; x2:581px; y2:85px; border-color:#c0c0c0; "/>
- <!-- 입력폼 테두리 처리 종료 -->
- <!-- 화면하단 창닫기 버튼 시작 -->
- <button id="btn_close" class="btn4_letter2" visibility="visible" style="left:519px; top:485px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <!-- 화면하당 창닫기 버튼 종료 -->
- <button id="button3" class="btn1_letter2" style="left:406px; top:5px; width:56px; height:22px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //fSave();
-
- var msgRtn = messageBox("선택하신 임상권한 건을", "Q001");
-
- if ( msgRtn != "6" ) return; // 삭제승인 버튼을 클릭하지않으면 중단한다.
-
- model.copyNode("/root/send/reqdata", "/root/main");
- model.makeValue("/root/send/reqdata/setflag", "del");
- submit("TXMRJ00801");
-
- // 부모창 검색 함수 실행
- opener.model.makeValue("/root/send/reqdata/authno", "");
- opener.javascript.submit("TRMRJ00801");
-
- // 윈도우 창 닫기
- window.close();
-
- ]]>
- </script>
- </button>
- <input id="input1" ref="/root/main/clinicauth/orddeptnm" disabled="true" style="left:445px; top:37px; width:130px; height:19px; text-align:left; "/>
- <datagrid id="grd_upd_attach" nodeset="/root/send/reqdata/updlist/attach" class="datagrid2" visibility="hidden" caption="삭제유무^임상권한 파일경로^파일순번^승인번호^상태" colsep="^" colwidth="54, 125, 10, 10, 10" ellipsis="true" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:415px; width:230px; height:60px; ">
- <col ref="delyn" visibility="hidden"/>
- <col ref="attfilenm" visibility="hidden"/>
- <col ref="attfileseq"/>
- <col ref="attauthno" style="text-align:center; "/>
- <col ref="status" visibility="hidden"/>
- </datagrid>
- </xhtml:body>
- </xhtml:html>
|