123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- /* ---------------------------------------------------------------------
- 임상과별 수술명별 평균 수술시간 (SMMCT00204.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By taebum
- : 2009-09-25 오후 2:52:20
- ---------------------------------------------------------------------- */
- /**
- * @group :
- * @ver : 2009-09-25 오후 2:40:53
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(){
- var currDate = getCurrentDate();
-
- model.setValue("/root/main/condition/fromdd" , fCalcDate(currDate,-1));
- model.setValue("/root/main/condition/todd" , currDate);
- model.refresh();
- model.removeNodeSet("/root/main/avgoptminfo/avgoptmlist");
- grd_avgoptmlst.refresh();
- var instcd = getUserInfo("dutplceinstcd");
- var rslt_ref = "/root/init/orddeptlist";
-
- model.setValue("/root/main/condition/orddrid", "");
- chk_secprcp.value = "Y";
- //zsdfGetCareOutOrderDepartmentList(instcd, rslt_ref, currDate);
- submit("TRMCT00208");
- addComboItem("cmb_subdept");
- }
- /*
- * 1달을 자동 세팅되게 하는 함수
- * sDate : 일자(string)
- * iFlag : int 1/-1 (1달 이전/이후의 날짜 계산용도)
- */
- function fCalcDate(sDt,iFlag){
- var sDate = sDt.toDate("YYYYMMDD").getAddDate(iFlag, "M").getAddDate(-(iFlag), "D")
- //alert(sDt.toDate("YYYYMMDD").getAddDate(iFlag, "M").getAddDate(-(iFlag), "D").getDayOfWeek("K")); -- 해당요일
- rtnDate = sDate.getFullYear();
- rtnDate = rtnDate.toString() + (( sDate.getMonth() + 1 > 9 ) ? sDate.getMonth() + 1 : "0" + (sDate.getMonth() + 1));
- rtnDate = rtnDate.toString() + (( sDate.getDate() > 9 ) ? sDate.getDate() : "0" + sDate.getDate()) ;
- return rtnDate;
- }
- /**
- * @group :
- * @ver : 2009-09-15 오후 6:45:47
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClickSearchBtn(){
- model.resetInstanceNode("/root/send");
- var todd = model.getValue("/root/main/condition/todd");
- var fromdd = model.getValue("/root/main/condition/fromdd");
- var subdeptcd = model.getValue("/root/main/condition/subdeptcd");
- var orddrid = model.getValue("/root/main/condition/orddrid");
- var search = model.getValue("/root/main/condition/search").toUpperCase();
- var searchcond = model.getValue("/root/main/condition/searchcond");
- var secprcpyn = model.getValue("/root/main/condition/secprcpyn");
- if(fromdd == "" || fromdd == "undefined" || fromdd == null){
- model.alert("시작일자는 필수 입력 항목입니다.");
- return;
- }
-
- if(todd == "" || todd == "undefined" || todd == null){
- model.alert("종료일자는 필수 입력 항목입니다.");
- return;
- }
-
- //현재시간을 비교하여 근무시간 이후일 경우 6개월이상 조회가능 하도록 설정
- var sCurrentTm = getCurrentTime().substr(0,4);
- var sCurrentDay = getCurrentDate().toDate("YYYYMMDD").getDayOfWeek("K");
-
- if(sCurrentDay == "월" || sCurrentDay == "화" || sCurrentDay == "수" ||
- sCurrentDay == "목" || sCurrentDay == "금"){
-
- //오후 5시 이전일 경우 조회 조건은 1달이상 조회되지 않도록 함.
- if(sCurrentTm < "1700"){
- var sSearchTerm = getDateInterval(fromdd, todd);
- if(sSearchTerm > 30){
- model.alert("근무시간에는 1달 이상 조회할 수 없습니다.");
- return;
- }
- }
- }
-
- model.setValue("/root/send/todd" , todd );
- model.setValue("/root/send/fromdd" , fromdd );
- model.setValue("/root/send/subdeptcd", subdeptcd);
- model.setValue("/root/send/orddrid" , orddrid );
- model.setValue("/root/send/search", search);
- model.setValue("/root/send/searchcond", searchcond);
- model.setValue("/root/send/secprcpyn", secprcpyn);
-
- model.removeNodeSet("/root/main/avgoptminfo/avgoptmlist");
- grd_avgoptmlst.refresh();
- if(submit("TRMCT00204")){
- }else{
- model.alert("수술명단 조회 시 서버 오류가 발생되었습니다.");
- return;
- }
- }
- /**
- * @group :
- * @ver : 2009-09-15 오후 6:45:47
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진료과 변경시 의사 조회 이벤트
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fValueChangedOrddrCombo(){
- var sordclsdeptflag = model.getValue("/root/init/orddeptlist/dept[deptcd = '"+model.getValue("/root/main/condition/subdeptcd")+"']/ordclsdeptflag"); // 대표/분과/서브 구분
- var sorddeptkind = model.getValue("/root/init/orddeptlist/dept[deptcd = '"+model.getValue("/root/main/condition/subdeptcd")+"']/orddeptkind"); // 센터/대표 구분
- var ssupdeptcd = model.getValue("/root/init/orddeptlist/dept[deptcd = '"+model.getValue("/root/main/condition/subdeptcd")+"']/supdeptcd"); // 상위부서코드
-
- var sorddeptflag = "";
-
- if (sorddeptkind == "C") { // 센터이면
- sorddeptflag = "C";
- } else if (sorddeptkind != "C" && sordclsdeptflag == "A") { // 센터가 아니면서 분과이면
- sorddeptflag = "A";
- } else { // 그외에 기타과
- sorddeptflag = "etc";
- }
-
- if(model.getValue("/root/main/condition/subdeptcd") == ""){
- model.setValue("/root/main/condition/orddrid","");
- cmb_orddrid.refresh();
- }
-
- model.makeValue("/root/send/reqdata/ordclsdeptflag", sorddeptflag);
- model.makeValue("/root/send/reqdata/supdeptcd", ssupdeptcd);
- model.makeValue("/root/send/reqdata/prcpspecflag", "Y");
-
- model.makeValue("/root/send/reqdata/orddd", getCurrentDate());
- model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/condition/subdeptcd"));
- submit("TRMNO00104"); // 의사리스트 조회
- addComboItem("cmb_orddrid");
- }
- /**
- * @group :
- * @ver : 2009-09-23 오후 3:17:39
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Excel 저장 버튼 클릭 시
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fOnClickExcelBtn(){
- fileName = window.fileDialog("save", ",", false, "임상과별 수술명별 평균 수술시간_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != "" && fileName != null) {
- grd_avgoptmlst.saveExcel(fileName, "SheetName", true, true, "", "", false);
- }
- }
|