SMRIS00600.js 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. var PARAM = "";
  2. /**
  3. * @desc : 화면초기화
  4. *
  5. * @param :
  6. * @return :
  7. * @author : 경북대학교
  8. * @---------------------------------------------------
  9. */
  10. function fInitialize(){
  11. zbcfGetCodeList(new Array("I0010"), new Array("/root/init/status"));
  12. PARAM = getScreenMenuParameter();
  13. if (isPopup()) {
  14. var menuparam = opener.window.javascript.getParameter("SMRIS00600_menuparam");
  15. var rshid = opener.window.javascript.getParameter("SMRIS00600_rshid");
  16. var rshnm = opener.window.javascript.getParameter("SMRIS00600_rshnm");
  17. var studycd = opener.window.javascript.getParameter("SMRIS00600_studycd");
  18. model.setValue("/root/main/cond/rshid", rshid );
  19. model.setValue("/root/main/cond/rshnm", rshnm );
  20. model.setValue("/root/main/cond/studycd", studycd );
  21. model.setValue("/root/main/cond/estatus", "Y" );
  22. btn_search.dispatch("DOMActivate");
  23. model.refresh();
  24. }else{
  25. // 연구소
  26. if( PARAM == "A" ){
  27. model.setValue("/root/main/cond/rshnm" , "" );
  28. model.setValue("/root/main/cond/rshid" , "" );
  29. model.setValue("/root/main/cond/estatus", "Y" );
  30. }else{
  31. model.setValue("/root/main/cond/rshid", getUserId() );
  32. model.setValue("/root/main/cond/rshnm", getUserName() );
  33. model.setValue("/root/main/cond/estatus", "Y" );
  34. btn_search.dispatch("DOMActivate");
  35. }
  36. model.refresh();
  37. }
  38. // 연구과제를 쿼리
  39. model.makeValue("/root/send/reqdata/instcd", getUserInfo("dutplceinstcd"));
  40. //submit("TRRIS00600");
  41. // 타입과 상태값을 초기화
  42. // model.setValue("/root/send/detail/kind", "A");
  43. // model.setValue("/root/send/detail/status", "P" );
  44. model.refresh();
  45. }
  46. /**
  47. * @desc : 연구원 등록
  48. *
  49. * @param :
  50. * @return :
  51. * @author :
  52. * @---------------------------------------------------
  53. */
  54. function fResearcherSave(){
  55. if(fSaveChk()!=false){ // 저장전 필수입력 체크
  56. model.copyNode("/root/send/savedata", "/root/send/detail");
  57. model.makeValue("/root/send/savedata/instcd", getUserInfo("dutplceinstcd"));
  58. if(submit("TXRIS00600")){// 연구원을 저장
  59. //model.resetInstanceNode("/root/send/detail"); //연구원 등록 입력폼 초기화
  60. //연구과제, 이름, 주민번호 사용가능
  61. combo3.disabled=false;
  62. input20.disabled=false;
  63. input21.disabled=false;
  64. model.setValue("/root/main/search_cond/projcd", model.getValue("/root/send/savedata/projcd"));
  65. model.makeValue("/root/send/reqdata/projcd", model.getValue("/root/send/savedata/projcd"));
  66. model.makeValue("/root/send/reqdata/chk", model.getValue("/root/main/search_cond/chk"));
  67. submit("TRRIS00610");
  68. model.makeNode("/root/send/detail/projcd");
  69. model.makeNode("/root/send/detail/hngnm");
  70. model.makeNode("/root/send/detail/rrgstno");
  71. model.makeNode("/root/send/detail/kind");
  72. model.makeNode("/root/send/detail/status");
  73. model.makeNode("/root/send/detail/fromdd");
  74. model.makeNode("/root/send/detail/todd");
  75. model.makeNode("/root/send/detail/hp");
  76. model.makeNode("/root/send/detail/sex");
  77. model.makeNode("/root/send/detail/school");
  78. model.makeNode("/root/send/detail/email");
  79. model.makeNode("/root/send/detail/address");
  80. model.makeNode("/root/send/detail/banknm");
  81. model.makeNode("/root/send/detail/account");
  82. // 타입과 상태값을 초기화
  83. model.setValue("/root/send/detail/kind", "A");
  84. model.setValue("/root/send/detail/status", "P" );
  85. }
  86. model.refresh();
  87. }
  88. }
  89. /**
  90. * @desc : 연구원 등록 전 필수입력항목 체크
  91. *
  92. * @param :
  93. * @return :
  94. * @author :
  95. * @---------------------------------------------------
  96. */
  97. function fSaveChk(){
  98. var projcd = model.getValue("/root/send/detail/projcd");
  99. var hngnm = model.getValue("/root/send/detail/hngnm");
  100. var rrgstno = model.getValue("/root/send/detail/rrgstno");
  101. if(projcd==""){
  102. messageBox("연구과제 선택은", "I003");
  103. return false;
  104. }
  105. if(hngnm==""){
  106. messageBox("연구원 이름은", "I003");
  107. return false;
  108. }
  109. if(rrgstno==""){
  110. messageBox("연구원 주민번호는", "I003");
  111. return false;
  112. }
  113. }
  114. /**
  115. * @desc : 연구원 검색
  116. *
  117. * @param :
  118. * @return :
  119. * @author :
  120. * @---------------------------------------------------
  121. */
  122. function fResearcherSearch(){
  123. var sRow = grd_stdylist.row ;
  124. var sProjcd = model.getValue("/root/main/cond/stdyinfo/stdylist["+ sRow +"]/projcd");
  125. model.makeValue("/root/send/reqdata/projcd", sProjcd);
  126. submit("TRRIS00610");
  127. model.refresh();
  128. }
  129. /**
  130. * @desc : 연구원 상세내용 세팅
  131. *
  132. * @param :
  133. * @return :
  134. * @author :
  135. * @---------------------------------------------------
  136. */
  137. function fResearcherDetail(){
  138. var select_row = grd_member.row;
  139. if(select_row < 1){
  140. return;
  141. }
  142. model.resetInstanceNode("/root/send/detail");
  143. model.removeNodeSet("/root/send/detail");
  144. model.makeValue("/root/send/detail/projcd", model.getValue("/root/main/researcherinfo[" + select_row +"]/projcd"));
  145. model.makeValue("/root/send/detail/studycd", model.getValue("/root/main/researcherinfo[" + select_row +"]/studycd"));
  146. model.makeValue("/root/send/detail/usernm", model.getValue("/root/main/researcherinfo[" + select_row +"]/hngnm"));
  147. model.makeValue("/root/send/detail/userid", model.getValue("/root/main/researcherinfo[" + select_row +"]/userid"));
  148. model.makeValue("/root/send/detail/kind", model.getValue("/root/main/researcherinfo[" + select_row +"]/kind"));
  149. model.makeValue("/root/send/detail/status", model.getValue("/root/main/researcherinfo[" + select_row +"]/status"));
  150. model.makeValue("/root/send/detail/fromdd", model.getValue("/root/main/researcherinfo[" + select_row +"]/fromdd"));
  151. model.makeValue("/root/send/detail/todd", model.getValue("/root/main/researcherinfo[" + select_row +"]/todd"));
  152. model.makeValue("/root/send/detail/hp", model.getValue("/root/main/researcherinfo[" + select_row +"]/hp"));
  153. model.makeValue("/root/send/detail/sex", model.getValue("/root/main/researcherinfo[" + select_row +"]/sex"));
  154. model.makeValue("/root/send/detail/school", model.getValue("/root/main/researcherinfo[" + select_row +"]/school"));
  155. model.makeValue("/root/send/detail/email", model.getValue("/root/main/researcherinfo[" + select_row +"]/email"));
  156. model.makeValue("/root/send/detail/address", model.getValue("/root/main/researcherinfo[" + select_row +"]/address"));
  157. model.makeValue("/root/send/detail/banknm", model.getValue("/root/main/researcherinfo[" + select_row +"]/banknm"));
  158. model.makeValue("/root/send/detail/account", model.getValue("/root/main/researcherinfo[" + select_row +"]/account"));
  159. model.makeValue("/root/send/detail/newyn", "N");
  160. modal("SMRIS00601", "", "", "", "Detail", "/root/send/detail", "/root/result/researcherlist");
  161. }
  162. function fNew(){
  163. var select_row = grd_stdylist.row;
  164. if(select_row < 1){
  165. return;
  166. }
  167. model.resetInstanceNode("/root/send/detail");
  168. model.removeNodeSet("/root/send/detail");
  169. model.makeValue("/root/send/detail/projcd", model.getValue("/root/main/cond/stdyinfo/stdylist[" + select_row +"]/projcd"));
  170. model.makeValue("/root/send/detail/studycd", model.getValue("/root/main/cond/stdyinfo/stdylist[" + select_row +"]/studycd"));
  171. model.makeValue("/root/send/detail/kind", "A");
  172. model.makeValue("/root/send/detail/status", "P");
  173. model.makeValue("/root/send/detail/newyn", "Y");
  174. model.makeNode("/root/send/detail/usernm");
  175. model.makeNode("/root/send/detail/userid");
  176. model.makeNode("/root/send/detail/fromdd");
  177. model.makeNode("/root/send/detail/todd");
  178. model.makeNode("/root/send/detail/hp");
  179. model.makeNode("/root/send/detail/sex");
  180. model.makeNode("/root/send/detail/school");
  181. model.makeNode("/root/send/detail/email");
  182. model.makeNode("/root/send/detail/address");
  183. model.makeNode("/root/send/detail/banknm");
  184. model.makeNode("/root/send/detail/account");
  185. modal("SMRIS00601", "", "", "", "Detail", "/root/send/detail", "/root/result/researcherlist");
  186. }
  187. function fDel(){
  188. var select_row = grd_member.row;
  189. if(select_row < 1){
  190. messageBox("삭제할 연구원을 선택하세요!","I999");
  191. return;
  192. }
  193. else {
  194. if ( 6 != messageBox("선택한 연구원을 삭제할까요?","Q999"))
  195. {
  196. return;
  197. }
  198. }
  199. model.makeValue("/root/send/savedata/projcd", model.getValue("/root/main/researcherinfo[" + select_row +"]/projcd"));
  200. model.makeValue("/root/send/savedata/userid", model.getValue("/root/main/researcherinfo[" + select_row +"]/userid"));
  201. submit("TXRIS00520");
  202. fResearcherSearch();
  203. }
  204. function fSdtySearch(){
  205. var rshid = model.getValue("/root/main/cond/rshid");
  206. if ( rshid=="" && PARAM != "A" )
  207. {
  208. messageBox("책임연구원이 선택되지 않았습니다!","Q999");
  209. return;
  210. }
  211. model.removenode("/root/send/sdtysrch");
  212. model.makeValue("/root/send/sdtysrch/suserid", model.getValue("/root/main/cond/rshid"));
  213. model.makeValue("/root/send/sdtysrch/studycd", model.getValue("/root/main/cond/studycd"));
  214. model.makeValue("/root/send/sdtysrch/estatus", model.getValue("/root/main/cond/estatus"));
  215. submit("TRRIS00520"); // 기간별 연구과제 조회
  216. }