MCT001.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*function list
  2. fSetMedDr(flag) : 부서코드 선택 시 주치의 및 세부분과 셋팅
  3. */
  4. /**
  5. * @desc : 부서코드 선택 시 주치의 셋팅
  6. * @param:
  7. flag - M : 주치의 SETTING , S: 세부분과SETTING , '' : 전체
  8. */
  9. function fSetMedDr(flag , orddeptcd ) {
  10. //model.removeNodeset("/root/init/userlist");
  11. //model.removeNodeset("/root/init/subdeptinfo");
  12. model.resetInstanceNode("/root/send");
  13. if( isNull(orddeptcd) || orddeptcd == "-" ) {
  14. if ( isNull(flag) || flag == "M" ){
  15. model.removeNodeset("/root/init/userlist");
  16. model.makeValue("/root/init/userlist/usercombo/userid", "-");
  17. model.makeValue("/root/init/userlist/usercombo/usernm", "전체");
  18. model.makeValue("/root/main/condition/medispclid" , "-");
  19. }
  20. if ( isNull(flag) || flag == "S" ){
  21. model.removeNodeset("/root/init/subdeptinfo");
  22. model.makeValue("/root/main/condition/subdeptcd" , "-");
  23. }
  24. } else {
  25. if ( isNull(flag) || flag == "M" ){
  26. //전문의
  27. mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist" , orddeptcd, "0330", "", "M");
  28. addComboInstance("/root/init/userlist", "userid^usernm", "-^전체", "usercombo"); //의사콤보 전체항목 추가
  29. cmb_medispclid.value = "-";
  30. }
  31. if ( isNull(flag) || flag == "S" ){
  32. //세부과 setting
  33. mmbfGetSubDeptComboList("/root/send/reqdata", "/root/init/subdeptinfo", orddeptcd);
  34. model.makeNode("/root/init/subdeptinfo/subdeptlist");
  35. addComboInstance("/root/init/subdeptinfo" , "subdeptcd^subdeptnm", "-^전체", "subdeptlist"); //부서콤보 Item '전체'추가
  36. cmb_subdept.value = "-";
  37. }
  38. }
  39. model.refresh();
  40. }