SMDRM00200_보고서-식수통계.xrw 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <msg>
  12. <instnm/>
  13. <eatnm/>
  14. <count/>
  15. <duration/>
  16. </msg>
  17. </list>
  18. </main>
  19. <send>
  20. <eatdds/>
  21. <eatdde/>
  22. <instcd/>
  23. <eatddselect/>
  24. </send>
  25. <properties>
  26. <error>
  27. <msg/>
  28. </error>
  29. </properties>
  30. <temp>
  31. </temp>
  32. <init>
  33. <instcd>
  34. <itemlist>
  35. <cdid/>
  36. <cdnm/>
  37. </itemlist>
  38. </instcd>
  39. <dept>
  40. <itemlist>
  41. <deptcd/>
  42. <depthngnm/>
  43. </itemlist>
  44. </dept>
  45. </init>
  46. <total>
  47. <issdgtotal>0</issdgtotal>
  48. </total>
  49. </root>
  50. </instance>
  51. <script type="javascript" ev:event="xforms-ready">
  52. <![CDATA[
  53. submit("TRDDP00203");
  54. model.setValue("/root/total/issdgtotal", 0);
  55. // 당일날짜 세팅
  56. addComboItem("cmb_instcd");
  57. model.removeNodeset("/root/main/list/msg");
  58. model.setValue("/root/send/eatdds", getCurrentDate());
  59. model.setValue("/root/send/eatdde", getCurrentDate());
  60. model.refresh();
  61. ]]>
  62. </script>
  63. <submission id="TRDDP00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp" replace="instance" resultref="/root/init/instcd"/>
  64. <submission id="TRDRM00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/list"/>
  65. </model>
  66. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  67. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  68. <script type="javascript" src="../../../com/authinfoweb/js/ZSA001.js"/>
  69. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  71. </xhtml:head>
  72. <xhtml:body guideline="1,1194;1,1195;2,49;2,10;2,87;2,33;2,773;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  73. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  74. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">보고서 - 식수 통계</caption>
  75. </group>
  76. <group id="group3" style="left:0px; top:13px; width:1195px; height:767px; ">
  77. <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; ">
  78. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  79. <button id="button1" class="btn1_letter2" style="left:1125px; top:7px; width:56px; height:22px; ">
  80. <caption>조회</caption>
  81. <script type="javascript" ev:event="DOMActivate">
  82. <![CDATA[
  83. var issddsDate = input11.value;
  84. var issddeDate = input12.value;
  85. if(issddsDate>issddeDate){
  86. messageBox("조회하고자 하는 식수기간을 제대로", "C001");
  87. }else if(issddsDate.length<8 | issddeDate.length<8){
  88. messageBox("조회하고자 하는 식수기간을 제대로", "C001");
  89. }else{
  90. submit("TRDRM00201");
  91. var vRow = grd_scrnlist.rows;
  92. var issdgtotal=0;
  93. for(var i = 1; i<vRow; i++){
  94. if((model.getValue("/root/main/list/msg["+i+"]/count"))==""){
  95. issdgtotal +=0;
  96. }else{
  97. issdgtotal +=parseInt(model.getValue("/root/main/list/msg["+i+"]/count"));
  98. }
  99. }
  100. model.setValue("/root/total/issdgtotal", issdgtotal);
  101. var eatdds = (model.getValue("/root/send/eatdds").toDate("YYYYMMDD")).getDateFormat("YYYY-MM-DD");
  102. var eatdde = (model.getValue("/root/send/eatdde").toDate("YYYYMMDD")).getDateFormat("YYYY-MM-DD");
  103. for(var j=1; j<vRow; j++){
  104. model.setValue("/root/main/list/msg["+j+"]/duration", eatdds+" ~ "+eatdde);
  105. }
  106. model.refresh();
  107. }
  108. ]]>
  109. </script>
  110. </button>
  111. <line id="line2" class="line_4" style="x1:1110px; y1:7px; x2:1110px; y2:27px; border-color:#ffe4bb; border-left-style:solid; "/>
  112. <caption id="caption5" class="search_name" style="left:11px; top:9px; width:84px; height:17px; ">식수기간</caption>
  113. <select1 id="cmb_instcd" ref="/root/send/instcd" appearance="minimal" style="left:410px; top:8px; width:135px; height:19px; ">
  114. <choices>
  115. <itemset nodeset="/root/init/instcd/itemlist">
  116. <label ref="cdnm"/>
  117. <value ref="cdid"/>
  118. </itemset>
  119. </choices>
  120. </select1>
  121. <caption id="caption4" class="search_name" style="left:335px; top:9px; width:80px; height:17px; vertical-align:middle; ">기관명</caption>
  122. <input id="input11" ref="/root/send/eatdds" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:105px; top:8px; width:100px; height:19px; "/>
  123. <input id="input12" ref="/root/send/eatdde" class="input_s_essential" editable="true" inputtype="date" style="left:221px; top:8px; width:100px; height:19px; "/>
  124. <caption id="caption3" class="search_no_b" style="left:207px; top:8px; width:15px; height:17px; ">~</caption>
  125. </group>
  126. <caption id="caption2" class="tit_2" style="left:5px; top:60px; width:300px; height:14px; font-family:돋움; vertical-align:middle; ">식수 통계 리스트</caption>
  127. <line id="line1" class="line_1" style="x1:0px; y1:75px; x2:1194px; y2:75px; "/>
  128. <datagrid id="grd_scrnlist" nodeset="/root/main/list/msg" caption="기관명^식수유형^식수량^식수기간" colsep="^" colwidth="226, 150, 100, 267" dataheight="23" defaultrows="1" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" style="left:0px; top:80px; width:1194px; height:659px; ">
  129. <col explorerbar="sortshowmove" ref="instnm" style="text-align:center; "/>
  130. <col explorerbar="sortshowmove" ref="eatnm" format="#,###" style="text-align:center; "/>
  131. <col explorerbar="sortshowmove" ref="count" style="text-align:center; "/>
  132. <col explorerbar="sortshowmove" ref="duration" visibility="hidden" style="text-align:center; "/>
  133. </datagrid>
  134. <button id="btn_cle" class="btn4_letter3" style="left:1124px; top:745px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
  135. <caption>초기화</caption>
  136. <script type="javascript" ev:event="DOMActivate">
  137. <![CDATA[
  138. model.reset();
  139. model.refresh();
  140. ]]>
  141. </script>
  142. </button>
  143. <select1 id="combo1" ref="/root/send/eatddselect" appearance="minimal" style="left:645px; top:17px; width:100px; height:19px; ">
  144. <choices>
  145. <item>
  146. <label>- 선택 -</label>
  147. <value/>
  148. </item>
  149. <item>
  150. <label>일</label>
  151. <value>D</value>
  152. </item>
  153. <item>
  154. <label>주</label>
  155. <value>W</value>
  156. </item>
  157. <item>
  158. <label>월</label>
  159. <value>M</value>
  160. </item>
  161. <item>
  162. <label>년</label>
  163. <value>Y</value>
  164. </item>
  165. </choices>
  166. <script type="javascript" ev:event="xforms-select">
  167. <![CDATA[
  168. var eatddSelect = model.getValue("/root/send/eatddselect");
  169. var date2 = (model.getValue("/root/send/eatdde"));
  170. var eatddedate = date2.toDate();
  171. if(eatddSelect =='D'){
  172. model.setValue("/root/send/eatdds" , (eatddedate.getAddDate(0,"D")).getDateFormat());
  173. }else if(eatddSelect =='W'){
  174. model.setValue("/root/send/eatdds" , (eatddedate.getAddDate(-6,"D")).getDateFormat());
  175. }else if(eatddSelect =='M'){
  176. model.setValue("/root/send/eatdds" , (eatddedate.getAddDate(-1,"M")).getDateFormat());
  177. }else if(eatddSelect =='Y'){
  178. model.setValue("/root/send/eatdds" , (eatddedate.getAddDate(-1,"Y")).getDateFormat());
  179. }else{
  180. model.setValue("/root/send/eatdds" ,getCurrentDate());
  181. model.setValue("/root/send/eatdde", getCurrentDate());
  182. }
  183. model.refresh();
  184. ]]>
  185. </script>
  186. </select1>
  187. <caption id="caption1" class="search_name" style="left:560px; top:19px; width:76px; height:17px; vertical-align:middle; ">기간선택</caption>
  188. <button id="button3" class="btn2_letter4" style="left:1070px; top:54px; width:64px; height:19px; ">
  189. <caption>엑셀저장</caption>
  190. <script type="javascript" ev:event="DOMActivate">
  191. <![CDATA[
  192. var dataYn = model.getValue("/root/main/list/msg["+1+"]/count");
  193. if(dataYn == ""){
  194. messageBox("조회된 ", "E013");
  195. return;
  196. }else{
  197. var fileName = window.fileDialog("save",",",false,"보고서-식수통계","xls","All Files(*.*)|*.*|Excel Files(*.xls)|*.xls");
  198. }
  199. if(fileName !=""){
  200. grd_scrnlist.saveExcel(fileName);
  201. }
  202. ]]>
  203. </script>
  204. </button>
  205. <caption id="caption7" class="output_text" style="left:185px; top:747px; width:30px; height:13px; ">건</caption>
  206. <button id="btn_print" class="btn6_letter2" style="left:1138px; top:52px; width:56px; height:22px; ">
  207. <caption>출력</caption>
  208. <script type="javascript" ev:event="DOMActivate">
  209. <![CDATA[
  210. var dataYn = model.getValue("/root/main/list/msg["+1+"]/count");
  211. if(dataYn == ""){
  212. messageBox("조회된 ", "E013");
  213. return;
  214. }else{
  215. exeReportPreview("RPDRM00201", "XMLSTR" , "/root/main/list/msg");
  216. }
  217. ]]>
  218. </script>
  219. </button>
  220. <caption id="caption8" class="search_name" style="left:10px; top:744px; width:107px; height:17px; ">총 식수량</caption>
  221. <output id="output1" ref="/root/total/issdgtotal" style="left:115px; top:744px; width:65px; height:19px; text-align:right; "/>
  222. </group>
  223. </xhtml:body>
  224. </xhtml:html>