SMRTC01100_레지던트교육외사항등록.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>레지던트교육외 사항 등록</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <educetc>
  11. <educetclist/>
  12. </educetc>
  13. <list>
  14. <educetclist>
  15. <educetclist/>
  16. </educetclist>
  17. <educetctmplist>
  18. <educetclist/>
  19. </educetctmplist>
  20. </list>
  21. </main>
  22. <send>
  23. <yy/>
  24. <rownum/>
  25. <deptcd/>
  26. </send>
  27. <init>
  28. <deptcond/>
  29. </init>
  30. <temp>
  31. <checkflag/>
  32. </temp>
  33. </root>
  34. </instance>
  35. <submission id="TRRTC00302" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/deptcond"/>
  36. <submission id="TXRTC00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  37. <submission id="TRRTC01101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list/educetclist/educetclist"/>
  38. <submission id="TRRTC01102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  39. <submission id="TXRTC01101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/list/educetclist/educetclist" resultref="/root/temp"/>
  40. </model>
  41. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  42. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  43. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  44. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  45. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  46. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  47. <script type="javascript" src="../../../mis/tistrngeducbaseinfomngtweb/js/RTC001.js"/>
  48. <script type="javascript" ev:event="xforms-ready">
  49. <![CDATA[
  50. //사용자 권한
  51. fCheckAuth();
  52. submit("TRRTC00302");
  53. misfGridInit(grd_educetclist);
  54. var today = getCurrentDate();
  55. var cur_mm = parseInt(today.substring(4, 6));
  56. var cur_yy = parseInt(today.substring(0, 4));
  57. if (cur_mm >= 11)
  58. cur_yy++;
  59. model.setValue("/root/send/yy", cur_yy);
  60. ipt_yy.refresh();
  61. var sPosdeptcd = getUserInfo("posdeptcd");
  62. // 내과 세부분과이면 내과로 세팅
  63. if(sPosdeptcd == "2010300000" || sPosdeptcd == "2010400000" || sPosdeptcd == "2010500000" || sPosdeptcd == "2010600000" || sPosdeptcd == "2010700000" || sPosdeptcd == "2010800000" || sPosdeptcd == "2010900000" || sPosdeptcd == "2011000000" || sPosdeptcd == "2011100000")
  64. {
  65. model.setValue("/root/send/deptcd", "2010000000"); // 진료과 설정 ;
  66. }
  67. else
  68. {
  69. model.setValue("/root/send/deptcd", sPosdeptcd); // 진료과 설정
  70. }
  71. cmb_deptcd.refresh();
  72. misfMsterDetailSet(grd_educetclist, null, "TRRTC01101", "Y");
  73. model.refresh();
  74. ]]>
  75. </script>
  76. <script type="javascript">
  77. <![CDATA[
  78. //========================================================================================
  79. //버튼에 대한 화면 권한 체크(R : 읽기, X : 입력/수정/삭제, P : 출력)
  80. //========================================================================================
  81. function fCheckAuth() {
  82. btn_search.disabled =!checkAuth("R") ;
  83. btn_save.disabled = !checkAuth("X") ;
  84. }
  85. function fDisabledSetting(check){
  86. tar_scincconfentry.disabled = check;
  87. tar_treatiseprst.disabled = check;
  88. tar_anodeptdispat.disabled = check;
  89. tar_valueexam.disabled = check;
  90. }
  91. // 새로운 데이터를 입력시 중복데이터를 체크한다
  92. function fCheckData()
  93. {
  94. submit("TRRTC01102");
  95. }
  96. function fDefaultDeptSetting(control)
  97. {
  98. var sPosdeptcd = getUserInfo("posdeptcd");
  99. var sDeptcd = control.value;
  100. // 주임교수이면서 핵의학과 교수일때
  101. if(sPosdeptcd == "2180000000" || sPosdeptcd == "2160000000")
  102. {
  103. if(sDeptcd == "2180000000" || sDeptcd == "2160000000")
  104. {}
  105. else
  106. {
  107. messageBox(control.label+ "을 선택", "E001");
  108. control.value = sPosdeptcd;
  109. // model.setValue("/root/send/deptcd", sPosdeptcd); // 진료과 설정
  110. }
  111. }
  112. // 주임교수이면서 치과 교수일때
  113. else if(sPosdeptcd == "2240000000")
  114. {
  115. if(sDeptcd == "2240000000" || sDeptcd == "2240500000" || sDeptcd == "2240200000" || sDeptcd == "2240400000")
  116. {}
  117. else
  118. {
  119. messageBox(control.label+ "을 선택", "E001");
  120. control.value = sPosdeptcd;
  121. // model.setValue("/root/send/deptcd", sPosdeptcd); // 진료과 설정
  122. }
  123. }
  124. else if(sPosdeptcd == "2010300000" || sPosdeptcd == "2010400000" || sPosdeptcd == "2010500000" || sPosdeptcd == "2010600000" || sPosdeptcd == "2010700000" || sPosdeptcd == "2010800000" || sPosdeptcd == "2010900000" || sPosdeptcd == "2011000000" || sPosdeptcd == "2011100000")
  125. {
  126. if(sDeptcd != "2010000000")
  127. {
  128. messageBox(control.label+ "을 선택", "E001");
  129. sPosdeptcd = "2010000000";
  130. control.value = sPosdeptcd;
  131. // model.setValue("/root/send/deptcd", sPosdeptcd); // 진료과 설정
  132. }
  133. }
  134. else
  135. {
  136. if(checkAuth("P"))
  137. {}
  138. else
  139. {
  140. if(sPosdeptcd != sDeptcd)
  141. {
  142. messageBox(control.label+ "을 선택", "E001");
  143. control.value = sPosdeptcd;
  144. }
  145. }
  146. }
  147. model.refresh();
  148. }
  149. ]]>
  150. </script>
  151. </xhtml:head>
  152. <xhtml:body style="margin-left:8; margin-right:8; ">
  153. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  154. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">레지던트교육외 사항 등록</caption>
  155. </group>
  156. <group id="group2" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  157. <line id="line6" class="line_3" style="x1:737; y1:733px; x2:1183; y2:733px; "/>
  158. <line id="line5" class="line_2" style="x1:737; y1:567; x2:1183; y2:567; "/>
  159. <line id="line4" class="line_2" style="x1:737; y1:402; x2:1183; y2:402; "/>
  160. <line id="line3" class="line_2" style="x1:737; y1:237; x2:1183; y2:237; "/>
  161. <line id="line1" class="line_1" style="x1:737; y1:69px; x2:1183; y2:69px; "/>
  162. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  163. <caption id="cap_yy" class="search_name" style="left:15px; top:19px; width:86px; height:17px; ">년 도 :</caption>
  164. <button id="btn_search" class="btn1_letter2" style="left:1125px; top:16px; width:56px; height:22px; ">
  165. <caption>조회</caption>
  166. <script type="javascript" ev:event="DOMActivate">
  167. <![CDATA[
  168. if(!isRequiredControls("cmb_deptcd"))return;
  169. misfGridRowStatusChange(grd_educetclist, "/root/main/list/educetctmplist" , "/root/main/educetc");
  170. var updtdata = getGridUpdateData(grd_educetclist);
  171. if ( updtdata != "")
  172. {
  173. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
  174. if (ret == 7) { // not OK
  175. return;
  176. }
  177. }
  178. model.resetInstanceNode("/root/main/educetc/educetclist");
  179. model.resetInstanceNode("/root/main/list/educetctmplist/educetclist");
  180. grd_educetclist.clearStatus();
  181. misfMsterDetailRetrieve();
  182. fDisabledSetting(false);
  183. model.refresh();
  184. ]]>
  185. </script>
  186. </button>
  187. <line id="line13" class="line_4" style="x1:1110px; y1:16px; x2:1110px; y2:38px; "/>
  188. <line id="line207" class="line_1" style="x1:0; y1:69; x2:732; y2:69px; "/>
  189. <datagrid id="grd_educetclist" nodeset="/root/main/list/educetclist/educetclist" caption="부서코드^부서과^학술회의참석^논문제출^타과파견^평가시험^년도(히든)" colsep="^" colwidth="100, 100, 100, 100, 100, 100, 100" dataheight="25" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:75px; width:732px; height:660px; ">
  190. <col ref="deptcd" visibility="hidden"/>
  191. <col ref="depthngnm"/>
  192. <col ref="scincconfentry"/>
  193. <col ref="treatiseprst"/>
  194. <col ref="anodeptdispat"/>
  195. <col ref="valueexam"/>
  196. <col ref="yy" visibility="hidden"/>
  197. <script type="javascript" ev:event="onrowchanged">
  198. <![CDATA[
  199. misfGridRowStatusChange(grd_educetctmplist, "/root/main/list/educetctmplist" , "/root/main/educetc");
  200. grd_educetctmplist.refresh();
  201. var updtdata = getGridUpdateData(grd_educetctmplist);
  202. if ( updtdata != "")
  203. {
  204. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
  205. if (ret == 7) { // not OK
  206. grd_educetclist.row= model.getValue("/root/send/rownum");
  207. model.resetInstanceNode("/root/main/educetc/educetclist");
  208. model.resetInstanceNode("/root/main/list/educetctmplist/educetclist");
  209. return;
  210. }
  211. }
  212. // fDisabledSetting(true);
  213. var cur_row = grd_educetclist.row;
  214. model.setValue("/root/send/rownum", cur_row);
  215. // model.copyNode("/root/main/educcdrgst/educcdrgstlist", "/root/main/list/educcdrgst/educcdrgstlist["+ cur_row + "]");
  216. model.copyNode("/root/main/list/educetctmplist/educetclist", "/root/main/list/educetclist/educetclist["+ cur_row + "]");
  217. model.copyNode("/root/main/educetc/educetclist", "/root/main/list/educetctmplist/educetclist");
  218. grd_educetctmplist.nodeset = "/root/main/list/educetctmplist/educetclist";
  219. grd_educetctmplist.row = 1;
  220. // alert(model.getValue("/root/main/list/educcdrgsttmp/educcdrgstlist/educnm"));
  221. model.refresh();
  222. ]]>
  223. </script>
  224. </datagrid>
  225. <input id="ipt_yy" ref="/root/send/yy" class="input_s_essential" navindex="1" format="yyyy" appearance="input" style="left:100px; top:18px; width:100px; height:19px; "/>
  226. <button id="button14" class="btn2_letter6" visibility="hidden" style="left:1009px; top:18px; width:86px; height:19px; ">
  227. <caption>전년도 copy</caption>
  228. <script type="javascript" ev:event="DOMActivate">
  229. <![CDATA[
  230. btn_search.dispatch("DOMActivate");
  231. if(grd_educcdrgstlist.rows - grd_educcdrgstlist.fixedRows > 0)
  232. {
  233. messageBox("이미 등록된 코드들이 있어 COPY를 ","E001");
  234. return;
  235. }
  236. submit("TXRTC00302");
  237. btn_search.dispatch("DOMActivate");
  238. model.refresh();
  239. ]]>
  240. </script>
  241. </button>
  242. <caption id="cap_deptcd" class="search_name" style="left:253px; top:19px; width:99px; height:17px; ">부 서 :</caption>
  243. <select1 id="cmb_deptcd" ref="/root/send/deptcd" class="combo_s_essential" navindex="2" appearance="minimal" style="left:337px; top:18px; width:100px; height:19px; ">
  244. <choices>
  245. <itemset nodeset="/root/init/deptcond">
  246. <label ref="depthngnm"/>
  247. <value ref="deptcd"/>
  248. </itemset>
  249. </choices>
  250. <script type="javascript" ev:event="xforms-value-changed">
  251. <![CDATA[
  252. fDefaultDeptSetting(cmb_deptcd);
  253. ]]>
  254. </script>
  255. </select1>
  256. <caption id="cap_scincconfentry" class="cell_1" style="left:737px; top:74px; width:100; height:162; vertical-align:middle; ">학술회의참석</caption>
  257. <caption id="cap_treatiseprst" class="cell_1" style="left:737px; top:239; width:100px; height:162; vertical-align:middle; ">논문제출</caption>
  258. <caption id="cap_anodeptdispat" class="cell_1" style="left:737px; top:404; width:100px; height:162; vertical-align:middle; ">타과 파견</caption>
  259. <caption id="cap_valueexam" class="cell_1" style="left:737px; top:569; width:100px; height:162; vertical-align:middle; ">평가시험</caption>
  260. <textarea id="tar_anodeptdispat" ref="/root/main/educetc/educetclist/anodeptdispat" disabled="true" navindex="8" style="left:839px; top:405; width:345px; height:161; padding-top:5; "/>
  261. <textarea id="tar_valueexam" ref="/root/main/educetc/educetclist/valueexam" disabled="true" navindex="9" style="left:839px; top:570; width:345px; height:161; padding-top:5; "/>
  262. <textarea id="tar_treatiseprst" ref="/root/main/educetc/educetclist/treatiseprst" disabled="true" navindex="7" style="left:839; top:240; width:345; height:161; padding-top:5; "/>
  263. <button id="button1" class="btn2_letter2" style="left:1095px; top:49px; width:42px; height:19px; ">
  264. <caption>추가</caption>
  265. <script type="javascript" ev:event="DOMActivate">
  266. <![CDATA[
  267. if(!isRequiredControls("ipt_yy"))return;
  268. if(!isRequiredControls("cmb_deptcd"))return;
  269. misfGridIUD(grd_educetclist, "A");
  270. grd_educetclist.dispatch("onrowchanged");
  271. grd_educetclist.valueMatrix(grd_educetclist.row, grd_educetclist.colRef("deptcd")) = cmb_deptcd.value;
  272. grd_educetclist.valueMatrix(grd_educetclist.row, grd_educetclist.colRef("depthngnm")) = cmb_deptcd.label;
  273. grd_educetclist.valueMatrix(grd_educetclist.row, grd_educetclist.colRef("yy")) = ipt_yy.value;
  274. fDisabledSetting(false);
  275. ]]>
  276. </script>
  277. </button>
  278. <datagrid id="grd_educetctmplist" nodeset="/root/main/list/educetctmplist/educetclist" visibility="hidden" caption="부서코드^부서과^학술회의참석^논문제출^타과파견^평가시험^년도(히든)" colsep="^" colwidth="100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:330px; width:730px; height:245px; ">
  279. <col ref="deptcd" visibility="visible"/>
  280. <col ref="depthngnm"/>
  281. <col ref="scincconfentry"/>
  282. <col ref="treatiseprst"/>
  283. <col ref="anodeptdispat"/>
  284. <col ref="valueexam"/>
  285. <col ref="yy" visibility="hidden"/>
  286. </datagrid>
  287. <button id="btn_createeduccd" class="btn2_letter6" visibility="hidden" style="left:1005px; top:49px; width:86px; height:19px; ">
  288. <caption>교육코드생성</caption>
  289. <script type="javascript" ev:event="DOMActivate">
  290. <![CDATA[
  291. if(!isRequiredControls("cmb_instcd"))return;
  292. if(!isRequiredControls("cmb_instcd"))return;
  293. if(!isRequiredControls("cmb_instcd"))return;
  294. if(!isRequiredControls("cmb_instcd"))return;
  295. fCreateDeptcd();
  296. ]]>
  297. </script>
  298. </button>
  299. <textarea id="tar_scincconfentry" ref="/root/main/educetc/educetclist/scincconfentry" disabled="true" style="left:839; top:75px; width:345; height:161; "/>
  300. <button id="button2" class="btn2_letter2" visibility="hidden" style="left:1140px; top:49px; width:42px; height:19px; ">
  301. <caption>삭제</caption>
  302. <script type="javascript" ev:event="DOMActivate">
  303. <![CDATA[
  304. misfGridIUD(grd_educetclist, "D");
  305. ]]>
  306. </script>
  307. </button>
  308. </group>
  309. <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  310. <button id="button8" class="btn3_letter4" visibility="hidden" style="left:0px; top:3px; width:80px; height:22px; ">
  311. <caption>화면이동</caption>
  312. </button>
  313. <button id="btn_save" class="btn4_letter2" style="left:1124px; top:3px; width:56px; height:22px; ">
  314. <caption>저장</caption>
  315. <script type="javascript" ev:event="DOMActivate">
  316. <![CDATA[
  317. /* 새로운 데이터를 입력시 */
  318. if(grd_educetclist.rowStatus(grd_educetclist.row) == 1)
  319. {
  320. // fDeptcdCheck();
  321. if(!isRequiredControls("ipt_yy"))return;
  322. if(!isRequiredControls("cmb_deptcd"))return;
  323. model.copyNode("/root/main/list/educetctmplist/educetclist", "/root/main/educetc/educetclist");
  324. model.copyNode("/root/main/list/educetclist/educetclist[" + model.getValue("/root/send/rownum") + "]", "/root/main/list/educetctmplist/educetclist");
  325. grd_educetclist.refresh();
  326. var updtdata = getGridUpdateData(grd_educetclist);
  327. if (updtdata == "")
  328. {
  329. messageBox("변경된 데이터가","I004");
  330. return;
  331. }
  332. // 새로운 데이터를 입력시 중복데이터를 체크한다
  333. fCheckData();
  334. var sCheckFlag = model.getValue("/root/temp/checkflag");
  335. if(sCheckFlag == "Y")
  336. {
  337. var sYy = ipt_yy.value;
  338. var sDeptcd = cmb_deptcd.label;
  339. messageBox(sYy + "년도 " + sDeptcd + "는 이미 입력된 데이터", "E008");
  340. misfMsterDetailRetrieve();
  341. return;
  342. }
  343. misfSave("TXRTC01101");
  344. grd_educetctmplist.clearStatus();
  345. }
  346. /* 조회된 데이터를 수정 할때 */
  347. else if(grd_educetclist.rowStatus(grd_educetclist.row) == 0)
  348. {
  349. if(!isRequiredControls("ipt_yy"))return;
  350. if(!isRequiredControls("cmb_cmb"))return;
  351. misfGridRowStatusChange(grd_educetctmplist, "/root/main/list/educetctmplist" , "/root/main/educetc");
  352. misfGridRowStatusChange(grd_educetclist, "/root/main/list/educetclist" , "/root/main/list/educetctmplist");
  353. grd_educetclist.refresh();
  354. var updtdata = getGridUpdateData(grd_educetclist);
  355. if (updtdata == "")
  356. {
  357. messageBox("변경된 데이터가","I004");
  358. return;
  359. }
  360. misfSave("TXRTC01101");
  361. grd_educetctmplist.clearStatus();
  362. }
  363. btn_search.dispatch("DOMActivate");
  364. model.refresh();
  365. ]]>
  366. </script>
  367. </button>
  368. <line id="line11" class="line_6" style="x1:0; y1:25; x2:1195; y2:25; "/>
  369. </group>
  370. </xhtml:body>
  371. </xhtml:html>