123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- /* ---------------------------------------------------------------------
- 수술스케일별 수술건수 통계 (SSMNP00600.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By taebum
- : 2008-09-23 오후 4:20:07
- ---------------------------------------------------------------------- */
- /**
- * @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();
-
- model.removeNodeSet("/root/main/deptlists/scaleDeptlist");
- datagrid4.refresh();
- model.removeNodeSet("/root/main/daylists/scaleDaylist");
- datagrid1.refresh();
- model.removeNodeSet("/root/main/roomlists/scaleRoomlist");
- datagrid3.refresh();
- /*
- model.removenode("/root/send");
- model.makeValue("/root/send/flag" , "X" );
- model.makeValue("/root/send/searchitem", "XX" );
- model.makeValue("/root/send/deptflag" , "011" );
- submit("TRMNP00107");
- */
- //addComboItem("cmb_orddept" , "전 체", "", "above" );
- //addComboItem("cmb_oproomlist", "전 체", "", "above" );
- }
-
- 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/ssflag1",model.getValue("/root/hidden/condition/ssflag1"));
- model.setValue("/root/send/ssflag2",model.getValue("/root/hidden/condition/ssflag2"));
- model.setValue("/root/send/ssflag3",model.getValue("/root/hidden/condition/ssflag3"));
- 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;
- }
-
- model.removeNodeSet("/root/main/deptlists/scaleDeptlist");
- datagrid4.refresh();
- if(submit("TRSNP00600")){
- var iGridCnt = getNodesetCnt(model, "/root/main/deptlists/scaleDeptlist");
- fHiddenGridCol(iGridCnt, datagrid4);
- }
- break;
- case "day" :
- if(model.getValue("/root/send/frdd") == "" || (model.getValue("/root/send/frdd")).length < 6){
- messageBox("년월은 필수입력 사항입니다.", "I000");
- return;
- }
- model.removeNodeSet("/root/main/daylists/scaleDaylist");
- datagrid1.refresh();
- submit("TRSNP00601");
- break;
- case "room" :
- if(model.getValue("/root/send/frdd") == "" || model.getValue("/root/send/todd") == ""){
- messageBox("시작일, 종료일은 필수입력 사항입니다.", "I000");
- return;
- }
- model.removeNodeSet("/root/main/roomlists/scaleRoomlist");
- datagrid3.refresh();
- if(submit("TRSNP00602")){
- var iGridCnt = getNodesetCnt(model, "/root/main/roomlists/scaleRoomlist");
- fHiddenGridCol(iGridCnt, datagrid3);
- }
- break;
- default :
- break;
- }
- }
- /**
- * @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) {
- datagrid4.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) {
- datagrid1.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;
- default :
- break;
- }
- }
- /**
- * 탭 버튼 클릭시 이벤트
- *
- */
- function fClickTab(pFlag){
- if(pFlag == "dept"){
- model.setValue("/root/init/tab", "dept");
- ipt_frdd.visible = true;
- caption1.visible = true;
- ipt_todd.visible = true;
- ipt_frdd.attribute("maxlength")= 8;
- ipt_frdd.attribute("format")= "yyyy-mm-dd";
- }else if(pFlag == "day"){
- model.setValue("/root/init/tab", "day");
- ipt_frdd.visible = true;
- caption1.visible = false;
- ipt_todd.visible = false;
- ipt_frdd.attribute("maxlength")= 6;
- ipt_frdd.attribute("format")= "yyyy-mm";
- model.setValue("/root/hidden/condition/frdd", (model.getValue("/root/hidden/condition/frdd").substr(0,6)));
- ipt_frdd.refresh();
- }else if(pFlag == "room"){
- model.setValue("/root/init/tab", "room");
- ipt_frdd.visible = true;
- caption1.visible = true;
- ipt_todd.visible = true;
- ipt_frdd.attribute("maxlength")= 8;
- ipt_frdd.attribute("format")= "yyyy-mm-dd";
- }
- }
- /**
- * @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;
- }
- }
- }
- }
|