SMRSD07200.xjs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[function fInit()
  3. {
  4. fInitialize();
  5. return;
  6. }
  7. function fInitialize()
  8. {
  9. grp_key.opt_instcd.value = sysf_getUserInfo("dutplceinstcd");
  10. grp_key.opt_instcdnm.value = sysf_getUserInfo("dutplceinstnm");
  11. var curdate = utlf_getCurrentDate();
  12. var cvtdate = curdate.toDate("YYYYMMDD");
  13. grp_key.ipt_prcpdd.value = curdate;
  14. grp_key.ipt_prcpdd2.value = curdate;
  15. grp_key.rdo_sumflag.value = "Y";
  16. ds_main_list_prcpgoodcase_prcpgoodcaselist.clearData();
  17. ds_main_list_prcpgoodcase_prcppatcaselist.clearData();
  18. }
  19. function fDataSearchTree()
  20. {
  21. var oParam = {};
  22. oParam.id = "TRRSD07103";
  23. oParam.service = "reqapp.ReqMngt";
  24. oParam.method = "reqGetSearchGoodTree2";
  25. oParam.inds = "req=ds_send_SearchTree";
  26. oParam.outds = "ds_main_PrcpGoodTrees_TreeList=TreeList";
  27. oParam.async = false;
  28. //oParam.callback = "cf_TRRSD07103";
  29. tranf_submit(oParam);
  30. }
  31. function fDataSearchDetail(pIdx)
  32. {
  33. var rPath = ds_send_SearchTree;
  34. var dPath = ds_send_prcppatcaseinfo;
  35. var tPath = ds_main_PrcpGoodTrees_TreeList;
  36. var vCaption = " 처방전달물품";
  37. var Idx = pIdx + 1;
  38. var sDepth = tPath.getColumn(Idx, "depth");
  39. var vCodeCd = tPath.getColumn(Idx, "codecd");
  40. var vCodeNm = tPath.getColumn(Idx, "codenm");
  41. var vBaseCd = tPath.getColumn(Idx, "basecode");
  42. var Tree2 = pIdx;
  43. if (utlf_isNull(vCodeCd))
  44. {
  45. return;
  46. }
  47. dPath.setColumn(0, "instcd", rPath.getColumn(0, "instcd"));
  48. dPath.setColumn(0, "prcpdd", rPath.getColumn(0, "prcpdd"));
  49. dPath.setColumn(0, "prcpdd2", rPath.getColumn(0, "prcpdd2"));
  50. dPath.setColumn(0, "sumflag", rPath.getColumn(0, "sumflag"));
  51. dPath.setColumn(0, "reqflag", rPath.getColumn(0, "reqflag"));
  52. dPath.setColumn(0, "reqdeptcd", "");
  53. dPath.setColumn(0, "reqprid", rPath.getColumn(0, "reqprid"));
  54. dPath.setColumn(0, "prcpdeptcd", "");
  55. dPath.setColumn(0, "goodcd", rPath.getColumn(0, "goodcd"));
  56. dPath.setColumn(0, "deptgr", "");
  57. dPath.setColumn(0, "pid", rPath.getColumn(0, "pid"));
  58. dPath.setColumn(0, "patnm", rPath.getColumn(0, "patnm"));
  59. dPath.setColumn(0, "purcflag", rPath.getColumn(0, "purcflag"));
  60. dPath.setColumn(0, "prodcmpynm", rPath.getColumn(0, "prodcmpynm"));
  61. dPath.setColumn(0, "suplplcecdnm", rPath.getColumn(0, "suplplcecdnm"));
  62. dPath.setColumn(0, "suppcustnm", rPath.getColumn(0, "suppcustnm"));
  63. dPath.setColumn(0, "prntmthd", "G");
  64. dPath.setColumn(0, "sumcnt", rPath.getColumn(0, "sumcnt"));
  65. dPath.setColumn(0, "querycls", ds_send_SearchTree.getColumn(0, "querycls"));
  66. dPath.setColumn(0, "wareflag", rPath.getColumn(0, "wareflag"));
  67. dPath.setColumn(0, "scrnid", "SMRSD07200");
  68. var vCls = parseInt(rdo_viewcls.value+sDepth);
  69. switch(vCls)
  70. {
  71. case 01 :
  72. vCaption = " :: 전체" ;
  73. break;
  74. case 02 :
  75. dPath.setColumn(0, "prcpdeptcd" , vCodeCd );
  76. vCaption = "시행부서 : "+vCodeCd + " - " + vCodeNm;
  77. break;
  78. case 11 :
  79. dPath.setColumn(0, "reqdeptcd" , vCodeCd);
  80. vCaption = "처방부서 : "+ vCodeCd + " - " + vCodeNm;
  81. break;
  82. case 12 :
  83. dPath.setColumn(0, "prcpdeptcd" , vCodeCd );
  84. vCode = tPath.getColumn(Tree2, "codecd");
  85. vName = tPath.getColumn(Tree2, "codenm");
  86. dPath.setColumn(0, "reqdeptcd" , vCode );
  87. vCaption = "처방부서 : "+vCode + " - " + vName + " >> 시행부서 : "+vCodeCd+ " - "+vCodeNm;
  88. break;
  89. case 21 :
  90. dPath.setColumn(0, "prcpdeptcd" , vCodeCd );
  91. vCaption = "시행부서 : "+vCodeCd + " - " + vCodeNm;
  92. break;
  93. case 22 :
  94. dPath.setColumn(0, "reqdeptcd" , vCodeCd);
  95. vCode = tPath.getColumn(Tree2, "codecd");
  96. vName = tPath.getColumn(Tree2, "codenm");
  97. dPath.setColumn(0, "prcpdeptcd" , vCode );
  98. vCaption = "시행부서 : "+vCode + " - " + vName + " >> 처방부서 : "+vCodeCd+ " - "+vCodeNm ;
  99. break;
  100. case 31 :
  101. dPath.setColumn(0, "prcpdeptcd" , vCodeCd );
  102. vCaption = "시행부서 : "+vCodeCd + " - " + vCodeNm;
  103. break;
  104. case 32 :
  105. dPath.setColumn(0, "goodcd" , vCodeCd);
  106. vCode = tPath.setColumn(Tree2, "codecd");
  107. vName = tPath.setColumn(Tree2, "codenm");
  108. dPath.setColumn(0, "prcpdeptcd" , vCode );
  109. vCaption = "시행부서 : "+vCode + " - " + vName + " >> 물품코드 : "+vCodeCd+ " - "+vCodeNm ;
  110. }
  111. if (dPath.getColumn(0, "prntmthd") == "P")
  112. {
  113. var oParam = {};
  114. oParam.id = "TRRSD07101";
  115. oParam.service = "reqapp.ReqMngt";
  116. oParam.method = "reqGetPrcpPatCaseList";
  117. oParam.inds = "req=ds_send_prcppatcaseinfo";
  118. oParam.outds = "ds_main_list_prcpgoodcase_prcppatcaselist=prcppatcaselist";
  119. oParam.async = false;
  120. oParam.callback = "cf_TRRSD07101";
  121. tranf_submit(oParam);
  122. }
  123. else
  124. {
  125. var oParam = {};
  126. oParam.id = "TRRSD07102";
  127. oParam.service = "reqapp.ReqMngt";
  128. oParam.method = "reqGetPrcpGoodCaseList";
  129. oParam.inds = "req=ds_send_prcppatcaseinfo";
  130. oParam.outds = "ds_main_list_prcpgoodcase_prcpgoodcaselist=prcpgoodcaselist ds_=deptstoccaselist ds_=prcpsuminfo";
  131. oParam.async = false;
  132. //oParam.callback = "cf_TRRSD07102";
  133. tranf_submit(oParam);
  134. }
  135. }
  136. ]]></Script>