SMMNB02900_이송요원호출통계.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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. <cond>
  11. <yearmonth/>
  12. <conddd/>
  13. <fromdd/>
  14. <todd/>
  15. <refflag>A</refflag>
  16. </cond>
  17. <transcallcountinfo>
  18. <transcallcountlist/>
  19. </transcallcountinfo>
  20. </main>
  21. <init>
  22. </init>
  23. <send>
  24. </send>
  25. <temp>
  26. </temp>
  27. </root>
  28. </instance>
  29. <submission id="TRMNB02901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/transcallcountinfo"/>
  30. </model>
  31. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  32. <!--script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/!-->
  33. <!--script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/!-->
  34. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  35. <!--script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/!-->
  36. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  37. <!--script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/!-->
  38. <!--script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/!-->
  39. </xhtml:head>
  40. <script type="javascript">
  41. <![CDATA[
  42. /* 전역공간 */
  43. // 데이터 그리드 sum 함수
  44. //grd_pattermdaylist.addColumn("ref:day"+k+"; type:output; text-align:center;", false);
  45. // 초기화 (2010-05-10 by 안도영)
  46. function fInit(){
  47. model.makeValue("/root/main/cond/conddd" , getCurrentDate()); // 년월일
  48. model.makeValue("/root/main/cond/yearmonth", (getCurrentDate()).substr(0,6)); // 년월
  49. // 조회 시작일
  50. model.makeValue("/root/main/cond/fromdd" , ((((getCurrentDate()).toDate()).getAddDate(-1,"D")).getDateFormat()));
  51. model.makeValue("/root/main/cond/todd" , getCurrentDate()); // 조회 종료일
  52. model.makeValue("/root/main/cond/refflag" , "A"); // default 조회기간 구분
  53. fChgFlag(); // 조회기간 구분에 따른 콤보 display
  54. model.refresh();
  55. }
  56. // 이송요원 호출 건수 조회 (2010-05-10 by 안도영)
  57. function fSrchTransCallCntInfo(flag){
  58. var fromdd = model.getValue("/root/main/cond/fromdd");
  59. var todd = model.getValue("/root/main/cond/todd");
  60. var interval = getDateInterval(fromdd, todd, "yyyy");
  61. var maxyear = 1;
  62. // 조회구간이 1년을 넘으면 제어
  63. if((model.getValue("/root/main/cond/refflag")=="C") && (interval >= maxyear)){
  64. messageBox("조회 가능기간이 아닙니다.","I");
  65. return;
  66. }else{
  67. model.removenode("/root/send");
  68. model.makeNode ("/root/send");
  69. model.makeValue("/root/send/conddd" , model.getValue("/root/main/cond/conddd"));
  70. model.makeValue("/root/send/yearmonth", model.getValue("/root/main/cond/yearmonth"));
  71. model.makeValue("/root/send/fromdd" , fromdd);
  72. model.makeValue("/root/send/todd" , todd);
  73. model.makeValue("/root/send/refflag" , model.getValue("/root/main/cond/refflag")); //조회기간 구분
  74. model.removeNode("/root/temp");
  75. model.makeNode ("/root/temp");
  76. submit("TRMNB02901"); // 호출 건수 조회
  77. var totalSum = new Array(0,0,0,0,0,0); // 합계 초기화
  78. var itemsRow = new Array("이송요원1", "이송요원2", "이송요원3", "이송요원4", "이송요원5", "합 계") ; // 항목명
  79. var colSize = 80;
  80. // 그리드 구성 및 데이터 modify
  81. for(i=0; i<itemsRow.length; i++){ // 행
  82. grd_transcallcountlist.valueMatrix(i+1, 0) = itemsRow[i];
  83. if(i!=(itemsRow.length-1)){
  84. if(flag=="Init") grd_transcallcountlist.addRow(false, true);
  85. }
  86. for(var j=1; j<=getNodesetCount("/root/temp/transcallcountlist"); j++){ // 열
  87. if(i==0){ // 캡션명 구성
  88. //grd_transcallcountlist.autoresize = true;
  89. grd_transcallcountlist.valueMatrix(0, j) = model.getValue("/root/temp/transcallcountlist[" + j + "]/depthngnm");
  90. grd_transcallcountlist.colwidth(j) = colSize;
  91. if(flag=="Init"){ // 첫 화면 로딩시
  92. grd_transcallcountlist.addColumn("text-align:right;", false);
  93. grd_transcallcountlist.valueMatrix(0, j+1) = "요원별 호출 건수";
  94. grd_transcallcountlist.colwidth(j+1) = colSize;
  95. }
  96. }
  97. // 데이터 넣기
  98. grd_transcallcountlist.valueMatrix(i+1, j) = model.getValue("/root/temp/transcallcountlist[" + j + "]/countnum" + (i+1));
  99. if(i!=(itemsRow.length-1)) totalSum[i] = totalSum[i] + parseInt(grd_transcallcountlist.valueMatrix(i+1, j));
  100. if(i==(itemsRow.length-1)){
  101. // 합계(병동별) 넣기
  102. grd_transcallcountlist.valueMatrix(i+1, j) = model.getValue("/root/temp/transcallcountlist[" + j + "]/totalnum");
  103. totalSum[i] = totalSum[i] + parseInt(grd_transcallcountlist.valueMatrix(i+1, j));
  104. // datagrid.subtotal(SubtotalType type, Integer groupColumn, Integer totalColumn, [String format], [String style], [Integer captionColumn], [String caption], [Boolean fillText])
  105. }
  106. }
  107. }
  108. // 요원별 호출 건수 데이터 넣기
  109. var ColIndex = 1 + parseInt(getNodesetCount("/root/temp/transcallcountlist"));
  110. for(i=0; i<itemsRow.length; i++){
  111. grd_transcallcountlist.valueMatrix(i+1, ColIndex) = totalSum[i];
  112. }
  113. model.refresh();
  114. return;
  115. }
  116. }
  117. // 조회기간 구분 함수
  118. function fChgFlag(){
  119. if(model.getValue("/root/main/cond/refflag") == "A"){ // 일별
  120. ipt_conddd.visible = true;
  121. ipt_yearmonth.visible = false;
  122. cpt_dash.visible = false;
  123. ipt_fromdd.visible = false;
  124. ipt_todd.visible = false;
  125. }else if(model.getValue("/root/main/cond/refflag") == "B"){ // 월별
  126. ipt_conddd.visible = false;
  127. ipt_yearmonth.visible = true;
  128. cpt_dash.visible = false;
  129. ipt_fromdd.visible = false;
  130. ipt_todd.visible = false;
  131. }else if(model.getValue("/root/main/cond/refflag") == "C"){ // 자유기간별
  132. ipt_conddd.visible = false;
  133. ipt_yearmonth.visible = false;
  134. cpt_dash.visible = true;
  135. ipt_fromdd.visible = true;
  136. ipt_todd.visible = true;
  137. }
  138. }
  139. // 엑셀 저장 함수
  140. function fExcelSave(){
  141. var fileName = window.fileDialog("save", ",", false, "이송요원호출통계_"+getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  142. grd_transcallcountlist.saveExcel(fileName, "sheetname:이송요원호출통계;colhiddenextend:true;rowhiddenextend:true;");
  143. }
  144. ]]>
  145. </script>
  146. <script type="javascript" ev:event="xforms-ready">
  147. <![CDATA[
  148. fInit(); // 초기화
  149. fSrchTransCallCntInfo("Init"); // 호출 건수 조회
  150. ]]>
  151. </script>
  152. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  153. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  154. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:207px; height:14px; ">이송요원 호출 통계</caption>
  155. </group>
  156. <group id="group3" overflow="scroll" style="left:0px; top:13px; width:1195px; height:757px; ">
  157. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  158. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  159. <button id="button1" class="btn1_letter2" style="left:1063px; top:7px; width:56px; height:22px; ">
  160. <caption>조회</caption>
  161. <script type="javascript" ev:event="DOMActivate">
  162. <![CDATA[
  163. fSrchTransCallCntInfo(); // 호출 건수 조회
  164. ]]>
  165. </script>
  166. </button>
  167. <line id="line13" class="line_4" style="x1:1047px; y1:7px; x2:1047px; y2:29px; "/>
  168. <caption id="caption2" class="search_name" style="left:400px; top:10px; width:99px; height:17px; ">조회기간 :</caption>
  169. <input id="ipt_yearmonth" ref="/root/main/cond/yearmonth" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:491px; top:9px; width:90px; height:19px; text-align:center; ">
  170. <script type="javascript" ev:event="xforms-value-changed">
  171. <![CDATA[
  172. //fSrchTransCallCntInfo(); // 호출 건수 조회
  173. ]]>
  174. </script>
  175. </input>
  176. <caption id="cpt_dash" class="search_no_b" visibility="hidden" style="left:584px; top:10px; width:17px; height:17px; ">~</caption>
  177. <input id="ipt_fromdd" ref="/root/main/cond/fromdd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:491px; top:9px; width:90px; height:19px; text-align:center; "/>
  178. <input id="ipt_conddd" ref="/root/main/cond/conddd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:491px; top:9px; width:90px; height:19px; text-align:center; "/>
  179. <input id="ipt_todd" ref="/root/main/cond/todd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:600px; top:9px; width:90px; height:19px; text-align:center; "/>
  180. <caption id="caption1" class="search_name" style="left:25px; top:10px; width:105px; height:17px; ">기간구분 :</caption>
  181. <select1 id="rdo_refflag" ref="/root/main/cond/refflag" appearance="full" cellspacing="5" cols="3" overflow="visible" style="left:120px; top:10px; width:195px; height:20px; border-style:none; ">
  182. <choices>
  183. <item>
  184. <label>일별</label>
  185. <value>A</value>
  186. </item>
  187. <item>
  188. <label>월별</label>
  189. <value>B</value>
  190. </item>
  191. <item>
  192. <label>자유기간별</label>
  193. <value>C</value>
  194. </item>
  195. </choices>
  196. <script type="javascript" ev:event="xforms-value-changed">
  197. <![CDATA[
  198. //조회구분
  199. fChgFlag();
  200. ]]>
  201. </script>
  202. </select1>
  203. <button id="button2" class="btn1_letter2" style="left:1128px; top:7px; width:56px; height:22px; ">
  204. <caption>엑셀</caption>
  205. <script type="javascript" ev:event="DOMActivate">
  206. <![CDATA[
  207. fExcelSave();
  208. ]]>
  209. </script>
  210. </button>
  211. </group>
  212. <datagrid id="grd_transcallcountlist" nodeset="/root/main/transcallcountinfo/transcallcountlist" caption-layout="static" overflow="scroll" scroll="auto" autoresize="false" caption="구분^" colsep="^" colwidth="130, 80" dataheight="25" ellipsis="true" fixedcols="1" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:0px; top:60px; width:1195px; height:690px; ">
  213. <col ref="reflag"/>
  214. <col ref="data" visibility="visible" style="text-align:right; "/>
  215. </datagrid>
  216. <line id="line2" class="line_1" style="x1:0px; y1:55px; x2:1195px; y2:55px; "/>
  217. </group>
  218. <group id="group5" scroll="auto" style="left:0px; top:770px; width:1195px; height:14px; "/>
  219. </xhtml:body>
  220. </xhtml:html>