SMRIS00101_과제관리.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  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:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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. <cond>
  11. <ddflag/>
  12. <status/>
  13. <kind/>
  14. <ddfrom/>
  15. <ddto/>
  16. <rshnm/>
  17. <rshid/>
  18. <studycd/>
  19. <instcd/>
  20. <chkstatus/>
  21. <btnflag/>
  22. <rshdeptcd/>
  23. <rshdeptnm/>
  24. </cond>
  25. </main>
  26. <send>
  27. <reqdata>
  28. </reqdata>
  29. <userinfo/>
  30. <param/>
  31. </send>
  32. <hidden>
  33. </hidden>
  34. <init>
  35. <baseinfo>
  36. <instinfo>
  37. <instcd/>
  38. <hospnm/>
  39. </instinfo>
  40. </baseinfo>
  41. <status/>
  42. <kind/>
  43. <projlist/>
  44. <gridstatus/>
  45. <C0048list/>
  46. </init>
  47. <temp/>
  48. <result>
  49. <studyprojlist>
  50. </studyprojlist>
  51. </result>
  52. <popupmenu>
  53. <menuso>
  54. <item>
  55. <name>입출금 상세내역</name>
  56. <func>fManAmt</func>
  57. </item>
  58. <item>
  59. <name>연구원 등록 및 조회</name>
  60. <func>fManStudyUser</func>
  61. </item>
  62. </menuso>
  63. <menuwonc>
  64. <item>
  65. <name>입출금 상세내역</name>
  66. <func>fManAmt</func>
  67. </item>
  68. <item>
  69. <name>연구원 등록 및 조회</name>
  70. <func>fManStudyUser</func>
  71. </item>
  72. </menuwonc>
  73. </popupmenu>
  74. </root>
  75. </instance>
  76. <script type="javascript" ev:event="xforms-ready">
  77. <![CDATA[
  78. fIni();
  79. ]]>
  80. </script>
  81. <submission id="TRRIS00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" replace="instance" resultref="/root/result/studyprojlist"/>
  82. <submission id="TXRIS00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" replace="instance" resultref="/root/temp"/>
  83. </model>
  84. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  85. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  86. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  87. <script type="javascript" src="../../../com/authinfoweb/js/ZSA001.js"/>
  88. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  89. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  90. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  91. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  92. <script type="javascript" src="../../../mis/ctmsweb/js/SMRIS00101.js"/>
  93. </xhtml:head>
  94. <xhtml:body>
  95. <group id="group3" style="left:0px; top:25px; width:1200px; height:65px; vertical-align:top; ">
  96. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1198px; height:63px; background-color:#fffbf2; border-color:#ffd799; "/>
  97. <button id="btn_search" class="btn1_letter2" _auth="R" style="left:1124px; top:18px; width:56px; height:22px; ">
  98. <caption>조회</caption>
  99. <script type="javascript" ev:event="DOMActivate">
  100. <![CDATA[
  101. fSearch();
  102. ]]>
  103. </script>
  104. </button>
  105. <caption id="caption2" class="search_name" style="left:335px; top:10px; width:90px; height:17px; ">구 분 :</caption>
  106. <select1 id="cmb_kind" ref="/root/main/cond/kind" appearance="minimal" style="left:413px; top:10px; width:145px; height:19px; ">
  107. <choices>
  108. <item>
  109. <label>외부위탁</label>
  110. <value>O</value>
  111. </item>
  112. <item>
  113. <label>국책(지자체)</label>
  114. <value>G</value>
  115. </item>
  116. <item>
  117. <label>원내</label>
  118. <value>H</value>
  119. </item>
  120. <item>
  121. <label>기타</label>
  122. <value>E</value>
  123. </item>
  124. <item>
  125. <label>-전체-</label>
  126. <value>-</value>
  127. </item>
  128. </choices>
  129. </select1>
  130. <caption id="caption3" class="search_name" style="left:587px; top:10px; width:91px; height:17px; ">과제번호 :</caption>
  131. <caption id="caption4" class="search_name" style="left:28px; top:36px; width:90px; height:17px; ">연 구 원 :</caption>
  132. <button id="btn_useid" class="icon_search" navindex="5" style="left:305px; top:37px; width:16px; height:16px; ">
  133. <caption/>
  134. <script type="javascript" ev:event="DOMActivate">
  135. <![CDATA[
  136. fSetUserinfo();
  137. ]]>
  138. </script>
  139. </button>
  140. <output id="opt_rshnm" ref="/root/main/cond/rshnm" class="output_fix" style="left:199px; top:35px; width:102px; height:19px; "/>
  141. <output id="opt_rshid" ref="/root/main/cond/rshid" class="output_fix" style="left:121px; top:35px; width:75px; height:19px; "/>
  142. <input id="ipt_studycd" ref="/root/main/cond/studycd" style="left:677px; top:10px; width:125px; height:19px; ">
  143. <script type="javascript" ev:event="onkeypress">
  144. <![CDATA[
  145. if(event.keyCode == "13") {
  146. inputEnterKey("btn_search","DOMActivate");
  147. }
  148. ]]>
  149. </script>
  150. </input>
  151. <caption id="caption1" class="search_name" style="left:821px; top:10px; width:65px; height:17px; ">상 태 :</caption>
  152. <line id="line30" class="line_4" style="x1:1100px; y1:9px; x2:1100px; y2:50px; "/>
  153. <caption id="caption5" class="search_name" style="left:30px; top:10px; width:90px; height:17px; ">기관코드 :</caption>
  154. <select1 id="cmb_instcd" ref="/root/main/cond/instcd" class="combo_defalut" appearance="minimal" style="left:121px; top:10px; width:180px; height:19px; ">
  155. <choices>
  156. <itemset nodeset="/root/init/C0048list/C0048">
  157. <label ref="cdnm"/>
  158. <value ref="cdid"/>
  159. </itemset>
  160. </choices>
  161. </select1>
  162. <select id="chk_status" ref="/root/main/cond/chkstatus" navindex="39" overflow="visible" appearance="full" cellspacing="10" cols="4" style="left:890px; top:11px; width:200px; height:15px; text-align:left; border-style:none; ">
  163. <choices>
  164. <itemset nodeset="/root/init/status/I0010">
  165. <label ref="cdnm"/>
  166. <value ref="cdid"/>
  167. </itemset>
  168. </choices>
  169. <script type="javascript" ev:event="xforms-value-changed">
  170. <![CDATA[
  171. var statusitem = model.getValue("/root/main/cond/chkstatus");
  172. var Arr = null;
  173. var text = "";
  174. if( statusitem != "" ){
  175. for( var i = 0 ; i <= chk_status.length ; i++ ){
  176. Arr = statusitem.split(" ");
  177. for( var a = 0 ; a < Arr.length; a++ ){
  178. if( a == 0 ){
  179. text = "'" + Arr[a] + "'";
  180. }else{
  181. text = text + ", '" + Arr[a] + "'";
  182. }
  183. }
  184. }
  185. }
  186. model.setValue("/root/main/cond/status", text );
  187. model.refresh();
  188. ]]>
  189. </script>
  190. </select>
  191. <caption id="cpt_rshdept" class="search_name" style="left:335px; top:36px; width:125px; height:17px; ">근무지 :</caption>
  192. <input id="ipt_rshdeptnm" ref="/root/main/cond/rshdeptnm" disabled="true" style="left:413px; top:35px; width:145px; height:19px; ">
  193. <script type="javascript" ev:event="onkeypress">
  194. <![CDATA[
  195. ]]>
  196. </script>
  197. </input>
  198. <button id="btn_rshdept" class="icon_search" navindex="5" style="left:561px; top:37px; width:16px; height:16px; ">
  199. <caption/>
  200. <script type="javascript" ev:event="DOMActivate">
  201. <![CDATA[
  202. var recv_list = "rshdeptcd,rshdeptnm";
  203. misfOpenPopUpList("02", ipt_rshdeptnm, "", recv_list, getUserInfo("posinstcd"), "instcd");
  204. model.refresh();
  205. ]]>
  206. </script>
  207. </button>
  208. </group>
  209. <datagrid id="grd_studyprojlist" nodeset="/root/result/studyprojlist" scroll="auto" caption="기관^상태^형태^구분^과제번호^과제명^ID^연구책임자^총연구비^수익^비용(직접비)^비용(간접비)^단계^승인일^계약일^시작일^종료일^상태^최초승인일^접수번호^국가구분^기관구분^승인유효일^약품명^의뢰기관^대행기관^최초수정자^최초수정일^최종수정자^최종수정일^과제코드^기관코드" colsep="^" colwidth="47, 47, 47, 80, 120, 283, 9, 69, 100, 100, 100, 100, 84, 85, 85, 85, 85, 57, 84, 59, 59, 65, 85, 100, 100, 100, 70, 100, 70, 100, 73, 100, 100, 100, 100" explorerbar="sortshow" rowheader="update" rowsep="|" tooltip="true" style="left:0px; top:97px; width:1200px; height:677px; ">
  210. <col disabled="true" ref="instcd" type="combo" style="text-align:center; ">
  211. <choices>
  212. <item>
  213. <label>본원</label>
  214. <value>031</value>
  215. </item>
  216. <item>
  217. <label>칠곡</label>
  218. <value>032</value>
  219. </item>
  220. </choices>
  221. </col>
  222. <col ref="status" type="combo" style="text-align:center; ">
  223. <choices>
  224. <itemset nodeset="/root/init/grdstatus/I0010">
  225. <label ref="cdnm"/>
  226. <value ref="cdid"/>
  227. </itemset>
  228. </choices>
  229. </col>
  230. <col disabled="true" ref="workkind" type="combo" style="text-align:center; ">
  231. <choices>
  232. <item>
  233. <label>참여</label>
  234. <value>A</value>
  235. </item>
  236. <item>
  237. <label>공동</label>
  238. <value>B</value>
  239. </item>
  240. <item>
  241. <label>책임</label>
  242. <value>C</value>
  243. </item>
  244. </choices>
  245. </col>
  246. <col disabled="true" ref="kind" type="combo">
  247. <choices>
  248. <itemset nodeset="/root/init/kind/I0011">
  249. <label ref="cdnm"/>
  250. <value ref="cdid"/>
  251. </itemset>
  252. </choices>
  253. </col>
  254. <col ref="studycd"/>
  255. <col ref="projnm"/>
  256. <col ref="rshid" visibility="hidden"/>
  257. <col ref="rshnm" style="text-align:center; "/>
  258. <col ref="projamt" format="(-)#,###" style="text-align:right; "/>
  259. <col ref="iamt" format="(-)#,###" style="text-align:right; "/>
  260. <col ref="oamt" format="(-)#,###" style="text-align:right; "/>
  261. <col ref="oiamt" format="(-)#,###" style="text-align:right; "/>
  262. <col ref="stage"/>
  263. <col ref="cnfmdd" format="yyyy-mm-dd" style="text-align:center; "/>
  264. <col ref="cntrdd" format="yyyy-mm-dd" style="text-align:center; "/>
  265. <col ref="fromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  266. <col ref="todd" format="yyyy-mm-dd" style="text-align:center; "/>
  267. <col disabled="true" ref="status" type="combo" visibility="hidden">
  268. <choices>
  269. <itemset nodeset="/root/init/status/I0010">
  270. <label ref="cdnm"/>
  271. <value ref="cdid"/>
  272. </itemset>
  273. </choices>
  274. </col>
  275. <col ref="fstcnfmdd" format="yyyy-mm-dd" style="text-align:center; "/>
  276. <col ref="projtype" style="text-align:center; "/>
  277. <col ref="nflag" style="text-align:center; "/>
  278. <col ref="oflag" style="text-align:center; "/>
  279. <col ref="cnfmvalidd" format="yyyy-mm-dd" style="text-align:center; "/>
  280. <col ref="drugnm"/>
  281. <col ref="reqfirm"/>
  282. <col ref="agent"/>
  283. <col ref="fstrgstrnm" style="text-align:center; "/>
  284. <col ref="fstrgstdt"/>
  285. <col ref="lastupdnm" style="text-align:center; "/>
  286. <col ref="lastupdtdt"/>
  287. <col ref="projcd"/>
  288. <col ref="statusbak" visibility="hidden"/>
  289. <col ref="amtcnt" visibility="hidden"/>
  290. <col ref="workcnt" visibility="hidden"/>
  291. <col ref="reptcnt" visibility="hidden"/>
  292. <script type="javascript" ev:event="ondblclick">
  293. <![CDATA[
  294. fDetail();
  295. ]]>
  296. </script>
  297. <script type="javascript" ev:event="DOMFocusOut">
  298. <![CDATA[
  299. window.setPopupMenu(false);
  300. ]]>
  301. </script>
  302. <script type="javascript" ev:event="DOMFocusIn">
  303. <![CDATA[
  304. window.setPopupMenu(true);
  305. ]]>
  306. </script>
  307. <script type="javascript" ev:event="onrowchanged">
  308. <![CDATA[
  309. if (event.button == 3 ){
  310. //if( grd_studyprojlist.isCell(event.target) && grd_studyprojlist.rows >= grd_studyprojlist.fixedRows ){
  311. if( PARAM == "P" ){
  312. // 연구원 참여, 공동
  313. if( model.getValue("/root/result/studyprojlist[" + grd_studyprojlist.row + "]/workkind") != "C"){
  314. window.setPopupMenu(false);
  315. }else{ // 연구원 책임
  316. window.setPopupMenu( true, "/root/popupmenu/menuwonc/item", "name", "func", false);
  317. }
  318. }else if( PARAM == "N" ){ //간호사
  319. window.setPopupMenu(false);
  320. }else{ // 연구소
  321. window.setPopupMenu( true, "/root/popupmenu/menuso/item", "name", "func", false);
  322. //setPopupMenu("grd_studyprojlist", false, "/root/popupmenu/menuso/item", "name", "func");
  323. }
  324. }
  325. if( model.getValue("/root/result/studyprojlist[" + grd_studyprojlist.row + "]/workkind") != "C"){
  326. btn_amt.visible = false;
  327. }else{
  328. btn_amt.visible = true;
  329. }
  330. model.refresh();
  331. ]]>
  332. </script>
  333. <script type="javascript" ev:event="xforms-value-changed">
  334. <![CDATA[
  335. if( grd_studyprojlist.colRef("status") == grd_studyprojlist.col ){
  336. if( model.getValue("/root/result/studyprojlist[" + grd_studyprojlist.row + "]/status") == model.getValue("/root/result/studyprojlist[" + grd_studyprojlist.row + "]/statusbak") ){
  337. if( model.getValue("/root/result/studyprojlist[" + grd_studyprojlist.row + "]/status") == "P" ){
  338. grd_studyprojlist.cellstyle("font-weight", grd_studyprojlist.row, 1, grd_studyprojlist.row, 1 ) = "bold";
  339. grd_studyprojlist.cellstyle("color", grd_studyprojlist.row, 1, grd_studyprojlist.row, 1) = "blue";
  340. }else{
  341. grd_studyprojlist.cellstyle("font-weight", grd_studyprojlist.row, 1, grd_studyprojlist.row, 1 ) = "normal";
  342. grd_studyprojlist.cellstyle("color", grd_studyprojlist.row, 1, grd_studyprojlist.row, 1) = "black";
  343. }
  344. grd_studyprojlist.rowStatus(grd_studyprojlist.row) = 0 ;
  345. }else{
  346. grd_studyprojlist.cellstyle("color", grd_studyprojlist.row , 1, grd_studyprojlist.row, 1) = "red";
  347. grd_studyprojlist.cellstyle("font-weight", grd_studyprojlist.row, 1, grd_studyprojlist.row, 1 ) = "bold";
  348. grd_studyprojlist.rowStatus(grd_studyprojlist.row) = 2;
  349. }
  350. }
  351. model.refresh();
  352. ]]>
  353. </script>
  354. <script type="javascript" ev:event="onclick">
  355. <![CDATA[
  356. if( model.getValue("/root/result/studyprojlist[" + grd_studyprojlist.row + "]/workkind") != "C"){
  357. btn_amt.visible = false;
  358. }else{
  359. btn_amt.visible = true;
  360. }
  361. model.refresh();
  362. ]]>
  363. </script>
  364. <script type="javascript" ev:event="onaftersort">
  365. <![CDATA[
  366. grd_studyprojlist.gridToInstance();
  367. ]]>
  368. </script>
  369. </datagrid>
  370. <line id="line1" class="line_1" style="x1:0px; y1:94px; x2:1200px; y2:94px; font-family:돋움체; "/>
  371. <group id="grp_buttons" style="left:0px; top:0px; width:1200px; height:25px; ">
  372. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:25px; ">과제관리</caption>
  373. <button id="btn_amt" class="btn4_letter3" _auth="R" style="left:1125px; top:0px; width:68px; height:22px; ">
  374. <caption>입출금</caption>
  375. <script type="javascript" ev:event="DOMActivate">
  376. <![CDATA[
  377. fManAmt();
  378. ]]>
  379. </script>
  380. </button>
  381. <button id="btn_new" class="btn4_letter2" _auth="R" style="left:1067px; top:0px; width:56px; height:22px; ">
  382. <caption>신규</caption>
  383. <script type="javascript" ev:event="DOMActivate">
  384. <![CDATA[
  385. fNew();
  386. ]]>
  387. </script>
  388. </button>
  389. <button id="btn_excel" class="btn6_letter2" _auth="R" style="left:1009px; top:0px; width:56px; height:22px; ">
  390. <caption>엑셀</caption>
  391. <script type="javascript" ev:event="DOMActivate">
  392. <![CDATA[
  393. var sTitle = "과제리스트";
  394. var fileName = window.fileDialog("save", ",", false, sTitle, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  395. if (fileName != ""){
  396. grd_studyprojlist.saveExcel(fileName, sTitle, true, true, "", "", true);
  397. }
  398. ]]>
  399. </script>
  400. </button>
  401. <button id="btn_save" class="btn3_letter2" _auth="R" style="left:951px; top:0px; width:56px; height:22px; ">
  402. <caption>저장</caption>
  403. <script type="javascript" ev:event="DOMActivate">
  404. <![CDATA[
  405. model.setValue("/root/main/cond/btnflag", "1");
  406. fSave();
  407. ]]>
  408. </script>
  409. </button>
  410. <button id="btn_del" class="btn3_letter2" _auth="R" style="left:893px; top:0px; width:56px; height:22px; ">
  411. <caption>제거</caption>
  412. <script type="javascript" ev:event="DOMActivate">
  413. <![CDATA[
  414. model.setValue("/root/main/cond/btnflag", "2");
  415. var i = grd_studyprojlist.row;
  416. if( i != "" ){
  417. if( parseInt(model.getValue("/root/result/studyprojlist[" + i + "]/amtcnt")) > 0 ){
  418. messageBox("이미 입출금내역이 등록된 과제는 삭제하실 수 없습니다. \n【 과제번호 : " + model.getValue("/root/result/studyprojlist[" + i + "]/studycd") + " 】" + "","I999");
  419. return;
  420. }
  421. if( parseInt(model.getValue("/root/result/studyprojlist[" + i + "]/workcnt")) > 0 ){
  422. messageBox("이미 연구원내역이 등록된 과제는 삭제하실 수 없습니다. \n【 과제번호 : " + model.getValue("/root/result/studyprojlist[" + i + "]/studycd") + " 】" + "","I999");
  423. return;
  424. }
  425. if( parseInt(model.getValue("/root/result/studyprojlist[" + i + "]/reptcnt")) > 0 ){
  426. messageBox("이미 보고서작성내역이 등록된 과제는 삭제하실 수 없습니다. \n【 과제번호 : " + model.getValue("/root/result/studyprojlist[" + i + "]/studycd") + " 】" + "","I999");
  427. return;
  428. }
  429. }
  430. fSave();
  431. ]]>
  432. </script>
  433. </button>
  434. </group>
  435. </xhtml:body>
  436. </xhtml:html>