SMLBD01020.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /***********************************************************************************************************************************************
  2. * create date : 2008.02.12
  3. * author : dhkim
  4. * file name : SMLBD01020.js
  5. * desc : 년도별 채별부작용 명단
  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. //grd_dnorlist.extendLastCol = true;
  20. grd_dnorlist.frozencols = grd_dnorlist.colref("sex");
  21. fSearch();
  22. }
  23. /*
  24. * 년도별 채별부작용 명단를 조회한다.
  25. */
  26. function fSearch(){
  27. var fromdd = model.getValue(xCondPath+'/fromdd');
  28. var todd = model.getValue(xCondPath+'/todd');
  29. var pidflag = model.getValue(xCondPath+'/pidflag');
  30. var pid = model.getValue(xCondPath+'/pid');
  31. var btype = model.getValue(xCondPath+'/btype');
  32. var kindflag = model.getValue(xCondPath+'/kindflag');
  33. if(fromdd == '')
  34. fromdd = currentDate;
  35. if(todd == '')
  36. todd = currentDate;
  37. model.removeNodeset(xDnorPath + "/dnorlist");
  38. model.removeNodeset(xReqPath);
  39. model.makeValue(xReqPath + '/fromdd', fromdd);
  40. model.makeValue(xReqPath + '/todd', todd);
  41. model.makeValue(xReqPath + '/pidflag', pidflag);
  42. model.makeValue(xReqPath + '/pid', pid);
  43. model.makeValue(xReqPath + '/btype', btype);
  44. model.makeValue(xReqPath + '/kindflag', kindflag);
  45. if(!submit('TRLBD01041')){
  46. messageBox('조회를', 'E009');
  47. }
  48. }
  49. /*
  50. * 엑셀출력
  51. */
  52. function fExcel(){
  53. var pGrd = grd_dnorlist;
  54. if (pGrd.rows > pGrd.fixedrows ) {
  55. var fileName = window.fileDialog("save", ",", false, "년도별채혈부작용명단_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  56. if (fileName != "") {
  57. pGrd.saveExcel(fileName, "SheetName", true, true, "", "", false);
  58. messageBox("엑셀저장이 ", "I002", ""); //I002 : 완료되었습니다.
  59. }
  60. } else {
  61. messageBox("자료가 존재하지 않습니다.", "E999", "");
  62. }
  63. }
  64. /*
  65. * 팝업
  66. */
  67. function fSearchPatInfo() {
  68. var flag = model.getValue("/root/cond/pidflag");
  69. var vPid = "";
  70. if (flag =="") return;
  71. switch (flag) {
  72. case "1": // 공여자팝업
  73. //만들어야함
  74. break;
  75. case "2": // 환자팝업
  76. vPid = model.getValue("/root/cond/pid");
  77. //팝업조건설정
  78. model.removenode("/root/temp/pid");
  79. model.makeValue("/root/temp/pid", vPid);
  80. //팝업호출
  81. modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/temp", "/root/cond");
  82. //리턴값
  83. if (model.getValue("/root/main/popupendflag") == "ok") {
  84. var ipid = model.getValue("/root/main/patinfo/patinfolist/pid");
  85. var ihngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  86. var irrgstno= model.getValue("/root/main/patinfo/patinfolist/rrgstno1") + "-" +
  87. model.getValue("/root/main/patinfo/patinfolist/rrgstno2") ;
  88. model.setValue("/root/cond/pid", ipid );
  89. model.setValue("/root/cond/pidnm", ihngnm );
  90. model.setValue("/root/cond/rrgstno", irrgstno );
  91. model.refresh();
  92. }
  93. break;
  94. }
  95. }