SMANT00250_멸균식간식및음료수통계.xrw 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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. <bmealstatslist>
  11. <dietnm2/>
  12. <clinccmtcnts/>
  13. <prcpdelivefact/>
  14. <tfdtlcd/>
  15. <remark/>
  16. <room1/>
  17. <dietnm1/>
  18. <bfremfactcd/>
  19. <bfremfactnm/>
  20. <room2/>
  21. <choidietyn/>
  22. <iptpsn/>
  23. <iptdt/>
  24. <prcpdd/>
  25. <dietmeal/>
  26. <calr/>
  27. <mealcnt/>
  28. <procermealyn/>
  29. <dietcd/>
  30. <dietmdlnm/>
  31. <dietsmlnm/>
  32. <calrunit/>
  33. <remark1/>
  34. <remark2/>
  35. <remark3/>
  36. <dietnm/>
  37. <bmealdrnknm/>
  38. <prntprcpdelivefact/>
  39. <dietcd/>
  40. <bmealdrnknm/>
  41. <bmealdrnkcnt/>
  42. <dietnm/>
  43. </bmealstatslist>
  44. </main>
  45. <main2>
  46. <magamlist>
  47. <magaminfo>
  48. <magamyn/>
  49. </magaminfo>
  50. </magamlist>
  51. </main2>
  52. <send>
  53. <searchitem>
  54. <dietdd/>
  55. <mealflag/>
  56. <endflag/>
  57. <nmcardflag/>
  58. <ward/>
  59. <nutrward/>
  60. <updtyn/>
  61. <updtflag/>
  62. <instcd/>
  63. <userid/>
  64. <endyn/>
  65. <endmsg/>
  66. <pid/>
  67. <hngnm/>
  68. </searchitem>
  69. </send>
  70. <temp>
  71. <ret>
  72. <retmsg/>
  73. </ret>
  74. </temp>
  75. <init>
  76. </init>
  77. </root>
  78. </instance>
  79. <script type="javascript" ev:event="xforms-ready">
  80. <![CDATA[
  81. finit();
  82. btn_search.disabled = !checkAuth("R");
  83. model.setValue("/root/send/searchitem/instcd", getUserInfo("dutplceinstcd"));
  84. model.setValue("/root/send/searchitem/userid", getUserInfo("userid"));
  85. ]]>
  86. </script>
  87. <script type="javascript">
  88. <![CDATA[
  89. //초기화
  90. function finit() {
  91. //화면open시 공통코드 setting
  92. model.removeNodeset("/root/main/data");
  93. model.setValue("/root/send/searchitem/dietdd", getCurrentDate());
  94. //화면open시 현재시간을 계산하여 끼니와 마감구분 자동setting
  95. //각 끼니별 2차 마감시간으로부터 2시간후까지는 이전끼니로 setting
  96. var tm = getCurrentTime();
  97. if ( tm.substr(0,4) <= 0830 ) { //조식 2차 마감시간은 06:30
  98. model.setValue("/root/send/searchitem/mealflag", "1");
  99. if ( tm.substr(0,4) <= 0530 ) {
  100. model.setValue("/root/send/searchitem/endflag", "1");
  101. } else {
  102. model.setValue("/root/send/searchitem/endflag", "2");
  103. }
  104. } else if ( (tm.substr(0,4) > 0830) && (tm.substr(0,4) <= 1330) ) { //중식 2차 마감시간은 11:30
  105. model.setValue("/root/send/searchitem/mealflag", "2");
  106. if ( tm.substr(0,4) <= 1030 ) {
  107. model.setValue("/root/send/searchitem/endflag", "1");
  108. } else {
  109. model.setValue("/root/send/searchitem/endflag", "2");
  110. }
  111. } else if ( (tm.substr(0,4) > 1330) ) {
  112. model.setValue("/root/send/searchitem/mealflag", "3");
  113. if ( tm.substr(0,4) <= 1600 ) {
  114. model.setValue("/root/send/searchitem/endflag", "1");
  115. } else {
  116. model.setValue("/root/send/searchitem/endflag", "2");
  117. }
  118. }
  119. model.refresh();
  120. }
  121. ]]>
  122. </script>
  123. <submission id="TRANT00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main2/magamlist"/>
  124. <bind id="bind_ward" ref="/root/main/data/ward" readonly="../ward!=''"/>
  125. <submission id="TRANT00251" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main"/>
  126. </model>
  127. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  128. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  129. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  130. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  131. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  132. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  133. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  134. </xhtml:head>
  135. <xhtml:body guideline="1,1193;1,0;2,784;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  136. <group id="group1" style="left:0px; top:0px; width:1195px; height:15px; ">
  137. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:190px; height:13px; ">멸균식 간식 및 음료수 통계</caption>
  138. </group>
  139. <group id="group3" scroll="auto" style="left:0px; top:15px; width:1195px; height:745px; ">
  140. <group id="group2" style="left:0px; top:10px; width:1195px; height:55px; vertical-align:top; ">
  141. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1194px; height:32px; background-color:#fffbf2; "/>
  142. <caption id="caption1" class="search_name" style="left:15px; top:17px; width:86px; height:17px; ">일자 :</caption>
  143. <input id="ipt_dietdd" ref="/root/send/searchitem/dietdd" class="input_s_essential" inputtype="date" style="left:79px; top:16px; width:100px; height:19px; "/>
  144. <button id="btn_search" class="btn1_letter2" style="left:1118px; top:15px; width:56px; height:22px; ">
  145. <caption>조회</caption>
  146. <script type="javascript" ev:event="DOMActivate">
  147. <![CDATA[
  148. //조회시점이 마감시간 전인지 마감시간 후인지 체크
  149. submit("TRANT00103");
  150. var tm = getCurrentTime();
  151. var dd = model.getValue("/root/send/searchitem/dietdd");
  152. var mealflag = model.getValue("/root/send/searchitem/mealflag"); //끼니
  153. var endflag = model.getValue("/root/send/searchitem/endflag"); //마감구분
  154. if (model.getValue("/root/main2/magamlist/magaminfo/magamyn") == "N"){
  155. //마감전 데이터임.
  156. model.setValue("/root/send/searchitem/endyn", "N");
  157. model.setValue("/root/send/searchitem/endmsg", "식사마감이 완료되지 않았습니다.");
  158. } else {
  159. //마감후 데이터임.
  160. model.setValue("/root/send/searchitem/endyn", "Y");
  161. model.setValue("/root/send/searchitem/endmsg", "마감완료된 식사입니다.");
  162. }
  163. if ( model.getValue("/root/send/searchitem/ward") == "" ) {
  164. model.setValue("/root/send/searchitem/ward", "-");
  165. }
  166. submit("TRANT00251");
  167. model.refresh();
  168. ]]>
  169. </script>
  170. </button>
  171. <line id="line1" style="x1:1099px; y1:15px; x2:1099px; y2:37px; "/>
  172. <select1 id="rdo_meal" ref="/root/send/searchitem/mealflag" class="radio_search" appearance="full" cellspacing="5" cols="3" rows="1" overflow="visible" style="left:355px; top:16px; width:150px; height:20px; ">
  173. <choices>
  174. <item>
  175. <label>조식</label>
  176. <value>1</value>
  177. </item>
  178. <item>
  179. <label>중식</label>
  180. <value>2</value>
  181. </item>
  182. <item>
  183. <label>석식</label>
  184. <value>3</value>
  185. </item>
  186. </choices>
  187. </select1>
  188. <caption id="caption5" class="search_name" style="left:265px; top:17px; width:91px; height:17px; ">끼니구분 :</caption>
  189. <button id="btn_before" class="icon_pre" style="left:183px; top:18px; width:13px; height:15px; ">
  190. <caption/>
  191. <script type="javascript" ev:event="onclick">
  192. <![CDATA[
  193. var dd = model.getValue("/root/send/searchitem/dietdd");
  194. dd = dd.toDate().getAddDate(-1, "D");
  195. dd = dd.getDateFormat();
  196. model.setValue("/root/send/searchitem/dietdd", dd);
  197. model.refresh();
  198. ]]>
  199. </script>
  200. </button>
  201. <button id="button1" class="icon_next" style="left:196px; top:18px; width:13px; height:15px; ">
  202. <caption/>
  203. <script type="javascript" ev:event="onclick">
  204. <![CDATA[
  205. var dd = model.getValue("/root/send/searchitem/dietdd");
  206. dd = dd.toDate().getAddDate(1, "D");
  207. dd = dd.getDateFormat();
  208. model.setValue("/root/send/searchitem/dietdd", dd);
  209. model.refresh();
  210. ]]>
  211. </script>
  212. </button>
  213. </group>
  214. <button id="btn_excel" class="btn2_letter2" style="left:1146px; top:67px; width:42px; height:19px; ">
  215. <caption>엑셀</caption>
  216. <script type="javascript" ev:event="DOMActivate">
  217. <![CDATA[
  218. if ( grd_data.rows-1 > 0 ) {
  219. var filename = window.fileDialog("save", ",", false, "멸균식간식음료수통계", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  220. if (filename != "") {
  221. grd_data.saveExcel(filename, "grd_data", true, false, "", "", "");
  222. }
  223. } else {
  224. messageBox("엑셀로 저장할 데이터가", "I004")
  225. return;
  226. }
  227. ]]>
  228. </script>
  229. </button>
  230. <datagrid id="grd_data" nodeset="/root/main/bmealstatslist" caption="입력일시^식사코드^식사명^간식 및 음료수명^건수" colsep="^" colwidth="110, 100, 210, 220, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:93px; width:1195px; height:601px; text-align:center; ">
  231. <col ref="iptdt" visibility="hidden" format="yyyy-mm-dd hh:nn"/>
  232. <col ref="dietcd"/>
  233. <col ref="dietnm" style="text-align:left; "/>
  234. <col ref="bmealdrnknm" style="text-align:left; "/>
  235. <col ref="bmealdrnkcnt" style="text-align:center; "/>
  236. </datagrid>
  237. <line id="line5" class="line_1" style="x1:0px; y1:93px; x2:1195px; y2:93px; "/>
  238. </group>
  239. </xhtml:body>
  240. </xhtml:html>