123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- /*
- 호스피스대기환자현황(SMMNH06500.xrw)
- - Version : 1.00.01
- */
- /**
- * @group :
- * @ver : 2010.05.27
- * @by : byday
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 초기화 (
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(){
- model.makeValue("/root/main/cond/bgndt", getCurrentDate());
- model.makeValue("/root/main/cond/tempdt", getCurrentDate());
- model.makeValue("/root/main/cond/enddt", getCurrentDate());
- btn_search.dispatch("DOMActivate");
- }
- /**
- * @group :
- * @ver : 2010.05.27
- * @by : byday
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 조회 (
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch(){
- var nSwIdx = switch1.selectedIndex;
- var bgnYear = model.getValue("/root/main/cond/bgndt").substring(0, 4);
- var endYear = model.getValue("/root/main/cond/enddt").substring(0, 4);
- if ( nSwIdx == 0 ) {
- if ( bgnYear == 0 ) {
- messageBox("조회시작년도를 입력하세요..", "I");
- return;
- }
- if ( endYear == 0 ) {
- messageBox("조회종료년도를 입력하세요..", "I");
- return;
- }
- if ( endYear < bgnYear ) {
- messageBox("조회시작년도가 조회종료년도보다 클 수 없습니다..", "I");
- return;
- }
- if ( endYear - bgnYear > 2) {
- messageBox("해당 조회기간을 3년이내로 설정하십시오.", "I");
- return;
- }
- } else if ( nSwIdx == 1 ) {
- if ( bgnYear == 0 ) {
- messageBox("조회년도를 입력하세요..", "I");
- return;
- }
- } else if ( nSwIdx == 2 ) {
- var tempDt = model.getValue("/root/main/cond/tempdt").substring(0, 6);
- if ( tempDt == 0 ) {
- messageBox("조회월을 입력하세요..", "I");
- return;
- }
- model.setValue("/root/main/cond/bgndt", tempDt);
- }
- model.removenode("/root/main/agonal");
- submit("TRMNH06501");
- if ( nSwIdx == 2 ) { // 일별
-
- grd_list2.colWidth(grd_list2.cols - 2) = (model.getValue("/root/main/agonal/list[1]/cnt31") == "" ? 0 : 60);
- grd_list2.colWidth(grd_list2.cols - 3) = (model.getValue("/root/main/agonal/list[1]/cnt30") == "" ? 0 : 60);
- grd_list2.colWidth(grd_list2.cols - 4) = (model.getValue("/root/main/agonal/list[1]/cnt29") == "" ? 0 : 60);
-
- //grd_list2.colHidden(grd_list2.cols - 2) = (model.getValue("/root/main/agonal/list[1]/cnt31") == "");
- //grd_list2.colHidden(grd_list2.cols - 3) = (model.getValue("/root/main/agonal/list[1]/cnt30") == "");
- //grd_list2.colHidden(grd_list2.cols - 4) = (model.getValue("/root/main/agonal/list[1]/cnt29") == "");
-
- } else if ( nSwIdx == 0 ) { // 년별
- var cap1 = "구분^상세구분";
- var cap2 = "구분^상세구분";
- for ( var nCnt = grd_list0.fixedCols; nCnt < grd_list0.cols; nCnt++ ) {
- grd_list0.colWidth(nCnt) = 0;
- //grd_list0.colHidden(nCnt) = true;
- }
- for ( var nCnt = endYear, nPos = 0; nCnt >= bgnYear; nCnt--, nPos++ ) {
- cap1 += "^ " + nCnt + " ^ " + nCnt + " ^ " + nCnt + " ";
- cap2 += "^ " + nCnt + "년 ^ " + (nCnt-1) + "년 ^ 증감(%) ";
- grd_list0.colHidden(nPos * 3 + grd_list0.fixedCols) = false;
- grd_list0.colHidden(nPos * 3 + 1 + grd_list0.fixedCols) = false;
- grd_list0.colHidden(nPos * 3 + 2 + grd_list0.fixedCols) = false;
-
- grd_list0.colWidth(nPos * 3 + grd_list0.fixedCols) = 90;
- grd_list0.colWidth(nPos * 3 + 1 + grd_list0.fixedCols) = 90;
- grd_list0.colWidth(nPos * 3 + 2 + grd_list0.fixedCols) = 90;
- }
- grd_list0.caption = cap1 + "|" + cap2;
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2010.06.07
- * @by : byday
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 년도별조회 (
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearchYear() {
- model.toggle("case1");
- ipt_bgndt.visible = true;
- ipt_bgndt2.visible = false;
- cap_tilde.visible = true;
- ipt_enddt.visible = true;
- cap_search.text = "조회년도 :";
- model.setValue("/root/main/cond/dtflag", "Y");
- btn_search.dispatch("DOMActivate");
- }
- /**
- * @group :
- * @ver : 2010.06.07
- * @by : byday
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 월별조회 (
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearchMonth() {
- model.toggle("case2");
- ipt_bgndt.visible = true;
- ipt_bgndt2.visible = false;
- cap_tilde.visible = false;
- ipt_enddt.visible = false;
- cap_search.text = "조회년도 :";
- model.setValue("/root/main/cond/dtflag", "M");
- btn_search.dispatch("DOMActivate");
- }
- /**
- * @group :
- * @ver : 2010.06.07
- * @by : byday
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 일별조회 (
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearchDay() {
- model.toggle("case3");
- ipt_bgndt.visible = false;
- ipt_bgndt2.visible = true;
- cap_tilde.visible = false;
- ipt_enddt.visible = false;
- cap_search.text = "조회년월 :";
- model.setValue("/root/main/cond/dtflag", "D");
- btn_search.dispatch("DOMActivate");
- }
- /**
- * @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);
- }
- }
|