123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428 |
- <?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="">
- <main>
- <inpt>
- <reptdata>
- <wardlist>
- <status/>
- <duty/>
- <usernm/>
- <posdeptnm/>
- <delivecnts/>
- <wardcd/>
- <plandd/>
- <plandt/>
- <deliveflagcd/>
- <staiud/>
- <userid/>
- <certnm/>
- <certdt/>
- <dutflag/>
- <holiflag/>
- <basedd/>
- <holinm/>
- </wardlist>
- </reptdata>
- </inpt>
- <idct>
- <idctdlist/>
- <idctelist/>
- <idctnlist/>
- <rptlist/>
- </idct>
- </main>
- <send>
- <reqdata/>
- </send>
- <temp>
- <srchdd2/>
- <duty>1</duty>
- <deptflag/>
- <certnm/>
- <certdt/>
- <recdd/>
- <deptcd/>
- </temp>
- <hidden/>
- <init>
- <dutinfo/>
- </init>
- </root>
- </instance>
- <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="urlencoded-post" replace="instance"/>
- <submission id="TRZSD00206" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TXMNB01204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden"/>
- <submission id="TRMNB01212" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/inpt/reptdata"/>
- <submission id="TRMNW00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/code/codelist"/>
- <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
- <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"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- //16.10.07_EMR.MNWHCAPL.DELIVEFLAGCD 설명
- //01.인사보고, 02.병동보고, 03.교육보고, 04.기타보고, 05.당직보고, 06.마취회복실 일일업무현황, 07.야간순회보고
-
- // 간호하드코딩 테이블 조회(I14 - 야간순회보고 조회가능 아이디)
- var pCode = "'I14'"; // 조회할 CdGrupID 코드정보
- var pDate = getCurrentDate(); //조회기준일자
- fGetNursHardCdInfo(pCode, pDate);
-
- var jobkindcd = getUserInfo("jobkindcd");
- var jobposcd = getUserInfo("jobposcd");
- var userid = getUserInfo("userid");
- var dutplcecd = getUserInfo("dutplcecd");
-
- var curTime= getCurrentTime().substr(0,4);
- if(curTime <= "0800") {
- ipt_orddd2.value = getAddDay(getCurrentDate(),-1);
- } else {
- ipt_orddd2.value = getCurrentDate();
- }
-
- // 간호부장, 과장, 수간호사 및 등록된 사용자만 조회가능토록
- if ( jobkindcd == "1140" && (jobposcd == "41" || jobposcd == "75" || jobposcd == "62" || getUserInfo("userid") == "ENR" || getUserInfo("userid") == model.getValue("/root/code/codeinfo/codelist[cdgrupid='I14' and cdid='"+getUserInfo("userid") +"']/cdid"))){
- btn_srch2.disabled = false;
- btn_excel2.disabled = false;
- button22.disabled = false;
- button23.disabled = false;
- btn_cert.disabled = false;
- ipt_orddd2.disabled = false;
- authflag = "Y";
- // rdo_deptflag.value = model.getValue("/root/code/codeinfo/codelist[cdgrupid='T52' and supcdid='"+dutplcecd+"']/cdid")
- } else {
- btn_srch2.disabled = true;
- btn_excel2.disabled = true;
- button22.disabled = true;
- button23.disabled = true;
- btn_cert.disabled = true;
- ipt_orddd2.disabled = true;
- authflag = "N";
- //messageBox("지정된 사용자 이외에는 조회", "E001");
- }
- fSearch_reptlist();
- // grd_wardlist.refresh();
- model.refresh();
- ]]>
- </script>
- </model>
- <script type="javascript">
- <![CDATA[
- var authflag = "";
-
- // 본원 야간 순회보고 저장
- function fSave_Reptrows2(){
-
- if(messageBox("","Q002") != 6) return;
-
- var updtdata = getGridUpdateData(grd_wardlist) ;
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.makeValue("/root/send/sReptPath" , updtdata);
-
- if(updtdata == null || updtdata == ""){
- messageBox("저장할 자료가 존재하지 않습니다.","I");
- return;
- }
-
- submit("TXMNB01204");
- btn_srch2.dispatch("DOMActivate");
- }
-
- // 야간 순회보고 조회
- function fSearch_reptlist(){
- var searchdd = ipt_orddd2.value.substr(0,6);
- var searchdd2 = ipt_orddd2.value;
- // var searchdd2 = ipt_orddd2.value;
- // alert("searchdd : " + searchdd);
- if(searchdd2.length < 8) {
- messageBox("보고일자를 다시 한 번", "C001");
- return;
- }
-
- model.removenodeset("/root/main/inpt/reptdata/wardlist");
- model.removenodeset("/root/send");
- model.makeNode("/root/send");
-
- model.makeValue("/root/send/reqdata/plandd", searchdd); //계획일자
- model.makeValue("/root/send/reqdata/deliveflagcd", "07"); //전달구분(야간순회보고 코드 : 07)
-
- // alert("authflag : " + authflag );
- if(authflag == "Y") {
- submit("TRMNB01212");
- } else {
- messageBox("지정된 사용자 이외에는 조회", "E001");
- return;
- }
-
- model.setValue(opt_certnm.attribute("ref"), model.getValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd2 +"']/certnm"));
- model.setValue(opt_certdt.attribute("ref"), model.getValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd2 +"']/certdt"));
- grd_wardlist.rebuildStyle();
- fSetColorHoliday();
-
- opt_certnm.refresh();
- opt_certdt.refresh();
- }
-
- function fUpt_Reptrows(grdflg){
- var wardcd = getUserInfo("dutplcecd");
- var plandd = model.getValue(ipt_orddd2.attribute("ref"));
- var plandt = getCurrentDate()+getCurrentTime().substring(0,4);
- if(grdflg == "wardlist"){
-
- var staiud = model.getValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud");
-
- if( (staiud =="insert") || (staiud =="delete") ){
- return;
- }
-
- var dt = model.getValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandt");
- var basedd = model.getValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/basedd");
-
- if(dt == null || dt == "") {
- //model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandd",plandd);
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandd",basedd);
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandt",plandt);
- }
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud","update");
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/usernm",getUserName());
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/userid",getUserId());
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/deliveflagcd","07");
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/wardcd", getUserInfo("dutplcecd"));
-
- }
- model.refresh();
- }
-
- // 일자별 표시기능
- function fSetColorHoliday(){
- for(var i=1;i<=grd_wardlist.rows;i++){
-
- var value = grd_wardlist.valueMatrix(i,grd_wardlist.colRef("dutflag") );
- if(value == "4"){
- grd_wardlist.cellstyle("color", i, 1, i, grd_wardlist.colRef("certdt")) = "#0000ee";
- grd_wardlist.cellstyle("background-color", i, 1, i, grd_wardlist.colRef("certdt")) = "#ffd3ff";
- }else if(value == "8"){
- grd_wardlist.cellstyle("color", i, 1, i, grd_wardlist.colRef("certdt")) = "#ee0000";
- grd_wardlist.cellstyle("background-color", i, 1, i, grd_wardlist.colRef("certdt")) = "#ffd3ff";
- }else
- grd_wardlist.cellstyle("color", i, 1, i, grd_wardlist.colRef("certdt")) = "#000000";
- }
- }
-
- function fDel_Reptrows(grdflg){
- var reptcnt;
- var selrow;
- if(grdflg == "wardlist"){
- reptcnt = grd_wardlist.rows;
- selrow = grd_wardlist.row;
- }
-
- // alert("selrow : " + selrow);
- if(reptcnt < 2 || selrow < grd_wardlist.fixedRows){
- messageBox("삭제 할 자료가","I004");
- return;
- }
-
- if(selrow == '' || selrow == null ){
- messageBox("선택된 셀이 ","I004");
- return;
- }
-
- if(grdflg == "wardlist"){
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud","delete");
- grd_wardlist.rowStatus(grd_wardlist.row) = "4";
- }
-
- model.refresh();
-
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="1118" pageheight="810" guideline="1,1094;2,823;1,1216;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1094px; height:13px; "/>
- <group id="group2" style="left:0px; top:0px; width:1100px; height:765px; ">
- <button id="button16" class="btn2_letter2" visibility="hidden" style="left:960px; top:5px; width:42px; height:19px; ">
- <caption>축소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_wardlist.attribute("height") = "250";
- ]]>
- </script>
- </button>
- <line id="line10" class="line_1" style="x1:0px; y1:25px; x2:1094px; y2:25px; "/>
- <datagrid id="grd_wardlist" nodeset="/root/main/inpt/reptdata/wardlist" autoresize="true" caption="^날짜^요일^caption7^caption6^작성자^내용(부서 - CTRL + ENTER시 다음줄에 기입가능)^작성일시^작성일시^확인자^확인자ID^확인일시^SEQNO^caption5^caption4^caption3^caption2^caption1" colsep="^" colwidth="0, 80, 63, 17, 18, 75, 556, 0, 120, 62, 11, 100, 100, 0, 0, 0, 0" explorerbar="sort" rowheader="update" rowheight="100" rowsep="|" selectionmode="free" style="left:0px; top:30px; width:1095px; height:730px; vertical-align:middle; ">
- <col class="update_n" ref="status" visibility="hidden"/>
- <col ref="basedd" style="text-align:center; "/>
- <col ref="holinm" style="text-align:center; "/>
- <col ref="dutflag" visibility="hidden"/>
- <col ref="holiflag" visibility="hidden"/>
- <col ref="usernm" style="text-align:center; "/>
- <col ref="delivecnts" type="input"/>
- <col ref="plandd" visibility="hidden" format="yyyy-mm-dd" style="text-align:right; "/>
- <col ref="plandt" type="input" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
- <col ref="certnm" style="text-align:center; "/>
- <col ref="certid" visibility="hidden"/>
- <col ref="certdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
- <col ref="seqno" visibility="hidden"/>
- <col ref="wardcd" visibility="hidden"/>
- <col ref="deliveflagcd" visibility="hidden"/>
- <col ref="staiud" visibility="hidden"/>
- <col ref="userid" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fUpt_Reptrows("wardlist");
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_wardlist.gridToInstance();
- grd_wardlist.resizeCells();
- ]]>
- </script>
- </datagrid>
- <button id="button10" class="btn2_letter3" visibility="hidden" style="left:865px; top:5px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fAdd_Reptrows("wardlist");
- ]]>
- </script>
- </button>
- <button id="button22" class="btn1_letter2" style="left:978px; top:3px; width:56px; height:22px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDel_Reptrows("wardlist");
- ]]>
- </script>
- </button>
- <caption id="caption17" class="tit_2" style="left:0px; top:10px; width:115px; height:15px; ">야간순회보고</caption>
- <button id="button23" class="btn1_letter2" style="left:1035px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSave_Reptrows2();
- ]]>
- </script>
- </button>
- <button id="button14" class="btn2_letter2" visibility="hidden" style="left:915px; top:5px; width:42px; height:19px; ">
- <caption>확대</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_wardlist.attribute("height") = "644";
- ]]>
- </script>
- </button>
- <button id="btn_srch2" class="btn1_letter2" navindex="5" style="left:864px; top:3px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSearch_reptlist();
- ]]>
- </script>
- </button>
- <caption id="caption21" class="search_name" style="left:670px; top:6px; width:86px; height:17px; ">보고일자 :</caption>
- <input id="ipt_orddd2" ref="/root/temp/srchdd2" class="input_default" navindex="1" inputtype="date" style="left:760px; top:5px; width:100px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fSearch_reptlist();
- ]]>
- </script>
- </input>
- <button id="btn_excel2" class="btn1_letter2" style="left:921px; top:3px; width:56px; height:22px; ">
- <caption>엑셀</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- // saveExcelAll( "grd_wardlist|부서관리"
- // ,"grd_psnlist|인사관리"
- // ,"grd_edulist|교육및회의"
- // ,"grd_etclist|기타"
- // ,"grd_noti|당직보고"
- // , true);
-
- // var sTitle = "야간순회보고"
- // var fileName = window.fileDialog("save", ",", false, sTitle, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- // if (fileName != ""){
- // grd_wardlist.saveExcel(fileName, sTitle, true, true, "", "", true);
- // }
-
- if (grd_wardlist.rows <= 1) {
- messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
- return;
- }
- var fileName = window.fileDialog("save", ",", false, "야간순회보고", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != ""){
- grd_wardlist.saveExcel(fileName, "SheetName", false, false, "", "", false);
- }
- ]]>
- </script>
- </button>
- </group>
- <button id="btn_cert" class="btn2_letter2" style="left:870px; top:768px; width:42px; height:19px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var searchdd = ipt_orddd2.value;
- var sseq = model.getValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd +"']/seqno")
- if(sseq == null || sseq == ""){
- messageBox(searchdd + " 일자의 야간순회보고가 작성되지 않았습니다.","E");
- return;
- }
- if(messageBox(searchdd + "일자에 확인","Q002") != 6) return;
-
- model.setValue(opt_certnm.attribute("ref"), getUserInfo("usernm"));
- model.setValue(opt_certdt.attribute("ref"), getCurrentDate() + getCurrentTime());
-
- opt_certnm.refresh();
- opt_certdt.refresh();
-
- // alert(ipt_orddd2.value);
- // alert("test : " + model.getValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd +"']/basedd"));
-
- model.setValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd +"']/certid", getUserInfo("userid"));
- model.setValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd +"']/certdt", getCurrentDate() + getCurrentTime());
- model.setValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd +"']/staiud", "update");
- grd_wardlist.rowStatus(grd_wardlist.findRow(searchdd, grd_wardlist.fixedRows, grd_wardlist.colRef("basedd"), false, false)) = 2;
-
- var updtdata = getGridUpdateData(grd_wardlist) ;
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.makeValue("/root/send/sReptPath" , updtdata);
-
- // alert("updtdata : " + updtdata);
- if(updtdata == null || updtdata == ""){
- messageBox("저장할 자료가 존재하지 않습니다.","I");
- return;
- }
-
- if(submit("TXMNB01204")) {
- messageBox("저장되었습니다.", "I");
- fSearch_reptlist();
- }
- ]]>
- </script>
- </button>
- <output id="opt_certdt" ref="/root/temp/certdt" class="output_fix" format="yyyy-mm-dd hh:nn" style="left:978px; top:768px; width:100px; height:19px; text-align:center; "/>
- <output id="opt_certnm" ref="/root/temp/certnm" class="output_fix" style="left:915px; top:768px; width:60px; height:19px; text-align:center; "/>
- </xhtml:body>
- </xhtml:html>
|