SMMMO04300M.js 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  3. 입원환자리스트 ( SMMMO04300_입원환자리스트.xrw - JScript )
  4. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  5. */
  6. var sINPATLIST_PATH = "/root/main/inpatinfo/inpatlist";
  7. var sDSCHDCLRT_PATH = "/root/main/dschdclrt/dschdclrt";
  8. var sORDERBY = "";
  9. /**
  10. * @desc : 화면 초기화
  11. * @
  12. * @param :
  13. * @return :
  14. * @author : 오지훈
  15. * @---------------------------------------------------
  16. */
  17. function fInitialize_SMMMO04300(){
  18. model.removeNodeset(sINPATLIST_PATH);
  19. model.setValue(instance1.selectSingleNode("root/main/cond/indd"), String(getCurrentDate()));
  20. model.setValue("/root/main/cond/orddeptcd", getUserInfo("dutplcecd")); //진료과
  21. model.setValue("/root/main/cond/subdeptcd", "-"); //세부과
  22. model.setValue("/root/main/cond/medispclid", "-"); //주치의
  23. model.setValue("/root/main/cond/atdoctid", "-"); //담당의
  24. model.setValue("/root/main/cond/wardcd", "-"); //병동
  25. fReqInPatList();
  26. }
  27. /**
  28. * @desc : 입원환자 환자 기본정보설정
  29. * @
  30. * @param :
  31. * @return :
  32. * @author : 오지훈
  33. * @---------------------------------------------------
  34. */
  35. /**
  36. * @desc : 입원환자 리스트 조회
  37. * @
  38. * @param :
  39. * @event : 조회버튼 EVENT
  40. * @return :
  41. * @author : 오지훈
  42. * @---------------------------------------------------
  43. */
  44. function fReqInPatList(){
  45. model.makeValue("/root/main/cond/srchdd", model.getValue(instance1.selectSingleNode("root/main/cond/indd")));
  46. model.copyNode("/root/send/reqdata", "/root/main/cond");
  47. //2011.05.01진상찬 페이지 처리추가(10건씩)
  48. var offset = parseInt(model.getValue("root/page/curpage"));
  49. //1page면 offset은 0, 1page가 아니면 offset은 page수 * 10 (한페이지당 10건씩 보여줌)
  50. if(offset == 1)
  51. {
  52. offset = offset - 1;
  53. }
  54. else
  55. {
  56. offset = (offset - 1) * 10;
  57. }
  58. model.makeValue("/root/send/reqdata/offset", String(offset)); //몇번째 데이터 부터 조회할지 지정
  59. model.makeValue("/root/send/reqdata/pagesize", model.getValue("root/page/pagesize")); //한페이지에 보여줄 건수(10건고정)
  60. //alert(model.getValue("/root/send/reqdata/offset"));
  61. //alert(model.getValue("/root/send/reqdata/pagesize"));
  62. //if(submit("TRMMO04301")){
  63. if(submit("TRMOB00001")){
  64. model.copyNode(parent.instance1.selectSingleNode("root/temp/inpatlist"), instance1.selectSingleNode("root/init"));
  65. model.copyNode(parent.instance1.selectSingleNode("root/cond/inpatlist"), instance1.selectSingleNode("root/main/cond"));
  66. }
  67. ///////////////////////////////
  68. var maxpage = parseInt(model.getValue("/root/main/inpatinfo/retcnt/maxcnt"));
  69. if(maxpage < 10)
  70. {
  71. model.setValue("/root/page/maxpage", "1");
  72. }
  73. else
  74. {
  75. maxpage = (maxpage / 10) - ((maxpage % 10) / 10) + 1;
  76. model.setValue("/root/page/maxpage", String(maxpage));
  77. }
  78. //////////////////////////////////////
  79. model.setValue("/root/main/cond/totcnt", model.getValue("/root/main/inpatinfo/retcnt/maxcnt")); //총 인원수
  80. model.refresh();
  81. }