SPPEA00103_처방희망일지정.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>처방 희망일 지정</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <prcplist>
  11. <prcpinfo/>
  12. </prcplist>
  13. </main>
  14. <send>
  15. <pid/>
  16. </send>
  17. <hidden>
  18. <dayflag>T</dayflag>
  19. <hopedd/>
  20. </hidden>
  21. </root>
  22. </instance>
  23. <submission id="TRPEA00112" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/prcplist/prcpinfo"/>
  24. <submission id="TXPEA00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/prcplist/prcpinfo" replace="instance" resultref="/root/main/prcplist/prcpinfo"/>
  25. <script type="javascript" ev:event="xforms-ready">
  26. <![CDATA[
  27. grd_prcp.fixedcellcheckbox(0, grd_prcp.colRef("chk")) = true;
  28. grd_prcp.fixedcellischeck(0, grd_prcp.colRef("chk")) = true;
  29. var pid = opener.javascript.getParameter("SPPEA00103_pid");
  30. if (pid != "") {
  31. model.setValue("/root/send/pid", pid);
  32. ipt_pid.refresh();
  33. btn_search.dispatch("DOMActivate");
  34. }
  35. model.setValue("/root/hidden/hopedd", getCurrentDate());
  36. ipt_hopedd.refresh();
  37. ]]>
  38. </script>
  39. </model>
  40. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  41. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  42. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  43. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  44. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  45. </xhtml:head>
  46. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  47. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:125px; height:13px; ">
  48. <![CDATA[처방 희망일 지정]]>
  49. </caption>
  50. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:285px; top:20px; width:910px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  51. <datagrid id="grd_prcp" nodeset="/root/main/prcplist/prcpinfo" backcoloralternate="transparent" caption="^등록번호^이름^처방일^진료과^진료의^구분^처방코드^처방명^상태^시행부서^다음진료일^다음검사일^처방희망일" colsep="^" colwidth="25, 60, 60, 80, 110, 60, 40, 80, 220, 80, 110, 80, 80, 90" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:0px; top:85px; width:1195px; height:675px; text-align:center; ">
  52. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  53. <col ref="pid"/>
  54. <col ref="hngnm"/>
  55. <col ref="prcpdd" format="yyyy-mm-dd"/>
  56. <col ref="orddepthngnm"/>
  57. <col ref="orddrnm"/>
  58. <col ref="prcpgenrflagnm"/>
  59. <col ref="prcpcd"/>
  60. <col ref="prcpnm" style="text-align:left; "/>
  61. <col ref="prcpstatnm"/>
  62. <col ref="prcpexecdeptnm"/>
  63. <col ref="nextorddd" format="yyyy-mm-dd"/>
  64. <col ref="nextrsrvdd" format="yyyy-mm-dd"/>
  65. <col ref="prcphopedd" format="yyyy-mm-dd" style="font-weight:bold; "/>
  66. <script type="javascript" ev:event="ondblclick">
  67. <![CDATA[
  68. var row = grd_prcp.row;
  69. var chk = model.getValue("/root/main/prcplist/prcpinfo[" + row + "]/chk") == "Y" ? "N" : "Y";
  70. model.setValue("/root/main/prcplist/prcpinfo[" + row + "]/chk", chk);
  71. if (chk != "Y") {
  72. model.setValue("/root/main/prcplist/prcpinfo[" + row + "]/prcphopedd", model.getValue("/root/main/prcplist/prcpinfo[" + row + "]/org_prcphopedd"));
  73. }
  74. grd_prcp.refresh();
  75. grd_prcp.rowStyle(row, "data", "background-color") = chk == "Y" ? "#ffffc7" : "#ffffff";
  76. ]]>
  77. </script>
  78. <script type="javascript" ev:event="xforms-value-changed">
  79. <![CDATA[
  80. if (grd_prcp.col != grd_prcp.colRef("chk")) {
  81. return;
  82. }
  83. var chk = model.getValue("/root/main/prcplist/prcpinfo[" + grd_prcp.row + "]/chk");
  84. if (chk != "Y") {
  85. model.setValue("/root/main/prcplist/prcpinfo[" + grd_prcp.row + "]/prcphopedd", model.getValue("/root/main/prcplist/prcpinfo[" + grd_prcp.row + "]/org_prcphopedd"));
  86. }
  87. grd_prcp.rowStyle(grd_prcp.row, "data", "background-color") = chk == "Y" ? "#ffffc7" : "#ffffff";
  88. ]]>
  89. </script>
  90. <script type="javascript" ev:event="onclick">
  91. <![CDATA[
  92. if (grd_prcp.row > 0 || grd_prcp.col != grd_prcp.colRef("chk")) {
  93. return;
  94. }
  95. grd_prcp.allStyle("data", "background-color") = grd_prcp.fixedcellischeck(0, grd_prcp.colRef("chk")) ? "#ffffc7" : "#ffffff";
  96. ]]>
  97. </script>
  98. </datagrid>
  99. <line id="line16" class="line_1" style="x1:0px; y1:80px; x2:1195px; y2:80px; "/>
  100. <select1 id="rdo_dayflag" ref="/root/hidden/dayflag" appearance="full" cellspacing="5" cols="4" overflow="visible" style="left:470px; top:29px; width:300px; height:20px; border-style:none; ">
  101. <choices>
  102. <item>
  103. <label>오늘</label>
  104. <value>T</value>
  105. </item>
  106. <item>
  107. <label>진료 예약일</label>
  108. <value>O</value>
  109. </item>
  110. <item>
  111. <label>검사 예약일</label>
  112. <value>E</value>
  113. </item>
  114. <item>
  115. <label>직접 지정</label>
  116. <value>D</value>
  117. </item>
  118. </choices>
  119. <script type="javascript" ev:event="xforms-value-changed">
  120. <![CDATA[
  121. switch (model.getValue("/root/hidden/dayflag")) {
  122. case "T" :
  123. ipt_hopedd.disabled = true;
  124. model.setValue("/root/hidden/hopedd", getCurrentDate());
  125. break;
  126. case "O" :
  127. ipt_hopedd.disabled = true;
  128. model.setValue("/root/hidden/hopedd", "");
  129. break;
  130. case "E" :
  131. ipt_hopedd.disabled = true;
  132. model.setValue("/root/hidden/hopedd", "");
  133. break;
  134. case "D" :
  135. ipt_hopedd.disabled = false;
  136. model.setValue("/root/hidden/hopedd", getCurrentDate());
  137. break;
  138. default : break;
  139. }
  140. rdo_dayflag.refresh();
  141. ipt_hopedd.refresh();
  142. ]]>
  143. </script>
  144. </select1>
  145. <input id="ipt_hopedd" ref="/root/hidden/hopedd" disabled="true" inputtype="date" style="left:785px; top:28px; width:100px; height:19px; font-weight:bold; text-align:center; background-color:#ffffa0; "/>
  146. <button id="btn_set" class="btn2_letter4" style="left:895px; top:28px; width:64px; height:19px; ">
  147. <caption>일괄지정</caption>
  148. <script type="javascript" ev:event="DOMActivate">
  149. <![CDATA[
  150. var flag = model.getValue("/root/hidden/dayflag");
  151. var hopedd = model.getValue("/root/hidden/hopedd");
  152. var path = "/root/main/prcplist/prcpinfo";
  153. var cnt = instance1.selectNodes(path).length;
  154. for (var i = 1; i <= cnt; i++) {
  155. if (model.getValue(path + "[" + i + "]/chk") != "Y") {
  156. continue;
  157. }
  158. if (flag == "O") {
  159. model.setValue(path + "[" + i + "]/prcphopedd", model.getValue(path + "[" + i + "]/nextorddd"));
  160. } else if (flag == "E") {
  161. model.setValue(path + "[" + i + "]/prcphopedd", model.getValue(path + "[" + i + "]/nextrsrvdd"));
  162. } else {
  163. model.setValue(path + "[" + i + "]/prcphopedd", hopedd);
  164. }
  165. grd_prcp.cellStyle("color", i, grd_prcp.colRef("prcphopedd")) = "#0000ff";
  166. grd_prcp.cellStyle("font-weight", i, grd_prcp.colRef("prcphopedd")) = "bold";
  167. }
  168. ]]>
  169. </script>
  170. </button>
  171. <button id="btn_save" class="btn4_letter2" style="left:1068px; top:27px; width:56px; height:22px; ">
  172. <caption>저장</caption>
  173. <script type="javascript" ev:event="DOMActivate">
  174. <![CDATA[
  175. if (messageBox("처방 희망일을 저장하시겠습니까?", "Q999") != 6) {
  176. return;
  177. }
  178. submit("TXPEA00104");
  179. btn_search.dispatch("DOMActivate");
  180. ]]>
  181. </script>
  182. </button>
  183. <caption id="caption75" class="search_name" style="left:295px; top:29px; width:166px; height:17px; ">처방 희망일 일괄 지정 :</caption>
  184. <caption id="caption1" class="tit_2" style="left:0px; top:65px; width:105px; height:13px; ">대상 처방 목록</caption>
  185. <button id="btn_close" class="btn4_letter2" style="left:1131px; top:27px; width:56px; height:22px; ">
  186. <caption>닫기</caption>
  187. <script type="javascript" ev:event="DOMActivate">
  188. <![CDATA[
  189. window.close();
  190. ]]>
  191. </script>
  192. </button>
  193. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:20px; width:275px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  194. <input id="ipt_pid" ref="/root/send/pid" class="input_search" navindex="1" style="left:98px; top:28px; width:70px; height:19px; font-weight:bold; text-align:center; ">
  195. <script type="javascript" ev:event="onkeyup">
  196. <![CDATA[
  197. if (event.keyCode == "13") {
  198. inputEnterKey("btn_search", "DOMActivate");
  199. }
  200. ]]>
  201. </script>
  202. </input>
  203. <line id="line13" class="line_4" style="x1:200px; y1:27px; x2:200px; y2:49px; "/>
  204. <button id="btn_pid" class="icon_search" style="left:175px; top:29px; width:16px; height:16px; ">
  205. <caption/>
  206. <script type="javascript" ev:event="DOMActivate">
  207. <![CDATA[
  208. model.makeNode("/root/main/patinfo/patinfolist");
  209. modal("SPPMC02500", "", "200", "200");
  210. if (model.getValue("/root/main/popupendflag") != "cancel") {
  211. model.setValue("/root/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  212. btn_search.dispatch("DOMActivate");
  213. } else {
  214. model.removenode("/root/main/patinfo");
  215. }
  216. ]]>
  217. </script>
  218. </button>
  219. <caption id="caption17" class="search_name" style="left:5px; top:29px; width:91px; height:17px; ">등록번호 :</caption>
  220. <button id="btn_search" class="btn1_letter2" navindex="3" style="left:210px; top:27px; width:56px; height:22px; ">
  221. <caption>조회</caption>
  222. <script type="javascript" ev:event="DOMActivate">
  223. <![CDATA[
  224. if (model.getValue("/root/send/pid") == "") {
  225. messageBox("등록번호를 입력해 주십시오.", "E999");
  226. return;
  227. }
  228. grd_prcp.fixedcellischeck(0, grd_prcp.colRef("chk")) = true;
  229. submit("TRPEA00112");
  230. var cnt = instance1.selectNodes("/root/main/prcplist/prcpinfo").length;
  231. grd_prcp.allStyle("data", "background-color") = "#ffffc7";
  232. ]]>
  233. </script>
  234. </button>
  235. <line id="line1" class="line_4" style="x1:1055px; y1:27px; x2:1055px; y2:49px; "/>
  236. </xhtml:body>
  237. </xhtml:html>