SMPAM00402_임상연구과제연계관리.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>임상 연구 과제 연계 관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <subjlist>
  11. <subjinfo>
  12. <instcd/>
  13. <subjno/>
  14. <stdyno/>
  15. <rschid/>
  16. <rschnm/>
  17. <stdysubjnm/>
  18. <subjectno/>
  19. <stdytermfrom/>
  20. <stdytermto/>
  21. <connflag/>
  22. </subjinfo>
  23. </subjlist>
  24. <projlist>
  25. <projinfo>
  26. <instcd/>
  27. <studycd/>
  28. <projcd/>
  29. <status/>
  30. <statnm/>
  31. <kind/>
  32. <kindnm/>
  33. <rshid/>
  34. <rshnm/>
  35. <projnm/>
  36. <cnfmdd/>
  37. <fromdd/>
  38. <todd/>
  39. <connflag/>
  40. </projinfo>
  41. </projlist>
  42. </main>
  43. <init/>
  44. <send>
  45. <procstat>T</procstat>
  46. <connflag>T</connflag>
  47. <nmflag/>
  48. <setflag/>
  49. <subj/>
  50. <proj/>
  51. </send>
  52. <hidden>
  53. <tooltipflag/>
  54. </hidden>
  55. </root>
  56. </instance>
  57. <submission id="TRPAM00412" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  58. <submission id="TXPAM00407" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  59. </model>
  60. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  62. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  63. <script type="javascript">
  64. <![CDATA[
  65. function fSetConnFlagDisp() {
  66. grd_subj.rebuildStyle();
  67. grd_proj.rebuildStyle();
  68. var cnt = grd_subj.rows;
  69. for (var i = 1; i < cnt; i++) {
  70. if (grd_subj.valueMatrix(i, grd_subj.colRef("connflag")) == "Y") {
  71. grd_subj.rowStyle(i, "data", "color") = "black";
  72. grd_subj.cellStyle("background-color", i, grd_subj.colRef("subjectno")) = "transparent";
  73. } else {
  74. grd_subj.rowStyle(i, "data", "color") = "crimson";
  75. grd_subj.cellStyle("background-color", i, grd_subj.colRef("subjectno")) = "#ffffb4";
  76. }
  77. }
  78. cnt = grd_proj.rows;
  79. for (var i = 1; i < cnt; i++) {
  80. if (grd_proj.valueMatrix(i, grd_proj.colRef("connflag")) == "Y") {
  81. grd_proj.rowStyle(i, "data", "color") = "black";
  82. grd_proj.cellStyle("background-color", i, grd_proj.colRef("studycd")) = "transparent";
  83. } else {
  84. grd_proj.rowStyle(i, "data", "color") = "crimson";
  85. grd_proj.cellStyle("background-color", i, grd_proj.colRef("studycd")) = "#ffffb4";
  86. }
  87. }
  88. }
  89. ]]>
  90. </script>
  91. <script type="javascript" ev:event="xforms-ready">
  92. <![CDATA[
  93. ]]>
  94. </script>
  95. </xhtml:head>
  96. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  97. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:20px; width:1195px; height:41px; background-color:#fffbf2; border-color:#ffd799; "/>
  98. <button id="btn_search" class="btn1_letter2" navindex="3" style="left:1130px; top:30px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  99. <caption>조회</caption>
  100. <script type="javascript" ev:event="DOMActivate">
  101. <![CDATA[
  102. submit("TRPAM00412");
  103. fSetConnFlagDisp();
  104. ]]>
  105. </script>
  106. </button>
  107. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:170px; height:13px; font-family:돋움; vertical-align:middle; ">임상 연구 과제 연계 관리</caption>
  108. <line id="line13" style="x1:1115px; y1:28px; x2:1115px; y2:55px; border-color:#FFD799; border-left-style:solid; "/>
  109. <caption id="caption2" class="tit_2" style="left:0px; top:70px; width:148px; height:14px; ">병원 과제 내역 (AST)</caption>
  110. <line id="line1" class="line_1" style="x1:0px; y1:85px; x2:595px; y2:85px; "/>
  111. <datagrid id="grd_subj" nodeset="/root/main/subjlist/subjinfo" backcoloralternate="transparent" caption="기관^과제번호^연구번호^책임교수ID^책임교수^과제명^CTMS연계번호^시작일^종료일^연계" colsep="^" colwidth="0, 80, 0, 0, 60, 315, 100, 80, 80, 0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:90px; width:595px; height:645px; ">
  112. <col ref="instcd"/>
  113. <col ref="subjno" style="text-align:center; "/>
  114. <col ref="stdyno"/>
  115. <col ref="rschid"/>
  116. <col ref="rschnm" style="text-align:center; "/>
  117. <col ref="stdysubjnm" style="text-align:left; "/>
  118. <col ref="subjectno" type="input" style="text-align:left; "/>
  119. <col ref="stdytermfrom" format="yyyy-mm-dd" style="text-align:center; "/>
  120. <col ref="stdytermto" format="yyyy-mm-dd" style="text-align:center; "/>
  121. <col ref="connflag" visibility="hidden"/>
  122. <script type="javascript" ev:event="onaftersort">
  123. <![CDATA[
  124. grd_subj.gridToInstance();
  125. fSetConnFlagDisp();
  126. ]]>
  127. </script>
  128. <script type="javascript" ev:event="onclick">
  129. <![CDATA[
  130. if (!grd_subj.isCell(event.target)) {
  131. return;
  132. }
  133. if (grd_subj.row < grd_subj.fixedRows) {
  134. return;
  135. }
  136. var str = "";
  137. var row = 0;
  138. var editflag = false;
  139. if (grd_subj.col == grd_subj.colRef("stdysubjnm")) {
  140. str = model.getValue("/root/main/subjlist/subjinfo[" + grd_subj.row + "]/stdysubjnm");
  141. row = grd_proj.findRow(str, 0, grd_proj.colRef("projnm"), false, true);
  142. } else if (grd_subj.col == grd_subj.colRef("subjectno")) {
  143. var str = model.getValue("/root/main/subjlist/subjinfo[" + grd_subj.row + "]/subjectno");
  144. var row = grd_proj.findRow(str, 0, grd_proj.colRef("studycd"), false, true);
  145. editflag = true;
  146. }
  147. if (row > 0) {
  148. model.setFocus("grd_proj");
  149. grd_proj.row = row;
  150. var topRow = row - 11;
  151. if (topRow < 1) {
  152. topRow = 1;
  153. }
  154. grd_proj.topRow = topRow;
  155. } else {
  156. grd_proj.select(grd_proj.row, 1) = false;
  157. }
  158. if (editflag) {
  159. grd_subj.editCell();
  160. }
  161. ]]>
  162. </script>
  163. <script type="javascript" ev:event="xforms-value-changed">
  164. <![CDATA[
  165. grd_subj.rowStyle(grd_subj.row, "data", "font-weight") = "bold";
  166. ]]>
  167. </script>
  168. </datagrid>
  169. <line id="line2" class="line_1" style="x1:600px; y1:85px; x2:1195px; y2:85px; "/>
  170. <datagrid id="grd_proj" nodeset="/root/main/projlist/projinfo" backcoloralternate="transparent" caption="기관^과제식별번호^과제코드^상태코드^상태^과제종류코드^과제종류^책임교수ID^책임교수^과제명^승인일^시작일^종료일^연계" colsep="^" colwidth="0, 110, 60, 0, 40, 0, 60, 0, 60, 225, 80, 80, 80, 0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:600px; top:90px; width:595px; height:645px; ">
  171. <col ref="instcd"/>
  172. <col ref="studycd" type="input" style="text-align:left; "/>
  173. <col ref="projcd" style="text-align:center; "/>
  174. <col ref="status"/>
  175. <col ref="statnm" style="text-align:center; "/>
  176. <col ref="kind"/>
  177. <col ref="kindnm" style="text-align:center; "/>
  178. <col ref="rshid"/>
  179. <col ref="rshnm" style="text-align:center; "/>
  180. <col ref="projnm" style="text-align:left; "/>
  181. <col ref="cnfmdd" format="yyyy-mm-dd" style="text-align:center; "/>
  182. <col ref="fromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  183. <col ref="todd" format="yyyy-mm-dd" style="text-align:center; "/>
  184. <col ref="connflag" visibility="hidden"/>
  185. <script type="javascript" ev:event="onaftersort">
  186. <![CDATA[
  187. grd_proj.gridToInstance();
  188. fSetConnFlagDisp();
  189. ]]>
  190. </script>
  191. <script type="javascript" ev:event="onclick">
  192. <![CDATA[
  193. if (!grd_proj.isCell(event.target)) {
  194. return;
  195. }
  196. if (grd_proj.row < grd_proj.fixedRows) {
  197. return;
  198. }
  199. var str = "";
  200. var row = 0;
  201. var editflag = false;
  202. if (grd_proj.col == grd_proj.colRef("projnm")) {
  203. str = model.getValue("/root/main/projlist/projinfo[" + grd_proj.row + "]/projnm");
  204. row = grd_subj.findRow(str, 0, grd_subj.colRef("stdysubjnm"), false, true);
  205. } else if (grd_proj.col == grd_proj.colRef("studycd")) {
  206. var str = model.getValue("/root/main/projlist/projinfo[" + grd_proj.row + "]/studycd");
  207. var row = grd_subj.findRow(str, 0, grd_subj.colRef("subjectno"), false, true);
  208. editflag = true;
  209. }
  210. if (row > 0) {
  211. model.setFocus("grd_subj");
  212. grd_subj.row = row;
  213. var topRow = row - 11;
  214. if (topRow < 1) {
  215. topRow = 1;
  216. }
  217. grd_subj.topRow = topRow;
  218. } else {
  219. grd_subj.select(grd_subj.row, 1) = false;
  220. }
  221. if (editflag) {
  222. grd_proj.editCell();
  223. }
  224. ]]>
  225. </script>
  226. <script type="javascript" ev:event="xforms-value-changed">
  227. <![CDATA[
  228. grd_proj.rowStyle(grd_proj.row, "data", "font-weight") = "bold";
  229. ]]>
  230. </script>
  231. </datagrid>
  232. <button id="btn_setsubj" class="btn4_letter7" style="left:479px; top:740px; width:116px; height:22px; ">
  233. <caption>변경 내역 저장</caption>
  234. <script type="javascript" ev:event="DOMActivate">
  235. <![CDATA[
  236. var rows = grd_subj.rows;
  237. var cnt = 0;
  238. for (var i = 1; i < rows; i++) {
  239. if (grd_subj.rowStatus(i) == 2) {
  240. cnt++;
  241. }
  242. }
  243. if (cnt < 1) {
  244. messageBox("변경된 내역이 없습니다.", "E999");
  245. return;
  246. } else if (messageBox("[ " + cnt + " ] 개 병원 과제의 CTMS연계번호를 변경하시겠습니까?", "Q999") != 6) {
  247. return;
  248. }
  249. var str = grd_subj.getUpdateData("update");
  250. model.setValue("/root/send/subj", str);
  251. model.setValue("/root/send/setflag", "subj");
  252. submit("TXPAM00407");
  253. model.setValue("/root/send/subj", "");
  254. fSetConnFlagDisp();
  255. ]]>
  256. </script>
  257. </button>
  258. <button id="btn_setproj" class="btn4_letter7" style="left:1079px; top:740px; width:116px; height:22px; ">
  259. <caption>변경 내역 저장</caption>
  260. <script type="javascript" ev:event="DOMActivate">
  261. <![CDATA[
  262. var rows = grd_proj.rows;
  263. var cnt = 0;
  264. for (var i = 1; i < rows; i++) {
  265. if (grd_proj.rowStatus(i) == 2) {
  266. cnt++;
  267. }
  268. }
  269. if (cnt < 1) {
  270. messageBox("변경된 내역이 없습니다.", "E999");
  271. return;
  272. } else if (messageBox("[ " + cnt + " ] 개 연구 과제의 과제식별번호를 변경하시겠습니까?", "Q999") != 6) {
  273. return;
  274. }
  275. var str = grd_proj.getUpdateData("update");
  276. model.setValue("/root/send/proj", str);
  277. model.setValue("/root/send/setflag", "proj");
  278. submit("TXPAM00407");
  279. model.setValue("/root/send/proj", "");
  280. fSetConnFlagDisp();
  281. ]]>
  282. </script>
  283. </button>
  284. <select id="checkbox1" ref="/root/hidden/tooltipflag" overflow="visible" appearance="full" style="left:155px; top:68px; width:75px; height:15px; border-style:none; ">
  285. <choices>
  286. <item>
  287. <label>툴팁 보기</label>
  288. <value>Y</value>
  289. </item>
  290. </choices>
  291. <script type="javascript" ev:event="xforms-value-changed">
  292. <![CDATA[
  293. if (model.getValue("/root/hidden/tooltipflag") == "Y") {
  294. grd_subj.attribute("tooltip") = "true";
  295. grd_proj.attribute("tooltip") = "true";
  296. } else {
  297. grd_subj.attribute("tooltip") = "false";
  298. grd_proj.attribute("tooltip") = "false";
  299. }
  300. ]]>
  301. </script>
  302. </select>
  303. <caption id="caption1" class="search_name" style="left:5px; top:32px; width:96px; height:17px; ">진행 상태 :</caption>
  304. <select1 id="rdo_proc" ref="/root/send/procstat" appearance="full" cellspacing="3" cols="3" overflow="visible" style="left:103px; top:32px; width:140px; height:15px; border-style:none; ">
  305. <choices>
  306. <item>
  307. <label>전체</label>
  308. <value>T</value>
  309. </item>
  310. <item>
  311. <label>진행</label>
  312. <value>P</value>
  313. </item>
  314. <item>
  315. <label>종결</label>
  316. <value>E</value>
  317. </item>
  318. </choices>
  319. </select1>
  320. <caption id="caption3" class="search_name" style="left:265px; top:32px; width:96px; height:17px; ">연계 과제 :</caption>
  321. <select1 id="rdo_conn" ref="/root/send/connflag" appearance="full" cellspacing="3" cols="3" overflow="visible" style="left:360px; top:32px; width:140px; height:15px; border-style:none; ">
  322. <choices>
  323. <item>
  324. <label>전체</label>
  325. <value>T</value>
  326. </item>
  327. <item>
  328. <label>있음</label>
  329. <value>Y</value>
  330. </item>
  331. <item>
  332. <label>없음</label>
  333. <value>N</value>
  334. </item>
  335. </choices>
  336. </select1>
  337. <caption id="caption4" class="tit_2" style="left:600px; top:70px; width:148px; height:14px; ">연구 과제 내역 (MIS)</caption>
  338. <select id="chk_nmflag" ref="/root/send/nmflag" overflow="visible" appearance="full" style="left:530px; top:33px; width:145px; height:15px; border-style:none; ">
  339. <choices>
  340. <item>
  341. <label>과제명 일치 항목 조회</label>
  342. <value>Y</value>
  343. </item>
  344. </choices>
  345. </select>
  346. <button id="btn_excel_ast" class="btn2_letter4" style="left:531px; top:65px; width:64px; height:19px; ">
  347. <caption>엑셀저장</caption>
  348. <script type="javascript" ev:event="DOMActivate">
  349. <![CDATA[
  350. var filename = window.fileDialog("save", ",", false, "병원 과제 내역 (AST)", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  351. var param = "";
  352. for (var i = 0; i < grd_subj.cols; i++) {
  353. if (grd_subj.colWidth(i) == 0) {
  354. param += "exportfalsecols:" + i + ";";
  355. }
  356. }
  357. grd_subj.saveExcel(filename, "sheetname:병원 과제 내역 (AST);colhiddenextend:true;rowhiddenextend:false;" + param);
  358. messageBox("엑셀 저장이 완료되었습니다.", "I999");
  359. ]]>
  360. </script>
  361. </button>
  362. <button id="btn_excel_mis" class="btn2_letter4" style="left:1131px; top:65px; width:64px; height:19px; ">
  363. <caption>엑셀저장</caption>
  364. <script type="javascript" ev:event="DOMActivate">
  365. <![CDATA[
  366. var filename = window.fileDialog("save", ",", false, "연구 과제 내역 (MIS)", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  367. var param = "";
  368. for (var i = 0; i < grd_proj.cols; i++) {
  369. if (grd_proj.colWidth(i) == 0) {
  370. param += "exportfalsecols:" + i + ";";
  371. }
  372. }
  373. grd_proj.saveExcel(filename, "sheetname:연구 과제 내역 (MIS);colhiddenextend:true;rowhiddenextend:false;" + param);
  374. messageBox("엑셀 저장이 완료되었습니다.", "I999");
  375. ]]>
  376. </script>
  377. </button>
  378. </xhtml:body>
  379. </xhtml:html>