123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- /* ---------------------------------------------------------------------
- 응급수술현황 통계 (SSMNP01100.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By taebum
- : 2008-11-19 오후 3:07:20
- ---------------------------------------------------------------------- */
- /**
- * @group :
- * @ver : 2008-09-23 오후 4:20:36
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(){
- model.setValue("/root/hidden/condition/frdd", getCurrentDate());
- model.setValue("/root/hidden/condition/todd" , getCurrentDate());
- model.refresh();
-
- //2010-03-10 오후 6:06:58 taebum add 연으로만 조회됨 오류 올라온건 관련 수정작업
- model.setValue("/root/temp/org_searfromdd", getCurrentDate());
- model.refresh();
-
- model.setValue("/root/init/tab", "dept");
- model.toggle("case1");
-
- model.removeNodeSet("/root/main/deptlists/deptlist");
- datagrid1.refresh();
- model.removeNodeSet("/root/main/monthlists/monthlist");
- datagrid2.refresh();
- model.removeNodeSet("/root/main/roomlists/roomlist");
- datagrid3.refresh();
- model.removeNodeSet("/root/main/weeklists/weeklist");
- datagrid4.refresh();
-
- }
-
- function fOnClickSearchBtn(){
- var sCurrentTab = model.getValue("/root/init/tab");
- if(sCurrentTab == "" || sCurrentTab == null || sCurrentTab == "undefined"){
- return;
- }
- model.setValue("/root/send/frdd", model.getValue("/root/hidden/condition/frdd"));
- model.setValue("/root/send/todd", model.getValue("/root/hidden/condition/todd"));
- model.setValue("/root/send/anstflag1", model.getValue("/root/hidden/condition/anstflag1"));
- model.setValue("/root/send/anstflag2", model.getValue("/root/hidden/condition/anstflag2"));
- model.setValue("/root/send/anstflag3", model.getValue("/root/hidden/condition/anstflag3"));
- model.setValue("/root/send/etcflag1", model.getValue("/root/hidden/condition/etcflag1"));
- model.setValue("/root/send/etcflag2", model.getValue("/root/hidden/condition/etcflag2"));
- model.setValue("/root/send/etcflag3", model.getValue("/root/hidden/condition/etcflag3"));
-
- switch(sCurrentTab){
- case "dept" :
- if(model.getValue("/root/send/frdd") == "" || model.getValue("/root/send/todd") == ""){
- messageBox("시작일, 종료일은 필수입력 사항입니다.", "I000");
- return;
- }
-
- if((model.getValue("/root/send/frdd")).length < 8){
- messageBox("시작일 입력형식은 년-월-일 입니다.", "I000");
- return;
- }
-
- model.removeNodeSet("/root/main/deptlists/deptlist");
- datagrid1.refresh();
- if(submit("TRSNP01100")){
- //진료과 갯수를 count하여 진료과명이 없는 Line은 width를 0으로 줄인다.
- var iGridCnt = getNodesetCnt(model, "/root/main/deptlists/deptlist");
- fHiddenGridCol(iGridCnt, datagrid1);
- }
- break;
- case "month" :
- if(model.getValue("/root/send/frdd") == "" || (model.getValue("/root/send/frdd")).length < 4){
- messageBox("년도는 필수입력 사항입니다.", "I000");
- return;
- }
- model.removeNodeSet("/root/main/monthlists/monthlist");
- datagrid2.refresh();
- submit("TRSNP01101");
- break;
- case "room" :
- if(model.getValue("/root/send/frdd") == "" || model.getValue("/root/send/todd") == ""){
- messageBox("시작일, 종료일은 필수입력 사항입니다.", "I000");
- return;
- }
-
- if((model.getValue("/root/send/frdd")).length < 8){
- messageBox("시작일 입력형식은 년-월-일 입니다.", "I000");
- return;
- }
-
- model.removeNodeSet("/root/main/roomlists/roomlist");
- datagrid3.refresh();
- if(submit("TRSNP01102")){
- var iGridCnt = getNodesetCnt(model, "/root/main/roomlists/roomlist");
- fHiddenGridCol(iGridCnt, datagrid3);
- }
- break;
- case "day" :
- if(model.getValue("/root/send/frdd") == "" || model.getValue("/root/send/todd") == ""){
- messageBox("시작일, 종료일은 필수입력 사항입니다.", "I000");
- return;
- }
-
- if((model.getValue("/root/send/frdd")).length < 8){
- messageBox("시작일 입력형식은 년-월-일 입니다.", "I000");
- return;
- }
-
- model.removeNodeSet("/root/main/weeklists/weeklist");
- datagrid4.refresh();
- submit("TRSNP01103");
- break;
- default :
- break;
- }
- }
- /**
- * 탭 버튼 클릭시 이벤트
- *
- */
- function fClickTab(pFlag){
- if(pFlag == "dept"){
- model.setValue("/root/init/tab", "dept");
- ipt_refcond.visible = true;
- caption1.visible = true;
- input1.visible = true;
- ipt_refcond.attribute("maxlength")= 8;
- ipt_refcond.attribute("format")= "yyyy-mm-dd";
- //2010-03-10 오후 6:06:58 taebum add 연으로만 조회됨 오류 올라온건 관련 수정작업
- if((model.getValue("/root/hidden/condition/frdd")).length < 5){
- model.setValue("/root/hidden/condition/frdd", model.getValue("/root/temp/org_searfromdd"));
- model.refresh();
- }
- }else if(pFlag == "month"){
- model.setValue("/root/init/tab", "month");
- ipt_refcond.visible = true;
- caption1.visible = false;
- input1.visible = false;
- ipt_refcond.attribute("maxlength")= 4;
- ipt_refcond.attribute("format")= "yyyy";
- model.setValue("/root/hidden/condition/frdd", (model.getValue("/root/hidden/condition/frdd").substr(0,4)));
- ipt_refcond.refresh();
- }else if(pFlag == "room"){
- model.setValue("/root/init/tab", "room");
- ipt_refcond.visible = true;
- caption1.visible = true;
- input1.visible = true;
- ipt_refcond.attribute("maxlength")= 8;
- ipt_refcond.attribute("format")= "yyyy-mm-dd";
- //2010-03-10 오후 6:06:58 taebum add 연으로만 조회됨 오류 올라온건 관련 수정작업
- if((model.getValue("/root/hidden/condition/frdd")).length < 7){
- model.setValue("/root/hidden/condition/frdd", model.getValue("/root/temp/org_searfromdd"));
- model.refresh();
- }
- }else if(pFlag == "day"){
- model.setValue("/root/init/tab", "day");
- ipt_refcond.visible = true;
- caption1.visible = true;
- input1.visible = true;
- ipt_refcond.attribute("maxlength")= 8;
- ipt_refcond.attribute("format")= "yyyy-mm-dd";
- //2010-03-10 오후 6:06:58 taebum add 연으로만 조회됨 오류 올라온건 관련 수정작업
- if((model.getValue("/root/hidden/condition/frdd")).length < 7){
- model.setValue("/root/hidden/condition/frdd", model.getValue("/root/temp/org_searfromdd"));
- model.refresh();
- }
- }
- }
-
- /**
- * @group :
- * @ver : 2007.10.17
- * @by : Grace
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Exel 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveExcel(){
- var sCurrentTab = model.getValue("/root/init/tab");
- if(sCurrentTab == "" || sCurrentTab == null || sCurrentTab == "undefined"){
- return;
- }
- var fileName = null;
- switch(sCurrentTab){
- case "dept" :
- fileName = window.fileDialog("save", ",", false, "응급수술현황_집도과별_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != "" && fileName != null) {
- datagrid1.saveExcel(fileName, "SheetName", true, true, "", "", false);
- }
- break;
- case "month" :
- fileName = window.fileDialog("save", ",", false, "응급수술현황_월별_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != "" && fileName != null) {
- datagrid2.saveExcel(fileName, "SheetName", true, true, "", "", false);
- }
- break;
- case "room" :
- fileName = window.fileDialog("save", ",", false, "응급수술현황_방별_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != "" && fileName != null) {
- datagrid3.saveExcel(fileName, "SheetName", true, true, "", "", false);
- }
- break;
- case "day" :
- fileName = window.fileDialog("save", ",", false, "응급수술현황_요일별_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != "" && fileName != null) {
- datagrid3.saveExcel(fileName, "SheetName", true, true, "", "", false);
- }
- break;
- default :
- break;
- }
- }
- /**
- * @group :
- * @ver : 2007.10.17
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드의 1행에 데이터 없는 열 감추기
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fHiddenGridCol(iGridCnt, pGrid){
- if(iGridCnt >1){
- for(var i = 1; i < pGrid.cols; i++){
- if(pGrid.valuematrix(1, i) == ""){
- pGrid.colwidth(i) = 0;
- }
- }
- }
- }
|