123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506 |
- /*
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 의사 진료일정 조회 ( SPMMR03900_진료일정.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- - Author : 박종훈
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- */
- var cnstflag = "";
- /**
- * @desc : 화면초기화
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fInitalize()
- {
- cnstflag = parent.window.javascript.getParameter("MMR05000_cnstflag");
- grup_cnst3.attribute("left") = 0;
- if (cnstflag == "1")
- {
- var ioflag = parent.model.getValue ("/root/main/result/paminfo/list/ioflag");
-
- grup_cnst3.attribute("width") = 0;
- grup_cnst3.attribute("height") = 0;
- grup_cnst1.attribute("visibility") = "visible";
-
- if (ioflag == "I" || ioflag == "E" || ioflag == "D")
- {
- rdo_cnstioflag.attribute("visibility") = "visible";
- //model.setValue("/root/init/cnstioflag", ioflag);
- ioflag = "I";
- }
- else
- {
- rdo_cnstioflag.attribute("visibility") = "hidden";
- ioflag = "O";
- }
-
- model.setValue("/root/init/cnstioflag", ioflag);
- window.Height = parseInt(grup_cnst1.attribute("height")) + 55;
- window.width = parseInt(grup_cnst1.attribute("width")) + 25;
- }
- else if (cnstflag == "3")
- {
- grup_cnst1.attribute("width") = 0;
- grup_cnst1.attribute("height") = 0;
- grup_cnst3.attribute("visibility") = "visible";
- window.Height = parseInt(grup_cnst3.attribute("height")) + 55;
- window.width = parseInt(grup_cnst3.attribute("width")) + 25;
- }
-
- model.setValue("/root/send/ioflag", model.getValue("/root/init/cnstioflag"));
- model.setValue("/root/send/cnstflag", cnstflag);
- submit("TRMMR04902"); //컨설트부서조회
- }
- /**
- * @desc : 내원구분 선택
- * @id :
- * @event : ondblclick
- * @return : void
- * @authur : 박종훈
- */
- function fSelIOFlag()
- {
- model.removeNodeset("/root/main/cnstformlist/cnstform");
- model.removeNodeset("/root/main/drschlist");
- model.setValue("/root/send/ioflag", model.getValue("/root/init/cnstioflag"));
- model.setValue("/root/send/cnstflag", cnstflag);
- submit("TRMMR04902"); //컨설트부서조회
- }
- /**
- * @desc : 부서리스트 선택
- * @id :
- * @event : ondblclick
- * @return : void
- * @authur : 박종훈
- */
- function fClickDeptList()
- {
- if((grd_deptlist.isCell(event.target) && grd_deptlist.mouserow >= grd_deptlist.fixedrows && (grd_deptlist.Rows > 1))) //그리드에서 데이타영역만
- {
- //var deptcd = model.getValue("/root/main/deptlist/dept[" + grd_deptlist.row + "]deptcd");
- var deptcd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstdeptcd"));
- var cnstflag = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstflag"));
- var fr_date = new Date();
- var to_date = new Date();
- to_date = to_date.getAddDate(29, "D");
-
- //2009-06-19 오후 8:38:58 강지훈 추가 : 특정과는 진료일정이없어도 모든 진료의를 보여주어야 한다.
- mmbfGetHardCodeInfo("/root/send/formhrdcd", "/root/tmp/depthrcd", 9902);
- var cnstdeptcd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstdeptcd"));
- var seledtedDeptcd = model.getValue("/root/tmp/depthrcd/hardcd[hardcd = "+ cnstdeptcd +"]/hardcd");
- var cnstioflag = "";
- if(seledtedDeptcd == ""){
- cnstioflag = "O" //진료일정이 있는 의사만 보여준다.
- }
- else{
- cnstioflag = "I" //진료일정이 없는 의사까지 모두 보여준다.
- }
-
- //alert("fr_date:"+fr_date.getDateFormat());
- //alert("to_date:"+to_date.getDateFormat());
- model.makeValue("/root/send/orddeptcd", deptcd);
- model.makeValue("/root/send/fromdd", fr_date.getDateFormat());
- model.makeValue("/root/send/todd", to_date.getDateFormat());
-
- model.makeValue("/root/send/cnstdeptcd", cnstdeptcd );
- model.makeValue("/root/send/cnstdeptnm", grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstdeptnm")) );
- model.makeValue("/root/send/formcd", grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("formcd")) );
- model.makeValue("/root/send/cnstioflag", cnstioflag);
-
- model.removeNodeset("/root/main/endresnlist");
- model.removeNodeset("/root/main/endresn");
- if(submit("TRMMR03901"))
- {
- grd_drschlist.rowheight(1) = 0;
- grd_drschlist.rowheight(2) = 0;
- grd_drschlist.resizeCells();
- fSetGrdColor();
- }
- }
- }
- /**
- * @desc : 재활고려서식을 위한 함수
- */
- function fClickDeptList_koryo()
- {
- if(grd_deptlist.Rows > 1) //그리드에서 데이타영역만
- {
- //var deptcd = model.getValue("/root/main/deptlist/dept[" + grd_deptlist.row + "]deptcd");
- var deptcd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstdeptcd"));
- var cnstflag = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstflag"));
- var fr_date = new Date();
- var to_date = new Date();
- to_date = to_date.getAddDate(29, "D");
-
- //2009-06-19 오후 8:38:58 강지훈 추가 : 특정과는 진료일정이없어도 모든 진료의를 보여주어야 한다.
- mmbfGetHardCodeInfo("/root/send/formhrdcd", "/root/tmp/depthrcd", 9902);
- var cnstdeptcd = grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstdeptcd"));
- var seledtedDeptcd = model.getValue("/root/tmp/depthrcd/hardcd[hardcd = "+ cnstdeptcd +"]/hardcd");
- var cnstioflag = "";
- if(seledtedDeptcd == ""){
- cnstioflag = "O" //진료일정이 있는 의사만 보여준다.
- }
- else{
- cnstioflag = "I" //진료일정이 없는 의사까지 모두 보여준다.
- }
-
- //alert("fr_date:"+fr_date.getDateFormat());
- //alert("to_date:"+to_date.getDateFormat());
- model.makeValue("/root/send/orddeptcd", deptcd);
- model.makeValue("/root/send/fromdd", fr_date.getDateFormat());
- model.makeValue("/root/send/todd", to_date.getDateFormat());
-
- model.makeValue("/root/send/cnstdeptcd", cnstdeptcd );
- model.makeValue("/root/send/cnstdeptnm", grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("cnstdeptnm")) );
- model.makeValue("/root/send/formcd", grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colref("formcd")) );
- model.makeValue("/root/send/cnstioflag", cnstioflag);
-
- model.removeNodeset("/root/main/endresnlist");
- model.removeNodeset("/root/main/endresn");
- if(submit("TRMMR03901"))
- {
- grd_drschlist.rowheight(1) = 0;
- grd_drschlist.rowheight(2) = 0;
- grd_drschlist.resizeCells();
- fSetGrdColor();
- }
- }
- }
- /**
- * @desc : 일정별 색상 설정
- * @id :
- * @event : ondblclick
- * @return : void
- * @authur : 박종훈
- */
- function fSetGrdColor()
- {
- var cols = grd_drschlist.cols;
- var rows = grd_drschlist.rows;
- for( var i = 1; i <= rows; i++ )
- {
- for( var j = 1; j <= cols; j++ )
- {
- var drsch = grd_drschlist.valueMatrix(i, j);
- if (i > 3)
- {
- if (drsch == "오전")
- {
- grd_drschlist.cellStyle("background-color", i, j) = "#ffff99";
- }
- else if (drsch == "오후")
- {
- grd_drschlist.cellStyle("background-color", i, j) = "#ccffff";
- }
- else if (drsch == "전일")
- {
- grd_drschlist.cellStyle("background-color", i, j) = "#ffcc99";
- }
- else if (drsch.substr(0, 2) == "휴진")
- {
- grd_drschlist.cellStyle("background-color", i, j) = "#3366ff";
- }
- else if (drsch == "마감")
- {
- grd_drschlist.cellStyle("background-color", i, j) = "#999999";
- }
- else
- {
- grd_drschlist.cellStyle("background-color", i, j) = "#ffffff";
- }
- }
- else if (i == 1)
- {
- if (drsch == "4")
- {
- grd_drschlist.cellStyle("color", 4, j) = "#3366ff"; //토요일
- }
- else if (drsch == "8")
- {
- grd_drschlist.cellStyle("color", 4, j) = "#ff0000"; //일요일
- }
- else
- {
- grd_drschlist.cellStyle("color", 4, j) = "#4d4d4d";
- }
- }
- if(i == 3 || j == 1)
- {
- //grd_drschlist.cellStyle("background-color", i, j) = "#99ccff"; //날짜, 의사명
- grd_drschlist.cellStyle("color", i, j) = "#4d4d4d";
- grd_drschlist.cellStyle("background-image", i, j) = "../../../com/commonweb/images/grid_bg.gif";
- grd_drschlist.cellStyle("background-repeat", i, j) = "repeat-x";
- grd_drschlist.cellStyle("background-stretch", i, j) = "stretch";
- grd_drschlist.cellStyle("border-style", i, j) = "solid";
- grd_drschlist.cellStyle("border-left-color", i, j) = "#c6e4ff";
- grd_drschlist.cellStyle("border-top-color", i, j) = "#8ebcff";
- grd_drschlist.cellStyle("border-right-color", i, j) = "#8ebcff";
- grd_drschlist.cellStyle("border-bottom-color", i, j) = "#8ebcff";
- }
- }
- }
- }
- /**
- * @desc : 일정 선택
- * @id :
- * @event : ondblclick
- * @return : void
- * @authur : 박종훈
- */
- function fClickSchList_old()
- {
- var col = grd_drschlist.col;
- var row = grd_drschlist.row;
- var day_rowno = 2;
- var drnm = grd_drschlist.valueMatrix(row, grd_drschlist.colref("orddrnm"));
- if (col > 1 && row > 4)
- {
- // var drsch = grd_drschlist.valueMatrix(row, col);
- //
- // if (drsch == "")
- // {
- // messageBox("선택하신 날짜에 " + drnm + "님의 진료일정이", "I004");
- // }
- // else
- // {
- var drid = grd_drschlist.valueMatrix(row, grd_drschlist.colref("orddrid"));
- var cnstflag = "1";
- var orddd = grd_drschlist.valueMatrix(day_rowno, col);
- if (orddd != "")
- {
- if (orddd < getCurrentDate())
- {
- messageBox("과거일로 의뢰할 수", "I004");
- return;
- }
- else
- {
- var deptcd = model.getValue("/root/send/cnstdeptcd");
- var deptnm = model.getValue("/root/send/cnstdeptnm");
- var formcd = model.getValue("/root/send/formcd");
- //alert("부서코드=" + deptcd + ", 의사ID=" + drid + ", 의사이름=" + drnm + ", 진료일=" + orddd);
- parent.window.javascript.fOpenCnstForm(formcd, deptcd, deptnm, drid, drnm, orddd, cnstflag, "", "");
- window.close();
- }
- }
- // }
- }
- }
- /**
- * @desc : 타과의뢰 선택
- * @id :
- * @event : ondblclick
- * @return : void
- * @authur : 박종훈
- */
- function fClickCnstList()
- {
- var col = grd_cnstlist.col;
- var row = grd_cnstlist.row;
- var formcd = grd_cnstlist.valueMatrix(row, grd_cnstlist.colref("formcd"));
- var formnm = grd_cnstlist.valueMatrix(row, grd_cnstlist.colref("formnm"));
- var deptcd = grd_cnstlist.valueMatrix(row, grd_cnstlist.colref("cnstdeptcd"));
- var deptnm = grd_cnstlist.valueMatrix(row, grd_cnstlist.colref("cnstdeptnm"));
- var replflag = grd_cnstlist.valueMatrix(row, grd_cnstlist.colref("replflag"));
- var cnstflag = "3";
-
- parent.window.javascript.setParameter("SPMMR03900_formcd", formcd);
- parent.window.javascript.setParameter("SPMMR03900_deptcd", deptcd);
- parent.window.javascript.setParameter("SPMMR03900_deptnm", deptnm);
- parent.window.javascript.setParameter("SPMMR03900_cnstflag", cnstflag);
-
- parent.window.javascript.setParameter("SPMMR03900_formnm", formnm);
- parent.window.javascript.setParameter("SPMMR03900_replflag", replflag);
-
- //parent.window.javascript.fOpenCnstForm(formcd, deptcd, deptnm, "", "", "", cnstflag, formnm, replflag);
- window.close();
- }
- /**
- * @desc : 다음달, 이전달
- * @id :
- * @event : ondblclick
- * @return : void
- * @authur : 박종훈
- */
- function fCalMonth(tmp)
- {
- var tmp_fr_date = model.getValue("/root/send/fromdd").toDate();
- var tmp_to_date = model.getValue("/root/send/todd").toDate();
- if (tmp == "prev")
- {
- var fr_date = tmp_fr_date.getAddDate(-30, "D");
- var to_date = tmp_to_date.getAddDate(-30, "D");
- }
- else
- {
- var fr_date = tmp_fr_date.getAddDate(30, "D");
- var to_date = tmp_to_date.getAddDate(30, "D");
- }
- model.makeValue("/root/send/fromdd", fr_date.getDateFormat());
- model.makeValue("/root/send/todd", to_date.getDateFormat());
- if(submit("TRMMR03901"))
- {
- grd_drschlist.rowheight(1) = 0;
- fSetGrdColor();
- }
- }
- /**
- * @desc : 의사 선택(휴진일정 셋팅)
- * @id :
- * @event : ondblclick
- * @return : void
- * @authur : 박종훈
- */
- function fClickDrNm()
- {
- var col = grd_drschlist.col;
- var row = grd_drschlist.row;
- var day_rowno = 2;
- if (row > 4)
- {
- var drid = grd_drschlist.valueMatrix(row, grd_drschlist.colref("orddrid"));
- model.removeNodeset("/root/main/endresn");
- copyNodeset("/root/main/endresn", "/root/main/endresnlist[orddrid=" +drid+ "and ordendresnnm != '']", "replace", model, model);
- model.refresh();
- }
- }
- /*****************************************************************************
- 튜닝
- ******************************************************************************/
- /**
- * @group :
- * @ver : 2008.06.13
- * @by : snoweye
- * @---------------------------------------------------
- * @type : function
- * @access : private
- * @desc : 의뢰의사를 선택한다.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClickSchList()
- {
- var col = grd_drschlist.col;
- var row = grd_drschlist.row;
- var day_rowno = 2;
- var drnm = grd_drschlist.valueMatrix(row, grd_drschlist.colref("orddrnm"));
- if (!fGetSuspendDiagInfo()) {
- return;
- }
-
- if (col > 1 && row > 4)
- {
- var drid = grd_drschlist.valueMatrix(row, grd_drschlist.colref("orddrid"));
- var cnstflag = "1";
- //2013/01/23 Start 원무팀의 외래 컨설트 hopedd 사용 할 수 있도록 수정
- var orddd = grd_drschlist.valueMatrix(day_rowno, col);
- //var orddd = getCurrentDate();
- //2012/01/23 End
-
- if (orddd != "")
- {
- if (orddd < getCurrentDate())
- {
- messageBox("과거일로 의뢰할 수", "I004");
- return;
- }
- else
- {
- var deptcd = model.getValue("/root/send/cnstdeptcd");
- var deptnm = model.getValue("/root/send/cnstdeptnm");
- var formcd = model.getValue("/root/send/formcd");
- var reqdeptno = model.getValue("/root/main/cnstformlist/cnstform[" + grd_deptlist.row + "]/reqdeptno");
-
-
- //선택된 진료의 정보를 부모창에 전달한다.
- parent.window.javascript.setParameter("SPMMR03900_formcd", formcd);
- parent.window.javascript.setParameter("SPMMR03900_deptcd", deptcd);
- parent.window.javascript.setParameter("SPMMR03900_deptnm", deptnm);
- parent.window.javascript.setParameter("SPMMR03900_drid", drid);
- parent.window.javascript.setParameter("SPMMR03900_drnm", drnm);
- parent.window.javascript.setParameter("SPMMR03900_orddd", orddd);
- parent.window.javascript.setParameter("SPMMR03900_cnstflag", cnstflag);
- parent.window.javascript.setParameter("SPMMR03900_reqdeptno", reqdeptno);
- parent.window.javascript.setParameter("SPMMR03900_cnstioflag", model.getValue("/root/init/cnstioflag"));
-
- //parent.window.javascript.fOpenCnstForm(formcd, deptcd, deptnm, drid, drnm, orddd, cnstflag, "", "");
- window.close();
- }
- }
- }
- }
- /**
- * 선택한 수신의의 휴진 정보 조회
- */
- function fGetSuspendDiagInfo() {
-
- model.makeValue("/root/send/reqsuspend/orddeptcd", model.getValue("/root/send/cnstdeptcd"));
- model.makeValue("/root/send/reqsuspend/orddrid", grd_drschlist.valueMatrix(grd_drschlist.row, grd_drschlist.colref("orddrid")));
- var sDrNm = grd_drschlist.valueMatrix(grd_drschlist.row, grd_drschlist.colref("orddrnm"));
-
- model.removeNodeset("/root/hidden/suspendinfo");
- if (submit("TRMMR04905")) {
- if (model.getValue("/root/hidden/suspendinfo/spndyn") == "Y") {
- if (messageBox("["+sDrNm+"] 선생님의 휴진정보입니다. \n\n"+
- model.getValue("/root/hidden/suspendinfo/description")+"\n\n의뢰하시겠습니까?", "Q", "") == 7) {
- return;
- }
- }
- }
- return true;
- }
|