SMANS00300_직원식통계.xrw 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <appdd/>
  12. <psnno1/>
  13. <psnno2/>
  14. <psnno3/>
  15. <insum/>
  16. <psnno4/>
  17. <psnno5/>
  18. <psnno6/>
  19. <psnno7/>
  20. <psnno8/>
  21. <outsum/>
  22. <totalsum/>
  23. </data>
  24. </main>
  25. <send>
  26. <data>
  27. <yyyymm/>
  28. </data>
  29. </send>
  30. <init/>
  31. <hidden/>
  32. </root>
  33. </instance>
  34. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  35. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  36. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  37. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  38. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  39. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  40. <script type="javascript" ev:event="xforms-ready">
  41. <![CDATA[
  42. ipt_yyyymm.value = getCurrentDate().substr(0, 6);
  43. makeReportPreview(5,55,1000,700);
  44. ]]>
  45. </script>
  46. <submission id="TRANS00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main"/>
  47. </model>
  48. <script type="javascript">
  49. <![CDATA[
  50. //계,소계,총계 구하기
  51. function fSum() {
  52. model.setValue("/root/main/data["+(grd_data.rows-3)+"]/appdd", "계");
  53. model.setValue("/root/main/data["+(grd_data.rows-2)+"]/appdd", "전월");
  54. //월계 구하기
  55. var val = 0;
  56. var temp = 0;
  57. for (var k = 1; k <= 8; k++) {
  58. for ( i=1; i<grd_data.rows-3; i++) {
  59. val = model.getValue("/root/main/data["+ i +"]/psnno" + k);
  60. if (val > 0) {
  61. temp = parseInt(temp) + parseInt(val);
  62. }
  63. }
  64. model.setValue("/root/main/data["+(grd_data.rows-3)+"]/psnno" + k, temp); //당월 계
  65. temp = 0;
  66. }
  67. //일별 소계,총계 구하기
  68. var val = 0;
  69. var temp = 0;
  70. var sum = 0;
  71. for ( i=1; i<grd_data.rows-1; i++) {
  72. for (var k = 1; k <= 8; k++) {
  73. val = model.getValue("/root/main/data["+ i +"]/psnno" + k);
  74. if (val != "") {
  75. temp = parseInt(temp) + parseInt(val);
  76. }
  77. if (k == 3) {
  78. model.setValue("/root/main/data["+ i +"]/insum", temp);
  79. sum = sum + temp;
  80. temp = 0;
  81. } else if (k == 8) {
  82. model.setValue("/root/main/data["+ i +"]/outsum", temp);
  83. model.setValue("/root/main/data["+ i +"]/totalsum", sum + temp);
  84. temp = 0;
  85. sum = 0;
  86. }
  87. }
  88. }
  89. }
  90. ]]>
  91. </script>
  92. </xhtml:head>
  93. <xhtml:body guideline="1,1193;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  94. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  95. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:14px; ">직원식통계</caption>
  96. </group>
  97. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:770px; ">
  98. <group id="group1" style="left:5px; top:10px; width:1180px; height:35px; vertical-align:top; ">
  99. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1178px; height:35px; background-color:#fffbf2; "/>
  100. <caption id="caption3" class="search_name" style="left:25px; top:9px; width:90px; height:17px; ">조회년월 :</caption>
  101. <line id="line14" class="line_4" style="x1:1095px; y1:7px; x2:1095px; y2:29px; "/>
  102. <input id="ipt_yyyymm" ref="/root/send/data/yyyymm" format="yyyy-mm" style="left:115px; top:9px; width:75px; height:19px; text-align:center; "/>
  103. <button id="btn_before" class="icon_pre" style="left:193px; top:10px; width:13px; height:15px; ">
  104. <caption/>
  105. <script type="javascript" ev:event="onclick">
  106. <![CDATA[
  107. var dd = model.getValue("/root/send/data/yyyymm") + "01";
  108. dd = dd.toDate().getAddDate(-1, "M");
  109. dd = dd.getDateFormat("YYYYMM");
  110. model.setValue("/root/send/data/yyyymm", dd);
  111. model.refresh();
  112. ]]>
  113. </script>
  114. </button>
  115. <button id="btn_next" class="icon_next" style="left:208px; top:10px; width:13px; height:15px; ">
  116. <caption/>
  117. <script type="javascript" ev:event="onclick">
  118. <![CDATA[
  119. var dd = model.getValue("/root/send/data/yyyymm") + "01";
  120. dd = dd.toDate().getAddDate(1, "M");
  121. dd = dd.getDateFormat("YYYYMM");
  122. model.setValue("/root/send/data/yyyymm", dd);
  123. model.refresh();
  124. ]]>
  125. </script>
  126. </button>
  127. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1110px; top:7px; width:56px; height:22px; ">
  128. <caption>조회</caption>
  129. <script type="javascript" ev:event="DOMActivate">
  130. <![CDATA[
  131. if (model.getValue("/root/send/data/yyyymm") == ""){
  132. messageBox("조회년월은", "I003");
  133. model.setFocus("ipt_yyyymm");
  134. return;
  135. }
  136. if (isValidDateTime(model.getValue("/root/send/data/yyyymm"), "YYYYMM") == false){
  137. messageBox("조회년월의 형식이", "E016");
  138. model.setFocus("ipt_yyyymm");
  139. return;
  140. }
  141. submit("TRANS00301");
  142. fSum(); //계,소계,총계 구하기
  143. exeReportPreview("RPANS00301", "XMLSTR", "", "", "false","","","","","false", "", "");
  144. ]]>
  145. </script>
  146. </button>
  147. </group>
  148. <line id="line2" class="line_1" style="x1:5px; y1:50px; x2:1185px; y2:50px; "/>
  149. <datagrid id="grd_data" nodeset="/root/main/data" visibility="hidden" caption="일자^본원^본원^본원^본원^외부^외부^외부^외부^외부^외부^총계|일자^ID카드^현금^공용^소계^성의^성모^의정부^부천^기타^소계^총계" colsep="^" colwidth="70, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 70" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:55px; width:800px; height:675px; ">
  150. <col ref="appdd" style="text-align:center; "/>
  151. <col ref="psnno1"/>
  152. <col ref="psnno2"/>
  153. <col ref="psnno3"/>
  154. <col ref="insum"/>
  155. <col ref="psnno4"/>
  156. <col ref="psnno5"/>
  157. <col ref="psnno6"/>
  158. <col ref="psnno7"/>
  159. <col ref="psnno8"/>
  160. <col ref="outsum"/>
  161. <col ref="totalsum"/>
  162. </datagrid>
  163. </group>
  164. </xhtml:body>
  165. </xhtml:html>