SMATB00600_임상약품생성의뢰관리.xrw 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973
  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. <subjlist>
  11. <item>
  12. <statcd/>
  13. <subjno/>
  14. <stdyno/>
  15. <itemnm/>
  16. <drugcd/>
  17. <stdysubjnm/>
  18. <respstdynm/>
  19. <reqnm/>
  20. <clincflag/>
  21. <ioflag/>
  22. <stdytermfrom/>
  23. <stdytermto/>
  24. <judgdg/>
  25. <irbjudglistdd/>
  26. <conpaperconacptdd/>
  27. <subjenddd/>
  28. <subjid/>
  29. <reqno/>
  30. <reqrid/>
  31. <reqrnm/>
  32. <reqdt/>
  33. <writrid/>
  34. <writrnm/>
  35. <writdt/>
  36. <cmtcnts/>
  37. <calcscorreqdt/>
  38. <calcscorrgststat/>
  39. <calcscorrgstdt/>
  40. <datayn/>
  41. <m/>
  42. </item>
  43. </subjlist>
  44. <userpopupinfo/>
  45. <tempuserinfo/>
  46. </main>
  47. <send>
  48. <srchdata>
  49. <savemode/>
  50. <srchsubjno/>
  51. <srchsubjflag>1</srchsubjflag>
  52. <srchstdyno/>
  53. <srchstdyflag>1</srchstdyflag>
  54. <srchfromdd/>
  55. <srchtodd/>
  56. <srchcstatcd1>00</srchcstatcd1>
  57. <srchcstatcd2>10,20</srchcstatcd2>
  58. <srchflag1>Y,N</srchflag1>
  59. <srchflag2>1,2,3</srchflag2>
  60. </srchdata>
  61. <savedata/>
  62. </send>
  63. <init>
  64. <savemode/>
  65. </init>
  66. <hidden/>
  67. <temp>
  68. <receivedata>
  69. <receiveref/>
  70. </receivedata>
  71. <popupmenu>
  72. <item>
  73. <func>fOpenDrugMaster</func>
  74. <label>임상약품마스터 등록</label>
  75. </item>
  76. <item>
  77. <func>fReqCancel</func>
  78. <label>생성의뢰 취소</label>
  79. </item>
  80. <item>
  81. <func>fWriCancel</func>
  82. <label>작성완료 취소</label>
  83. </item>
  84. </popupmenu>
  85. <reqdata>
  86. <subjno/>
  87. </reqdata>
  88. </temp>
  89. </root>
  90. </instance>
  91. <script type="javascript" ev:event="xforms-ready">
  92. <![CDATA[
  93. menuParam = getScreenMenuParameter(); // R: 의뢰 mode, C: 확인 mode
  94. if( isNull(menuParam) ) menuParam = "R";
  95. //------------------(20091015)
  96. model.setValue("/root/send/srchdata/savemode", menuParam);
  97. if( menuParam == "R" ){
  98. //R: 의뢰 mode
  99. caption6.attribute("text") = "임상약품코드생성의뢰 관리(의뢰)";
  100. //btn_save.attribute("text") = "의뢰저장";
  101. grd_subjlist.colDisabled( grd_subjlist.colRef("writrnm") ) = true;
  102. grd_subjlist.colDisabled( grd_subjlist.colRef("writdt") ) = true;
  103. //model.setValue("/root/send/srchdata/srchfromdd", getCurrentDate());
  104. //model.setValue("/root/send/srchdata/srchtodd", getCurrentDate());
  105. model.setValue("/root/send/srchdata/srchcstatcd2",""); //의뢰인 경우는 상태는 '생성의뢰/작성완료 기본값 해제)
  106. }else{
  107. //C: 확인 mode
  108. caption6.attribute("text") = "임상약품코드생성의뢰 관리(확인)";
  109. //btn_save.attribute("text") = "확인저장";
  110. grd_subjlist.colDisabled( grd_subjlist.colRef("reqrnm") ) = true;
  111. grd_subjlist.colDisabled( grd_subjlist.colRef("reqdt") ) = true;
  112. getCurrentDate()
  113. var addDate=new Date();
  114. var curdate = getCurrentDate().toDate("YYYYMMDD").getAddDate(-1, "M");
  115. /* 수정자 : 노동우
  116. 날짜 : 20091127
  117. 내용 : 화면 첫 로딩시 조회 조건 없음.
  118. */
  119. //model.setValue("/root/send/srchdata/srchfromdd", curdate.getDateFormat("YYYYMMDD") ); // 날짜 초기값 세팅
  120. //model.setValue("/root/send/srchdata/srchtodd", getCurrentDate());
  121. //model.setValue("/root/send/srchdata/srchcstatcd1",""); //의뢰인 경우는 상태는 '생성의뢰/작성완료 기본값 해제)
  122. //------------------(20091015)
  123. }
  124. //------------920091015)
  125. model.removeNodeset("/root/main/subjlist/item"); // 첫 row 를 제거한다.
  126. model.refresh();
  127. model.setFocus("btn_query");
  128. //-----------
  129. fGetSubjList();
  130. ]]>
  131. </script>
  132. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  133. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  134. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  135. <submission id="TRATB00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/subjlist"/>
  136. <submission id="TXATB00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/subjlist"/>
  137. </model>
  138. <script type="javascript">
  139. <![CDATA[
  140. //전역변수
  141. var menuParam = "";
  142. var ref = "/root/main/subjlist/item";
  143. //임상약품코드생성의뢰 리스트 조회
  144. function fGetSubjList(){
  145. //-------------------(20091015)
  146. //수가신청이 체크된 경우
  147. //미승인,승인중,승인완료를 체크해야함
  148. //alert(model.getValue("/root/send/srchdata/srchflag1"));
  149. if (model.getValue("/root/send/srchdata/srchflag1") == "Y" || model.getValue("/root/send/srchdata/srchflag1") == "Y,N" ) {
  150. if (model.getValue("/root/send/srchdata/srchflag2") == "" ) {
  151. messageBox("수가신청은 '미승인 ,승인중 ,승인완료' 중 한가지 이상 선택해야 합니다.","I9999");
  152. model.setFocus("chk_srchflag2");
  153. return;
  154. }
  155. }
  156. if (model.getValue("/root/send/srchdata/srchflag1") == "" ) {
  157. messageBox("수가신청,미신청중 한가지 이상 선택해야 합니다.","I9999");
  158. model.setFocus("chk_srchflag2");
  159. return;
  160. }
  161. //--------------------
  162. submit("TRATB00601", true);
  163. }
  164. //사용자 팝업 호출 및 사용자 정보 return
  165. function fGetUserInfo(){
  166. var iRow = grd_subjlist.row - grd_subjlist.fixedRows + 1;
  167. var iCol = grd_subjlist.col;
  168. if( iRow > 0 && iRow <= grd_subjlist.rows ){
  169. var reqNo = model.getValue(ref + "[" + iRow + "]/reqno"); //key
  170. var reqrID = model.getValue(ref + "[" + iRow + "]/reqrid");
  171. var reqrNm = model.getValue(ref + "[" + iRow + "]/reqrnm");
  172. var reqDt = model.getValue(ref + "[" + iRow + "]/reqdt");
  173. var writrID = model.getValue(ref + "[" + iRow + "]/writrid");
  174. var writrNm = model.getValue(ref + "[" + iRow + "]/writrnm");
  175. var writDt = model.getValue(ref + "[" + iRow + "]/writdt");
  176. var orgStatus = model.getValue(ref + "[" + iRow + "]/statcd");
  177. var srchTxt = "";
  178. if( menuParam == "R" && iCol == grd_subjlist.colRef("reqrnm") ){
  179. srchTxt = reqrNm;
  180. if( orgStatus == "20" ){
  181. messageBox ( "이미 작성완료 상태이므로 수정할 수", "I004" );
  182. return;
  183. }
  184. } else if( menuParam == "C" && iCol == grd_subjlist.colRef("writrnm") ){
  185. srchTxt = writrNm;
  186. if( orgStatus == "00" ){
  187. messageBox ( "미의뢰 상태이므로 수정할 수", "I004" );
  188. grd_subjlist.endEditCell();
  189. return;
  190. }
  191. }else{
  192. return;
  193. }
  194. model.resetInstanceNode("/root/main/userpopupinfo");
  195. model.resetInstanceNode("/root/main/tempuserinfo");
  196. model.makeValue("/root/main/userpopupinfo/param", "_OneS");
  197. model.makeValue("/root/main/userpopupinfo/flag", "usernm");
  198. model.makeValue("/root/main/userpopupinfo/searchitem", srchTxt );
  199. modal("../../userdeptinfoweb/xrw/SPZSU10103", "", "200", "200", "SPZSU10103","/root/main/userpopupinfo","/root/main/temp");
  200. var iParam = getParameter("SPZSU10103_");
  201. if( !isNull(iParam) ){
  202. setCSVToNode("/root/main/tempuserinfo", iParam, "list"); //return 받은 데이터
  203. var id = model.getValue("/root/main/tempuserinfo/list[1]/userid");
  204. var nm = model.getValue("/root/main/tempuserinfo/list[1]/usernm");
  205. if( menuParam == "R" && reqrID != id ){
  206. model.setValue(ref + "[" + iRow + "]/reqrid", id);
  207. model.setValue(ref + "[" + iRow + "]/reqrnm", nm);
  208. if(isNull(reqDt)) model.setValue(ref + "[" + iRow + "]/reqdt", getCurrentDate());
  209. if(isNull(reqNo)){
  210. model.setValue(ref + "[" + iRow + "]/statcd", "10");
  211. model.setValue(ref + "[" + iRow + "]/m", "I");
  212. }else{
  213. model.setValue(ref + "[" + iRow + "]/m", "U");
  214. }
  215. }else if( menuParam == "C" && writrID != id ) {
  216. model.setValue(ref + "[" + iRow + "]/writrid", id);
  217. model.setValue(ref + "[" + iRow + "]/writrnm", nm);
  218. if(isNull(reqDt)) model.setValue(ref + "[" + iRow + "]/writdt", getCurrentDate());
  219. if(isNull(reqNo)) model.setValue(ref + "[" + iRow + "]/statcd", "20");
  220. model.setValue(ref + "[" + iRow + "]/m", "U");
  221. }
  222. }
  223. clearParameter("SPZSU10103_");
  224. }
  225. }
  226. //과제정보를 물고 임상시험약품정보(마스터) open
  227. function fOpenDrugMaster(){
  228. model.setValue("/root/temp/reqdata/subjno", model.getValue(ref + "[" + grd_subjlist.row + "]/subjno"));
  229. modal("SMADC10600", "", "", "", "SMADC10600", "/root/temp/reqdata/subjno", "/root/main/crinfo/crdruginfo/subjectno");
  230. }
  231. // 20091229_노동우_생성의뢰 취소
  232. function fReqCancel() {
  233. var iRow = grd_subjlist.row;
  234. var reqNo = model.getValue(ref + "[" + iRow + "]/reqno"); //key
  235. var reqrID = model.getValue(ref + "[" + iRow + "]/reqrid");
  236. var reqrNm = model.getValue(ref + "[" + iRow + "]/reqrnm");
  237. var reqDt = model.getValue(ref + "[" + iRow + "]/reqdt");
  238. var orgStatus = model.getValue(ref + "[" + iRow + "]/statcd");
  239. //&& (iCol == grd_subjlist.colRef("reqdt") || iCol == grd_subjlist.colRef("reqrnm"))
  240. //신청 변경
  241. if( menuParam == "R" && orgStatus == "10" ){
  242. if( orgStatus == "20" ){
  243. messageBox ( "이미 작성완료 상태이므로 수정할 수", "I004" );
  244. return;
  245. }
  246. if( !isNull(reqNo) && reqrID == getUserId() ){
  247. //생성의뢰 취소 -> 미의뢰
  248. model.setValue(ref + "[" + iRow + "]/m", "U");
  249. model.setValue(ref + "[" + iRow + "]/statcd", "00");
  250. model.setValue(ref + "[" + iRow + "]/reqrid", "");
  251. model.setValue(ref + "[" + iRow + "]/reqrnm", "");
  252. model.setValue(ref + "[" + iRow + "]/reqdt", "");
  253. grd_subjlist.rowStatus(iRow) = 2; //수정
  254. return;
  255. //model.refresh();
  256. } else {
  257. messageBox ( "의뢰자가 틀려 생성의뢰 취소할 수", "I004" );
  258. return;
  259. }
  260. } else if( menuParam == "R" && orgStatus == "00"){
  261. messageBox ( "생성의뢰 취소할 수", "I004" );
  262. return;
  263. } else return;
  264. }
  265. // 20091229_노동우_작성완료 취소
  266. function fWriCancel() {
  267. var iRow = grd_subjlist.row;
  268. var writrID = model.getValue(ref + "[" + iRow + "]/writrid");
  269. var writrNm = model.getValue(ref + "[" + iRow + "]/writrnm");
  270. var writDt = model.getValue(ref + "[" + iRow + "]/writdt");
  271. var orgStatus = model.getValue(ref + "[" + iRow + "]/statcd");
  272. //신청 변경
  273. if( menuParam == "C" && orgStatus == "20" ){
  274. if( !isNull(writrID) && writrID == getUserId() ){
  275. // 작성완료 취소 -> 생성의뢰
  276. model.setValue(ref + "[" + iRow + "]/m", "U");
  277. model.setValue(ref + "[" + iRow + "]/statcd", "10");
  278. model.setValue(ref + "[" + iRow + "]/writrid", "");
  279. model.setValue(ref + "[" + iRow + "]/writrnm", "");
  280. model.setValue(ref + "[" + iRow + "]/writdt", "");
  281. grd_subjlist.rowStatus(iRow) = 2; //수정
  282. return;
  283. } else {
  284. messageBox ( "작성약사가 틀려 작서완료 취소할 수", "I004" );
  285. return;
  286. }
  287. } else if( menuParam == "C" && orgStatus == "10"){
  288. messageBox ( "작성완료 취소할 수", "I004" );
  289. return;
  290. } else return;
  291. }
  292. ]]>
  293. </script>
  294. </xhtml:head>
  295. <xhtml:body pagewidth="1211" pageheight="785" guideline="1,1194;2,757;2,786;">
  296. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">임상약품코드생성의뢰 관리</caption>
  297. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  298. <group id="group2" style="left:0px; top:10px; width:1194px; height:60px; vertical-align:top; ">
  299. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:59px; "/>
  300. <button id="btn_query" class="btn1_letter2" style="left:1120px; top:20px; width:56px; height:22px; ">
  301. <caption>조회</caption>
  302. <script type="javascript" ev:event="DOMActivate">
  303. <![CDATA[
  304. fGetSubjList();
  305. ]]>
  306. </script>
  307. </button>
  308. <line id="line2" class="line_4" style="x1:1104px; y1:9px; x2:1104px; y2:52px; "/>
  309. <caption id="caption1" class="search_name" style="left:15px; top:32px; width:91px; height:17px; ">과제번호 :</caption>
  310. <caption id="caption10" class="search_name" style="left:15px; top:10px; width:106px; height:17px; ">연구코드 :</caption>
  311. <caption id="caption3" class="search_name" style="left:313px; top:10px; width:148px; height:17px; ">의뢰일자 :</caption>
  312. <input id="input8" ref="/root/send/srchdata/srchstdyno" class="input_default" style="left:110px; top:9px; width:93px; height:19px; ">
  313. <script type="javascript" ev:event="onkeyup">
  314. <![CDATA[
  315. if ( event.keyCode == 13 ) {
  316. setInputNodeCurText();
  317. fGetSubjList();
  318. }
  319. ]]>
  320. </script>
  321. </input>
  322. <select1 id="radio1" ref="/root/send/srchdata/srchsubjflag" visibility="hidden" appearance="full" cols="3" overflow="visible" style="left:205px; top:32px; width:95px; height:20px; border-style:none; ">
  323. <choices>
  324. <item>
  325. <label>포함</label>
  326. <value>1</value>
  327. </item>
  328. <item>
  329. <label>일치</label>
  330. <value>2</value>
  331. </item>
  332. </choices>
  333. </select1>
  334. <select1 id="radio3" ref="/root/send/srchdata/srchstdyflag" visibility="hidden" appearance="full" cols="3" overflow="visible" style="left:205px; top:9px; width:95px; height:20px; border-style:none; ">
  335. <choices>
  336. <item>
  337. <label>포함</label>
  338. <value>1</value>
  339. </item>
  340. <item>
  341. <label>일치</label>
  342. <value>2</value>
  343. </item>
  344. </choices>
  345. </select1>
  346. <input id="input3" ref="/root/send/srchdata/srchsubjno" class="input_default" style="left:110px; top:33px; width:93px; height:19px; ">
  347. <script type="javascript" ev:event="onkeyup">
  348. <![CDATA[
  349. if ( event.keyCode == 13 ) {
  350. setInputNodeCurText();
  351. fGetSubjList();
  352. }
  353. ]]>
  354. </script>
  355. </input>
  356. <caption id="caption5" class="search_name" style="left:313px; top:35px; width:85px; height:17px; ">상 태 :</caption>
  357. <caption id="caption11" class="search_n_b" style="left:515px; top:11px; width:12px; height:17px; font-weight:bolder; ">~</caption>
  358. <input id="input2" ref="/root/send/srchdata/srchfromdd" class="input_s_essential" inputtype="date" style="left:410px; top:9px; width:100px; height:19px; "/>
  359. <input id="input6" ref="/root/send/srchdata/srchtodd" class="input_s_essential" inputtype="date" style="left:532px; top:9px; width:100px; height:19px; "/>
  360. <caption id="caption4" class="search_name" style="left:740px; top:10px; width:144px; height:17px; ">수가요청승인구분 :</caption>
  361. <select id="checkbox2" ref="/root/send/srchdata/srchcstatcd2" overflow="visible" appearance="full" cellspacing="10" cols="10" sep="," style="left:485px; top:33px; width:155px; height:20px; border-style:none; ">
  362. <choices>
  363. <item>
  364. <label>생성의뢰</label>
  365. <value>10</value>
  366. </item>
  367. <item>
  368. <label>작성완료</label>
  369. <value>20</value>
  370. </item>
  371. </choices>
  372. </select>
  373. <select id="checkbox3" ref="/root/send/srchdata/srchcstatcd1" overflow="visible" appearance="full" style="left:410px; top:33px; width:75px; height:20px; border-style:none; ">
  374. <choices>
  375. <item>
  376. <label>미의뢰</label>
  377. <value>00</value>
  378. </item>
  379. </choices>
  380. </select>
  381. <select id="chk_srchflag2" ref="/root/send/srchdata/srchflag2" overflow="visible" appearance="full" cellspacing="10" cols="3" sep="," style="left:885px; top:30px; width:200px; height:20px; border-style:none; ">
  382. <choices>
  383. <item>
  384. <label>미승인</label>
  385. <value>1</value>
  386. </item>
  387. <item>
  388. <label>승인중</label>
  389. <value>2</value>
  390. </item>
  391. <item>
  392. <label>승인완료</label>
  393. <value>3</value>
  394. </item>
  395. </choices>
  396. </select>
  397. <select id="chk_srchflag1" ref="/root/send/srchdata/srchflag1" overflow="visible" appearance="full" cols="2" sep="," style="left:885px; top:8px; width:140px; height:20px; border-style:none; ">
  398. <choices>
  399. <item>
  400. <label>수가신청</label>
  401. <value>Y</value>
  402. </item>
  403. <item>
  404. <label>미신청</label>
  405. <value>N</value>
  406. </item>
  407. </choices>
  408. <script type="javascript" ev:event="xforms-value-changed">
  409. <![CDATA[
  410. if( model.getValue("/root/send/srchdata/srchflag1") != "N" ) chk_srchflag2.disabled = false;
  411. else chk_srchflag2.disabled = true;
  412. ]]>
  413. </script>
  414. </select>
  415. </group>
  416. <line id="line6" class="line_3" style="x1:655px; y1:743px; x2:1194px; y2:743px; "/>
  417. <line id="line1" class="line_1" style="x1:0px; y1:94px; x2:1194px; y2:94px; "/>
  418. <button id="button5" class="btn2_letter4" style="left:1131px; top:74px; width:64px; height:19px; ">
  419. <caption>엑셀저장</caption>
  420. <script type="javascript" ev:event="DOMActivate">
  421. <![CDATA[
  422. //-------------(20091015)
  423. var fileName = window.fileDialog("save", ",", false, "임상약품코드생성의뢰 리스트", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  424. if (fileName != ""){
  425. grd_subjlist.saveExcel(fileName, "Sheet1", false, false, "", "", false);
  426. }
  427. //----------------
  428. ]]>
  429. </script>
  430. </button>
  431. <caption id="caption7" class="tit_2" style="left:5px; top:79px; width:147px; height:14px; ">임상약품코드생성의뢰</caption>
  432. <datagrid id="grd_subjlist" nodeset="/root/main/subjlist/item" class="datagrid2" caption="상태^과제번호^연구코드^품목명^시험약코드^연구제목^책임연구자^의뢰자(상호)^임상단계^원내외구분^연구예정기간^연구예정기간^IRB차수^승인일^계약일^종결일^과제ID^reqno^reqrid^의뢰자^의뢰일자^writrid^작성약사^작성완료일자^수가요청일^수가요청&#xA;승인상태^수가요청&#xA;승인일^비고^자료존재여부^m" colsep="^" colwidth="66, 95, 85, 100, 30, 110, 70, 90, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 65, 85, 20, 71, 88, 80, 80, 85, 145, 0, 30" ellipsis="true" explorerbar="sortshow" rowheader="update" rowsep="|" style="left:0px; top:99px; width:1195px; height:645px; ">
  433. <col disabled="true" ref="statcd" type="combo">
  434. <choices>
  435. <item>
  436. <label>생성의뢰</label>
  437. <value>10</value>
  438. </item>
  439. <item>
  440. <label>작성완료</label>
  441. <value>20</value>
  442. </item>
  443. <item>
  444. <label>미의뢰</label>
  445. <value>00</value>
  446. </item>
  447. </choices>
  448. </col>
  449. <col ref="subjno" style="left:66px; top:23px; width:95px; height:23px; "/>
  450. <col ref="stdyno"/>
  451. <col ref="itemnm"/>
  452. <col ref="drugcd" visibility="hidden"/>
  453. <col ref="stdysubjnm"/>
  454. <col ref="respstdynm"/>
  455. <col ref="reqnm"/>
  456. <col disabled="true" ref="clincflag" type="combo" visibility="hidden">
  457. <choices>
  458. <item>
  459. <label>허가1</label>
  460. <value>1</value>
  461. </item>
  462. <item>
  463. <label>허가2</label>
  464. <value>2</value>
  465. </item>
  466. <item>
  467. <label>허가3</label>
  468. <value>3</value>
  469. </item>
  470. <item>
  471. <label>연구용</label>
  472. <value>4</value>
  473. </item>
  474. </choices>
  475. </col>
  476. <col disabled="true" ref="ioflag" type="combo" visibility="hidden">
  477. <choices>
  478. <item>
  479. <label>원내</label>
  480. <value>I</value>
  481. </item>
  482. <item>
  483. <label>원외</label>
  484. <value>O</value>
  485. </item>
  486. </choices>
  487. </col>
  488. <col ref="stdytermfrom" visibility="hidden" format="yyyy-mm-dd"/>
  489. <col ref="stdytermto" visibility="hidden" format="yyyy-mm-dd"/>
  490. <col ref="judgdg" visibility="hidden" style="text-align:center; "/>
  491. <col ref="irbjudglistdd" visibility="hidden" format="yyyy-mm-dd"/>
  492. <col ref="conpaperconacptdd" visibility="hidden" format="yyyy-mm-dd"/>
  493. <col ref="subjenddd" visibility="hidden" format="yyyy-mm-dd"/>
  494. <col ref="subjid" visibility="hidden"/>
  495. <col ref="reqno" visibility="hidden"/>
  496. <col ref="reqrid" visibility="hidden"/>
  497. <col ref="reqrnm"/>
  498. <col ref="reqdt" type="inputdate" format="yyyy-mm-dd"/>
  499. <col ref="writrid" visibility="hidden"/>
  500. <col ref="writrnm"/>
  501. <col ref="writdt" type="inputdate" format="yyyy-mm-dd"/>
  502. <col ref="calcscorreqdt" format="yyyy-mm-dd"/>
  503. <col disabled="true" ref="calcscorrgststat" type="combo">
  504. <choices>
  505. <item>
  506. <label>미승인</label>
  507. <value>1</value>
  508. </item>
  509. <item>
  510. <label>승인중</label>
  511. <value>2</value>
  512. </item>
  513. <item>
  514. <label>승인완료</label>
  515. <value>3</value>
  516. </item>
  517. </choices>
  518. </col>
  519. <col ref="calcscorrgstdt" format="yyyy-mm-dd"/>
  520. <col ref="cmtcnts"/>
  521. <col ref="datayn" visibility="hidden"/>
  522. <col ref="m" visibility="hidden"/>
  523. <script type="javascript" ev:event="ondblclick">
  524. <![CDATA[
  525. var iRow = grd_subjlist.row - grd_subjlist.fixedRows + 1;
  526. var iCol = grd_subjlist.col;
  527. if( iRow > 0 && iRow <= grd_subjlist.rows ){
  528. var reqNo = model.getValue(ref + "[" + iRow + "]/reqno"); //key
  529. var reqrID = model.getValue(ref + "[" + iRow + "]/reqrid");
  530. var reqrNm = model.getValue(ref + "[" + iRow + "]/reqrnm");
  531. var reqDt = model.getValue(ref + "[" + iRow + "]/reqdt");
  532. var writrID = model.getValue(ref + "[" + iRow + "]/writrid");
  533. var writrNm = model.getValue(ref + "[" + iRow + "]/writrnm");
  534. var writDt = model.getValue(ref + "[" + iRow + "]/writdt");
  535. var orgStatus = model.getValue(ref + "[" + iRow + "]/statcd");
  536. //신청 변경
  537. if( menuParam == "R" && (iCol == grd_subjlist.colRef("reqdt") || iCol == grd_subjlist.colRef("reqrnm")) ){
  538. if( orgStatus == "20" ){
  539. messageBox ( "이미 작성완료 상태이므로 수정할 수", "I004" );
  540. return;
  541. }
  542. if( isNull(reqNo) ){
  543. model.setValue(ref + "[" + iRow + "]/m", "I");
  544. model.setValue(ref + "[" + iRow + "]/statcd", "10");
  545. model.setValue(ref + "[" + iRow + "]/reqrid", getUserId());
  546. model.setValue(ref + "[" + iRow + "]/reqrnm", getUserName());
  547. model.setValue(ref + "[" + iRow + "]/reqdt", getCurrentDate());
  548. grd_subjlist.rowStatus(iRow) = 2;
  549. } else if(reqrID == "-" && orgStatus == "00" ) {
  550. model.setValue(ref + "[" + iRow + "]/statcd", "10");
  551. model.setValue("/root/main/subjlist/item[" + iRow + "]/m", "U");
  552. model.setValue(ref + "[" + iRow + "]/reqrid", getUserId());
  553. model.setValue(ref + "[" + iRow + "]/reqrnm", getUserName());
  554. model.setValue(ref + "[" + iRow + "]/reqdt", getCurrentDate());
  555. grd_subjlist.rowStatus(iRow) = 2;
  556. } else return;
  557. }else if( menuParam == "C" && (iCol == grd_subjlist.colRef("writdt") || iCol == grd_subjlist.colRef("writrnm")) ){
  558. if( orgStatus == "00" ){
  559. messageBox ( "미의뢰 상태이므로 수정할 수", "I004" );
  560. grd_subjlist.endEditCell(); // (20091015)
  561. return;
  562. }
  563. if(!isNull(reqrID) && reqrID != "-" && orgStatus == "10") {
  564. model.setValue(ref + "[" + iRow + "]/statcd", "20");
  565. model.setValue("/root/main/subjlist/item[" + iRow + "]/m", "U");
  566. model.setValue(ref + "[" + iRow + "]/writrid", getUserId());
  567. model.setValue(ref + "[" + iRow + "]/writrnm", getUserName());
  568. model.setValue(ref + "[" + iRow + "]/writdt", getCurrentDate());
  569. grd_subjlist.rowStatus(iRow) = 2;
  570. } else if( isNull(reqrID) || reqrID == "-") {
  571. messageBox ( "의뢰자가", "I004" );
  572. return;
  573. }
  574. }else{
  575. return;
  576. }
  577. }
  578. ]]>
  579. </script>
  580. <!-- <script type="javascript" ev:event="onbuttonclick">
  581. <![CDATA[
  582. // 20091128_노동우_로그인한 사용자만 의뢰자, 작성자에 이름 넣을수 있게.
  583. //fGetUserInfo();
  584. ]]>
  585. </script>-->
  586. <script type="javascript" ev:event="xforms-value-changed">
  587. <![CDATA[
  588. // 20091229_노동우_날짜 변경
  589. var iRow = grd_subjlist.row - grd_subjlist.fixedRows + 1;
  590. var iCol = grd_subjlist.col;
  591. if( iRow > 0 && iRow <= grd_subjlist.rows ){
  592. var reqNo = model.getValue(ref + "[" + iRow + "]/reqno"); //key
  593. var reqrID = model.getValue(ref + "[" + iRow + "]/reqrid");
  594. var reqrNm = model.getValue(ref + "[" + iRow + "]/reqrnm");
  595. var reqDt = model.getValue(ref + "[" + iRow + "]/reqdt");
  596. var writrID = model.getValue(ref + "[" + iRow + "]/writrid");
  597. var writrNm = model.getValue(ref + "[" + iRow + "]/writrnm");
  598. var writDt = model.getValue(ref + "[" + iRow + "]/writdt");
  599. var orgStatus = model.getValue(ref + "[" + iRow + "]/statcd");
  600. //신청 변경
  601. if( menuParam == "R" && (iCol == grd_subjlist.colRef("reqdt") || iCol == grd_subjlist.colRef("reqrnm")) ){
  602. if( orgStatus == "20" ){
  603. messageBox( "이미 작성완료 상태이므로 수정할 수", "I004" );
  604. return;
  605. }
  606. if( isNull(reqNo) && isNull(reqrID) ){
  607. messageBox("의뢰자를","C001" );
  608. return;
  609. }else if( !isNull(reqNo) && reqDt.substr(0,8) != getCurrentDate() && reqrID == getUserId()){
  610. model.setValue(ref + "[" + iRow + "]/m", "U");
  611. model.setValue(ref + "[" + iRow + "]/reqrid", getUserId());
  612. model.setValue(ref + "[" + iRow + "]/reqrnm", getUserName());
  613. model.setValue(ref + "[" + iRow + "]/reqdt", reqDt.substr(0,8));
  614. return;
  615. } else if( !isNull(reqNo) && reqDt.substr(0,8) != getCurrentDate() && reqrID == '-'){
  616. messageBox("의뢰자를","C001" );
  617. return;
  618. } else if( !isNull(reqNo) && reqDt.substr(0,8) != getCurrentDate() && reqrID != getUserId() ) {
  619. messageBox("의뢰자가 틀려 날짜를 변경할 수" , "I004");
  620. grd_subjlist.rowStatus(iRow) = 0;
  621. return;
  622. } else return;
  623. }else if( menuParam == "C" && (iCol == grd_subjlist.colRef("writdt") || iCol == grd_subjlist.colRef("writrnm")) ){
  624. if( orgStatus == "00" ){
  625. messageBox("미의뢰 상태이므로 수정할 수", "I004" );
  626. grd_subjlist.endEditCell(); // (20091015)
  627. return;
  628. }
  629. if(!isNull(writrID) && writDt.substr(0,8) != getCurrentDate() && writrID == getUserId() ) {
  630. model.setValue("/root/main/subjlist/item[" + iRow + "]/m", "U");
  631. model.setValue(ref + "[" + iRow + "]/writrid", getUserId());
  632. model.setValue(ref + "[" + iRow + "]/writrnm", getUserName());
  633. model.setValue(ref + "[" + iRow + "]/writdt", writDt.substr(0,8));
  634. grd_subjlist.rowStatus(iRow) = 2;
  635. return;
  636. } else if( !isNull(writrID) && writDt.substr(0,8) != getCurrentDate() && writrID == '-'){
  637. messageBox("작성약사를","C001" );
  638. return;
  639. } else if( !isNull(writrID) && writDt.substr(0,8) != getCurrentDate() && writrID != getUserId() ) {
  640. messageBox("작성약사가 틀려 날짜를 변경할 수" , "I004");
  641. grd_subjlist.rowStatus(iRow) = 0;
  642. return;
  643. } else return;
  644. }else{
  645. return;
  646. }
  647. }
  648. ]]>
  649. </script>
  650. <script type="javascript" ev:event="onaftersort">
  651. <![CDATA[
  652. grd_subjlist.gridToInstance();
  653. ]]>
  654. </script>
  655. <script type="javascript" ev:event="onmousedown">
  656. <![CDATA[
  657. if( event.button == 3 )
  658. setPopupMenu("grd_subjlist", false, "/root/temp/popupmenu/item", "label", "func");
  659. ]]>
  660. </script>
  661. <script type="javascript" ev:event="DOMFocusOut">
  662. <![CDATA[
  663. initPopupMenu();
  664. ]]>
  665. </script>
  666. </datagrid>
  667. <button id="btn_save" class="btn4_letter4" navindex="31" style="left:1045px; top:72px; width:80px; height:22px; ">
  668. <caption>저장</caption>
  669. <script type="javascript" ev:event="DOMActivate">
  670. <![CDATA[
  671. //--------------------------------
  672. //-----------------(20091015)
  673. var sUserId = getUserId();
  674. var sUserNm = getUserName();
  675. //var sDate = getCurrentDate();
  676. var sflag = "";
  677. var sGrid = grd_subjlist;
  678. var ref = "/root/main/subjlist/item";
  679. if (sGrid.rows <=1) {
  680. messageBox("자료가 존재하지 않습니다.","I9999");
  681. model.setFocus("btn_query");
  682. return;
  683. }
  684. if (menuParam =="R") {
  685. // 메뉴가 'R' 인경우는 '의뢰관리로 호출된것으로
  686. // 자동설정시 '미의뢰'를 ''생성의뢰'로 변경하고 '저장하면 저장되도록 한다.
  687. for(iRow = 1; iRow <= getNodesetCount(ref); iRow++ ) {
  688. var sStatcd = model.getValue(ref + "["+ iRow +"]/statcd");
  689. if (sStatcd == "10") { //생성의뢰이면
  690. if ( model.getValue(ref + "[" + iRow + "]/m") == "I") {
  691. if (model.getValue(ref + "[" + iRow + "]/reqrnm") == "") {
  692. model.setValue(ref + "[" + iRow + "]/m", "");
  693. sGrid.rowStatus(iRow) = 0;
  694. messageBox("과제번호(" + model.getValue(ref + "[" + iRow + "]/subjno") + ")는 의뢰자정보가 없어 저장되지 않습니다","I9999");
  695. }
  696. }
  697. }
  698. }
  699. model.refresh();
  700. } else {
  701. // 메뉴가 'R'가 아닌경우는 '확인관리로 호출된것으로
  702. // 자동설정시 '생성의뢰'를 ''작성완료'로 변경하고 '저장하면 저장되도록 한다.
  703. for(iRow = 1; iRow <= getNodesetCount(ref); iRow++ ) {
  704. var sStatcd = model.getValue(ref + "["+ iRow +"]/statcd");
  705. if (sStatcd == "20") { //작성완료
  706. if ( model.getValue(ref + "[" + iRow + "]/m") == "U") {
  707. //alert(iRow + "/" + model.getValue(ref + "[" + iRow + "]/writrnm"));
  708. if (model.getValue(ref + "[" + iRow + "]/writrnm") == "") {
  709. model.setValue(ref + "[" + iRow + "]/m", "");
  710. sGrid.rowStatus(iRow) = 0;
  711. messageBox("과제번호(" + model.getValue(ref + "[" + iRow + "]/subjno") + ")는 작성자정보가 없어 저장되지 않습니다","I9999");
  712. }
  713. }
  714. }
  715. }
  716. model.refresh();
  717. }
  718. //-------------------
  719. //--------------------------------
  720. copyNodeListType("/root/send/savedata", "/root/main/subjlist/item[m!='']", "replace", model, model);
  721. submit("TXATB00601", true);
  722. ]]>
  723. </script>
  724. </button>
  725. <button id="btn_autoN" class="btn4_letter4" navindex="31" style="left:963px; top:71px; width:80px; height:22px; ">
  726. <caption>자동해제</caption>
  727. <script type="javascript" ev:event="DOMActivate">
  728. <![CDATA[
  729. //-----------------(20091015)
  730. var sUserId = getUserId();
  731. var sUserNm = getUserName();
  732. var sDate = getCurrentDate();
  733. var sGrid = grd_subjlist;
  734. var ref = "/root/main/subjlist/item";
  735. var sflag = "";
  736. if (sGrid.rows <=1) {
  737. messageBox("자료가 존재하지 않습니다.","I9999");
  738. model.setFocus("btn_query");
  739. return;
  740. }
  741. //alert(menuParam+ "/" + getNodesetCount(ref));
  742. if (menuParam =="R") {
  743. // 메뉴가 'R' 인경우는 '의뢰관리로 호출된것으로
  744. // 자동해제시 신규자료중 '생성의뢰'을 '미의뢰'로 변경하고 '저장하면 저장되도록 한다.
  745. sflag = "N";
  746. for(iRow = 1; iRow <= getNodesetCount(ref); iRow++ ) {
  747. var sStatcd = model.getValue(ref + "["+ iRow +"]/statcd");
  748. //alert(iRow);
  749. if (sStatcd == "10") { //생성의뢰
  750. model.setValue(ref + "[" + iRow + "]/reqrid", "");
  751. model.setValue(ref + "[" + iRow + "]/reqrnm", "");
  752. model.setValue(ref + "[" + iRow + "]/reqdt", "");
  753. model.setValue(ref + "[" + iRow + "]/statcd", "00");
  754. //-----------------(20091015_20091101)
  755. //if (model.getValue(ref + "[" + iRow + "]/m") == 'I') { //신규이면
  756. //alert(model.getValue(ref + "["+ iRow +"]/datayn"));
  757. if ( model.getValue(ref + "["+ iRow +"]/datayn") != "Y" ) {
  758. model.setValue(ref + "[" + iRow + "]/m", "");
  759. sGrid.rowStatus(iRow)=0 ; //초기화
  760. } else {
  761. model.setValue(ref + "[" + iRow + "]/m", "U");
  762. sGrid.rowStatus(iRow)=2 ;
  763. }
  764. //-----------------(20091015_20091101)
  765. sflag = "Y";
  766. }
  767. }
  768. if (sflag == "Y") {
  769. messageBox("자동해제했습니다.","I9999");
  770. } else {
  771. messageBox("자동해제대상이 없습니다.","I9999");
  772. }
  773. model.refresh();
  774. } else {
  775. // 메뉴가 'R'가 아닌경우는 '확인관리로 호출된것으로
  776. // 자동설정시 '생성의뢰'를 ''작성완료'로 변경하고 '저장하면 저장되도록 한다.
  777. sflag = "N";
  778. for(iRow = 1; iRow <= getNodesetCount(ref); iRow++ ) {
  779. var sStatcd = model.getValue(ref + "["+ iRow +"]/statcd");
  780. //alert(iRow);
  781. if (sStatcd == "20") { //신규이면서 생성의뢰이면
  782. model.setValue(ref + "[" + iRow + "]/writrid", "");
  783. model.setValue(ref + "[" + iRow + "]/writrnm", "");
  784. model.setValue(ref + "[" + iRow + "]/writdt", "");
  785. model.setValue(ref + "[" + iRow + "]/statcd", "10");
  786. model.setValue(ref + "[" + iRow + "]/m", "U");
  787. sGrid.rowStatus(iRow)=2 ;
  788. sflag = "Y";
  789. }
  790. }
  791. if (sflag == "Y") {
  792. messageBox("자동해제했습니다.","I9999");
  793. } else {
  794. messageBox("자동해제대상이 없습니다.","I9999");
  795. }
  796. model.refresh();
  797. }
  798. //-------------------
  799. ]]>
  800. </script>
  801. </button>
  802. <button id="btn_autoY" class="btn4_letter4" navindex="31" style="left:883px; top:71px; width:80px; height:22px; ">
  803. <caption>자동설정</caption>
  804. <script type="javascript" ev:event="DOMActivate">
  805. <![CDATA[
  806. //-----------------(20091015)
  807. var sUserId = getUserId();
  808. var sUserNm = getUserName();
  809. var sDate = getCurrentDate();
  810. var sflag = "";
  811. var sGrid = grd_subjlist;
  812. var ref = "/root/main/subjlist/item";
  813. if (sGrid.rows <=1) {
  814. messageBox("자료가 존재하지 않습니다.","I9999");
  815. model.setFocus("btn_query");
  816. return;
  817. }
  818. if (menuParam =="R") {
  819. // 메뉴가 'R' 인경우는 '의뢰관리로 호출된것으로
  820. // 자동설정시 '미의뢰'를 ''생성의뢰'로 변경하고 '저장하면 저장되도록 한다.
  821. sflag = "N";
  822. for(iRow = 1; iRow <= getNodesetCount(ref); iRow++ ) {
  823. var sStatcd = model.getValue(ref + "["+ iRow +"]/statcd");
  824. if (sStatcd == "00") { //미의뢰이면
  825. model.setValue(ref + "[" + iRow + "]/reqrid", sUserId);
  826. model.setValue(ref + "[" + iRow + "]/reqrnm", sUserNm);
  827. model.setValue(ref + "[" + iRow + "]/reqdt", sDate);
  828. model.setValue(ref + "[" + iRow + "]/statcd", "10");
  829. if ( model.getValue(ref + "["+ iRow +"]/datayn") == "Y" ) {
  830. model.setValue(ref + "[" + iRow + "]/m", "U");
  831. sGrid.rowStatus(iRow) = 2; //수정
  832. } else {
  833. model.setValue(ref + "[" + iRow + "]/m", "I");
  834. sGrid.rowStatus(iRow) = 1; //신규
  835. }
  836. sflag = "Y";
  837. }
  838. }
  839. if (sflag == "Y") {
  840. messageBox("자동설정했습니다.","I9999");
  841. } else {
  842. messageBox("자동설정대상이 없습니다.","I9999");
  843. }
  844. model.refresh();
  845. } else {
  846. // 메뉴가 'R'가 아닌경우는 '확인관리로 호출된것으로
  847. // 자동설정시 '생성의뢰'를 ''작성완료'로 변경하고 '저장하면 저장되도록 한다.
  848. sflag = "N";
  849. for(iRow = 1; iRow <= getNodesetCount(ref); iRow++ ) {
  850. var sStatcd = model.getValue(ref + "["+ iRow +"]/statcd");
  851. if (sStatcd == "10") { //생성의뢰이면
  852. model.setValue(ref + "[" + iRow + "]/writrid", sUserId);
  853. model.setValue(ref + "[" + iRow + "]/writrnm", sUserNm);
  854. model.setValue(ref + "[" + iRow + "]/writdt", sDate);
  855. model.setValue(ref + "[" + iRow + "]/statcd", "20");
  856. model.setValue(ref + "[" + iRow + "]/m", "U");
  857. sGrid.rowStatus(iRow) = 2; //수정
  858. sflag = "Y";
  859. }
  860. }
  861. if (sflag == "Y") {
  862. messageBox("자동설정했습니다.","I9999");
  863. } else {
  864. messageBox("자동설정대상이 없습니다.","I9999");
  865. }
  866. model.refresh();
  867. }
  868. //-------------------
  869. ]]>
  870. </script>
  871. </button>
  872. </group>
  873. <group id="grp_btn" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  874. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  875. <!--
  876. <button id="btn_save" class="btn4_letter4" navindex="31" style="left:1043px; top:5px; width:80px; height:22px; ">
  877. <caption>저장</caption>
  878. <script type="javascript" ev:event="DOMActivate">
  879. <![CDATA[
  880. copyNodeListType("/root/send/savedata", "/root/main/subjlist/item[m!='']", "replace", model, model);
  881. return;
  882. submit("TXATB00601", true);
  883. ]]>
  884. </script>
  885. </button>
  886. -->
  887. <button id="button2" class="btn4_letter3" navindex="31" visibility="hidden" style="left:1125px; top:5px; width:68px; height:22px; ">
  888. <caption>초기화</caption>
  889. <script type="javascript" ev:event="DOMActivate">
  890. <![CDATA[
  891. ]]>
  892. </script>
  893. </button>
  894. </group>
  895. </xhtml:body>
  896. </xhtml:html>