SPMNV21001_가야할곳.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <imain>
  10. <masterinfo>
  11. <masterlist>
  12. </masterlist>
  13. </masterinfo>
  14. <usedeptinfo>
  15. <usedeptlist/>
  16. </usedeptinfo>
  17. <detlinfo>
  18. <detllist/>
  19. </detlinfo>
  20. </imain>
  21. <isend>
  22. <reqdata/>
  23. </isend>
  24. <iinit/>
  25. <ihidden>
  26. <msgrgst>
  27. <msg/>
  28. </msgrgst>
  29. <waitroommsg>
  30. <msg/>
  31. </waitroommsg>
  32. </ihidden>
  33. <itemp/>
  34. <icond>
  35. <con>
  36. <pid/>
  37. <orddd/>
  38. <cretno/>
  39. <orddeptcd/>
  40. <roomcd/>
  41. <ordroomseq/>
  42. </con>
  43. </icond>
  44. </root>
  45. </instance>
  46. <submission id="TRMNV21201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/isend/reqdata" replace="instance" resultref="/root/imain/masterinfo"/>
  47. <submission id="TRMNV21104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/isend/reqdata" replace="instance" resultref="/root/imain/usedeptinfo"/>
  48. <submission id="TRMNV21202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/isend/reqdata" resultref="/root/imain/detlinfo"/>
  49. </model>
  50. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  51. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  52. <script type="javascript">
  53. <![CDATA[
  54. function fDeptMstList() //진료과 선택시 대기자 리스트 가져오기
  55. {
  56. model.makeValue("/root/isend/reqdata/userid","-");
  57. model.resetInstanceNode("/root/imain/masterinfo/masterlist");
  58. model.resetInstanceNode("/root/imain/usedeptinfo/usedeptlist");
  59. model.resetInstanceNode("/root/imain/detlinfo/detllist");
  60. submit("TRMNV21201"); // 가야할 곳 마스터 조회
  61. submit("TRMNV21104"); // 진료/검사실 기준자료
  62. }
  63. function fSetMenuGroupSeq(toSeq, type) // 순서 변경 함수
  64. {
  65. var isSeq = grd_detllist.row; //클릭한 로우
  66. var fixRow = grd_detllist.fixedRows;
  67. if(isSeq > 0){ // 클릭한 로우가 존재할 때
  68. var srcSeq = (isSeq > toSeq) ? isSeq+1 : isSeq; //클릭한 행과 이동할 행을 비교하여 클릭한 행이 클 때는
  69. grd_ordschelistinfo.insertRow(toSeq, type, false); // 이동할 위치에 행을 하나 삽입한다.
  70. model.copyNode("/root/main/ordschelist/ordschelistinfo["+grd_ordschelistinfo.row+"]", "/root/main/ordschelist/ordschelistinfo["+srcSeq+"]");
  71. // alert("srcSeq위치에행을삭제한다"+srcSeq);
  72. grd_ordschelistinfo.deleteRow(srcSeq, false);
  73. if(isSeq > toSeq){
  74. startRow = toSeq;
  75. endRow = isSeq;
  76. grd_ordschelistinfo.row = startRow; //위로 올릴때 포커스는 시작점
  77. //alert("start"+startRow);
  78. if(isSeq==startRow) // 순서 위로 변경시 변경한 순서와 처음 순서가 같을 때
  79. {
  80. model.makeValue("/root/chkvalue/chk","Y");
  81. //alert("위"+model.getValue("/root/chkvalue/chk"));
  82. }
  83. }else{
  84. startRow = isSeq;
  85. endRow = toSeq;
  86. grd_ordschelistinfo.row = endRow; //밑으로 내릴 때 포커스는 끝나는점
  87. //alert("end"+endRow);
  88. if(isSeq==endRow) // 순서 밑으로 변경시 변경한 순서와 처음 순서가 같을 때
  89. {
  90. model.makeValue("/root/chkvalue/chk","Y");
  91. //alert("아래"+model.getValue("/root/chkvalue/chk"));
  92. }
  93. }
  94. model.refresh();
  95. }else{
  96. messageBox("변경할 메뉴그룹을","C002");
  97. }
  98. }
  99. function fOrdPatWaitSeqChng(){
  100. var pid = model.getValue("/root/icond/con/pid");
  101. var orddd = model.getValue("/root/icond/con/orddd");
  102. var cretno= model.getValue("/root/icond/con/cretno");
  103. if(pid<>""){
  104. for(i=1;i<=grd_detllist.rows;i++){
  105. model.makeValue("/root/imain/detlinfo/detllist[i]/pid",pid);
  106. model.makeValue("/root/imain/detlinfo/detllist[i]/orddd",orddd);
  107. model.makeValue("/root/imain/detlinfo/detllist[i]/cretno",cretno);
  108. }
  109. }
  110. }
  111. ]]>
  112. </script>
  113. </xhtml:head>
  114. <xhtml:body>
  115. <group id="group2" style="left:0px; top:0px; width:735px; height:663px; ">
  116. <shape id="roundrect2" class="roundrect_example" appearance="roundrect" style="left:2px; top:606px; width:278px; height:56px; "/>
  117. <button id="button15" class="btn4_letter2" navindex="17" disable.background-image="../../../com/commonweb/images/dis_btn4_letter2.gif" style="left:248px; top:525px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn4_letter2.gif; ">
  118. <caption>저장</caption>
  119. <script type="javascript" ev:event="DOMActivate">
  120. <![CDATA[
  121. model.resetInstanceNode("/root/ihidden/msgrgst/status");
  122. model.refresh();
  123. fOrdRoomMsgSave();
  124. ]]>
  125. </script>
  126. </button>
  127. <datagrid id="grd_detllist" nodeset="/root/imain/detlinfo/detllist" caption="표시순서^가야할 곳(이름)^roomcd^orddeptcd" colsep="^" colwidth="31, 280, 9, 6" dataheight="25" extendlastcol="scroll" frozencols="5" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:1px; top:27px; width:364px; height:495px; ">
  128. <col ref="dispord" style="left:20px; top:23px; width:98px; height:18px; text-align:center; "/>
  129. <col ref="useroomnm" style="text-align:center; "/>
  130. <col ref="roomcd" visibility="hidden"/>
  131. <col ref="orddeptcd" visibility="hidden"/>
  132. </datagrid>
  133. <input id="ipt_msgtotm" ref="/root/ihidden/msgrgst/msgtotm" navindex="15" format="nn:ss" style="left:116px; top:636px; width:82px; height:19px; "/>
  134. <textarea id="tx_msg" ref="/root/ihidden/msgrgst/msg" navindex="13" scroll="autovscroll" maxlength="26" style="left:2px; top:552px; width:364px; height:52px; "/>
  135. <caption id="caption20" class="tit_2" style="left:374px; top:7px; width:118px; height:13px; ">가야할 곳 마스터</caption>
  136. <input id="ipt_msgfromtm" ref="/root/ihidden/msgrgst/msgfromtm" navindex="14" format="nn:ss" style="left:14px; top:636px; width:82px; height:19px; "/>
  137. <caption id="caption10" style="left:100px; top:640px; width:14px; height:11px; font-weight:bold; ">~</caption>
  138. <button id="button6" class="btn4_letter2" navindex="18" disable.background-image="../../../com/commonweb/images/dis_btn4_letter2.gif" style="left:310px; top:525px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn4_letter2.gif; ">
  139. <caption>삭제</caption>
  140. <script type="javascript" ev:event="DOMActivate">
  141. <![CDATA[
  142. model.makeValue("/root/ihidden/msgrgst/status","D");
  143. fOrdRoomMsgSave();
  144. ]]>
  145. </script>
  146. </button>
  147. <caption id="caption2" class="tit_2" style="left:2px; top:532px; width:320px; height:13px; ">소대기 공지사항 (표시기간동안 표시)</caption>
  148. <button id="button7" class="icon_top" style="left:181px; top:2px; width:26px; height:19px; background-image:../../../com/commonweb/images/btn_send_top.gif; ">
  149. <caption/>
  150. <script type="javascript" ev:event="DOMActivate">
  151. <![CDATA[
  152. if(grd_detllist.valuematrix(grd_detllist.mouseRow,grd_detllist.colRef("useroomnm"))!="")
  153. {
  154. if ( grd_detllist.row == "1") {
  155. messageBox("최상위환자입니다.", "I");
  156. return;
  157. } else {
  158. fSetMenuGroupSeq("1", "above");
  159. }
  160. }
  161. ]]>
  162. </script>
  163. <hint>
  164. <![CDATA[맨위로]]>
  165. </hint>
  166. </button>
  167. <button id="btn_wroom_del" class="btn4_letter2" navindex="21" disable.background-image="../../../com/commonweb/images/dis_btn4_letter2.gif" style="left:678px; top:525px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn4_letter2.gif; ">
  168. <caption>삭제</caption>
  169. <script type="javascript" ev:event="DOMActivate">
  170. <![CDATA[
  171. fSetWaitRoomMsg("D");
  172. ]]>
  173. </script>
  174. </button>
  175. <button id="button8" class="icon_bottom" style="left:271px; top:2px; width:26px; height:19px; background-image:../../../com/commonweb/images/btn_send_bottom.gif; ">
  176. <caption/>
  177. <script type="javascript" ev:event="DOMActivate">
  178. <![CDATA[
  179. if(rdo_condwait.value=='2') //보류 환자 선택시
  180. {
  181. messageBox("순서 변경은 대기 환자만","I006");
  182. return;
  183. }
  184. if(grd_ordschelistinfo.row<=0)
  185. {
  186. messageBox("환자를 선택","I008");
  187. return;
  188. }
  189. // if(grd_ordschelistinfo.row < 3)
  190. // {
  191. // messageBox("상위 2명 환자의 순서는 변경할수","E001");
  192. // return;
  193. // }
  194. // else
  195. // {
  196. if( grd_ordschelistinfo.rows-grd_ordschelistinfo.fixedRows > grd_ordschelistinfo.row )
  197. {
  198. fSetMenuGroupSeq(grd_ordschelistinfo.rows-grd_ordschelistinfo.fixedRows, "below");
  199. }
  200. else
  201. {
  202. messageBox("최하위 메뉴그룹이","E005");
  203. }
  204. // }
  205. ]]>
  206. </script>
  207. <hint>
  208. <![CDATA[맨아래로]]>
  209. </hint>
  210. </button>
  211. <caption id="caption3" class="tit_2" style="left:374px; top:313px; width:211px; height:14px; ">진료/검사실 기준자료</caption>
  212. <button id="button9" class="icon_top_direction" disable.background-image="../../../com/commonweb/images/dis_btn2_letter3.gif" style="left:211px; top:2px; width:26px; height:19px; background-image:../../../com/commonweb/images/btn_send_up.gif; ">
  213. <caption/>
  214. <script type="javascript" ev:event="DOMActivate">
  215. <![CDATA[
  216. if(rdo_condwait.value=='2') //보류 환자 선택시
  217. {
  218. messageBox("순서 변경은 대기 환자만","I006");
  219. return;
  220. }
  221. if(grd_detllist.row<=0)
  222. {
  223. messageBox("환자를 선택","I008");
  224. return;
  225. }
  226. //상위 두명도 순서를 변경할 수 있도록 해달라는 요청으로 기존 로직 삭제 : 2009. 04. 22 김영학 추가
  227. if (grd_ordschelistinfo.row <= 1 ) {
  228. messageBox("최상위입니다.","I");
  229. } else {
  230. fSetMenuGroupSeq(grd_ordschelistinfo.row-1, "above");
  231. }
  232. // end //
  233. // if(grd_ordschelistinfo.row > 3)
  234. // {
  235. // fSetMenuGroupSeq(grd_ordschelistinfo.row-1, "above");
  236. // }
  237. // else
  238. // {
  239. // messageBox("상위 2명 환자의 순서는 변경할수","E001");
  240. // }
  241. ]]>
  242. </script>
  243. <hint>
  244. <![CDATA[위로]]>
  245. </hint>
  246. </button>
  247. <line id="line1" class="line_1" style="x1:2px; y1:548px; x2:366px; y2:548px; "/>
  248. <button id="btn_wroom_save" class="btn4_letter2" navindex="21" disable.background-image="../../../com/commonweb/images/dis_btn4_letter2.gif" style="left:616px; top:525px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn4_letter2.gif; ">
  249. <caption>저장</caption>
  250. <script type="javascript" ev:event="DOMActivate">
  251. <![CDATA[
  252. // fSetWaitRoomMsg("S");
  253. var size = tar_wroommsg.value.length;
  254. if (size > "50") {
  255. messageBox("현재" + size + "자 입력되었습니다. \n최대 50자까지만 입력가능합니다.", "I");
  256. return;
  257. } else {
  258. fSetWaitRoomMsg("S");
  259. }
  260. ]]>
  261. </script>
  262. </button>
  263. <caption id="cpt_voluntrflag" class="cell_1" style="left:5px; top:611px; width:269px; height:20px; font-size:10pt; font-weight:bold; vertical-align:middle; ">* 예약지연시간 표시기간(시분)</caption>
  264. <line id="line2" class="line_1" style="x1:371px; y1:23px; x2:733px; y2:23px; "/>
  265. <datagrid id="grd_masterlist" nodeset="/root/imain/masterinfo/masterlist" caption="번호^담당의^가야할 곳(이름)" colsep="^" colwidth="14, 90, 224" dataheight="25" extendlastcol="scroll" frozencols="5" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:371px; top:26px; width:362px; height:281px; ">
  266. <col ref="mainseqno" visibility="hidden" style="left:20px; top:23px; width:98px; height:18px; text-align:center; "/>
  267. <col ref="usernm" style="text-align:center; "/>
  268. <col ref="titl" style="text-align:center; "/>
  269. <script type="javascript" ev:event="ondblclick">
  270. <![CDATA[
  271. if (isDataCell() == true && grd_masterlist.valuematrix(grd_masterlist.mouseRow,grd_masterlist.colRef("usernm"))!="" && model.getValue("/root/icond/con/pid")!=""){
  272. model.makeNode("/root/isend/reqdata/mainseqno");
  273. model.setValue("/root/isend/reqdata/mainseqno", model.getValue("/root/imain/masterinfo/masterlist[" + grd_masterlist.row + "]/mainseqno"));
  274. model.resetInstanceNode("/root/imain/detlinfo/detllist");
  275. submit("TRMNV21202");
  276. model.refresh();
  277. }else{
  278. messageBox("환자를 선택","I008");
  279. }
  280. ]]>
  281. </script>
  282. </datagrid>
  283. <button id="btn_to_down" class="icon_bottom_direction" disable.background-image="../../../com/commonweb/images/dis_btn2_letter3.gif" style="left:241px; top:2px; width:26px; height:19px; background-image:../../../com/commonweb/images/btn_send_down.gif; ">
  284. <caption/>
  285. <script type="javascript" ev:event="DOMActivate">
  286. <![CDATA[
  287. if(rdo_condwait.value=='2') //보류 환자 선택시
  288. {
  289. messageBox("순서 변경은 대기 환자만","I006");
  290. return;
  291. }
  292. if(grd_ordschelistinfo.row<=0)
  293. {
  294. messageBox("환자를 선택","I008");
  295. return;
  296. }
  297. // if(grd_ordschelistinfo.row < 3)
  298. // {
  299. // messageBox("상위 2명 환자의 순서는 변경할수","E001");
  300. // return;
  301. // }
  302. // else
  303. // {
  304. if( grd_ordschelistinfo.rows-grd_ordschelistinfo.fixedRows > grd_ordschelistinfo.row )
  305. {
  306. fSetMenuGroupSeq(grd_ordschelistinfo.row+1, "below");
  307. }
  308. else
  309. {
  310. messageBox("최하위 메뉴그룹이","E005");
  311. }
  312. // }
  313. // fChgIdxSetPrcpRefInfo("down");
  314. ]]>
  315. </script>
  316. <hint>
  317. <![CDATA[아래로]]>
  318. </hint>
  319. </button>
  320. <caption id="caption7" class="tit_2" style="left:3px; top:8px; width:118px; height:13px; ">가야할 곳</caption>
  321. <caption id="caption28" class="tit_2" style="left:370px; top:532px; width:290px; height:13px; ">대대기 공지사항 (삭제할때까지 표시)</caption>
  322. <line id="line4" class="line_1" style="x1:371px; y1:329px; x2:733px; y2:329px; "/>
  323. <button id="button12" class="btn2_letter4" disable.background-image="../../../com/commonweb/images/dis_btn2_letter4.gif" style="left:301px; top:2px; width:64px; height:19px; font-weight:bold; background-image:../../../com/commonweb/images/btn2_letter4.gif; ">
  324. <caption>순서저장</caption>
  325. <script type="javascript" ev:event="DOMActivate">
  326. <![CDATA[
  327. fOrdPatWaitSeqChng();
  328. ]]>
  329. </script>
  330. </button>
  331. <line id="line5" class="line_1" style="x1:2px; y1:24px; x2:366px; y2:24px; "/>
  332. <line id="line6" class="line_1" style="x1:370px; y1:548px; x2:734px; y2:548px; "/>
  333. <textarea id="tar_wroommsg" ref="/root/ihidden/waitroommsg/msg" navindex="19" scroll="autovscroll" style="left:370px; top:552px; width:364px; height:52px; "/>
  334. <datagrid id="grd_room" nodeset="/root/imain/usedeptinfo/usedeptlist" caption="코드^가야할 곳(이름)^orddeptcd" colsep="^" colwidth="125, 215, 100" dataheight="25" extendlastcol="scroll" frozencols="5" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:371px; top:332px; width:362px; height:190px; ">
  335. <col ref="roomcd" style="left:20px; top:23px; width:98px; height:18px; text-align:center; "/>
  336. <col ref="useroomnm" style="text-align:center; "/>
  337. <col ref="orddeptcd" visibility="hidden"/>
  338. <script type="javascript" ev:event="ondblclick">
  339. <![CDATA[
  340. // if(model.removenodeset("/root/main/detlinfo/detllist"); /root/main/detlinfo/detllist
  341. if (isDataCell() == true && grd_room.valuematrix(grd_room.mouseRow,grd_room.colRef("roomcd"))!="" && model.getValue("/root/icond/con/pid")!="") {
  342. var row = grd_room.row;
  343. var roomcd = model.getValue("/root/imain/usedeptinfo/usedeptlist[" + row + "]/roomcd");
  344. var useroomnm = model.getValue("/root/imain/usedeptinfo/usedeptlist[" + row + "]/useroomnm");
  345. var orddeptcd = model.getValue("/root/imain/usedeptinfo/usedeptlist[" + row + "]/orddeptcd");
  346. grd_detllist.addRow();
  347. var roomrow = grd_detllist.rows -1;
  348. model.setValue("/root/imain/detlinfo/detllist[" + roomrow + "]/dispord" , roomrow);
  349. model.setValue("/root/imain/detlinfo/detllist[" + roomrow + "]/roomcd" , roomcd);
  350. model.setValue("/root/imain/detlinfo/detllist[" + roomrow + "]/useroomnm" , useroomnm);
  351. model.setValue("/root/imain/detlinfo/detllist[" + roomrow + "]/orddeptcd" , orddeptcd);
  352. } else {
  353. messageBox("환자를 선택","I008");
  354. }
  355. ]]>
  356. </script>
  357. </datagrid>
  358. </group>
  359. </xhtml:body>
  360. </xhtml:html>