SMRTC01500_TIS세부일정관리.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <detlschemngtlist/>
  11. </main>
  12. <send>
  13. <scheflag/>
  14. <detlschemngtlist/>
  15. <deptcd/>
  16. <init>
  17. <scheunit>MD</scheunit>
  18. <schefrom/>
  19. <scheto/>
  20. </init>
  21. </send>
  22. <init>
  23. <label>근무성적입력기간</label>
  24. <value>01</value>
  25. <label>수련계획입력기간</label>
  26. <value>02</value>
  27. <label>사랑나눔교육일정관리</label>
  28. <value>03</value>
  29. <label>문제은행채용실기문항등록</label>
  30. <value>04</value>
  31. <label>인턴수련인원정보</label>
  32. <value>05</value>
  33. </init>
  34. <temp>
  35. </temp>
  36. </root>
  37. </instance>
  38. <submission id="TRRTC00302" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/deptcond"/>
  39. <submission id="TRRTC01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/detlschemngtlist"/>
  40. <submission id="TXRTC01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/detlschemngtlist" resultref="/root/temp"/>
  41. <submission id="TRRTS00602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqint" resultref="/root/main/tisorddeptcdlist"/>
  42. </model>
  43. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  44. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  45. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  46. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  47. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  48. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  49. <script type="javascript" src="../../../mis/tistrngeducbaseinfomngtweb/js/RTC001.js"/>
  50. <script type="javascript" ev:event="xforms-ready">
  51. <![CDATA[
  52. /*
  53. 일정구분에 의해서 일정세부코드가 바뀐다. 부서코드가 될수도 있고 직종이 될수도 있다.
  54. 일정세부코드의 명칭을 가지고 오기위해서는 쿼리쪽에서 동적으로 조인 테이블을 조정해줘야한다
  55. TF단에서도 일정세부코드를 직업 그리드에 입력하는 방식이 아니라 그리드를 클릭했을시
  56. 팝업이나 콤보활성화를 시켜 선택후 그리드에 입력하는 방식으로 해야한다. 단 이때도 역시 일정구분에 의해서 팝업창이나 콤보의 값이 동적으로 바껴야한다.
  57. */
  58. //사용자 권한
  59. fCheckAuth();
  60. submit("TRRTS00602");
  61. misfGridInit(grd_detlschemngtlist);
  62. misfMsterDetailSet(grd_detlschemngtlist, null, "TRRTC01501", "Y");
  63. model.refresh();
  64. ]]>
  65. </script>
  66. <script type="javascript">
  67. <![CDATA[
  68. //========================================================================================
  69. //버튼에 대한 화면 권한 체크(R : 읽기, X : 입력/수정/삭제, P : 출력)
  70. //========================================================================================
  71. function fCheckAuth() {
  72. btn_search.disabled =!checkAuth("R") ;
  73. btn_save.disabled = !checkAuth("X") ;
  74. }
  75. function fGridSetting(firstrow, lastrow, flag){
  76. var sScheunit = grd_detlschemngtlist.valueMatrix(grd_detlschemngtlist.row, grd_detlschemngtlist.colRef("scheunit"));
  77. for(var i=firstrow ; i < lastrow ; i++)
  78. {
  79. if(sScheunit == "MD")
  80. {
  81. grd_detlschemngtlist.cellFormat(i, grd_detlschemngtlist.colRef("schefrom")) = "mm-dd";
  82. grd_detlschemngtlist.cellFormat(i, grd_detlschemngtlist.colRef("scheto")) = "mm-dd";
  83. }
  84. else if(sScheunit == "YMD")
  85. {
  86. grd_detlschemngtlist.cellFormat(i, grd_detlschemngtlist.colRef("schefrom")) = "yyyy-mm-dd";
  87. grd_detlschemngtlist.cellFormat(i, grd_detlschemngtlist.colRef("scheto")) = "yyyy-mm-dd";
  88. }
  89. }
  90. if(flag)
  91. {
  92. grd_detlschemngtlist.valueMatrix(firstrow, grd_detlschemngtlist.colRef("schefrom")) = '';
  93. grd_detlschemngtlist.valueMatrix(firstrow, grd_detlschemngtlist.colRef("scheto")) = '';
  94. }
  95. }
  96. function fControlVisible(num, check) {
  97. if(num == 1 || num == 2 || num == 3 || num == 4 || num == 5)
  98. {
  99. cap_deptcd_search.visible = check;
  100. cmb_deptcd_search.visible = check;
  101. }
  102. else if(num == 0)
  103. {
  104. cap_deptcd_search.visible = check;
  105. cmb_deptcd_search.visible = check;
  106. }
  107. }
  108. ]]>
  109. </script>
  110. </xhtml:head>
  111. <xhtml:body style="margin-left:8; margin-right:8; ">
  112. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  113. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">TIS세부일정관리</caption>
  114. </group>
  115. <group id="group2" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  116. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  117. <caption id="cap_scheflag" class="search_name" style="left:15px; top:19px; width:99px; height:17px; ">일정 구분 :</caption>
  118. <button id="btn_search" class="btn1_letter2" navindex="3" style="left:1125px; top:16px; width:56px; height:22px; ">
  119. <caption>조회</caption>
  120. <script type="javascript" ev:event="DOMActivate">
  121. <![CDATA[
  122. if(!isRequiredControls("cmb_scheflag"))return;
  123. var updtdata = getGridUpdateData(grd_detlschemngtlist);
  124. if ( updtdata != "")
  125. {
  126. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
  127. if (ret == 7) { // not OK
  128. return;
  129. }
  130. }
  131. misfMsterDetailRetrieve();
  132. misfSetReadOnlyCol(grd_detlschemngtlist, "schedetlcd", true);
  133. fGridSetting(1, grd_detlschemngtlist.rows, false);
  134. fControlVisible(0,false);
  135. model.refresh();
  136. ]]>
  137. </script>
  138. </button>
  139. <line id="line13" class="line_4" style="x1:1110px; y1:16px; x2:1110px; y2:38px; "/>
  140. <line id="line207" class="line_1" style="x1:0; y1:69; x2:1190; y2:69px; "/>
  141. <button id="btn_grddel" class="btn2_letter3" style="left:1139px; top:49px; width:53px; height:19px; ">
  142. <caption>행삭제</caption>
  143. <script type="javascript" ev:event="DOMActivate">
  144. <![CDATA[
  145. misfGridIUD(grd_detlschemngtlist, "D");
  146. fControlVisible(0,false);
  147. ]]>
  148. </script>
  149. </button>
  150. <button id="btn_grdadd" class="btn2_letter3" style="left:1085px; top:49px; width:53px; height:19px; ">
  151. <caption>행추가</caption>
  152. <script type="javascript" ev:event="DOMActivate">
  153. <![CDATA[
  154. if(!isRequiredControls("cmb_scheflag"))return;
  155. misfGridIUD(grd_detlschemngtlist, "A");
  156. fControlVisible(0,false);
  157. ]]>
  158. </script>
  159. </button>
  160. <select1 id="cmb_scheflag" ref="/root/send/scheflag" navindex="1" appearance="minimal" style="left:105px; top:18; width:150px; height:19px; ">
  161. <choices>
  162. <itemset nodeset="/root/init">
  163. <label ref="label"/>
  164. <value ref="value"/>
  165. </itemset>
  166. </choices>
  167. </select1>
  168. <datagrid id="grd_detlschemngtlist" nodeset="/root/main/detlschemngtlist" caption="일정구분^일정세부코드^일정세부명^일정단위^일정시작^일정종료" colsep="^" colwidth="200, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:75px; width:1195; height:660; ">
  169. <col ref="scheflag" type="combo">
  170. <choices>
  171. <itemset nodeset="/root/init">
  172. <label ref="label"/>
  173. <value ref="value"/>
  174. </itemset>
  175. </choices>
  176. </col>
  177. <col ref="schedetlcd" visibility="hidden" _key="true"/>
  178. <col ref="deptnm" _key="true"/>
  179. <col ref="scheunit" type="combo" visibility="visible">
  180. <choices>
  181. <item>
  182. <label>MD</label>
  183. <value>MD</value>
  184. </item>
  185. <item>
  186. <label>YMD</label>
  187. <value>YMD</value>
  188. </item>
  189. </choices>
  190. </col>
  191. <col ref="schefrom" type="input" format="yyyy-mm-dd"/>
  192. <col ref="scheto" type="input" format="yyyy-mm-dd"/>
  193. <script type="javascript" ev:event="onclick">
  194. <![CDATA[
  195. cmb_deptcd_search.value = "";
  196. var sScheflag = grd_detlschemngtlist.valueMatrix(grd_detlschemngtlist.row, grd_detlschemngtlist.colRef("scheflag"));
  197. if(sScheflag == "01" && grd_detlschemngtlist.col == grd_detlschemngtlist.colRef("deptnm"))
  198. {
  199. fControlVisible(1, true);
  200. }
  201. else if(sScheflag == "02" && grd_detlschemngtlist.col == grd_detlschemngtlist.colRef("deptnm"))
  202. {
  203. fControlVisible(2, true);
  204. }
  205. else if(sScheflag == "03" && grd_detlschemngtlist.col == grd_detlschemngtlist.colRef("deptnm"))
  206. {
  207. fControlVisible(3, true);
  208. }
  209. else if(sScheflag == "04" && grd_detlschemngtlist.col == grd_detlschemngtlist.colRef("deptnm"))
  210. {
  211. fControlVisible(4, true);
  212. }
  213. else if(sScheflag == "05" && grd_detlschemngtlist.col == grd_detlschemngtlist.colRef("deptnm"))
  214. {
  215. fControlVisible(5, true);
  216. }
  217. ]]>
  218. </script>
  219. <script type="javascript" ev:event="xforms-value-changed">
  220. <![CDATA[
  221. fControlVisible(0,false);
  222. if(grd_detlschemngtlist.col == grd_detlschemngtlist.colRef("scheunit"))
  223. {
  224. fGridSetting(grd_detlschemngtlist.row, grd_detlschemngtlist.row, true);
  225. }
  226. ]]>
  227. </script>
  228. </datagrid>
  229. <select1 id="cmb_deptcd_search" ref="/root/send/deptcd" navindex="2" visibility="hidden" appearance="minimal" style="left:405px; top:18px; width:120px; height:19px; ">
  230. <choices>
  231. <itemset nodeset="/root/main/tisorddeptcdlist">
  232. <label ref="deptnm"/>
  233. <value ref="deptcd"/>
  234. </itemset>
  235. </choices>
  236. <script type="javascript" ev:event="xforms-value-changed">
  237. <![CDATA[
  238. if(grd_detlschemngtlist.rowStatus(grd_detlschemngtlist.row) == 1)
  239. {
  240. grd_detlschemngtlist.valueMatrix(grd_detlschemngtlist.row, grd_detlschemngtlist.colRef("schedetlcd")) = cmb_deptcd_search.value;
  241. grd_detlschemngtlist.valueMatrix(grd_detlschemngtlist.row, grd_detlschemngtlist.colRef("deptnm")) = cmb_deptcd_search.label;
  242. }
  243. grd_detlschemngtlist.refresh();
  244. ]]>
  245. </script>
  246. </select1>
  247. <caption id="cap_deptcd_search" class="search_name" visibility="hidden" style="left:300px; top:19px; width:105px; height:17px; ">진 료 과 :</caption>
  248. <button id="button1" class="btn2_letter4" style="left:1020px; top:49px; width:64px; height:19px; ">
  249. <caption>일괄등록</caption>
  250. <script type="javascript" ev:event="DOMActivate">
  251. <![CDATA[
  252. if(grd_detlschemngtlist.rows - grd_detlschemngtlist.fixedRows == 0)
  253. {
  254. messageBox("조회되 데이터가 ","I004");
  255. return;
  256. }
  257. ipt_scheto.value ="";
  258. ipt_schefrom.value = "";
  259. cmb_scheunit.dispatch("xforms-value-changed");
  260. group3.visible = true;
  261. group1.disabled = true;
  262. group2.disabled = true;
  263. group3.disabled = false;
  264. ]]>
  265. </script>
  266. </button>
  267. </group>
  268. <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  269. <button id="button8" class="btn3_letter4" visibility="hidden" style="left:0px; top:3px; width:80px; height:22px; ">
  270. <caption>화면이동</caption>
  271. </button>
  272. <button id="btn_save" class="btn4_letter2" style="left:1124px; top:3px; width:56px; height:22px; ">
  273. <caption>저장</caption>
  274. <script type="javascript" ev:event="DOMActivate">
  275. <![CDATA[
  276. if(!checkKeyColumn("grd_detlschemngtlist")) return;
  277. misfSave("TXRTC01501");
  278. btn_search.dispatch("DOMActivate");
  279. fControlVisible(0,false);
  280. model.refresh();
  281. ]]>
  282. </script>
  283. </button>
  284. <line id="line11" class="line_6" style="x1:0; y1:25; x2:1195; y2:25; "/>
  285. </group>
  286. <group id="group3" visibility="hidden" style="left:955px; top:125px; width:235px; height:105px; ">
  287. <shape id="roundrect2" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:235px; height:75px; "/>
  288. <caption id="caption1" class="search_name" style="left:5px; top:10px; width:99px; height:17px; ">일정 단위 :</caption>
  289. <select1 id="cmb_scheunit" ref="/root/send/init/scheunit" navindex="4" appearance="minimal" style="left:100px; top:10px; width:125px; height:19px; ">
  290. <choices>
  291. <item>
  292. <label>MD</label>
  293. <value>MD</value>
  294. </item>
  295. <item>
  296. <label>YMD</label>
  297. <value>YMD</value>
  298. </item>
  299. </choices>
  300. <script type="javascript" ev:event="xforms-value-changed">
  301. <![CDATA[
  302. ipt_scheto.value ="";
  303. ipt_schefrom.value = "";
  304. if(cmb_scheunit.value == "MD")
  305. {
  306. ipt_scheto.attribute("format") = "mm-dd";
  307. ipt_schefrom.attribute("format") = "mm-dd";
  308. }
  309. else if(cmb_scheunit.value == "YMD")
  310. {
  311. ipt_scheto.attribute("format") = "yyyy-mm-dd";
  312. ipt_schefrom.attribute("format") = "yyyy-mm-dd";
  313. }
  314. model.refresh();
  315. ]]>
  316. </script>
  317. </select1>
  318. <caption id="caption2" class="search_name" style="left:5px; top:30px; width:99px; height:17px; ">일정 시작 :</caption>
  319. <caption id="caption3" class="search_name" style="left:5px; top:50px; width:99px; height:17px; ">일정 종료 :</caption>
  320. <input id="ipt_scheto" ref="/root/send/init/scheto" navindex="6" style="left:100px; top:50px; width:125px; height:19px; "/>
  321. <input id="ipt_schefrom" ref="/root/send/init/schefrom" navindex="5" style="left:100px; top:30px; width:125px; height:19px; "/>
  322. <button id="button2" class="btn4_letter2" navindex="7" style="left:115px; top:79px; width:56px; height:22px; ">
  323. <caption>입력</caption>
  324. <script type="javascript" ev:event="DOMActivate">
  325. <![CDATA[
  326. for(var i=grd_detlschemngtlist.fixedRows ; i < grd_detlschemngtlist.rows ; i++)
  327. {
  328. if(cmb_scheunit.value == "MD")
  329. {
  330. grd_detlschemngtlist.cellFormat(i, grd_detlschemngtlist.colRef("schefrom")) = "mm-dd";
  331. grd_detlschemngtlist.cellFormat(i, grd_detlschemngtlist.colRef("scheto")) = "mm-dd";
  332. }
  333. else if(cmb_scheunit.value == "YMD")
  334. {
  335. grd_detlschemngtlist.cellFormat(i, grd_detlschemngtlist.colRef("schefrom")) = "yyyy-mm-dd";
  336. grd_detlschemngtlist.cellFormat(i, grd_detlschemngtlist.colRef("scheto")) = "yyyy-mm-dd";
  337. }
  338. }
  339. for(var i = grd_detlschemngtlist.fixedRows ; i < grd_detlschemngtlist.rows ; i++)
  340. {
  341. grd_detlschemngtlist.valueMatrix(i, grd_detlschemngtlist.colRef("scheunit")) = cmb_scheunit.value;
  342. grd_detlschemngtlist.valueMatrix(i, grd_detlschemngtlist.colRef("schefrom")) = ipt_schefrom.value;
  343. grd_detlschemngtlist.valueMatrix(i, grd_detlschemngtlist.colRef("scheto")) = ipt_scheto.value;
  344. // 조회된 데이터만 수정으로 바꿔준다
  345. if(grd_detlschemngtlist.rowStatus(i) == 0)
  346. grd_detlschemngtlist.rowStatus(i) = 2;
  347. }
  348. group3.visible = false;
  349. group1.disabled = false;
  350. group2.disabled = false;
  351. group3.disabled = true;
  352. ]]>
  353. </script>
  354. </button>
  355. <button id="button3" class="btn4_letter2" style="left:175px; top:79px; width:56px; height:22px; ">
  356. <caption>취소</caption>
  357. <script type="javascript" ev:event="DOMActivate">
  358. <![CDATA[
  359. group3.visible = false;
  360. group1.disabled = false;
  361. group2.disabled = false;
  362. group3.disabled = true;
  363. ]]>
  364. </script>
  365. </button>
  366. </group>
  367. </xhtml:body>
  368. </xhtml:html>