SMMNW13900.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. 간호평가리스트 (SMMNW13900.xrw - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. /**
  7. * @group :
  8. * @ver : 2011.06.10
  9. * @by : 김지선
  10. * @---------------------------------------------------
  11. * @type : function
  12. * @access : public
  13. * @desc : 평가대상자 리스트 조회
  14. * @param :
  15. * @return :
  16. * @---------------------------------------------------
  17. */
  18. function fInitialize() {
  19. //조회날짜 받아옴
  20. //var fromdd = ((getCurrentDate().toDate()).getAddDate(-30)).getDateFormat();
  21. var fromdd = getCurrentDate();
  22. var todd = getCurrentDate();
  23. var wardcd = '3050160000'; //default 706병동
  24. var gbn = '1'; //default 706병동
  25. //한달을 기준으로 한달안에 내용을 보여줌
  26. model.makeValue("/root/main/cond/fromdd",fromdd);
  27. model.makeValue("/root/main/cond/todd",todd);
  28. model.makeValue("/root/main/cond/wardcd",wardcd);
  29. model.makeValue("/root/main/cond/gbn",gbn);
  30. // 게시판 리스트를 조회
  31. fgetPyungPatList();
  32. }
  33. function fgetPyungPatList(){
  34. // 조회 조건을 셋팅 한다.
  35. /*
  36. var fromdd = model.getValue("/root/main/cond/fromdd");
  37. var todd = model.getValue("/root/main/cond/todd");
  38. var wardcd = model.getValue("/root/main/cond/wardcd");
  39. */
  40. /*
  41. 확인결과, fgetPyungPatList 메소드가 호출되기 이전에,
  42. /root/send 인스턴스가 초기화되어 fromdd 및 todd 가 존재하지 않습니다.
  43. 따라서 없는 인스턴스를 참조하여 값을 세팅하려고해서 오류가 발생했던거구요,
  44. model.makeValue("/root/send/fromdd", model.getValue("/root/main/cond/fromdd"));
  45. 처럼 인스턴스를 생성해서 입력하는 방법을 사용하는 방법을 추천드립니다.
  46. 아니면 여기 들어오기 전 로직에서 fromdd, todd를 날리지 않는 방법으로가야 할 듯 합니다.
  47. 일단 setValue -> makeValue로 일단 변경해두었슴니다 ㅎ
  48. 이상
  49. */
  50. model.makeValue("/root/send/fromdd", model.getValue("/root/main/cond/fromdd"));
  51. model.makeValue("/root/send/todd", model.getValue("/root/main/cond/todd"));
  52. model.makeValue("/root/send/wardcd", model.getValue("/root/main/cond/wardcd"));
  53. model.makeValue("/root/send/gbn", model.getValue("/root/main/cond/gbn"));
  54. model.removeNodeset("/root/main/plistinfo/plist");
  55. model.resetInstanceNode("/root/main/iteminfo");
  56. // 게시판 리스트를 조회
  57. submit("TRMNW13902");
  58. model.refresh();
  59. }