SPADC62200.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /**
  2. * 파 일 명 : SPADC62200.js
  3. * 설 명 : (팝업)회신내역서식 Javascriot
  4. * 설 계 자 : 김귀남
  5. * 작 성 자 : 김귀남
  6. * 수정이력 : 2008.09.03 / 최초작성 / 김귀남
  7. */
  8. var modaltype = ""; // 진료 (emr) / 약제 (ast) 구분
  9. //****************Emr & Ast******************************************************
  10. /* 초기화
  11. */
  12. function finit(){
  13. if(model.getValue("/root/temp/cnstinfo/formrecseq") != ""){
  14. modaltype = "emr";
  15. getReplCnst();
  16. }else if(model.getValue("/root/temp/replform/replcnts") != ""){
  17. modaltype = "ast";
  18. model.setValue("/root/main/formdata/replinfo/replcnts", model.getValue("/root/temp/replform/replcnts"));
  19. }
  20. model.refresh();
  21. }
  22. /******************************************************************************
  23. //****************Emr***********************************************************
  24. /* 진료측에서 회신내용 확인시
  25. * 회신내용을 불러와 화면에 출력
  26. */
  27. function getReplCnst(){
  28. model.setValue("/root/send/srchinfo/formrecseq", model.getValue("/root/temp/cnstinfo/formrecseq"));
  29. model.setValue("/root/send/srchinfo/pid", model.getValue("/root/temp/cnstinfo/pid"));
  30. if(submit("TXADC66201")){
  31. var success = submit("TRADC62201");
  32. if(success){
  33. if(model.getValue("/root/main/formdata/replinfo/replcnts") == "") messageBox("회신내역이", "E014");
  34. }
  35. }
  36. }
  37. //******************************************************************************
  38. //****************Ast***********************************************************
  39. /* 회신내용 작성 후 확인 팝업
  40. * replcnts : 회신내용
  41. * sel : 확인 = cfm, 취소 = null 내용 전달
  42. * 부모창에서 에서 sel 값을 판단하여 행위 결정
  43. * 2008-11-17 EN에 대해서 회신내용을 수정가능하도록 처리한다.
  44. * 2009-01-22 PN에 대해서 회신내용 수정가능하도록 처리. formflag : EN -> NST 변경
  45. */
  46. function fSendReplForm(replcnts,flag){
  47. model.setValue("/root/temp/replform/replcnts", replcnts);
  48. //2010-01-08 TDM저장시 저장지내용 미리보기후 저장자ID 저장하기 - 메세지를 [회신]->[저장]으로 명칭변경처리함.
  49. model.makeValue("/root/temp/replform/formflag", flag);
  50. //2008-11-17 EN에 대해서 회신내용을 수정가능하도록 처리한다.
  51. //2009-01-22 PN에 대해서 회신내용 수정가능하도록 처리. formflag : EN -> NST 변경
  52. if (flag == "NST"){
  53. model.setValue("/root/temp/replform/formflag", "NST");
  54. }
  55. modal("SPADC62200", 1, 0, 0 ,"SPADC62200","/root/temp/replform", "/root/temp/replform");
  56. var sel = model.getValue("/root/temp/replform/sel");
  57. return sel;
  58. }
  59. //******************************************************************************
  60. //****************Ast***********************************************************
  61. /**회신시 - 회신 내용 [확인] messageBox
  62. */
  63. function fAstConfirm(){
  64. if (checkOpener()) {
  65. //2010-01-08 TDM저장시 저장지내용 미리보기후 저장자ID 저장하기 - 메세지를 [회신]->[저장]으로 명칭변경처리함.
  66. //if(messageBox("현재의 " + 회신내용으로 회신하겠습니다.\n","Q003") == 6){
  67. if(messageBox("현재의 " + caption2.text + "으로 " + (caption2.text).substr(0,2) + "하겠습니다.\n","Q003") == 6){
  68. opener.model.makeValue("/root/temp/formdata/replinfo/replcnts", model.getValue("/root/main/formdata/replinfo/replcnts"));
  69. opener.model.setValue("/root/temp/replform/sel", "cfm");
  70. opener.model.refresh();
  71. window.close();
  72. }else{
  73. btn_can.dispatch("DOMActivate");
  74. }
  75. } else {
  76. messageBox("상위화면이 변경되어 데이터를 전달할 수 ","I004");
  77. }
  78. }
  79. //******************************************************************************
  80. //****************Ast***********************************************************
  81. /**회신시 - 회신 내용 [취소] messageBox
  82. */
  83. function fAstCancel(){
  84. if ( checkOpener() ) {
  85. opener.model.setValue("/root/temp/replform/sel", "");
  86. opener.model.refresh();
  87. window.close();
  88. } else {
  89. window.close();
  90. }
  91. }
  92. //******************************************************************************