1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480 |
- <?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>
- <![CDATA[desupp]]>
- <xhtml:title>검사실별 예약현황조회</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <rsrvprescondlist>
- <rsrvprescond>
- <rsrvtm/>
- <pid/>
- <hngnm/>
- <age/>
- <prcpcd/>
- <prcpnm/>
- <usernm/>
- <prcpdd/>
- <rsrvrem/>
- <prcpdelivefact/>
- <clinccmtcnts/>
- <prcpgenrflag/>
- <execprcpstatcd/>
- <roomcd/>
- <fromdd/>
- <todd/>
- <updnm/>
- <upddate/>
- <specdrnm/>
- <wardcd/>
- <payflagnm/>
- </rsrvprescond>
- <rsrvposstm>
- <rsrvtm/>
- <count/>
- <max/>
- </rsrvposstm>
- </rsrvprescondlist>
- <rsrvprescondlist2>
- <rsrvprescond>
- <rsrvtm/>
- <pid/>
- <hngnm/>
- <age/>
- <prcpcd/>
- <prcpnm/>
- <usernm/>
- <prcpdd/>
- <rsrvrem/>
- <prcpdelivefact/>
- <clinccmtcnts/>
- <prcpgenrflag/>
- <execprcpstatcd/>
- <roomcd/>
- <fromdd/>
- <todd/>
- <updnm/>
- <upddate/>
- <specdrnm/>
- <payflagnm/>
- </rsrvprescond>
- </rsrvprescondlist2>
- <sample1>
- <deptcd/>
- <deptnm/>
- </sample1>
- <rsrvupdtinfo>
- <rsrvupdt>
- <rsrvupdtfromdd/>
- <rsrvupdtfromtm/>
- <rsrvupdttodd/>
- <rsrvupdttotm/>
- <updtresndesc/>
- <updtresncnts/>
- <excuroomcd/>
- <suppdeptcd/>
- <ioflag/>
- </rsrvupdt>
- </rsrvupdtinfo>
- </main>
- <send>
- <rsrvfromdd/>
- <rsrvtodd/>
- <suppdeptcd/>
- <orddeptcd/>
- <rsrvflag/>
- <excuroomcd/>
- <rsrvstatcd/>
- <pid/>
- <wardcd/>
- <patnm/>
- <globalinstance>
- <instance1/>
- </globalinstance>
- <execrid/>
- <prsrvfromdd/>
- <prsrvtodd/>
- <psuppdeptcd/>
- <pexcuroomcd/>
- <unexecyn/>
- <printgubn/>
- <data>
- <rsrvdd/>
- <rsrvdate/>
- </data>
- <reqdata>
- <rsrvfromdd/>
- <rsrvtodd/>
- <suppdeptcd/>
- <excuroomcd/>
- <execrid/>
- <instcd/>
- <room/>
- </reqdata>
- <ioflag/>
- <prcpcd/>
- <rsrvid/>
- <sdate/>
- <tdate/>
- </send>
- <init1>
- <cmb_info>
- <initexecroom>
- <excuroomcdid/>
- <excuroomcdnm/>
- </initexecroom>
- </cmb_info>
- </init1>
- <init>
- <cmb_info>
- <suppdeptlist>
- <suppdept>
- <suppdeptcd/>
- <depthngnm/>
- </suppdept>
- </suppdeptlist>
- <orddeptcdlist>
- <dept>
- <deptcd/>
- <depthngnm/>
- </dept>
- </orddeptcdlist>
- <wardcdlist>
- <dept>
- <deptcd/>
- <depthngnm/>
- </dept>
- </wardcdlist>
- <rsrvflaglist>
- </rsrvflaglist>
- <excuroomcdlist>
- <excuroom>
- <basecd/>
- <basecdflagdesc/>
- </excuroom>
- </excuroomcdlist>
- <execridlist>
- <execr>
- <basecd/>
- <basecdflagdesc/>
- </execr>
- </execridlist>
- <rsrvidinfo>
- </rsrvidinfo>
- </cmb_info>
- <patinfo/>
- <curerprescondlist>
- <curerprescond>
- <userid/>
- <usernm/>
- </curerprescond>
- <rsrvcalendar>
- <rsrvdd/>
- <count/>
- <max/>
- </rsrvcalendar>
- <orddeptlist>
- <orddeptcd/>
- </orddeptlist>
- </curerprescondlist>
- <calenlist>
- <calendinfo>
- <basedd/>
- <dutflag/>
- </calendinfo>
- </calenlist>
- </init>
- <init2>
- <cmb_info>
- <initexecprcpstatcd>
- <M0011>
- <cdid/>
- <cdnm/>
- </M0011>
- </initexecprcpstatcd>
- <prcpgenrflag>
- </prcpgenrflag>
- </cmb_info>
- </init2>
- <hidden>
- <calendar>
- <year/>
- <month/>
- <weeklist>
- <list>
- <sun/>
- <mon/>
- <tue/>
- <wed/>
- <thu/>
- <fri/>
- <sat/>
- <sun_memo/>
- <mon_memo/>
- <tue_memo/>
- <wed_memo/>
- <thu_memo/>
- <fri_memo/>
- <sat_memo/>
- </list>
- </weeklist>
- <dd/>
- </calendar>
- <grdcellcolor>
- <calrow/>
- <calcol/>
- <bfcalrow/>
- <bfcalcol/>
- <color/>
- </grdcellcolor>
- <cntflag/>
- <rsrvlist>
- <rsrvprescond/>
- </rsrvlist>
- </hidden>
- <temp>
- <rsrvprescondlist/>
- </temp>
- <init2>
- <cmb_info2>
- <initexcuroomcd>
- <excuroomcdnm/>
- <excuroomcdid/>
- </initexcuroomcd>
- </cmb_info2>
- </init2>
- </root>
- </instance>
- <bind id="bind_orddept" ref="/root/main/rsrvprescondlist/rsrvprescond/orddeptcd" readonly="../orddeptcd!=''"/>
- <bind id="bind_orddr" ref="/root/main/rsrvprescondlist/rsrvprescond/orddrid" readonly="../orddrid!=''"/>
- <bind id="bind_ward" ref="/root/main/rsrvprescondlist/rsrvprescond/wardcd" readonly="../wardcd!=''"/>
- <bind id="bind_room" ref="/root/main/rsrvprescondlist/rsrvprescond/roomcd" readonly="../roomcd!=''"/>
- <bind id="bind_excuroom" ref="/root/main/rsrvprescondlist/rsrvprescond/excuroomcd" readonly="../excuroomcd!=''"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
-
- model.removeNodeset("/root/main/rsrvprescondlist/rsrvprescond");
-
- aezfSetSuppDeptcd();
-
- //model.setValue("/root/send/rsrvfromdd", getCurrentDate().toDate().getAddDate(-1,"M").getDateFormat("YYYYMMDD"));
- model.setValue("/root/send/rsrvtodd", getCurrentDate());
- model.setValue("/root/send/prsrvfromdd", getCurrentDate());
- model.setValue("/root/send/prsrvtodd", getCurrentDate());
-
- var instcd = getUserInfo("posinstcd");
- var standard_yn = "orduseyn";
- var ord_deptflag = "D"; //외래진료실
- var rslt_ref = "/root/init/cmb_info/orddeptcdlist";
- zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref);
-
- ord_deptflag = "W"; //일반병동
- rslt_ref = "/root/init/cmb_info/wardcdlist";
- zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref);
-
- //통합예약사용자가져오기
- astGetComboList( new Array("T0001"), new Array("/root/init/cmb_info/rsrvidinfo") );
- model.setValue("/root/send/rsrvid", model.getValue("/root/init/cmb_info/rsrvidinfo/T0001"));
-
- zbcfGetCodeList( new Array("M0011","M0010"), new Array("/root/init2/cmb_info/initexecprcpstatcd","/root/init2/cmb_info/prcpgenrflag") );
- submit("TRZBC00101", false);
-
- //submit("TRAEA00904", false); //지원부서
- submit("TRAEA05301", false); //지원부서
-
- // submit("TRAEA00902", false); //검사실
- // submit("TRAEA00903", false); //검사자
- // submit("TRAEA01301", false); //검사실
-
- btn_case1.selected = true;
-
- model.setValue("/root/send/suppdeptcd",model.getValue("/root/send/globalinstance/instance1"));
- model.setValue("/root/send/psuppdeptcd",model.getValue("/root/send/globalinstance/instance1"));
- model.setValue("/root/send/printgubn", "1");
-
- // //*********************************************************************************************************************************************
- // //담당 검사실 갖고오기
- // submit("TRAEA01115",false);
- //
- // //담당 검사실 세팅
- // model.setValue("/root/send/excuroomcd",model.getValue("/root/init2/cmb_info/initexcuroomcd[1]/excuroomcd"));
- // //*********************************************************************************************************************************************
-
- initCalendar();
- setCurrentDate();
-
- model.toggle("case1");
- model.refresh();
-
- ]]>
- </script>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRAEA00902" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/cmb_info/excuroomcdlist"/>
- <submission id="TRAEA00903" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/cmb_info/execridlist"/>
- <submission id="TRAEA00904" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/cmb_info/suppdeptlist"/>
- <submission id="TRAEA01301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/globalinstance" replace="instance" resultref="/root/init1/cmb_info"/>
- <submission id="TRZSD00105" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRAEA00901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/rsrvprescondlist"/>
- <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRAEA02012" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/calenlist"/>
- <submission id="TRAEA00907" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/curerprescondlist"/>
- <submission id="TRAEA01115" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/globalinstance" replace="instance" resultref="/root/init2/cmb_info"/>
- <submission id="TRAEA05301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/cmb_info/suppdeptlist"/>
- <submission id="TRAEA05302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/rsrvprescondlist2"/>
- <submission id="TRAEA05303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/rsrvprescondlist"/>
- <submission id="TRAEA00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/rsrvupdtinfo"/>
- <submission id="TRAAA00001"/>
- </model>
- <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/stringHelper.js"/>
- <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
- <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../ast/examcureweb/js/combolist.js"/>
- <script type="javascript">
- <![CDATA[
- function getRsrvPossTm(gridObj) {
-
- var calRow = model.getValue("/root/hidden/grdcellcolor/calrow");
- var calCol = model.getValue("/root/hidden/grdcellcolor/calcol");
-
- if( calCol >= 7 )
- calCol -= 7;
-
- var yyyy = model.getValue("/root/hidden/calendar/year");
- var mm = model.getValue("/root/hidden/calendar/month");
- var dd = model.getValue("/root/hidden/calendar/weeklist/list[" + calRow + "]/" + gridObj.colAttribute(calCol, "ref"));
-
-
- if (getStringLength(dd) == 1) {
- dd = "0" + dd;
- }
-
- model.setValue("/root/send/rsrvtodd", yyyy + mm + dd);
- model.setValue("/root/send/data/rsrvdd", yyyy + mm + dd);
- model.setValue("/root/send/rsrvfromdd", "");
- model.setValue("/root/send/data/rsrvdate",model.getValue("/root/send/data/rsrvdd"));
-
- model.setValue("/root/hidden/cntflag", "");
- chk_cntflag.refresh();
-
- datagrid1.rebuildStyle();
-
- submit("TRAEA05303");
- }
-
- function initCalendar() {
-
- var curDate = getCurrentDate().toDate();
-
- model.setValue("/root/hidden/calendar/year", curDate.getDateFormat('YYYY'));
- model.setValue("/root/hidden/calendar/month", curDate.getDateFormat('MM'));
- //model.refresh();
-
- setCalendar(curDate);
-
- }
- function setCurrentDate() {
-
- var curDate = getCurrentDate().substr(6,2); //오늘날짜
- var curWeek = getCurrentDate().toDate().getDayOfWeek("E").toLowerCase(); //오늘요일
- if(curDate <10) {
- curDate= curDate.substr(1,1);
- }
-
- if(curWeek == "sun")
- model.setValue("/root/hidden/grdcellcolor/calcol",0);
- if(curWeek == "mon")
- model.setValue("/root/hidden/grdcellcolor/calcol",1);
- if(curWeek == "tue")
- model.setValue("/root/hidden/grdcellcolor/calcol",2);
- if(curWeek == "wed")
- model.setValue("/root/hidden/grdcellcolor/calcol",3);
- if(curWeek == "thu")
- model.setValue("/root/hidden/grdcellcolor/calcol",4);
- if(curWeek == "fri")
- model.setValue("/root/hidden/grdcellcolor/calcol",5);
- if(curWeek == "sat")
- model.setValue("/root/hidden/grdcellcolor/calcol",6);
-
- for(var i = 0 ; i <grd_calendar.rows; i++ ) {
- if(model.getValue("/root/hidden/calendar/weeklist/list["+i+"]/"+curWeek) ==curDate) {
- model.setValue("/root/hidden/grdcellcolor/calrow",i);
- }
- }
-
- setCellColor(grd_calendar);
- }
- function setCellColor(gridObj) {
-
- var calRow = 0; //현재선택
- var calCol = 0; //현재선택
- var bfcalRow = 0; //전에 선택
- var bfcalCol = 0; //전에 선택
-
- var white = 1; //#ffffff
- var green = 2; //#c4e693
-
-
- calRow = Number(model.getValue("/root/hidden/grdcellcolor/calrow"));
- calCol = Number(model.getValue("/root/hidden/grdcellcolor/calcol"));
-
- bfcalRow = Number(model.getValue("/root/hidden/grdcellcolor/bfcalrow"));
- bfcalCol = Number(model.getValue("/root/hidden/grdcellcolor/bfcalcol"));
- // 1. 원래 색으로 돌려놓기
- if(model.getValue("/root/hidden/grdcellcolor/color") == "1" ) {
-
- gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#ffffff";
-
- if( bfcalCol < 7 )
- bfcalCol += 7;
- else
- bfcalCol -= 7;
-
- gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#ffffff";
- }
- else if (model.getValue("/root/hidden/grdcellcolor/color") == "2" ) {
-
- gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#c4e693";
-
- if( bfcalCol < 7 )
- bfcalCol += 7;
- else
- bfcalCol -= 7;
-
- gridObj.cellStyle("background-color", bfcalRow, bfcalCol) = "#c4e693";
- }
-
-
- // 2. bf 인스턴스에 선택한 원래 셀 담아두기
-
- // if(gridObj.cellStyle("background-color", calRow, calCol) == "white" ) {
- //
- // model.setValue("/root/hidden/grdcellcolor/color", "1");
- // }
- // if(gridObj.cellStyle("background-color", calRow, calCol) == "#c4e693" ) {
- //
- // model.setValue("/root/hidden/grdcellcolor/color", "2");
- // }
-
- if(gridObj.cellStyle("background-color", calRow, calCol) == "#ffffff" ) {
-
- model.setValue("/root/hidden/grdcellcolor/color", "1");
- }
- if(gridObj.cellStyle("background-color", calRow, calCol) == "#c4e693" ) {
-
- model.setValue("/root/hidden/grdcellcolor/color", "2");
- }
- model.setValue("/root/hidden/grdcellcolor/bfcalrow",calRow);
- model.setValue("/root/hidden/grdcellcolor/bfcalcol",calCol);
-
- gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
-
- if( calCol < 7 )
- calCol += 7;
- else
- calCol -= 7;
-
- gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
-
- // 현재일자 색상 표시 2011.07.20 by kya
- var curdate = getCurrentDate();
- var caldate = model.getValue("/root/hidden/calendar/year") + model.getValue("/root/hidden/calendar/month");
- var curday = curdate.substring(6,8);
- var calday = "";
-
- if ( curdate.substring(0,6) == caldate ) {
- for (i=0; i<gridObj.rows; i++) {
- for (j=0; j<gridObj.cols; j++) {
- calday = gridObj.valueMatrix(i,j);
- if (eval(curday) == calday) {
- calRow = i;
- calCol =j;
- // 현재일자 색상 표시
- gridObj.cellStyle("background-color", calRow, calCol) = "#95d4fb";
-
- if ( calCol < 7 ) {
- calCol += 7;
- } else {
- calCol -= 7;
- }
- gridObj.cellStyle("background-color", calRow, calCol) = "#95d4fb";
- }
- }
- }
- }
-
-
- }
- function fGetCalendar(arg){
-
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- if(model.getValue("/root/hidden/calendar/month") < arg) {
- var num = arg- isMonth ;
- var isDate = (isYear+isMonth+1).toDate().getAddDate(+num,'M');
-
- }
- if(model.getValue("/root/hidden/calendar/month") > arg) {
- var num = isMonth - arg ;
- var isDate = (isYear+isMonth+1).toDate().getAddDate(-num,'M');
- }
-
- model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
- model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
- model.refresh();
- setCalendar(isDate);
-
- }
- function setCalendar(dateObj) {
- // 그리드 초기화
- model.removeNodeset("/root/hidden/calendar/weeklist/list");
- model.removeNodeset("/root/init/curerprescondlist/rsrvcalendar");
-
- grd_calendar.refresh();
-
- dateObj.setDate(1);
- var startDay = dateObj.getDay();
- var days = dateObj.getMonthDay();
-
- var rows = Math.ceil( ( startDay + days ) / 7 );
- /*
- for( var i = 0; i < rows; i++ )
- grd_calendar.addRow(false);
-
- grd_calendar.rebuild();
- */
- if (rows != grd_calendar.rows - 1){
- model.removeNodeset("/root/hidden/calendar/weeklist/list");
- for( var i = 0; i < rows; i++ ){
- grd_calendar.addRow(false);
- }
- }else{
- model.setValue("/root/hidden/calendar/weeklist/list", "");
-
- }
- grd_calendar.refresh();
- var rowIndex = grd_calendar.fixedRows;
- var colIndex = startDay;
- for( var i = 1; i <= days; i++ ) {
- grd_calendar.valueMatrix(rowIndex, colIndex) = i;
- grd_calendar.valueMatrix(rowIndex, colIndex + 7) = "0/0";
- colIndex++;
- if( colIndex == 7 ) {
- colIndex = 0;
- rowIndex++;
-
- }
- }
-
- model.setValue("/root/send/data/rsrvdd",model.getValue("/root/hidden/calendar/year")+model.getValue("/root/hidden/calendar/month")+"01");
-
- fCalendar();
-
- setRsrvPresCondByMonth();
-
- //submit("TRAEA00901");
-
- }
- function fCalendar(){
- if (submit("TRAEA02012")){
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate();
-
- var startDay = isDate.getDay();
- for (var i = 1; i < datagrid3.rows; i++) {
- var dd = model.getValue("/root/init/calenlist/calendinfo[" + i + "]/basedd");
-
- var colidx = dd.toDate().getDay();
- var rowidx = Math.ceil( ( startDay + Number(dd.substr(6,2)) ) / 7 );
- //var rowidx = Math.ceil( ( startDay + Number(dd.substr(6,2)) ) / 7 );
- //alert("DD==" + dd + "==colidx==" + rowidx + "==rowidx");
- if (model.getValue("/root/init/calenlist/calendinfo[" + i + "]/dutflag") == "8"){
- grd_calendar.cellstyle("color", rowidx, colidx, rowidx, colidx) = "red";
- }else if (model.getValue("/root/init/calenlist/calendinfo[" + i + "]/dutflag") == "4"){
- grd_calendar.cellstyle("color", rowidx, colidx, rowidx, colidx) = "blue";
- }else{
- grd_calendar.cellstyle("color", rowidx, colidx, rowidx, colidx) = "black";
- }
- }
- grd_calendar.refresh();
- }
- }
- function setCalendarinit(dateObj){
- dateObj.setDate(1);
- var startDay = dateObj.getDay();
- var days = dateObj.getMonthDay();
-
- var rowIndex = grd_calendar.fixedRows;
- var colIndex = startDay;
- for( var i = 1; i <= days; i++ ) {
- grd_calendar.valueMatrix(rowIndex, colIndex) = i;
- grd_calendar.valueMatrix(rowIndex, colIndex + 7) = "0/0";
- colIndex++;
- if( colIndex == 7 ) {
- colIndex = 0;
- rowIndex++;
-
- }
- }
- }
- function setRsrvPresCondByMonth() {
-
- submit("TRAEA00907", false);
-
- grd_temp.refresh();
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate();
- var startDay = isDate.getDay();
- for (var i = 1; i < datagrid3.rows; i++) {
- var dd = model.getValue("/root/init/calenlist/calendinfo[" + i + "]/basedd");
- var colidx = dd.toDate().getDay();
- var rowidx = Math.ceil( ( startDay + Number(dd.substr(6,2)) ) / 7 );
- //var rowidx = Math.ceil( ( startDay + Number(dd.substr(6,2)) ) / 7 );
- //alert("DD==" + dd + "==colidx==" + rowidx + "==rowidx");
- grd_calendar.cellStyle("background-color", rowidx, colidx) = "white";
- grd_calendar.cellStyle("background-color", rowidx, colidx+7) = "white";
- }
- grd_calendar.refresh();
- //grd_calendar.rebuildStyle();
- for (var i = 1; i < grd_temp.rows; i++) {
- var dd = model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/rsrvdd");
- var colidx = dd.toDate().getDay();
- var rowidx = Math.ceil( ( startDay + Number(dd.substr(6,2)) ) / 7 );
- grd_calendar.valueMatrix(rowidx, colidx+7) = model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/count") + "/" + model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/max") ;
-
- //예약가능일자 녹색주기
- //if(model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/count") < model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/max")){
- /*
- if(model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/count") > "0"){
- grd_calendar.cellStyle("background-color", rowidx, colidx) = "#c4e693";
- grd_calendar.cellStyle("background-color", rowidx, colidx+7) = "#c4e693"; // #D9EFB9 < #C4E693 < #ABDC65
- }else{
- grd_calendar.cellStyle("background-color", rowidx, colidx) = "#ffffff";
- grd_calendar.cellStyle("background-color", rowidx, colidx+7) = "#ffffff"; // #D9EFB9 < #C4E693 < #ABDC65
- }
- */
- if(parseFloat(model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/count")) < parseFloat(model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/max"))){
- //alert("==" + parseFloat(model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/count")) + "==" + parseFloat(model.getValue("/root/init/curerprescondlist/rsrvcalendar[" + i + "]/max")));
- grd_calendar.cellStyle("background-color", rowidx, colidx) = "#c4e693";
- grd_calendar.cellStyle("background-color", rowidx, colidx+7) = "#c4e693"; // #D9EFB9 < #C4E693 < #ABDC65
- }
- }
- setCellColor(grd_calendar);
-
- model.setValue("/root/hidden/cntflag", "");
- chk_cntflag.refresh();
-
- datagrid1.rebuildStyle();
-
- submit("TRAEA05303");
- //2011.08.10 검사실별 휴검관리 조회 추가- 박재영
- var sdate = model.getValue("/root/send/data/rsrvdd").substr(0,6)+"01";
- var tdate = model.getValue("/root/send/data/rsrvdd").substr(0,6)+"31";
- model.setValue("/root/send/sdate",sdate);
- model.setValue("/root/send/tdate",tdate);
- submit("TRAEA00701");
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="1,1197;2,140;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:150px; height:14px; background-image:../../../com/commonweb/images/tit_bullet1.gif; ">검사실별 예약현황조회</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
- <group id="group2" class="input_search" style="left:0px; top:10px; width:1195px; height:40px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <line id="line1" style="x1:1130px; y1:6px; x2:1130px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
- <caption id="caption1" class="search_name" style="left:5px; top:9px; width:86px; height:17px; text-align:left; background-image:../../../com/commonweb/images/search_bullet1.gif; ">지원부서 :</caption>
- <caption id="caption5" class="search_name" style="left:215px; top:9px; width:106px; height:17px; background-image:../../../com/commonweb/images/search_bullet1.gif; ">검사/치료실 :</caption>
- <caption id="caption7" class="search_name" style="left:444px; top:9px; width:119px; height:17px; background-image:../../../com/commonweb/images/search_bullet1.gif; ">검사자/치료사 :</caption>
- <select1 id="combo6" ref="/root/send/execrid" class="combo_search" appearance="minimal" editmode="inputsearch" style="left:565px; top:8px; width:70px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/cmb_info/execridlist/execr">
- <label ref="basecdflagdesc"/>
- <value ref="basecd"/>
- </itemset>
- </choices>
- </select1>
- <button id="btn_sea" class="btn1_letter2" style="left:1135px; top:7px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if (btn_case1.selected == true) {
-
- model.setValue("/root/hidden/cntflag", "");
- chk_cntflag.refresh();
-
- datagrid1.rebuildStyle();
-
- submit("TRAEA05303");
- //2011.08.10 검사실별 휴검관리 조회 추가- 박재영
- var sdate = model.getValue("/root/send/data/rsrvdd").substr(0,6)+"01";
- var tdate = model.getValue("/root/send/data/rsrvdd").substr(0,6)+"31";
- model.setValue("/root/send/sdate",sdate);
- model.setValue("/root/send/tdate",sdate);
- submit("TRAEA00701");
- } else {
- submit("TRAEA05302");
- }
-
- model.refresh();
- ]]>
- </script>
- </button>
- <select1 id="cmb_excuroom" ref="/root/send/excuroomcd" class="combo_search" appearance="minimal" editmode="inputsearch" style="left:322px; top:8px; width:115px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/cmb_info/excuroomcdlist/excuroom">
- <label ref="basecdflagdesc"/>
- <value ref="basecd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if (btn_case1.selected == true) {
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate();
- setCalendarinit(isDate);
- setRsrvPresCondByMonth();
- } else {
- submit("TRAEA05302");
- }
- ]]>
- </script>
- </select1>
- <caption id="caption10" class="search_name" style="left:895px; top:9px; width:88px; height:17px; background-image:../../../com/commonweb/images/search_bullet1.gif; ">실시여부 :</caption>
- <select1 id="rbo_gb" ref="/root/send/unexecyn" navindex="1" appearance="full" cols="3" overflow="visible" style="left:982px; top:9px; width:145px; height:19px; border-style:none; ">
- <choices>
- <item>
- <label>전체</label>
- <value/>
- </item>
- <item>
- <label>미실시</label>
- <value>1</value>
- </item>
- <item>
- <label>실시</label>
- <value>2</value>
- </item>
- </choices>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- btn_sea.dispatch("DOMActivate");
- ]]>
- </script>
- </select1>
- <select1 id="combo1" ref="/root/send/suppdeptcd" appearance="minimal" style="left:92px; top:8px; width:115px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/cmb_info/suppdeptlist/suppdept">
- <label ref="suppdeptnm"/>
- <value ref="suppdeptcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.setValue("/root/send/globalinstance/instance1", model.getValue("/root/send/suppdeptcd"));
- model.setValue("/root/send/excuroomcd", "");
- submit("TRAEA00902", false);
- submit("TRAEA00903");
-
- model.resetInstanceNode("/root/main/rsrvprescondlist/rsrvposstm");
-
- datagrid1.rebuildStyle();
- model.resetInstanceNode("/root/main/rsrvprescondlist/rsrvprescond");
-
- model.refresh();
-
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate();
- setCalendarinit(isDate);
- ]]>
- </script>
- </select1>
- <caption id="caption2" class="search_name" style="left:645px; top:9px; width:60px; height:17px; background-image:../../../com/commonweb/images/search_bullet1.gif; ">구분 :</caption>
- <select1 id="rdo_ioflag" ref="/root/send/ioflag" navindex="1" appearance="full" cols="4" overflow="visible" style="left:710px; top:9px; width:175px; height:17px; border-style:none; ">
- <choices>
- <item>
- <label>외래</label>
- <value>O</value>
- </item>
- <item>
- <label>입원</label>
- <value>I</value>
- </item>
- <item>
- <label>건진</label>
- <value>S</value>
- </item>
- <item>
- <label>전체</label>
- <value/>
- </item>
- </choices>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- btn_sea.dispatch("DOMActivate");
- ]]>
- </script>
- </select1>
- </group>
- <button id="btn_case1" class="btn_sw" group="tab2" selected="true" style="left:0px; top:50px; width:125px; height:22px; ">
- <caption>월별 예약현황(정원)</caption>
- <toggle case="case1" ev:event="onclick"/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- var excuroomcd = model.getValue("/root/send/excuroomcd");
- model.setValue("/root/send/rsrvfromdd", "");
-
- if (excuroomcd == "" ) {
- model.resetInstanceNode("/root/main/rsrvprescondlist/rsrvposstm");
-
- datagrid1.rebuildStyle();
- model.resetInstanceNode("/root/main/rsrvprescondlist/rsrvprescond");
-
- model.refresh();
-
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate();
- setCalendarinit(isDate);
- } else {
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate();
- setCalendarinit(isDate);
- setRsrvPresCondByMonth();
- }
- ]]>
- </script>
- </button>
- <button id="btn_case2" class="btn_sw" group="tab2" style="left:125px; top:50px; width:125px; height:22px; ">
- <caption>검사실별예약현황</caption>
- <toggle case="case2" ev:event="onclick"/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var rsrvfromdd = model.getValue("/root/send/rsrvfromdd");
- if (rsrvfromdd == "") {
- ipt_fromdd.value = getCurrentDate().toDate().getAddDate(-1,"M").getDateFormat("YYYYMMDD");
- model.setValue("/root/send/rsrvfromdd", getCurrentDate().toDate().getAddDate(-1,"M").getDateFormat("YYYYMMDD"));
- }
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="button1" class="btn2_letter9" disable.background-image="../../../com/commonweb/images/dis_btn2_letter2.gif" style="left:1076px; top:75px; width:119px; height:19px; background-image:../../../com/commonweb/images/btn2_letter2.gif; ">
- <caption>일일예약리스트출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.setValue("/root/send/reqdata/rsrvfromdd", model.getValue("/root/send/rsrvfromdd"));
- model.setValue("/root/send/reqdata/rsrvtodd", model.getValue("/root/send/rsrvtodd"));
- model.setValue("/root/send/reqdata/suppdeptcd", model.getValue("/root/send/suppdeptcd"));
- model.setValue("/root/send/reqdata/excuroomcd", model.getValue("/root/send/excuroomcd"));
- model.setValue("/root/send/reqdata/execrid", model.getValue("/root/send/execrid"));
- model.setValue("/root/send/reqdata/instcd", getUserInfo("dutplceinstcd"));
- var _room = combo1.label
- if(cmb_excuroom.label != '' && cmb_excuroom.label.length >1)
- { _room += '('+ cmb_excuroom.label +')'; }
- model.setValue("/root/send/reqdata/room", _room);
-
- var printgubn = model.getValue("/root/send/printgubn");
- if (printgubn == "1") {
- exeReportPreview("RPAEA00910", "XML", "/root/send/reqdata");
- } else if (printgubn == "2"){
- exeReportPreview("RPAEA00911", "XML", "/root/send/reqdata");
- } else {
- exeReportPreview("RPAEA00912", "XML", "/root/send/reqdata");
- }
-
- ]]>
- </script>
- </button>
- </group>
- <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
- <button id="btn_reset" class="btn4_letter3" style="left:1067px; top:3px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.reset();
- ]]>
- </script>
- </button>
- <button id="btn_cls" class="btn4_letter2" style="left:1137px; top:3px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <close ev:event="DOMActivate"/>
- </button>
- </group>
- <switch id="switch1" style="left:0px; top:85px; width:1195px; height:645px; ">
- <case id="case1" selected="true">
- <datagrid id="grd_rsrvposstm" nodeset="/root/main/rsrvprescondlist/rsrvposstm" caption="시간^현황^가용" colsep="^" colwidth="41, 33, 32" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:394px; top:29px; width:144px; height:606px; ">
- <col ref="rsrvtm" format="hh:nn" style="text-align:center; "/>
- <col ref="count" style="text-align:center; "/>
- <col ref="max" style="text-align:center; "/>
- </datagrid>
- <caption id="caption3" class="tit_2" style="left:540px; top:10px; width:85px; height:13px; ">예약내역</caption>
- <multilinegrid id="grd_calendar" nodeset="/root/hidden/calendar/weeklist/list" class="gridcalendar" autoresize="true" caption="일^월^화^수^목^금^토" colsep="^" colwidth="56, 55, 55, 55, 55, 56, 56" dataheight="20" extendlastcol="noscroll" focuscolor="transparent" rowsep="|" mergecellsfixedrows="bycolrec" style="left:0px; top:85px; width:390px; height:297px; ">
- <row>
- <col class="color_sun" ref="sun" style="border-bottom-width:0px; "/>
- <col ref="mon" style="border-bottom-width:0px; "/>
- <col ref="tue" style="border-bottom-width:0px; "/>
- <col ref="wed" style="border-bottom-width:0px; "/>
- <col ref="thu" style="border-bottom-width:0px; "/>
- <col ref="fri" style="border-bottom-width:0px; "/>
- <col class="color_sat" ref="sat" style="border-bottom-width:0px; "/>
- </row>
- <row>
- <col ref="sun_memo" style="border-top-width:0px; "/>
- <col ref="mon_memo" style="border-top-width:0px; "/>
- <col ref="tue_memo" style="border-top-width:0px; "/>
- <col ref="wed_memo" style="border-top-width:0px; "/>
- <col ref="thu_memo" style="border-top-width:0px; "/>
- <col ref="fri_memo" style="border-top-width:0px; "/>
- <col ref="sat_memo" style="border-top-width:0px; "/>
- </row>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
-
- if(grd_calendar.row != 0 ) {
-
- model.setValue("/root/hidden/grdcellcolor/calrow",grd_calendar.row);
- model.setValue("/root/hidden/grdcellcolor/calcol",grd_calendar.col);
-
- setCellColor(grd_calendar);
- getRsrvPossTm(grd_calendar);
-
-
- var curDate = getCurrentDate().substr(0,8); //오늘날짜
- var rsrvdd =model.getValue("/root/send/data/rsrvdd"); //선택일자
-
- }
-
- ]]>
- </script>
- </multilinegrid>
- <group id="group4" scroll="auto" style="left:0px; top:28px; width:394px; height:55px; ">
- <shape id="rectangle2" class="calendar_header" appearance="rectangle" style="left:0px; top:3px; width:390px; height:52px; "/>
- <button id="button7" class="icon_month" style="left:20px; top:25px; width:27px; height:27px; ">
- <caption>1</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(opt_month.value!== "01") {
- fGetCalendar("01");
- }
- ]]>
- </script>
- </button>
- <button id="button8" class="icon_month" style="left:50px; top:25px; width:27px; height:27px; ">
- <caption>2</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(opt_month.value!== "02") {
- fGetCalendar("02");
- }
- ]]>
- </script>
- </button>
- <button id="button9" class="icon_month" style="left:80px; top:25px; width:27px; height:27px; ">
- <caption>3</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(opt_month.value!== "03") {
- fGetCalendar("03");
- }
- ]]>
- </script>
- </button>
- <button id="button10" class="icon_month" style="left:110px; top:25px; width:27px; height:27px; ">
- <caption>4</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(opt_month.value!== "04") {
- fGetCalendar("04");
- }
- ]]>
- </script>
- </button>
- <button id="button11" class="icon_month" style="left:140px; top:25px; width:27px; height:27px; ">
- <caption>5</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(opt_month.value!== "05") {
- fGetCalendar("05");
- }
- ]]>
- </script>
- </button>
- <button id="button12" class="icon_month" style="left:170px; top:25px; width:27px; height:27px; ">
- <caption>6</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(opt_month.value!== "06") {
- fGetCalendar("06");
- }
- ]]>
- </script>
- </button>
- <button id="button13" class="icon_month" style="left:200px; top:25px; width:27px; height:27px; ">
- <caption>7</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(opt_month.value!== "07") {
- fGetCalendar("07");
- }
- ]]>
- </script>
- </button>
- <button id="button14" class="icon_month" style="left:230px; top:25px; width:27px; height:27px; ">
- <caption>8</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(opt_month.value!== "08") {
- fGetCalendar("08");
- }
- ]]>
- </script>
- </button>
- <button id="button18" class="icon_month" style="left:260px; top:25px; width:27px; height:27px; ">
- <caption>9</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(opt_month.value!== "09") {
- fGetCalendar("09");
- }
- ]]>
- </script>
- </button>
- <button id="button19" class="icon_month" style="left:290px; top:25px; width:27px; height:27px; ">
- <caption>10</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(opt_month.value!== "10") {
- fGetCalendar("10");
- }
- ]]>
- </script>
- </button>
- <button id="button20" class="icon_month" style="left:320px; top:25px; width:27px; height:27px; ">
- <caption>11</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(opt_month.value!== "11") {
- fGetCalendar("11");
- }
- ]]>
- </script>
- </button>
- <button id="button21" class="icon_month" style="left:350px; top:25px; width:27px; height:27px; ">
- <caption>12</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(opt_month.value!== "12") {
- fGetCalendar("12");
- }
- ]]>
- </script>
- </button>
- <output id="opt_month" ref="/root/hidden/calendar/month" class="calendar_output" style="left:200px; top:2px; width:20px; height:19px; "/>
- <caption id="caption24" class="calendar_output" style="left:178px; top:2px; width:20px; height:19px; ">년</caption>
- <caption id="caption25" class="calendar_output" style="left:220px; top:2px; width:20px; height:19px; ">월</caption>
- <button id="button31" class="icon_next_year" style="left:270px; top:5px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_next_y.gif; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'Y');
-
- model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
- model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
- model.refresh();
-
-
- setCalendar(isDate);
- // getCurerPresCond();
- ]]>
- </script>
- </button>
- <button id="button33" class="icon_pre_month" visibility="visible" style="left:121px; top:5px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_pre_m.gif; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'M');
-
- model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
- model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
- model.refresh();
- /*
- if(model.getValue("/root/send/excuroomcd") == "") {
- messageBox("치료실","C002");
- return;
- }
- */
- setCalendar(isDate);
-
- ]]>
- </script>
- </button>
- <output id="opt_year" ref="/root/hidden/calendar/year" class="calendar_output" style="left:148px; top:2px; width:30px; height:19px; "/>
- <button id="button35" class="icon_next_month" visibility="visible" style="left:246px; top:5px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_next_m.gif; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'M');
-
- model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
- model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
- model.refresh();
- /*
- if(model.getValue("/root/send/excuroomcd") == "") {
- messageBox("치료실","C002");
- return;
- }
- */
- setCalendar(isDate);
-
- ]]>
- </script>
- </button>
- <button id="button36" class="icon_pre_year" style="left:98px; top:5px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_pre_y.gif; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'Y');
-
- model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
- model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
- model.refresh();
-
- setCalendar(isDate);
- // getCurerPresCond();
- ]]>
- </script>
- </button>
- </group>
- <caption id="caption15" class="tit_2" style="left:394px; top:10px; width:85px; height:13px; ">예약시간</caption>
- <line id="line3" class="line_1" style="x1:540px; y1:25px; x2:1190px; y2:25px; "/>
- <line id="line6" class="line_1" style="x1:394px; y1:25px; x2:538px; y2:25px; "/>
- <datagrid id="datagrid1" nodeset="/root/main/rsrvprescondlist/rsrvprescond" caption="예약일시^등록번호^환자명^성별/나이^처방코드^급비^처방명^진료과(진료의)^처방일시^지정의^병동^병실^예약사항^처방전달사항^임상소견^입원외래구분^처방상태^caption1^caption2^caption3^예약자^입력일시^외래진료예약일" colsep="^" colwidth="106, 65, 58, 62, 77, 63, 280, 124, 105, 54, 62, 71, 129, 200, 200, 82, 85, 19, 12, 16, 60, 120,110" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" tooltip="true" style="left:540px; top:29px; width:650px; height:606px; ">
- <col ref="rsrvtm" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
- <col ref="pid" style="text-align:center; "/>
- <col ref="hngnm"/>
- <col ref="age" style="text-align:center; "/>
- <col ref="prcpcd"/>
- <col ref="payflagnm"/>
- <col ref="prcpnm"/>
- <col ref="usernm"/>
- <col ref="prcpdd" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
- <col ref="specdrnm"/>
- <col ref="wardcd"/>
- <col ref="roomcd"/>
- <col ref="rsrvrem"/>
- <col ref="prcpdelivefact"/>
- <col ref="clinccmtcnts"/>
- <col disabled="true" ref="prcpgenrflag" type="combo">
- <choices>
- <itemset nodeset="/root/init2/cmb_info/prcpgenrflag/M0010">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col disabled="true" ref="execprcpstatcd" type="combo">
- <choices>
- <itemset nodeset="/root/init2/cmb_info/initexecprcpstatcd/M0011">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="roomcd" visibility="hidden"/>
- <col ref="fromdd" visibility="hidden"/>
- <col ref="todd" visibility="hidden"/>
- <col ref="updnm"/>
- <col ref="upddate"/>
- <col ref="orddd" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- datagrid1.gridToInstance();
- ]]>
- </script>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if (!datagrid1.isCell(event.target)) {
- return;
- }
-
- if (model.getValue("/root/main/rsrvprescondlist/rsrvprescond[" + datagrid1.row + "]/hngnm") == "") {
- return;
- }
-
- var pid = model.getValue("/root/main/rsrvprescondlist/rsrvprescond[" + datagrid1.row + "]/pid");
-
- var main = getMainViewer();
-
- if (main.document.title == "통합예약관리") {
- main.window.model.makeValue("/root/send/data/srchpid", pid);
- main.window.javascript.navigate("SMAEA02000", "", "", "", "SMAEA02000", "/root/send/data/srchpid", "/root/send/data/srchpid");
- } else if (main.document.title == "검사예약") {
- main.window.model.setValue("/root/send/data/pid", pid);
- setGlobalVariable("menuparam", "T");
- main.window.javascript.navigate("SMPEA00100", "", "", "", "SMPEA00100", "root/send/data/pid", "root/send/data/pid");
- }
-
- ]]>
- </script>
- </datagrid>
- <datagrid id="datagrid3" nodeset="/root/init/calenlist/calendinfo" visibility="hidden" caption="caption1^caption2" colsep="^" colwidth="100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:400px; top:420px; width:220px; height:150px; ">
- <col ref="basedd"/>
- <col ref="dutflag"/>
- </datagrid>
- <datagrid id="grd_temp" nodeset="/root/init/curerprescondlist/rsrvcalendar" visibility="hidden" caption="일자(dd)^가용현황^max^caption3" colsep="^" colwidth="76, 62, 32" mergecellsfixedrows="bycolrec" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:630px; top:415px; width:175px; height:170px; ">
- <col ref="rsrvdd"/>
- <col ref="count"/>
- <col ref="max"/>
- </datagrid>
- <caption id="caption8" class="tit_2" style="left:0px; top:10px; width:85px; height:14px; ">예약현황</caption>
- <line id="line5" class="line_1" style="x1:0px; y1:25px; x2:390px; y2:25px; "/>
- <caption id="caption11" class="tit_2" style="left:5px; top:400px; width:157px; height:14px; ">검사실별 휴검관리 조회</caption>
- <line id="line2" class="line_1" style="x1:0px; y1:415px; x2:390px; y2:415px; "/>
- <datagrid id="datagrid4" nodeset="/root/main/rsrvupdtinfo/rsrvupdt" caption="시작일시^시작일시^종료일시^종료일시^사유^최종변경자^최종변경일시^검사실코드^지원부서코드^입원외래구분" colsep="^" colwidth="70, 40, 70, 40, 155, 80, 116, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" navindex="8" style="left:0px; top:420px; width:390px; height:215px; ">
- <col disabled="true" ref="rsrvupdtfromdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col disabled="true" ref="rsrvupdtfromtm" format="hh:nn" style="text-align:center; "/>
- <col disabled="true" ref="rsrvupdttodd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col disabled="true" ref="rsrvupdttotm" format="hh:nn" style="text-align:center; "/>
- <col ref="updtresndesc"/>
- <col ref="lastupdtrid" style="text-align:center; "/>
- <col ref="lastupdtdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
- <col ref="excuroomcd" visibility="hidden"/>
- <col ref="suppdeptcd" visibility="hidden"/>
- <col ref="ioflag" visibility="hidden"/>
- <script type="javascript" ev:event="DOMFocusIn">
- <![CDATA[
- checkKeyColumn("datagrid2");
- ]]>
- </script>
- </datagrid>
- <select id="chk_cntflag" ref="/root/hidden/cntflag" overflow="visible" appearance="full" style="left:625px; top:8px; width:140px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>시간별 예약 건수 표시</label>
- <value>Y</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- var mPath = "/root/main/rsrvprescondlist/rsrvprescond";
- var cnt = instance1.selectNodes(mPath).length;
- if (cnt < 1) {
- return;
- }
-
- datagrid1.rebuildStyle();
-
- var hPath = "/root/hidden/rsrvlist/rsrvprescond";
-
- if (model.getValue("/root/hidden/cntflag") == "Y") {
-
- // 원본 노드 백업
- model.removenode("/root/temp/rsrvprescondlist");
- model.makeNode("/root/temp/rsrvprescondlist");
- model.copyNode("/root/temp/rsrvprescondlist", "/root/main/rsrvprescondlist");
-
- // 작업 노드 저장
- model.removenode("/root/hidden/rsrvlist");
- model.makeNode("/root/hidden/rsrvlist");
- model.copyNode("/root/hidden/rsrvlist", "/root/main/rsrvprescondlist");
-
- sortNodeList(hPath, "rsrvtm", "asc");
-
- model.removenode("/root/main/rsrvprescondlist");
- model.makeNode("/root/main/rsrvprescondlist");
-
- var hCnt = 1;
- var addCnt = 1;
-
- for (var i = 1; i <= cnt; i++) {
-
- model.duplicate("/root/main/rsrvprescondlist", hPath + "[" + i + "]");
-
- var hour = model.getValue(hPath + "[" + i + "]/rsrvtm").substr(8, 2);
-
- var nextHour = "";
- if (i < cnt) {
- nextHour = model.getValue(hPath + "[" + ( i + 1 ) + "]/rsrvtm").substr(8, 2);
- } else {
- nextHour = parseInt(hour) + 1;
- nextHour = nextHour.length == 1 ? "0" + nextHour : String(nextHour);
- }
-
- if (hour != nextHour) {
-
- var node = instance1.selectSingleNode(hPath + "[" + i + "]");
- var nodeList = node.childNodes;
- while (n = nodeList.nextNode()) {
- model.makeValue(mPath + "[" + ( i + addCnt ) + "]/" + n.nodeName, "");
- }
-
- model.setValue(mPath + "[" + ( i + addCnt ) + "]/rsrvtm", hour + ":00 ~ " + nextHour + ":00");
- model.setValue(mPath + "[" + ( i + addCnt ) + "]/pid", hCnt);
-
- addCnt++;
-
- hCnt = 1;
-
- } else {
- hCnt++;
- }
- }
-
- datagrid1.refresh();
-
- for (var i = 1; i <= datagrid1.rows; i++) {
- if (model.getValue(mPath + "[" + i + "]/hngnm") == "") {
- datagrid1.rowStyle(i, "all", "background-color") = "#ffff00";
- datagrid1.rowStyle(i, "all", "font-weight") = "bold";
- }
- }
-
- } else {
-
- model.copyNode("/root/main/rsrvprescondlist", "/root/temp/rsrvprescondlist");
-
- datagrid1.refresh();
- }
- ]]>
- </script>
- </select>
- <button id="btn_excel" class="btn2_letter4" style="left:1126px; top:5px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- var filename = "검사실별 예약 현황_" + combo1.label + "_" + model.getValue("/root/send/data/rsrvdd");
- filename = window.fileDialog("save", ",", false, filename, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (filename == "") {
- messageBox("파일명을 지정해 주십시오.", "C999");
- return;
- }
-
- datagrid1.saveExcel(filename, "sheetname:예약내역;colhiddenextend:true;rowhiddenextend:false;");
-
- messageBox("엑셀 저장이 완료되었습니다.", "I999");
- ]]>
- </script>
- </button>
- </case>
- <case id="case2">
- <datagrid id="datagrid2" nodeset="/root/main/rsrvprescondlist2/rsrvprescond" caption="예약일시^등록번호^환자명^성별/나이^핸드폰^처방코드^급/비급^처방명^진료과(진료의)^지정의^처방일시^예약사항^처방전달사항^임상소견^입원외래구분^처방상태^caption1^caption2^caption3^예약자^입력일시" colsep="^" colwidth="106, 65, 65, 65, 106, 100, 59, 268, 124, 51, 105, 129, 200, 200, 82, 85, 19, 12, 16, 60, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:0px; top:35px; width:1190px; height:605px; ">
- <col ref="rsrvtm" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
- <col ref="pid"/>
- <col ref="hngnm"/>
- <col ref="age" style="text-align:center; "/>
- <col ref="mpphontel" style="text-align:center; "/>
- <col ref="prcpcd"/>
- <col ref="payflagnm"/>
- <col ref="prcpnm"/>
- <col ref="usernm"/>
- <col ref="specdrnm"/>
- <col ref="prcpdd" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
- <col ref="rsrvrem"/>
- <col ref="prcpdelivefact"/>
- <col ref="clinccmtcnts"/>
- <col disabled="true" ref="prcpgenrflag" type="combo">
- <choices>
- <itemset nodeset="/root/init2/cmb_info/prcpgenrflag/M0010">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col disabled="true" ref="execprcpstatcd" type="combo">
- <choices>
- <itemset nodeset="/root/init2/cmb_info/initexecprcpstatcd/M0011">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="roomcd" visibility="hidden"/>
- <col ref="fromdd" visibility="hidden"/>
- <col ref="todd" visibility="hidden"/>
- <col ref="updnm"/>
- <col ref="upddate"/>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- datagrid1.gridToInstance();
- ]]>
- </script>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if (!datagrid2.isCell(event.target)) {
- return;
- }
-
- var pid = model.getValue("/root/main/rsrvprescondlist2/rsrvprescond[" + datagrid2.row + "]/pid");
-
- var main = getMainViewer();
-
- if (main.document.title == "통합예약관리") {
- main.window.model.makeValue("/root/send/data/srchpid", pid);
- main.window.javascript.navigate("SMAEA02000", "", "", "", "SMAEA02000", "/root/send/data/srchpid", "/root/send/data/srchpid");
- } else if (main.document.title == "검사예약") {
- main.window.model.setValue("/root/send/data/pid", pid);
- main.window.javascript.navigate("SMPEA00100", "", "", "", "SMPEA00100", "/root/send/data/pid", "/root/send/data/pid");
- }
- ]]>
- </script>
- </datagrid>
- <line id="line4" class="line_1" style="x1:0px; y1:31px; x2:1190px; y2:31px; "/>
- <input id="ipt_fromdd" ref="/root/send/rsrvfromdd" class="input_default" visibility="visible" inputtype="date" style="left:95px; top:5px; width:90px; height:19px; "/>
- <input id="ipt_todd" ref="/root/send/rsrvtodd" class="input_default" visibility="visible" inputtype="date" style="left:210px; top:5px; width:90px; height:19px; "/>
- <caption id="caption4" style="left:190px; top:5px; width:15px; height:19px; text-align:center; ">~</caption>
- <caption id="caption13" class="search_name" style="left:325px; top:5px; width:86px; height:17px; text-align:left; background-image:../../../com/commonweb/images/search_bullet1.gif; ">검사코드 :</caption>
- <caption id="caption14" class="search_name" style="left:545px; top:5px; width:86px; height:17px; text-align:left; background-image:../../../com/commonweb/images/search_bullet1.gif; ">예약자 :</caption>
- <input id="ipt_prcpcd" ref="/root/send/prcpcd" style="left:415px; top:5px; width:120px; height:19px; "/>
- <select1 id="cmb_rsrvid" ref="/root/send/rsrvid" appearance="minimal" style="left:620px; top:5px; width:90px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/cmb_info/rsrvidinfo/T0001">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption9" class="search_name" style="left:5px; top:5px; width:90px; height:17px; ">예약일자 :</caption>
- </case>
- </switch>
- </xhtml:body>
- </xhtml:html>
|