SMANT00800_병동별상차림현황.xrw 12 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. <data>
  11. <wardcd/>
  12. <wardnm/>
  13. <data1/>
  14. <data2/>
  15. <data3/>
  16. <data4/>
  17. <data5/>
  18. <data6/>
  19. <data7/>
  20. <data8/>
  21. <data9/>
  22. <data10/>
  23. <data11/>
  24. <data12/>
  25. <data13/>
  26. <data14/>
  27. <data15/>
  28. <data16/>
  29. <data17/>
  30. <data18/>
  31. <data19/>
  32. <data20/>
  33. </data>
  34. <printlist>
  35. <prcpdd/>
  36. <dietmeal/>
  37. <dietnm/>
  38. <w4A/>
  39. <w4B/>
  40. <w5A/>
  41. <w5B/>
  42. <w6A/>
  43. <w6B/>
  44. <w7A/>
  45. <w7B/>
  46. <w7C/>
  47. <w8A/>
  48. <w8B/>
  49. <w8C/>
  50. <w9A/>
  51. <w9B/>
  52. <w9C/>
  53. <we/>
  54. <wh/>
  55. <w3/>
  56. <w10A/>
  57. <w10B/>
  58. <w10C/>
  59. </printlist>
  60. </main>
  61. <main1>
  62. <titleinfo/>
  63. </main1>
  64. <send>
  65. <searchitem>
  66. <appdd/>
  67. <dietmeal/>
  68. </searchitem>
  69. </send>
  70. <temp/>
  71. <init>
  72. <basecode>
  73. <dietmeal>
  74. <A0055>
  75. <cdid/>
  76. <cdnm/>
  77. </A0055>
  78. </dietmeal>
  79. </basecode>
  80. </init>
  81. <rexprnt>
  82. <title>
  83. <item/>
  84. </title>
  85. <ward>
  86. <wardnm/>
  87. </ward>
  88. </rexprnt>
  89. </root>
  90. </instance>
  91. <script type="javascript" ev:event="xforms-ready">
  92. <![CDATA[
  93. model.removenode("/root/main1/titleinfo");
  94. submit("TRANT00803");
  95. var icnt = parseInt(getNodesetCount("/root/main1/titleinfo/title1")) + 1;
  96. var scaption = "병동코드^구분";
  97. var k = 0;
  98. for (var i = 1; i < icnt; i++){
  99. scaption = scaption + "^" + model.getValue("/root/main1/titleinfo[" + i + "]/title1");
  100. k = parseInt(k) + 1;
  101. }
  102. if (k < 20){
  103. for (var i = parseInt(k + 1); i < 21; i++){
  104. scaption = scaption + "^" + "";
  105. grd_data.colHidden(i + 2) = true;
  106. }
  107. }
  108. grd_data.caption = scaption;
  109. finit();
  110. //btn_search.disabled = !checkAuth("R");
  111. button1.disabled = !checkAuth("R");
  112. //btn_save.disabled = !checkAuth("X");
  113. //btn_excel.disabled = !checkAuth("P");
  114. ]]>
  115. </script>
  116. <script type="javascript">
  117. <![CDATA[
  118. function finit() {
  119. // 화면open시 공통코드 setting
  120. zbcfGetCodeList( new Array( "A0055" ), new Array( "/root/init/basecode/dietmeal" ) );
  121. model.resetInstanceNode("/root/main");
  122. model.resetInstanceNode("/root/send");
  123. model.removeNodeset("/root/main");
  124. //model.setFocus("ipt_pid");
  125. model.setValue("/root/send/searchitem/appdd", getCurrentDate());
  126. //화면open시 현재시간을 계산하여 끼니 자동setting
  127. //각 끼니별 2차 마감시간으로부터 2시간후까지는 이전끼니로 setting
  128. var tm = getCurrentTime();
  129. if ( tm.substr(0,4) <= 0830 ) { //조식 2차 마감시간은 06:30
  130. //if ( tm.substr(0,4) <= 0630 ) {
  131. model.setValue("/root/send/searchitem/dietmeal", "1");
  132. } else if ( (tm.substr(0,4) > 0830) && (tm.substr(0,4) <= 1330) ) { //중식 2차 마감시간은 11:30
  133. //} else if ( (tm.substr(0,4) > 0630) && (tm.substr(0,4) <= 1130) ) {
  134. model.setValue("/root/send/searchitem/dietmeal", "2");
  135. } else {
  136. model.setValue("/root/send/searchitem/dietmeal", "3");
  137. }
  138. model.refresh();
  139. //btn_search.dispatch("DOMActivate");
  140. button1.dispatch("DOMActivate");
  141. }
  142. ]]>
  143. </script>
  144. <submission id="TRZBC00101"/>
  145. <submission id="TRANT00801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main"/>
  146. <submission id="TRANT00802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main"/>
  147. <submission id="TRANT00803" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main"/>
  148. </model>
  149. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  150. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  151. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  152. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  153. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  154. </xhtml:head>
  155. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  156. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  157. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:149px; height:14px; ">병동별상차림현황</caption>
  158. </group>
  159. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  160. <caption id="caption1" class="tit_2" style="left:5px; top:56px; width:140px; height:13px; ">병동별상차림현황</caption>
  161. <line id="line1" class="line_1" style="x1:0px; y1:71px; x2:1194px; y2:71px; "/>
  162. <datagrid id="grd_data" nodeset="/root/main/data" caption="병동코드^구분^일반밥^선택밥^보호자밥^일반죽^선택죽^미음^소아밥^소아죽^산모밥^산모죽^caption1^caption2^caption3^caption4^caption5^caption6^caption7^caption8^caption9^caption10" colsep="^" colwidth="10, 100, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:76px; width:1194px; height:667px; text-align:center; ">
  163. <col ref="wardcd" visibility="hidden"/>
  164. <col ref="wardnm"/>
  165. <col ref="data1"/>
  166. <col ref="data2"/>
  167. <col ref="data3"/>
  168. <col ref="data4"/>
  169. <col ref="data5"/>
  170. <col ref="data6"/>
  171. <col ref="data7"/>
  172. <col ref="data8"/>
  173. <col ref="data9"/>
  174. <col ref="data10"/>
  175. <col ref="data11"/>
  176. <col ref="data12"/>
  177. <col ref="data13"/>
  178. <col ref="data14"/>
  179. <col ref="data15"/>
  180. <col ref="data16"/>
  181. <col ref="data17"/>
  182. <col ref="data18"/>
  183. <col ref="data19"/>
  184. <col ref="data20"/>
  185. </datagrid>
  186. <button id="btn_excel" class="btn2_letter4" style="left:1130px; top:50px; width:64px; height:19px; ">
  187. <caption>엑셀저장</caption>
  188. <script type="javascript" ev:event="DOMActivate">
  189. <![CDATA[
  190. var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
  191. grd_data.saveExcel(file);
  192. ]]>
  193. </script>
  194. </button>
  195. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  196. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  197. <caption id="caption2" class="search_name" style="left:41px; top:9px; width:64px; height:17px; ">일자 :</caption>
  198. <caption id="caption3" class="search_name" style="left:316px; top:9px; width:62px; height:17px; ">끼니 :</caption>
  199. <button id="btn_search" class="btn1_letter2" visibility="hidden" style="left:950px; top:5px; width:56px; height:22px; ">
  200. <caption>조회</caption>
  201. <script type="javascript" ev:event="DOMActivate">
  202. <![CDATA[
  203. submit("TRANT00801");
  204. //그리드 하단에 합계 구하기
  205. grd_data.addrow();
  206. model.setValue("/root/main/data["+grd_data.row+"]/"+ grd_data.colAttribute(2, "ref"), "계");
  207. var val = 0;
  208. for ( j = 3; j < grd_data.cols; j++) {
  209. var sum = 0;
  210. for ( i=1; i<grd_data.rows-1; i++) {
  211. val = model.getValue("/root/main/data["+ i +"]/"+ grd_data.colAttribute(j, "ref"));
  212. sum = parseInt(sum) + parseInt(val);
  213. }
  214. model.setValue("/root/main/data["+grd_data.row+"]/"+ grd_data.colAttribute(j, "ref"), sum);
  215. }
  216. //값이 0 인 컬럼 공백으로 표시
  217. // for ( j = 3; j < grd_data.cols; j++) {
  218. // for ( i=1; i<grd_data.rows-1; i++) {
  219. // if ( model.getValue("/root/main/data["+ i +"]/"+ grd_data.colAttribute(j, "ref"))=="0" ) {
  220. // model.setValue("/root/main/data["+grd_data.row+"]/"+ grd_data.colAttribute(j, "ref"), "");
  221. // }
  222. // }
  223. // }
  224. model.refresh();
  225. ]]>
  226. </script>
  227. </button>
  228. <line id="line13" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29px; "/>
  229. <input id="ipt_appdd" ref="/root/send/searchitem/appdd" class="input_s_essential" inputtype="date" style="left:105px; top:8px; width:100px; height:19px; "/>
  230. <button id="btn_beforedd" class="icon_pre" style="left:208px; top:10px; width:13px; height:15px; ">
  231. <caption/>
  232. <script type="javascript" ev:event="onclick">
  233. <![CDATA[
  234. var dd = model.getValue("/root/send/searchitem/appdd");
  235. dd = dd.toDate().getAddDate(-1, "D");
  236. dd = dd.getDateFormat();
  237. model.setValue("/root/send/searchitem/appdd", dd);
  238. model.refresh();
  239. ]]>
  240. </script>
  241. </button>
  242. <button id="btn_nextdd" class="icon_next" style="left:221px; top:10px; width:13px; height:15px; ">
  243. <caption/>
  244. <script type="javascript" ev:event="onclick">
  245. <![CDATA[
  246. var dd = model.getValue("/root/send/searchitem/appdd");
  247. dd = dd.toDate().getAddDate(1, "D");
  248. dd = dd.getDateFormat();
  249. model.setValue("/root/send/searchitem/appdd", dd);
  250. model.refresh();
  251. ]]>
  252. </script>
  253. </button>
  254. <select1 id="rdo_dietmeal" ref="/root/send/searchitem/dietmeal" class="radio_search" appearance="full" cellspacing="5" cols="3" rows="1" overflow="visible" style="left:380px; top:9px; width:150px; height:20px; ">
  255. <choices>
  256. <item>
  257. <label>조식</label>
  258. <value>1</value>
  259. </item>
  260. <item>
  261. <label>중식</label>
  262. <value>2</value>
  263. </item>
  264. <item>
  265. <label>석식</label>
  266. <value>3</value>
  267. </item>
  268. </choices>
  269. </select1>
  270. <button id="button1" class="btn1_letter2" style="left:1120px; top:5px; width:56px; height:22px; ">
  271. <caption>조회</caption>
  272. <script type="javascript" ev:event="DOMActivate">
  273. <![CDATA[
  274. submit("TRANT00802");
  275. //그리드 하단에 합계 구하기
  276. grd_data.addrow();
  277. model.setValue("/root/main/data["+grd_data.row+"]/"+ grd_data.colAttribute(2, "ref"), "계");
  278. var val = 0;
  279. for ( j = 3; j < grd_data.cols; j++) {
  280. var sum = 0;
  281. for ( i=1; i<grd_data.rows-1; i++) {
  282. val = model.getValue("/root/main/data["+ i +"]/"+ grd_data.colAttribute(j, "ref"));
  283. sum = parseInt(sum) + parseInt(val);
  284. }
  285. model.setValue("/root/main/data["+grd_data.row+"]/"+ grd_data.colAttribute(j, "ref"), sum);
  286. }
  287. //값이 0 인 컬럼 공백으로 표시
  288. // for ( j = 3; j < grd_data.cols; j++) {
  289. // for ( i=1; i<grd_data.rows-1; i++) {
  290. // if ( model.getValue("/root/main/data["+ i +"]/"+ grd_data.colAttribute(j, "ref"))=="0" ) {
  291. // model.setValue("/root/main/data["+grd_data.row+"]/"+ grd_data.colAttribute(j, "ref"), "");
  292. // }
  293. // }
  294. // }
  295. model.refresh();
  296. ]]>
  297. </script>
  298. </button>
  299. </group>
  300. </group>
  301. <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
  302. <button id="button8" class="btn3_letter4" disabled="true" style="left:0px; top:5px; width:80px; height:22px; ">
  303. <caption>식수통계</caption>
  304. </button>
  305. <button id="btn_print" class="btn3_letter2" visibility="hidden" style="left:285px; top:5px; width:56px; height:22px; ">
  306. <caption>출력</caption>
  307. <script type="javascript" ev:event="DOMActivate">
  308. <![CDATA[
  309. exeReportPreview("RPANT00801", "XMLSTR", "/root/main/printlist");
  310. //exeReportPreview("RPANT00802", "XMLSTR", "/root/main/printlist"); //B컨테이너 상차림현황 출력
  311. ]]>
  312. </script>
  313. </button>
  314. <button id="button2" class="btn3_letter2" style="left:95px; top:5px; width:56px; height:22px; ">
  315. <caption>출력</caption>
  316. <script type="javascript" ev:event="DOMActivate">
  317. <![CDATA[
  318. // exeReportPreview("RPANT00802", "XMLSTR", "/root/main/printlist");
  319. exeReportPreview("RPANT00803", "XMLSTR", "/root/main/printlist");
  320. //exeReportPreview("RPANT00802", "XMLSTR", "/root/main/printlist"); //B컨테이너 상차림현황 출력
  321. ]]>
  322. </script>
  323. </button>
  324. </group>
  325. </xhtml:body>
  326. </xhtml:html>