SPMNP00001_수술사용자조회.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  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. <list>
  11. <userlist/>
  12. </list>
  13. <item>
  14. <temp/>
  15. </item>
  16. </main>
  17. <send>
  18. <searchitem/>
  19. <flag/>
  20. <instcd/>
  21. <deptflag/>
  22. <orddeptcd/>
  23. <searchdd/>
  24. </send>
  25. <init>
  26. <searchitem/>
  27. <flag>
  28. <lable>사용자ID</lable>
  29. <value>userid</value>
  30. </flag>
  31. <flag>
  32. <lable>사용자명</lable>
  33. <value>usernm</value>
  34. </flag>
  35. <deptflag/>
  36. <orddeptcd/>
  37. <searchdd/>
  38. </init>
  39. <popinfo>
  40. <refinfo>
  41. <serchitem/>
  42. </refinfo>
  43. </popinfo>
  44. <hidedata>
  45. <DeptLists>
  46. <deptlist>
  47. <deptcd/>
  48. <depthngnm/>
  49. <depthngabbr/>
  50. <deptengnm/>
  51. <deptengabbr/>
  52. <deptplce/>
  53. </deptlist>
  54. </DeptLists>
  55. </hidedata>
  56. </root>
  57. </instance>
  58. <script type="javascript" ev:event="xforms-ready">
  59. <![CDATA[
  60. fInitialize();
  61. ]]>
  62. </script>
  63. <submission id="TRMNP00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
  64. <submission id="TRMNP00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidedata/orddeptlists"/>
  65. </model>
  66. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  67. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  68. <script type="javascript">
  69. <![CDATA[
  70. /*
  71. 초기화 작업을 합니다.
  72. */
  73. function fInitialize(){
  74. if ( checkOpener() ) {
  75. opener.javascript.setParameter("SendData", "");
  76. }
  77. //특정 기준일자별 조회 이 값이 없을 경우 sysdate로 조회한다. 2008-07-26
  78. //================================================================
  79. var sSearchdd = opener.javascript.getParameter("SendData_Searchdd");
  80. if(sSearchdd != "" && sSearchdd != null && sSearchdd != "undefined"){
  81. model.setValue("/root/init/searchdd", sSearchdd);
  82. opener.javascript.setParameter("SendData_Searchdd", "");
  83. }
  84. //================================================================
  85. radio1.select(1);
  86. model.setFocus("ipt_search_item");
  87. model.removenode("/root/hidedata/DeptLists");
  88. model.refresh();
  89. }
  90. /*
  91. 버튼 컨트롤들을 클릭했을때 공통으로 타는 함수입니다.
  92. control : "search" 는 조회 버튼 클릭
  93. "init"은 신규 버튼 클릭
  94. "save"는 저장 버튼 클릭
  95. grid : 그리드 컨트롤을 넘겨줍니다.
  96. param : 기타 param을 넘겨줍니다.
  97. */
  98. function fClicked(control, grid, param){
  99. if ("search" == control){
  100. fSearchClick(grid, param);
  101. model.resetInstanceNode("/root/send");
  102. } else if ("init" == control){
  103. model.reset();
  104. } else {
  105. messageBox("처리를 수행","E002");
  106. }
  107. model.refresh();
  108. }
  109. /*
  110. 조회버튼 클릭 타는 함수입니다.
  111. grid.explorerbar = "sortshow" sort설정합니다.
  112. ipt_usercdnm_flag는 검색조건의 사용자코드 or 사용자명입니다.
  113. radio1은 사용자코드 or 사용자명 선택 라디오 버튼입니다.
  114. 을 날립니다.
  115. .
  116. */
  117. function fSearchClick(grid,param){
  118. var isearchitem = ipt_search_item.value;
  119. grid.explorerbar = "sortshow";
  120. model.removeNodeset("/root/main/list/userlist");
  121. grid.rebuild();
  122. //model.resetInstanceNode("/root/send");
  123. model.removeNodeset("/root/send");
  124. model.makeValue("/root/send/searchitem", ipt_search_item.currentText);
  125. model.makeValue("/root/send/flag" , radio1.value);
  126. model.makeValue("/root/send/deptflag" , model.getValue("/root/init/deptflag") );
  127. model.makeValue("/root/send/orddeptcd" , model.getValue("/root/init/orddeptcd"));
  128. model.makeValue("/root/send/searchdd" , model.getValue("/root/init/searchdd"));
  129. submit("TRMNP00001");
  130. }
  131. function fResetNode(node, destinationelement){
  132. // model.setValue(node + "/" + destinationelement, "");
  133. alert(model.elementName("/root/main/item"));
  134. }
  135. /*
  136. model.getValue(); 를 함수로 만들었습니다.
  137. param1 : node는 grid의 xPath입니다.
  138. param2 : row는 grid에서 선택한 row값입니다.
  139. param3 : element는 getvalue할 해당 element 명입니다.
  140. 해당 getvalue값을 return 해줍니다.
  141. return 하지 않으면 해당값을 가져올 수 없습니다.
  142. */
  143. function fGetValue(node, row, element) {
  144. var rtnValue = model.getValue(node + "[" + row + "]/" + element);
  145. return rtnValue;
  146. }
  147. /*
  148. model.setValue();를 함수로 만들었습니다.
  149. param1 : node는 setvalue할 컨트롤의 xPath입니다.
  150. param2 : destinationelement는 setvalue할 element명 입니다.
  151. param3 : sourceelement는 setvalue할 값입니다.
  152. */
  153. function fSetValue(node, destinationelement, sourceelement) {
  154. model.setValue(node + "/" + destinationelement, sourceelement);
  155. }
  156. function fDblclick(pRow) {
  157. //alert("pRow : "+pRow);
  158. var iParam="";
  159. var iNode = "/root/main/list/userlist";
  160. var iParam_userid = fGetValue(iNode, pRow, "userid");
  161. var iParam_usernm = fGetValue(iNode, pRow, "usernm");
  162. var iParam_posinstnm = fGetValue(iNode, pRow, "posinstnm");
  163. var iParam_posinstcd = fGetValue(iNode, pRow, "posinstcd");
  164. var iParam_posdeptnm = fGetValue(iNode, pRow, "posdeptnm");
  165. var iParam_posdeptcd = fGetValue(iNode, pRow, "posdeptcd");
  166. iParam = iParam_userid +"|"+iParam_usernm +"|"
  167. + iParam_posinstcd +"|"+iParam_posinstnm +"|"
  168. + iParam_posdeptcd +"|"+iParam_posdeptnm;
  169. // alert(iParam);
  170. if ( checkOpener() ) {
  171. opener.javascript.setParameter("SendData", iParam);
  172. window.close();
  173. }
  174. }
  175. ]]>
  176. </script>
  177. </xhtml:head>
  178. <xhtml:body pagewidth="622" pageheight="412" style="font-family:Courier New; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  179. <group id="group5" scroll="auto" style="left:0px; top:0px; width:605px; height:411px; ">
  180. <group id="group2" style="left:0px; top:0px; width:603px; height:35px; vertical-align:top; ">
  181. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:603px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  182. <caption id="caption1" class="search_name" style="left:5px; top:9px; width:90px; height:17px; ">검색조건</caption>
  183. <line id="line1" style="x1:525px; y1:7px; x2:525px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  184. <button id="btn_search" class="btn1_letter2" style="left:534px; top:7px; width:56px; height:22px; ">
  185. <caption>조회</caption>
  186. <script type="javascript" ev:event="DOMActivate">
  187. <![CDATA[
  188. var param = ipt_search_item.currentText;
  189. // alert(ipt_search_item.attribute("ref"));
  190. fClicked("search", grd_userlist);
  191. ]]>
  192. </script>
  193. </button>
  194. <input id="ipt_search_item" ref="/root/init/searchitem" class="input_s_essential" style="left:415px; top:10px; width:105px; height:19px; ">
  195. <script type="javascript" ev:event="onkeypress">
  196. <![CDATA[
  197. if(event.keyCode == 13){
  198. var param = ipt_search_item.currentText;
  199. // alert(ipt_search_item.attribute("ref"));
  200. fClicked("search", grd_userlist);
  201. }
  202. ]]>
  203. </script>
  204. </input>
  205. <select1 id="radio1" ref="/root/init" class="s" appearance="full" cols="2" overflow="visible" style="left:266px; top:10px; width:14px; height:13px; background-color:transparent; border-style:none; ">
  206. <choices>
  207. <itemset nodeset="/root/init/flag">
  208. <label ref="lable"/>
  209. <value ref="value"/>
  210. </itemset>
  211. </choices>
  212. </select1>
  213. <select1 id="cmb_deptflag" ref="/root/init/deptflag" class="combo_default" appearance="minimal" style="left:85px; top:8px; width:79px; height:19px; ">
  214. <choices>
  215. <item>
  216. <label>전체</label>
  217. <value/>
  218. </item>
  219. <item>
  220. <label>집도과</label>
  221. <value>011</value>
  222. </item>
  223. <item>
  224. <label>마취과</label>
  225. <value>012</value>
  226. </item>
  227. <item>
  228. <label>CCR</label>
  229. <value>013</value>
  230. </item>
  231. <item>
  232. <label>수술방</label>
  233. <value>014</value>
  234. </item>
  235. <item>
  236. <label>수술실_간호</label>
  237. <value>015</value>
  238. </item>
  239. <item>
  240. <label>회복실_간호</label>
  241. <value>016</value>
  242. </item>
  243. <item>
  244. <label>마취과_간호</label>
  245. <value>017</value>
  246. </item>
  247. <item>
  248. <label>중앙공급실</label>
  249. <value>018</value>
  250. </item>
  251. <item>
  252. <label>중앙공급실 간호</label>
  253. <value>019</value>
  254. </item>
  255. </choices>
  256. <script type="javascript" ev:event="xforms-value-changed">
  257. <![CDATA[
  258. //부서구분 값이 변경되었을 경우 이벤트
  259. var sConValue = cmb_deptflag.value;
  260. if(sConValue == "011"){
  261. model.removenode("/root/hidedata/DeptLists/deptlist");
  262. model.removenode("/root/send");
  263. model.makeValue("/root/send/flag" , "X" );
  264. model.makeValue("/root/send/searchitem", "XX" );
  265. model.makeValue("/root/send/deptflag" , "011" );
  266. model.makeNode("/root/send/orddeptcd");
  267. submit("TRMNP00102");
  268. addComboItem("cmb_orddept" , "전 체", "all", "above" );
  269. //cmb_orddept.vlsible = true;
  270. }else{
  271. model.removenode("/root/hidedata/DeptLists");
  272. model.refresh();
  273. }
  274. ]]>
  275. </script>
  276. </select1>
  277. <select1 id="cmb_orddept" ref="/root/init/orddeptcd" class="combo_default" appearance="minimal" style="left:165px; top:8px; width:94px; height:19px; ">
  278. <choices>
  279. <itemset nodeset="/root/hidedata/DeptLists/deptlist">
  280. <label ref="depthngnm"/>
  281. <value ref="deptcd"/>
  282. </itemset>
  283. </choices>
  284. </select1>
  285. </group>
  286. <caption id="caption9" class="tit_2" style="left:0px; top:45px; width:169px; height:13px; vertical-align:middle; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">사용자리스트</caption>
  287. <line id="line12" class="line_1" style="x1:0px; y1:61px; x2:604px; y2:61px; "/>
  288. <datagrid id="grd_userlist" nodeset="/root/main/list/userlist" caption="사용자ID^사용자명^근무지기관명^근무지부서명^소속기관코드^소속부서코드" colwidth="100, 100, 158, 206, 0, 0" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="32" style="left:0px; top:66px; width:604px; height:344px; ">
  289. <col ref="userid"/>
  290. <col ref="usernm"/>
  291. <col ref="posinstnm"/>
  292. <col ref="posdeptnm"/>
  293. <col ref="posinstcd"/>
  294. <col ref="posdeptcd"/>
  295. <script type="javascript" ev:event="ondblclick">
  296. <![CDATA[
  297. var iRow = grd_userlist.row;
  298. fDblclick(iRow);
  299. ]]>
  300. </script>
  301. </datagrid>
  302. <output id="output1" ref="/root/init/searchdd" visibility="hidden" style="left:417px; top:39px; width:100px; height:19px; "/>
  303. </group>
  304. </xhtml:body>
  305. </xhtml:html>