SMATR00400_반환요청.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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. <adbmcrtn>
  11. <item>
  12. <subjno/>
  13. <stdyno/>
  14. <prcpno/>
  15. <prcphistno/>
  16. <itemnm/>
  17. <screenno/>
  18. <subtesteephosid/>
  19. <subtesteephosnm/>
  20. <srchpid/>
  21. <hngnm/>
  22. <prcpdd/>
  23. <drugcd/>
  24. <orddrid/>
  25. <orddrnm/>
  26. <prcpvol/>
  27. <prcpvolunitnm/>
  28. <prcpqty/>
  29. <prcpqtyunitnm/>
  30. <prcptims/>
  31. <prcpdayno/>
  32. <drugmthdspccd/>
  33. <rtndd/>
  34. <rtnsavedt/>
  35. <rtnrid/>
  36. <rtnnm/>
  37. <cmtcnts/>
  38. <state/>
  39. </item>
  40. </adbmcrtn>
  41. <cond>
  42. <subjno/>
  43. <srchstdyno/>
  44. <subjnoflag>1</subjnoflag>
  45. <stdynoflag>1</stdynoflag>
  46. <srchrtnyn>Y</srchrtnyn>
  47. <srchpid/>
  48. <srchfromdd/>
  49. <srchtodd/>
  50. </cond>
  51. <userpopupinfo/>
  52. <tempuserinfo/>
  53. </main>
  54. <send>
  55. <adbmcrtn/>
  56. </send>
  57. <init>
  58. </init>
  59. <hidden>
  60. </hidden>
  61. </root>
  62. </instance>
  63. <script type="javascript" ev:event="xforms-ready">
  64. <![CDATA[
  65. var addDate=new Date();
  66. var curdate = getCurrentDate().toDate("YYYYMMDD").getAddDate(-1, "M");
  67. //model.setValue("/root/main/cond/srchfromdd", curdate.getDateFormat("YYYYMMDD") ); // 날짜 초기값 세팅
  68. model.setValue("/root/main/cond/srchfromdd", getCurrentDate() ); // 날짜 초기값 세팅
  69. model.setValue("/root/main/cond/srchtodd", getCurrentDate());
  70. model.removeNodeset("/root/main/adbmcrtn/item"); // 첫 row 를 제거한다.
  71. model.refresh();
  72. ]]>
  73. </script>
  74. <submission id="TRATR00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/adbmcrtn"/>
  75. <submission id="TXATR00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/adbmcrtn"/>
  76. <script type="javascript" ev:event="xforms-ready">
  77. <![CDATA[
  78. radio3.selected = true;
  79. radio1.selected = true;
  80. ]]>
  81. </script>
  82. </model>
  83. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  84. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  85. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  86. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  87. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  88. <script type="javascript">
  89. <![CDATA[
  90. //사용자 팝업 호출 및 사용자 정보 return
  91. function fGetUserInfo() {
  92. var ref = "/root/main/adbmcrtn/item";
  93. var iRow = grd_mthdlist.row - grd_mthdlist.fixedRows + 1;
  94. var iCol = grd_mthdlist.col;
  95. if( iRow > 0 && iRow <= grd_mthdlist.rows ){
  96. if (iCol == grd_mthdlist.colRef("rtnnm")) {
  97. var srchTxt = model.getValue(ref + "[" + iRow + "]/rtnnm");
  98. var rtndt = model.getValue(ref + "[" + iRow + "]/rtndt");
  99. model.resetInstanceNode("/root/main/userpopupinfo");
  100. model.resetInstanceNode("/root/main/tempuserinfo");
  101. model.removeNodeset("/root/main/tempuserinfo/list"); //누락하면 다음에 사용자팝업에서 리턴 안됨
  102. model.makeValue("/root/main/userpopupinfo/param", "_OneS");
  103. model.makeValue("/root/main/userpopupinfo/flag", "usernm");
  104. model.makeValue("/root/main/userpopupinfo/searchitem", srchTxt );
  105. modal("../../userdeptinfoweb/xrw/SPZSU10103", "", "200", "200", "SPZSU10103","/root/main/userpopupinfo","/root/main/temp");
  106. var iParam = getParameter("SPZSU10103_");
  107. if( !isNull(iParam) ){
  108. setCSVToNode("/root/main/tempuserinfo", iParam, "list"); //return 받은 데이터
  109. var id = model.getValue("/root/main/tempuserinfo/list[1]/userid");
  110. var nm = model.getValue("/root/main/tempuserinfo/list[1]/usernm");
  111. model.setValue(ref + "[" + iRow + "]/rtnrid", id);
  112. model.setValue(ref + "[" + iRow + "]/rtnnm", nm);
  113. if(isNull(rtndt)) model.setValue(ref + "[" + iRow + "]/rtnsavedt", getCurrentDate());
  114. if(isNull(rtndt)) model.setValue(ref + "[" + iRow + "]/rtndd", getCurrentDate());
  115. fnsaveflag( iRow);
  116. model.refresh();
  117. }
  118. clearParameter("SPZSU10103_");
  119. }
  120. }
  121. }
  122. //저장flag
  123. function fnsaveflag( iRow) {
  124. if ( model.getValue("/root/main/adbmcrtn/item["+ iRow+"]/state") == "1" ){
  125. grd_mthdlist.rowStatus(iRow) = 1;
  126. //alert("신규");
  127. //model.setValue("/root/main/adbmcrtn/item["+ iRow+"]/state", "1"); //신규
  128. }else{
  129. grd_mthdlist.rowStatus(iRow) = 2;
  130. //alert("수정");
  131. //model.setValue("/root/main/adbmcrtn/item["+ iRow+"]/state", "2"); //업데이트
  132. }
  133. }
  134. ]]>
  135. </script>
  136. </xhtml:head>
  137. <xhtml:body guideline="1,2123;1,2102;1,2109;1,2082;1,6;1,2078;1,2123;1,2112;1,2109;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  138. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  139. <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:145px; height:14px; ">반환약등록</caption>
  140. </group>
  141. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1194px; height:744px; ">
  142. <group id="group2" style="left:0px; top:5px; width:1194px; height:55px; ">
  143. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:1px; width:1194px; height:47px; background-color:#fffbf2; border-color:#ffd799; "/>
  144. <line id="line13" class="line_4" style="x1:1080px; y1:10px; x2:1080px; y2:35px; border-color:#ffe4bb; border-left-style:solid; "/>
  145. <button id="btn_seamthd" class="btn1_letter2" style="left:1110px; top:13px; width:56px; height:22px; ">
  146. <caption>조회</caption>
  147. <script type="javascript" ev:event="DOMActivate">
  148. <![CDATA[
  149. if (model.getValue("/root/main/cond/srchfromdd") =="") {
  150. messageBox("처방일자(from) ","C001");
  151. model.setFocus("ipt_prcpddfr");
  152. return;
  153. }
  154. if (model.getValue("/root/main/cond/srchtodd") =="") {
  155. messageBox("처방일자(to) ","C001");
  156. model.setFocus("ipt_prcpddto");
  157. return;
  158. }
  159. model.copyNode("/root/send", "/root/main/cond");
  160. submit("TRATR00401");
  161. ]]>
  162. </script>
  163. </button>
  164. <input id="input8" ref="/root/main/cond/subjno" class="input_default" style="left:110px; top:6px; width:93px; height:19px; "/>
  165. <caption id="caption10" class="search_name" style="left:15px; top:6px; width:112px; height:17px; ">과제번호 :</caption>
  166. <caption id="caption1" class="search_name" style="left:15px; top:26px; width:91px; height:17px; ">연구코드 :</caption>
  167. <select1 id="radio1" ref="/root/main/cond/stdynoflag" appearance="full" cols="3" overflow="visible" style="left:205px; top:26px; width:95px; height:25px; border-style:none; ">
  168. <choices>
  169. <item>
  170. <label>포함</label>
  171. <value>1</value>
  172. </item>
  173. <item>
  174. <label>일치</label>
  175. <value>2</value>
  176. </item>
  177. </choices>
  178. </select1>
  179. <select1 id="radio3" ref="/root/main/cond/subjnoflag" appearance="full" cols="3" overflow="visible" style="left:205px; top:6px; width:95px; height:25px; border-style:none; ">
  180. <choices>
  181. <item>
  182. <label>포함</label>
  183. <value>1</value>
  184. </item>
  185. <item>
  186. <label>일치</label>
  187. <value>2</value>
  188. </item>
  189. </choices>
  190. </select1>
  191. <input id="input3" ref="/root/main/cond/srchstdyno" class="input_default" style="left:110px; top:27px; width:93px; height:19px; "/>
  192. <caption id="caption2" class="search_name" style="left:330px; top:15px; width:112px; height:17px; ">반환여부 :</caption>
  193. <caption id="caption4" class="search_name" style="left:543px; top:15px; width:112px; height:17px; ">등록번호 :</caption>
  194. <input id="input2" ref="/root/main/cond/srchpid" class="input_default" style="left:638px; top:15px; width:93px; height:19px; "/>
  195. <select1 id="combo1" ref="/root/main/cond/srchrtnyn" appearance="minimal" style="left:417px; top:14px; width:40px; height:19px; ">
  196. <choices>
  197. <item>
  198. <label>Y</label>
  199. <value>Y</value>
  200. </item>
  201. <item>
  202. <label>N</label>
  203. <value>N</value>
  204. </item>
  205. </choices>
  206. </select1>
  207. </group>
  208. <button id="btn_excsave" class="btn2_letter2" style="left:1150px; top:55px; width:42px; height:19px; ">
  209. <caption>엑셀</caption>
  210. <script type="javascript" ev:event="DOMActivate">
  211. <![CDATA[
  212. var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
  213. grd_mthdlist.saveExcel(file);
  214. ]]>
  215. </script>
  216. </button>
  217. <datagrid id="grd_mthdlist" nodeset="/root/main/adbmcrtn/item" backcoloralternate="#f0f0f0" caption="과제번호^연구코드^품목명^screen no^피험자 id^피험자 initial^등록번호^성명^처방일자^처방의^처방의명^약품코드^용량^단위^수량^단위^횟수^일수^용법^반환일^반환입력일^반납자^비고^상태1^상태2^반납자ID" colsep="^" colwidth="98, 70, 257, 67, 57, 76, 64, 58, 76, 57, 76, 69, 40, 40, 40, 40, 40, 40, 40, 94, 84, 87, 100, 0,85, 100, 100, 0" explorerbar="sortshow" extendlastcol="scroll" frozencols="10" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:76px; width:1194px; height:644px; margin-left:0; margin-right:0; ">
  218. <col ref="subjno" type="output"/>
  219. <col ref="stdyno" type="output"/>
  220. <col ref="itemnm" type="output" style="left:198px; top:23px; width:204px; height:23px; "/>
  221. <col ref="screenno" type="output"/>
  222. <col ref="subtesteephosid" type="output"/>
  223. <col ref="subtesteephosnm" type="output"/>
  224. <col ref="srchpid" type="output"/>
  225. <col ref="hngnm" type="output"/>
  226. <col ref="prcpdd" type="output" format="yyyy-mm-dd"/>
  227. <col ref="orddrid" type="output"/>
  228. <col ref="orddrnm" type="output"/>
  229. <col ref="drugcd" type="output"/>
  230. <col ref="prcpvol" type="output" style="text-align:right; "/>
  231. <col ref="prcpvolunitnm" type="output" style="text-align:right; "/>
  232. <col ref="prcpqty" type="output" style="text-align:right; "/>
  233. <col ref="prcpqtyunitnm" type="output" style="text-align:right; "/>
  234. <col ref="prcptims" type="output" style="text-align:right; "/>
  235. <col ref="prcpdayno" type="output" style="text-align:right; "/>
  236. <col ref="drugmthdspccd" type="output" visibility="hidden"/>
  237. <col ref="rtndd" type="inputdate" style="text-align:center; "/>
  238. <col ref="rtnsavedt" type="output" visibility="hidden"/>
  239. <col ref="rtnnm" type="inputbutton"/>
  240. <col ref="cmtcnts" type="input"/>
  241. <col ref="state" type="output" visibility="hidden"/>
  242. <col ref="prcphistno" type="output" visibility="hidden"/>
  243. <col ref="prcpno" type="output" visibility="hidden"/>
  244. <col ref="rtnrid" visibility="hidden"/>
  245. <script type="javascript" ev:event="xforms-value-changed">
  246. <![CDATA[
  247. var iRow = grd_mthdlist.row;
  248. if( grd_mthdlist.row > 0 && grd_mthdlist.row <= grd_mthdlist.rows ){
  249. fnsaveflag(grd_mthdlist.row );
  250. }
  251. ]]>
  252. </script>
  253. <!-- (20091120) -->
  254. <script type="javascript" ev:event="onbuttonclick">
  255. <![CDATA[
  256. fGetUserInfo();
  257. ]]>
  258. </script>
  259. <script type="javascript" ev:event="onendedit">
  260. <![CDATA[
  261. var iRow = grd_mthdlist.row - grd_mthdlist.fixedRows + 1;
  262. var iCol = grd_mthdlist.col;
  263. if( iRow > 0 && iRow <= grd_mthdlist.rows ){
  264. if(event.keyCode == "13") {
  265. fGetUserInfo();
  266. }
  267. }
  268. ]]>
  269. </script>
  270. <!-- (20091120) -->
  271. </datagrid>
  272. </group>
  273. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1194px; height:27px; ">
  274. <button id="button1" class="btn4_letter2" style="left:1135px; top:5px; width:56px; height:22px; ">
  275. <caption>저장</caption>
  276. <script type="javascript" ev:event="DOMActivate">
  277. <![CDATA[
  278. var update = grd_mthdlist.getUpdateData();
  279. model.makeValue("/root/send/save", update);
  280. if(submit("TXATR00401")){
  281. model.copyNode("/root/send", "/root/main/cond");
  282. submit("TRATR00401");
  283. }
  284. ]]>
  285. </script>
  286. </button>
  287. </group>
  288. <caption id="caption3" class="search_name" style="left:753px; top:60px; width:148px; height:17px; ">처방일자 :</caption>
  289. <input id="ipt_prcpddfr" ref="/root/main/cond/srchfromdd" class="input_s_essential" inputtype="date" style="left:850px; top:59px; width:100px; height:19px; "/>
  290. <input id="ipt_prcpddto" ref="/root/main/cond/srchtodd" class="input_s_essential" inputtype="date" style="left:972px; top:59px; width:100px; height:19px; "/>
  291. <caption id="caption11" class="search_n_b" style="left:955px; top:61px; width:12px; height:17px; font-weight:bolder; ">~</caption>
  292. </xhtml:body>
  293. </xhtml:html>