SMABC02000_공통마감화면.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  4. <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">
  5. <xhtml:head>
  6. <xhtml:title>공통마감</xhtml:title>
  7. <model id="model1">
  8. <instance id="instance1">
  9. <root xmlns="">
  10. <main>
  11. <projlist>
  12. <list>
  13. <proj>
  14. <check/>
  15. <execddtm/>
  16. <pid/>
  17. <hngnm/>
  18. <sexage/>
  19. <prcpcd/>
  20. <prcpnm/>
  21. <cdnm/>
  22. <acting/>
  23. <execrid/>
  24. <roomcd/>
  25. <enddd/>
  26. <action/>
  27. <prcpdd/>
  28. <prcpno/>
  29. <prcphistno/>
  30. <execprcpno/>
  31. <instcd/>
  32. <execdeptcd/>
  33. <oiflag/>
  34. <note/>
  35. </proj>
  36. </list>
  37. </projlist>
  38. <list/>
  39. </main>
  40. <send>
  41. <search>
  42. </search>
  43. <cond>
  44. <basecd/>
  45. <execdd/>
  46. <exeflag>Y</exeflag>
  47. <deptcd/>
  48. <flag/>
  49. </cond>
  50. </send>
  51. <init>
  52. <actingplace>
  53. <combo>
  54. <deptnm/>
  55. <deptcd/>
  56. </combo>
  57. </actingplace>
  58. <flag>
  59. <item>
  60. <name>마감전</name>
  61. <id>before</id>
  62. </item>
  63. <item>
  64. <name>마감후</name>
  65. <id>after</id>
  66. </item>
  67. </flag>
  68. </init>
  69. <actingend>
  70. <endlist/>
  71. <endflagvalue>
  72. <endflag/>
  73. </endflagvalue>
  74. </actingend>
  75. <hidden>
  76. <ret>
  77. <count/>
  78. </ret>
  79. </hidden>
  80. </root>
  81. </instance>
  82. <script type="javascript" ev:event="xforms-ready">
  83. <![CDATA[
  84. model.removeNodeset("/root/actingend/endlist");
  85. fInitialize();
  86. ]]>
  87. </script>
  88. <submission id="TRABC02001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cond/basecd" resultref="/root/init/actingplace"/>
  89. <submission id="TRABC02002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cond" resultref="/root/main/projlist/list"/>
  90. <submission id="TRABC02003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/actingend" resultref="/root/hidden/ret"/>
  91. </model>
  92. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  93. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  94. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  95. <script type="javascript">
  96. <![CDATA[
  97. function fInitialize(){
  98. var today = getCurrentDate();
  99. model.setValue("/root/send/cond/execdd", today);
  100. grd_projlist.fixedcellcheckbox(0, 1) = true; //그리드 헤더에 체크박스 설정
  101. model.removeNodeset("/root/main/projlist/list/proj");
  102. submit("TRABC02001");
  103. // 콤보에 전체선택 추가
  104. //addComboItem("combo1", "-전체-", "-", "above");
  105. combo1.select(0);
  106. combo2.select(0);
  107. // 세션에서 부서 코드를 받아온다.
  108. var dutplcecd = getUserInfo("dutplcecd") ;
  109. if(dutplcecd == "1000000000"){
  110. addComboItem("combo1", "-전체-", "-", "above");
  111. }
  112. var combo1Index = 0;
  113. // AST 로 로그인 안했을 경우, 콤보박스에 해당 부서이름만 나오게 한다. (AST 로그인 시에는 콤보박스에서 부서 선택 가능)
  114. if(dutplcecd != "1000000000"){
  115. var nodeList = root.selectNodes("/root/init/actingplace/combo/deptcd");
  116. for(var i = 0; i < nodeList.length; i++){
  117. if(nodeList.item(i).value == dutplcecd){
  118. combo1Index = i;
  119. break;
  120. }
  121. }
  122. combo1.select(combo1Index);
  123. combo1.disabled = true;
  124. }else{
  125. button6.visible = false;
  126. }
  127. model.refresh();
  128. }
  129. function fGetActingList(){
  130. model.removeNodeset("/root/main/projlist/list/proj");
  131. model.refresh();
  132. submit("TRABC02002");
  133. grd_projlist.colstyle(3,"data","text-align") = "right";
  134. }
  135. ]]>
  136. </script>
  137. </xhtml:head>
  138. <xhtml:body guideline="1,1195;2,782;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  139. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  140. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:196px; height:14px; ">공통마감</caption>
  141. </group>
  142. <group id="group5" scroll="auto" style="left:0px; top:45px; width:1195px; height:730px; ">
  143. <group id="group6" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  144. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  145. <caption id="caption2" class="search_name" style="left:6px; top:8px; width:69px; height:17px; ">일자</caption>
  146. <caption id="caption3" class="search_name" style="left:186px; top:8px; width:96px; height:17px; ">Acting 부서</caption>
  147. <input id="ipt_execdd" ref="/root/send/cond/execdd" class="input_default" inputtype="date" style="left:63px; top:8px; width:100px; height:19px; ">
  148. <script type="javascript" ev:event="xforms-value-changed">
  149. <![CDATA[
  150. fGetActingList();
  151. ]]>
  152. </script>
  153. </input>
  154. <select1 id="radio1" ref="/root/send/cond/exeflag" visibility="1" appearance="full" cols="2" overflow="visible" style="left:455px; top:8px; width:110px; height:20px; border-style:none; ">
  155. <choices>
  156. <item>
  157. <label>실행</label>
  158. <value>Y</value>
  159. </item>
  160. <item>
  161. <label>미실행</label>
  162. <value>N</value>
  163. </item>
  164. </choices>
  165. <script type="javascript" ev:event="xforms-value-changed">
  166. <![CDATA[
  167. if (model.getValue("/root/send/cond/deptcd") != '-' &&
  168. model.getValue("/root/send/cond/exeflag") == "Y" &&
  169. model.getValue("/root/send/cond/flag") =="before"){
  170. button6.visible = true;
  171. }else{
  172. button6.visible = false;
  173. }
  174. fGetActingList();
  175. ]]>
  176. </script>
  177. </select1>
  178. <select1 id="combo1" ref="/root/send/cond/deptcd" class="combo_search" appearance="minimal" style="left:290px; top:8px; width:145px; height:19px; ">
  179. <choices>
  180. <itemset nodeset="/root/init/actingplace/combo">
  181. <label ref="deptnm"/>
  182. <value ref="deptcd"/>
  183. </itemset>
  184. </choices>
  185. <script type="javascript" ev:event="xforms-select">
  186. <![CDATA[
  187. if(model.getValue("/root/send/cond/deptcd") != '-' &&
  188. model.getValue("/root/send/cond/exeflag") == "Y" &&
  189. model.getValue("/root/send/cond/flag") =="before"){
  190. button6.visible = true;
  191. }else{
  192. button6.visible = false;
  193. }
  194. fGetActingList();
  195. ]]>
  196. </script>
  197. </select1>
  198. <select1 id="combo2" ref="/root/send/cond/flag" class="combo_search" appearance="minimal" style="left:670px; top:8px; width:90px; height:19px; ">
  199. <choices>
  200. <itemset nodeset="/root/init/flag/item">
  201. <label ref="name"/>
  202. <value ref="id"/>
  203. </itemset>
  204. </choices>
  205. <script type="javascript" ev:event="xforms-select">
  206. <![CDATA[
  207. if (model.getValue("/root/send/cond/deptcd") != '-' &&
  208. model.getValue("/root/send/cond/exeflag") == "Y" &&
  209. model.getValue("/root/send/cond/flag") =="before"){
  210. button6.visible = true;
  211. }else{
  212. button6.visible = false;
  213. }
  214. fGetActingList();
  215. ]]>
  216. </script>
  217. </select1>
  218. <caption id="caption4" class="search_name" style="left:596px; top:8px; width:76px; height:17px; ">구 분</caption>
  219. </group>
  220. <line id="line20" class="line_1" style="x1:0px; y1:81px; x2:1194px; y2:81px; "/>
  221. <caption id="caption8" class="tit_2" style="left:5px; top:66px; width:160px; height:13px; ">액팅 리스트</caption>
  222. <group id="group2" style="left:800px; top:55px; width:395px; height:25px; ">
  223. <button id="button6" class="btn2_letter3" disable.background-image="../../../com/commonweb/images/dis_btn2_letter3.gif" style="left:340px; top:5px; width:53px; height:19px; background-image:../../../com/commonweb/images/btn2_letter3.gif; ">
  224. <caption>마감</caption>
  225. <script type="javascript" ev:event="DOMActivate">
  226. <![CDATA[
  227. model.removeNodeset("/root/actingend/endlist");
  228. model.makeNode("/root/actingend/endlist");
  229. var endListRow = 1;
  230. for(var i = 1; i < grd_projlist.rows; i++){
  231. if(grd_projlist.textmatrix(i, 1) == 'true'){
  232. model.makeNode("/root/actingend/endlist["+endListRow+"]/prcpdd");
  233. model.setValue("/root/actingend/endlist["+endListRow+"]/prcpdd", model.getValue("/root/main/projlist/list/proj["+ i +"]/prcpdd"));
  234. model.makeNode("/root/actingend/endlist["+endListRow+"]/prcpno");
  235. model.setValue("/root/actingend/endlist["+endListRow+"]/prcpno", model.getValue("/root/main/projlist/list/proj["+ i +"]/prcpno"));
  236. model.makeNode("/root/actingend/endlist["+endListRow+"]/prcphistno");
  237. model.setValue("/root/actingend/endlist["+endListRow+"]/prcphistno", model.getValue("/root/main/projlist/list/proj["+ i +"]/prcphistno"));
  238. model.makeNode("/root/actingend/endlist["+endListRow+"]/execprcpno");
  239. model.setValue("/root/actingend/endlist["+endListRow+"]/execprcpno", model.getValue("/root/main/projlist/list/proj["+ i +"]/execprcpno"));
  240. model.makeNode("/root/actingend/endlist["+endListRow+"]/instcd");
  241. model.setValue("/root/actingend/endlist["+endListRow+"]/instcd", model.getValue("/root/main/projlist/list/proj["+ i +"]/instcd"));
  242. model.makeNode("/root/actingend/endlist["+endListRow+"]/oiflag");
  243. model.setValue("/root/actingend/endlist["+endListRow+"]/oiflag", model.getValue("/root/main/projlist/list/proj["+ i +"]/oiflag"));
  244. endListRow++;
  245. }
  246. }
  247. // 체크된 행이 있으면 마감실행
  248. if(endListRow !== 1){
  249. model.makeNode("/root/actingend/endflagvalue/endflag");
  250. model.setValue("/root/actingend/endflagvalue/endflag", "A12");
  251. model.makeNode("/root/actingend/endflagvalue/execdd");
  252. model.setValue("/root/actingend/endflagvalue/execdd", model.getValue("/root/send/cond/execdd"));
  253. model.makeNode("/root/actingend/endflagvalue/execdeptcd");
  254. model.setValue("/root/actingend/endflagvalue/execdeptcd", model.getValue("/root/send/cond/deptcd"));
  255. submit("TRABC02003");
  256. fGetActingList();
  257. alert("마감되었습니다");
  258. }
  259. ]]>
  260. </script>
  261. </button>
  262. </group>
  263. <datagrid id="grd_projlist" nodeset="/root/main/projlist/list/proj" caption="^수행시간^등록번호^환자명^Sex/Age^처방코드^처방명^상태^Acting^수행자^병실^마감일시^Action^caption1^caption2^caption3^caption4^caption5^caption6^caption7^Note^seq" colsep="^" colwidth="26, 102, 87, 70, 60, 0, 382, 94, 55, 99, 71, 120, 73, 100, 58, 100, 100, 100, 100, 34, 209" dataheight="23" defaultrows="0" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:85px; width:1194px; height:640px; ">
  264. <col ref="check" type="checkbox"/>
  265. <col ref="execddtm" format="yyyy-mm-dd 99:99"/>
  266. <col ref="pid"/>
  267. <col ref="hngnm"/>
  268. <col ref="sexage"/>
  269. <col ref="prcpcd"/>
  270. <col ref="prcpnm"/>
  271. <col ref="cdnm"/>
  272. <col ref="acting"/>
  273. <col ref="execrid"/>
  274. <col ref="roomcd"/>
  275. <col ref="enddd" format="yyyy-mm-dd 99:99:99"/>
  276. <col ref="action" visibility="hidden"/>
  277. <col ref="prcpdd" visibility="hidden"/>
  278. <col ref="prcpno" visibility="hidden"/>
  279. <col ref="prcphistno" visibility="hidden"/>
  280. <col ref="execprcpno" visibility="hidden"/>
  281. <col ref="instcd" visibility="hidden"/>
  282. <col ref="execdeptcd" visibility="hidden"/>
  283. <col ref="oiflag" visibility="hidden"/>
  284. <col ref="note"/>
  285. </datagrid>
  286. </group>
  287. <group id="group3" style="left:0px; top:13px; width:1190px; height:27px; ">
  288. <button id="button7" class="btn4_letter3" disable.background-image="../../../com/commonweb/images/dis_btn4_letter3.gif" style="left:1120px; top:2px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
  289. <caption>초기화</caption>
  290. <script type="javascript" ev:event="DOMActivate">
  291. <![CDATA[
  292. fInitialize();
  293. ]]>
  294. </script>
  295. </button>
  296. <line id="line1" class="line_6" style="x1:0px; y1:25px; x2:1189px; y2:25px; "/>
  297. </group>
  298. </xhtml:body>
  299. </xhtml:html>