SMLBD01050.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /***********************************************************************************************************************************************
  2. * create date : 2008.02.12
  3. * author : dhkim
  4. * file name : SMLBD01000.js
  5. * desc : APU_업무현황조회
  6. ***********************************************************************************************************************************************/
  7. var xDnorPath = '/root/main/dnorinfo';
  8. var xCondPath = '/root/cond';
  9. var xReqPath = '/root/send/reqdata';
  10. var currentDate = getCurrentDate();
  11. /*
  12. * 초기화
  13. */
  14. function fInit(){
  15. model.removeNodeset(xDnorPath);
  16. model.setValue(xCondPath + '/fromdd', currentDate);
  17. model.setValue(xCondPath + '/todd', currentDate);
  18. //zbcfGetCodeList(new Array("M0376"), new Array("/root/init/M0376list")); //혈액형
  19. submit("TRLBD01053"); //병동콤보
  20. //grd_dnorlist.extendLastCol = true;
  21. grd_dnorsum.frozencols = grd_dnorsum.colRef("depttotal");
  22. grd_dnorlist.frozencols = grd_dnorlist.colRef("execdt");
  23. grd_dnorsum.rowheight(0) = 30;
  24. grd_dnorsum.rowheight(1) = 35;
  25. //alert(grd_dnorsum.rowheight(0) + "/" + grd_dnorsum.rowheight(1));
  26. fSearch();
  27. }
  28. /*
  29. * APU_업무현황조회
  30. */
  31. function fSearch(){
  32. var dayflag = model.getValue(xCondPath+'/dayflag');
  33. var fromdd = model.getValue(xCondPath+'/fromdd');
  34. var todd = model.getValue(xCondPath+'/todd');
  35. if(fromdd == '')
  36. fromdd = currentDate;
  37. if(todd == '')
  38. todd = currentDate;
  39. if (dayflag == "M") {
  40. fromdd = fromdd.substring(0,6) + '01';
  41. todd = todd.substring(0,6) + '31' ;
  42. }
  43. if (dayflag == "Y") {
  44. fromdd = fromdd.substring(0,4)+ '0101' ;
  45. todd = todd.substring(0,4)+ '1231';
  46. }
  47. model.removeNodeset(xDnorPath + "/dnorlist");
  48. model.removeNodeset(xReqPath);
  49. model.makeValue(xReqPath + '/dayflag', dayflag);
  50. model.makeValue(xReqPath + '/fromdd', fromdd);
  51. model.makeValue(xReqPath + '/todd', todd);
  52. //if(!submit('TRLBD01051')){
  53. if(!submit('TRLBD01052')){
  54. messageBox('조회를', 'E009');
  55. }
  56. fSearch2();
  57. }
  58. /*
  59. * 집계그리드 만들기
  60. */
  61. function fSearch2(){
  62. //1.타이틀만들기
  63. //2.그리드생성하기
  64. }
  65. /*
  66. * 엑셀출력
  67. */
  68. function fExcel(flag){
  69. var fileNm = "";
  70. var pGrd ;
  71. switch (flag) {
  72. case "S":
  73. fileNm = "APU 업무내역SUM";
  74. pGrd = grd_dnorsum;
  75. break;
  76. case "D":
  77. fileNm = "APU 업무내역LIST";
  78. pGrd = grd_dnorlist;
  79. break;
  80. }
  81. if (pGrd.rows > pGrd.fixedrows ) {
  82. var fileName = window.fileDialog("save", ",", false, fileNm + "_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  83. if (fileName != "") {
  84. pGrd.saveExcel(fileName, "SheetName", true, true, "", "", false);
  85. messageBox("엑셀저장이 ", "I002", ""); //I002 : 완료되었습니다.
  86. }
  87. } else {
  88. messageBox("자료가 존재하지 않습니다.", "E999", "");
  89. }
  90. }