SMANS01000_식수통계.xrw 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. <list>
  11. <item>
  12. <emplno/>
  13. <name/>
  14. <dutplcedeptnm/>
  15. <deptnm/>
  16. <instnm/>
  17. <count/>
  18. <amount/>
  19. </item>
  20. </list>
  21. </main>
  22. <send>
  23. <fromdd/>
  24. <todd/>
  25. <globalinstance>
  26. <instance1/>
  27. </globalinstance>
  28. </send>
  29. <hidden/>
  30. </root>
  31. </instance>
  32. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  33. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  34. <script type="javascript" ev:event="xforms-ready">
  35. <![CDATA[
  36. //var fromdd = getCurrentDate().toDate().getAddDate(-1, "D").getDateFormat("YYYYMMDD");
  37. //var todd = getCurrentDate().substr(0,6) + fromdd.toDate().getMonthDay();
  38. var fromdd = getCurrentDate().substring(0, 6) + '00'; // 적용일자 현재일자 셋팅
  39. var todd = getCurrentDate().substring(0, 6) + '99'; // 적용일자 현재일자 셋팅
  40. model.removenode("/root/main/list/item");
  41. model.setValue("/root/send/fromdd", fromdd);
  42. model.setValue("/root/send/todd", todd);
  43. model.refresh();
  44. ]]>
  45. </script>
  46. <script type="javascript">
  47. <![CDATA[
  48. /*
  49. * 소속에 따른 소계 및 총계를 생성한다.
  50. */
  51. function fSetSicksuSum() {
  52. // 그리드 merge 및 합계 초기화
  53. grd_sicksulist.autoMerge = false;
  54. grd_sicksulist.mergeCells = "bycolrec";
  55. grd_sicksulist.subtotalPosition = "below";
  56. grd_sicksulist.multiTotals = true;
  57. grd_sicksulist.subtotal("clear", 0, 0);
  58. for(var i =0; i < grd_sicksulist.cols ; i++) {
  59. // 소계
  60. if(i >= grd_sicksulist.colRef("count") && i <= grd_sicksulist.colRef("amount")) {
  61. grd_sicksulist.subtotal("sum", grd_sicksulist.colRef("instnm") , i ,"format:(-,+)#,###; roundmode:round; roundpostion:2", "background-color:#ccffff; font-weight:bold", grd_sicksulist.colRef("instnm"), "소계" );
  62. grd_sicksulist.subtotal("sum", -1 , i ,"format:(-,+)#,###; roundmode:round; roundpostion:2", "background-color:#33cccc; font-weight:bold", grd_sicksulist.colRef("instnm") , "총계" );
  63. }
  64. // 화면 merge
  65. if( i == grd_sicksulist.colRef("instnm")) {
  66. grd_sicksulist.mergeCol(i) = true;
  67. }else{
  68. grd_sicksulist.mergeCol(i) = false;
  69. }
  70. }
  71. grd_sicksulist.merge();
  72. }
  73. ]]>
  74. </script>
  75. <submission id="TRANS01001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/list"/>
  76. </model>
  77. </xhtml:head>
  78. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  79. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  80. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:209px; height:14px; ">본원,칠곡 소속 구분별 식수 통계</caption>
  81. </group>
  82. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  83. <caption id="caption1" class="tit_2" style="left:5px; top:50px; width:200px; height:14px; ">월별 소속 구분별 식수 리스트</caption>
  84. <line id="line1" class="line_1" style="x1:0px; y1:65px; x2:1183px; y2:65px; "/>
  85. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:30px; vertical-align:top; ">
  86. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1193px; height:30px; background-color:#fffbf2; border-color:#ffd799; "/>
  87. <caption id="caption2" class="search_name" style="left:15px; top:7px; width:86px; height:17px; ">조회기간 :</caption>
  88. <line id="line13" class="line_4" style="x1:1110px; y1:4px; x2:1110px; y2:26px; "/>
  89. <button id="btn_sea" class="btn1_letter2" navindex="4" style="left:1120px; top:4px; width:56px; height:22px; ">
  90. <caption>조회</caption>
  91. <script type="javascript" ev:event="DOMActivate">
  92. <![CDATA[
  93. if (model.getValue("/root/send/fromdd") == ""){
  94. messageBox("조회시작일자는", "I003");
  95. model.setFocus("ipt_fromdd");
  96. return;
  97. }
  98. if (model.getValue("/root/send/todd") == ""){
  99. messageBox("조회종료일자는", "I003");
  100. model.setFocus("ipt_todd");
  101. return;
  102. }
  103. if (model.getValue("/root/send/fromdd") > model.getValue("/root/send/todd")){
  104. messageBox("조회 시작일자는 종료일자 보다 클 수", "I004");
  105. model.setFocus("ipt_fromdd");
  106. return;
  107. }
  108. var fromdd = model.getValue("/root/send/fromdd")+ '00'; // 적용일자 현재일자 셋팅
  109. var todd = model.getValue("/root/send/todd") + '99'; // 적용일자 현재일자 셋팅
  110. model.setValue("/root/send/fromdd", fromdd);
  111. model.setValue("/root/send/todd", todd);
  112. var ret = submit("TRANS01001");
  113. if(ret) {
  114. fSetSicksuSum();
  115. model.refresh();
  116. }
  117. ]]>
  118. </script>
  119. </button>
  120. <input id="ipt_todd" ref="/root/send/todd" class="input_default" navindex="2" inputtype="date" format="yyyy-mm" style="left:207px; top:6px; width:85px; height:19px; "/>
  121. <caption id="caption5" class="search_no_b" style="left:192px; top:7px; width:12px; height:17px; ">~</caption>
  122. <input id="ipt_fromdd" ref="/root/send/fromdd" class="input_default" navindex="1" inputtype="date" format="yyyy-mm" style="left:106px; top:6px; width:85px; height:19px; "/>
  123. </group>
  124. <button id="btn_excsave" class="btn2_letter4" style="left:1120px; top:45px; width:64px; height:19px; ">
  125. <caption>엑셀저장</caption>
  126. <script type="javascript" ev:event="DOMActivate">
  127. <![CDATA[
  128. var fileName = window.fileDialog("save", ",", false, "", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  129. if (fileName != "") {
  130. grd_sicksulist.saveExcel(fileName);
  131. }
  132. ]]>
  133. </script>
  134. </button>
  135. <datagrid id="grd_sicksulist" nodeset="/root/main/list/item" class="datagrid2" caption="소속^사번^성명^본원부서^칠곡부서^사용수^총금액" colsep="^" colwidth="100, 70, 100, 300, 300, 100, 100" explorerbar="sortshow" frozencols="7" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" selectionmode="free" style="left:0px; top:71px; width:1183px; height:624px; ">
  136. <col disabled="true" ref="instnm" style="text-align:center; "/>
  137. <col disabled="true" ref="emplno" style="text-align:center; "/>
  138. <col disabled="true" ref="name" style="text-align:center; "/>
  139. <col disabled="true" ref="dutplcedeptnm" style="text-align:center; "/>
  140. <col disabled="true" ref="deptnm" style="text-align:center; "/>
  141. <col disabled="true" ref="count" style="text-align:center; "/>
  142. <col disabled="true" ref="amount" style="text-align:center; "/>
  143. <script type="javascript" ev:event="onaftersort">
  144. <![CDATA[
  145. grd_sicksulist.gridtoinstance();
  146. ]]>
  147. </script>
  148. </datagrid>
  149. <button id="btn_prt" class="btn1_letter5" style="left:1010px; top:14px; width:92px; height:22px; ">
  150. <caption>PDF 저장</caption>
  151. <script type="javascript" ev:event="DOMActivate">
  152. <![CDATA[
  153. // 매개변수
  154. model.makeValue("/root/main/export/weeknm" , model.getValue("/root/send/srchdd").toDate("YYYYMMDD").getDayOfWeek("k"));
  155. model.makeValue("/root/main/export/srchdd" , model.getValue("/root/send/srchdd").toDate("YYYYMMDD").getDateFormat("YYYY/MM/DD"));
  156. exeReportPreview("RPANS01001", "XMLSTR" , "" , "" , "" , "" , "pdf" , "식수통계" , "true" , "true" ,"" ,"" ,"" ,"" ,"" ,"" ,"" ,"" );
  157. ]]>
  158. </script>
  159. </button>
  160. </group>
  161. </xhtml:body>
  162. </xhtml:html>