SMANT01800_환자식검식일지.xrw 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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. <data>
  11. <item>
  12. <mealflag/>
  13. <seq/>
  14. <dishnm/>
  15. </item>
  16. </data>
  17. <appdd>
  18. <appdd1/>
  19. <appdd2/>
  20. <appdd3/>
  21. <appdd4/>
  22. </appdd>
  23. <print>
  24. <dishnm1/>
  25. <dishnm2/>
  26. <dishnm3/>
  27. <dishnm4/>
  28. <dishnm5/>
  29. <dishnm6/>
  30. <dishnm7/>
  31. <dishnm8/>
  32. <dishnm9/>
  33. <dishnm10/>
  34. <dishnm11/>
  35. <dishnm12/>
  36. <dishnm13/>
  37. <dishnm14/>
  38. <dishnm15/>
  39. </print>
  40. </main>
  41. <send>
  42. <searchitem>
  43. <appdd/>
  44. <menuflag/>
  45. </searchitem>
  46. </send>
  47. <send1>
  48. <list>
  49. <prid/>
  50. </list>
  51. </send1>
  52. <init/>
  53. <hidden/>
  54. </root>
  55. </instance>
  56. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  57. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  58. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  60. <script type="javascript" ev:event="xforms-ready">
  61. <![CDATA[
  62. finit();
  63. ]]>
  64. </script>
  65. <submission id="TRANT01801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" replace="instance" resultref="/root/main/data"/>
  66. <submission id="TRANT01409" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/send1"/>
  67. </model>
  68. <script type="javascript">
  69. <![CDATA[
  70. function finit() {
  71. makeReportPreview(5,55,1170,700);
  72. model.resetInstanceNode("/root/main");
  73. model.resetInstanceNode("/root/send");
  74. model.removeNodeset("/root/main/data");
  75. model.setValue("/root/send/searchitem/appdd", getCurrentDate());
  76. model.setValue("/root/send/searchitem/menuflag", 'Q1');
  77. btn_search.dispatch("DOMActivate");
  78. model.refresh();
  79. }
  80. ]]>
  81. </script>
  82. </xhtml:head>
  83. <xhtml:body guideline="1,1193;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  84. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  85. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:14px; ">환자식검식일지</caption>
  86. </group>
  87. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:770px; ">
  88. <group id="group1" style="left:5px; top:10px; width:1180px; height:35px; vertical-align:top; ">
  89. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1178px; height:35px; background-color:#fffbf2; "/>
  90. <caption id="caption3" class="search_name" style="left:25px; top:9px; width:65px; height:17px; ">일자 :</caption>
  91. <line id="line14" class="line_4" style="x1:1095px; y1:7px; x2:1095px; y2:29px; "/>
  92. <input id="ipt_appdd" ref="/root/send/searchitem/appdd" navindex="1" inputtype="date" format="yyyy-mm-dd" style="left:90px; top:9px; width:95px; height:19px; text-align:center; ">
  93. <script type="javascript" ev:event="xforms-value-changed">
  94. <![CDATA[
  95. btn_search.dispatch("DOMActivate");
  96. ]]>
  97. </script>
  98. </input>
  99. <button id="btn_before" class="icon_pre" style="left:190px; top:12px; width:13px; height:15px; ">
  100. <caption/>
  101. <script type="javascript" ev:event="DOMActivate">
  102. <![CDATA[
  103. var ym = model.getValue("/root/send/searchitem/appdd");
  104. ym = ym.toDate().getAddDate(-1, "D");
  105. ym = ym.getDateFormat();
  106. model.setValue("/root/send/searchitem/appdd", ym);
  107. model.refresh();
  108. btn_search.dispatch("DOMActivate");
  109. ]]>
  110. </script>
  111. </button>
  112. <button id="btn_next" class="icon_next" style="left:203px; top:12px; width:13px; height:15px; ">
  113. <caption/>
  114. <script type="javascript" ev:event="DOMActivate">
  115. <![CDATA[
  116. var ym = model.getValue("/root/send/searchitem/appdd");
  117. ym = ym.toDate().getAddDate(1, "D");
  118. ym = ym.getDateFormat();
  119. model.setValue("/root/send/searchitem/appdd", ym);
  120. model.refresh();
  121. btn_search.dispatch("DOMActivate");
  122. ]]>
  123. </script>
  124. </button>
  125. <button id="btn_search" class="btn1_letter2" visibility="hidden" style="left:1110px; top:7px; width:56px; height:22px; ">
  126. <caption>조회</caption>
  127. <script type="javascript" ev:event="DOMActivate">
  128. <![CDATA[
  129. model.removeNodeset("/root/main/data/item");
  130. model.resetInstanceNode("/root/main/appdd");
  131. var appdd = model.getValue("/root/send/searchitem/appdd");
  132. if (isValidDateTime(appdd, "YYYYMMDD") == false) {
  133. messageBox("조회일자의 형식이", "E016");
  134. model.setFocus("ipt_appdd");
  135. return;
  136. }
  137. submit("TRANT01801");
  138. submit("TRANT01409");
  139. var cnt = getNodesetCount("/root/main/data/item");
  140. var seq = 1;
  141. var dishnm = "";
  142. for ( i=1; i<=cnt; i++ ) {
  143. dishnm = model.getValue("/root/main/data/item["+ i +"]/dishnm");
  144. if (dishnm != "" && dishnm != '흰밥') {
  145. model.setValue("/root/main/print/dishnm"+ seq, model.getValue("/root/main/data/item["+ i +"]/dishnm"));
  146. if (i==5) {
  147. seq = 6;
  148. } else if (i==10) {
  149. seq = 11;
  150. } else {
  151. seq = seq + 1;
  152. }
  153. }
  154. }
  155. //월+일 구하기
  156. var dd = parseInt(model.getValue("/root/send1/list/prid"));
  157. var sdd = appdd.substr(6,2);
  158. /*
  159. if ( appdd.substr(7,1) == '0' ) {
  160. var seqdd = appdd.substr(0,6) + dd;
  161. } else {
  162. var seqdd = appdd.substr(0,6) + '0' + appdd.substr(7,1);
  163. }
  164. */
  165. var seqdd = "";
  166. if (sdd > dd){
  167. var scnt = parseInt(sdd) - parseInt(dd);
  168. if (scnt > dd){
  169. scnt = parseInt(scnt) - parseInt(dd);
  170. }
  171. if (scnt < 10){
  172. seqdd = appdd.substr(0,6) + '0' + scnt;
  173. }else{
  174. seqdd = appdd.substr(0,6) + scnt;
  175. }
  176. }else{
  177. seqdd = appdd.substr(0,6) + sdd;
  178. }
  179. for ( i=1; i<=4; i++ ) {
  180. if ( seqdd.substr(0,6) == appdd.substr(0,6) ) {
  181. model.setValue("/root/main/appdd/appdd"+ i, seqdd.substr(4,2)+'월 '+seqdd.substr(6,2)+'일');
  182. } else {
  183. model.setValue("/root/main/appdd/appdd"+ i, "");
  184. }
  185. seqdd = seqdd.toDate("YYYYMMDD").getAddDate(dd, "D");
  186. seqdd = getDateTime(seqdd, 'D');
  187. }
  188. exeReportPreview("RPANT01801", "XMLSTR", "", "", "false","","","","","false", "", "");
  189. ]]>
  190. </script>
  191. </button>
  192. </group>
  193. <line id="line2" class="line_1" style="x1:5px; y1:50px; x2:1185px; y2:50px; "/>
  194. <datagrid id="grd_data" nodeset="/root/main/data/item" autoresize="true" caption="끼니^순번^식단명" colsep="^" colwidth="50, 50, 200" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:55px; width:1180px; height:700px; ">
  195. <col ref="mealflag" style="text-align:center; "/>
  196. <col ref="seq" style="text-align:center; "/>
  197. <col ref="dishnm" style="text-align:left; "/>
  198. </datagrid>
  199. </group>
  200. </xhtml:body>
  201. </xhtml:html>