123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- function getNodeSetCnt(path)
- {
- var insXml = model.instances(0);
- var nodeList = insXml.selectNodes(path);
- return nodeList.length;
- }
- /**
- * @desc : 폼초기화
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.06.12
- * @---------------------------------------------------
- */
- function fFormInit()
- {
- //진료과/ 챠트과 불러오기.
- model.makeValue("/root/send/reqdata/ioflag", "O");
- model.makeValue("/root/send/reqdata/orddeptflag", "'D', 'X'");
- submit("TRMRC00050");
- //공통코드 가져오기...
- //M0412:과보관사유코드
- zbcfGetCodeList(new Array("M0412"), new Array("/root/init/M0412"));
- model.removeNodeset("/root/main/lendlist");
- // 대출내역 초기값
- model.setValue("/root/condition/ioflag" , "O");
- model.setValue("/root/condition/appdeptcd" , getUserInfo("dutplcecd"));
- model.setValue("/root/condition/pid" , "");
- model.setValue("/root/condition/deptkeepyn" , "Y");
- model.setValue("/root/condition/rendfromdd" , getCurrentDate());
- model.setValue("/root/condition/rendtodd" , getCurrentDate());
- model.refresh();
- }
- /**
- * @desc : 차트 대출 현황 조회하기
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.07.21
- * @---------------------------------------------------
- */
- function fGetLendList()
- {
- var appdeptcd = model.getValue("/root/condition/appdeptcd");
- var rendfromdd = model.getValue("/root/condition/rendfromdd");
- var rendtodd = model.getValue("/root/condition/rendtodd");
- var deptkeepyn = model.getValue("/root/condition/deptkeepyn");
- model.makeValue("/root/send/reqdata/appdeptcd" , appdeptcd);
- model.makeValue("/root/send/reqdata/rendfromdd" , rendfromdd);
- model.makeValue("/root/send/reqdata/rendtodd" , rendtodd);
- model.makeValue("/root/send/reqdata/deptkeepyn" , deptkeepyn);
- model.makeValue("/root/send/reqdata/apprendcd" , "ALL");
- model.refresh();
- submit("TRMRC00320");
- }
- /**
- * @desc : excel 저장 하기
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.07.14
- * @---------------------------------------------------
- */
- function fExcel(gridObj, title){
- if (title == null) { title = "" }
- var fileName = window.fileDialog("save", ",", false, title + "_" + getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != "") {
- gridObj.saveExcel(fileName, "SheetName", true, true, "", "", true);
- }
- }
- /**
- * @desc : 마우스 오른쪽 버튼 팝업창
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fMouseRghtBtnPopup(gridObj)
- {
- if (event.button == 3) {
- if (gridObj.isCell(event.target) && gridObj.mouseRow >= gridObj.fixedrows) {
- model.removeNodeset("/root/send/savedata");
- window.setPopupMenu(true, "/root/hidden/menu/menu", "label", "func", false);
- } else {
- window.setPopupMenu(false);
- }
- } else {
- window.setPopupMenu(false);
- }
- }
- /**
- * @desc : 챠트 반납 우클릭시 - > 과보관 사유 입력
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.07.28
- * @---------------------------------------------------
- */
- function fsetdeptkeep()
- {
- if(grd_lendlist.row < 1){ return; }
- // 2008.01.13. 과보관사유 입력하기...
- fShowWndIptBox();
- }
- /**
- * @desc : 팝업폼 보여주기..
- * @
- * @param :
- * @
- * @return :
- * @authur : 이은영 2008.07.28
- * @---------------------------------------------------
- */
- function fShowWndIptBox()
- {
- grup_deptkeep.visible = "false";
- model.setValue("/root/main/deptkeep/deptkeepcd", "00");
- model.setValue("/root/main/deptkeep/deptkeepresn", "");
- model.refresh();
- if (event.clientY < 600) {
- grup_deptkeep.attribute("top") = event.clientY-90;
- } else {
- grup_deptkeep.attribute("top") = 600;
- }
- grup_deptkeep.visible = "true";
- }
- /**
- * @desc : 챠트 반납 우클릭시 - > 과보관 사유 입력 (update)
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.07.28
- * @---------------------------------------------------
- */
- function fUpdateDeptKeepresn()
- {
- // 2008.01.13. 과보관사유 입력하기...
- var deptkeepcd = model.getValue("/root/main/deptkeep/deptkeepcd");
- var deptkeepresn = model.getValue("/root/main/deptkeep/deptkeepresn");
- var savedata ="chrtseqno▦deptkeepcd▦deptkeepresn▩";
- var dataString = "";
- var dataCount = 0;
- for ( var i = 0; i < grd_lendlist.selectedRows; i++)
- {
- // 2009.01.06. sort (정렬) 후 인스턴스가 바뀌어 저장시 오류 발생 수정함.
- // var chrtseqno = model.getValue("/root/main/lendlist[" + grd_lendlist.selectedrow(i) + "]/chrtseqno");
- var chrtseqno = grd_lendlist.textMatrix(grd_lendlist.selectedrow(i), grd_lendlist.colRef("chrtseqno"));
- dataString = dataString + chrtseqno + "▦" + deptkeepcd + "▦" + deptkeepresn + "▩";
- dataCount = dataCount + 1;
- }
-
- if (dataString.length > 0)
- {
- alert("총 " + dataCount + " 건 과보관(사유입력) 되었습니다.");
- model.makeValue("/root/send/savedata", savedata + dataString);
- model.refresh();
- submit("TXMRC00103");
- }
- grup_deptkeep.visible = false;
-
- // 다시 조회하기..
- fGetLendList();
- }
- /**
- * @desc : 환자등록번호 조회 팝업
- * @
- * @param : refPid - 환자번호 참고 node path
- * refPnm - 환자명 참고 node path
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fGetPid(refPid, refPnm)
- {
- //조회건수가 1건일 경우 팝업창을 바로 닫는다.
- model.makeValue("/root/hidden/tmp/pidpopupinfo/checkfnexam", "1");
- model.makeValue("/root/hidden/tmp/pidpopupinfo/autoflag", "N");
- if( model.getValue("/root/hidden/tmp/pidpopupinfo/srchcond") == '' ){
- model.makeValue("/root/hidden/tmp/pidpopupinfo/srchcond", '2');
- }
-
- modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/hidden/tmp/pidpopupinfo", "/root/send");
- model.resetInstanceNode("/root/source");
- //환자번호 copy
- var popupendflag = model.getValue("/root/main/popupendflag");
-
- if (popupendflag == "ok")
- {
- model.makeValue(refPid, model.getValue("/root/main/patinfo/patinfolist/pid"));
- if (refPnm == null) { refPnm = "" }
- if (refPnm != "") {
- model.makeValue(refPnm, model.getValue("/root/main/patinfo/patinfolist/hngnm"));
- }
- model.refresh();
- }
- }
- /**
- * @desc : 차트 보관 관리에서 대출일자 기간 콤보 보여줄까? 말까?
- * @
- * @param :
- * @return :
- * @authur : 이은영 2009.01.06
- * @---------------------------------------------------
- */
- function fLendTermDisabled()
- {
- var lendtermdisabled = lendterm_disabled.value;
- if (lendtermdisabled == "Y") {
- var today = getCurrentDate();
- model.setValue("/root/condition/rendfromdd", today);
- model.setValue("/root/condition/rendtodd" , today);
- ipt_fromrendd.disabled = false;
- ipt_torendd.disabled = false;
- } else {
- model.setValue("/root/condition/rendfromdd", "");
- model.setValue("/root/condition/rendtodd" , "");
- ipt_fromrendd.disabled = true;
- ipt_torendd.disabled = true;
- }
- ipt_fromrendd.refresh();
- ipt_torendd.refresh();
- }
|