123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>이송요원 호출 통계</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <cond>
- <yearmonth/>
- <conddd/>
- <fromdd/>
- <todd/>
- <refflag>A</refflag>
- </cond>
- <transcallcountinfo>
- <transcallcountlist/>
- </transcallcountinfo>
- </main>
- <init>
- </init>
- <send>
- </send>
- <temp>
- </temp>
- </root>
- </instance>
- <submission id="TRMNB02901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/transcallcountinfo"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <!--script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/!-->
- <!--script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/!-->
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <!--script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/!-->
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <!--script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/!-->
- <!--script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/!-->
- </xhtml:head>
- <script type="javascript">
- <![CDATA[
- /* 전역공간 */
-
- // 데이터 그리드 sum 함수
- //grd_pattermdaylist.addColumn("ref:day"+k+"; type:output; text-align:center;", false);
-
- // 초기화 (2010-05-10 by 안도영)
- function fInit(){
- model.makeValue("/root/main/cond/conddd" , getCurrentDate()); // 년월일
- model.makeValue("/root/main/cond/yearmonth", (getCurrentDate()).substr(0,6)); // 년월
- // 조회 시작일
- model.makeValue("/root/main/cond/fromdd" , ((((getCurrentDate()).toDate()).getAddDate(-1,"D")).getDateFormat()));
- model.makeValue("/root/main/cond/todd" , getCurrentDate()); // 조회 종료일
- model.makeValue("/root/main/cond/refflag" , "A"); // default 조회기간 구분
-
- fChgFlag(); // 조회기간 구분에 따른 콤보 display
- model.refresh();
- }
-
- // 이송요원 호출 건수 조회 (2010-05-10 by 안도영)
- function fSrchTransCallCntInfo(flag){
- var fromdd = model.getValue("/root/main/cond/fromdd");
- var todd = model.getValue("/root/main/cond/todd");
- var interval = getDateInterval(fromdd, todd, "yyyy");
- var maxyear = 1;
-
- // 조회구간이 1년을 넘으면 제어
- if((model.getValue("/root/main/cond/refflag")=="C") && (interval >= maxyear)){
- messageBox("조회 가능기간이 아닙니다.","I");
- return;
- }else{
- model.removenode("/root/send");
- model.makeNode ("/root/send");
- model.makeValue("/root/send/conddd" , model.getValue("/root/main/cond/conddd"));
- model.makeValue("/root/send/yearmonth", model.getValue("/root/main/cond/yearmonth"));
- model.makeValue("/root/send/fromdd" , fromdd);
- model.makeValue("/root/send/todd" , todd);
- model.makeValue("/root/send/refflag" , model.getValue("/root/main/cond/refflag")); //조회기간 구분
-
- model.removeNode("/root/temp");
- model.makeNode ("/root/temp");
- submit("TRMNB02901"); // 호출 건수 조회
-
- var totalSum = new Array(0,0,0,0,0,0); // 합계 초기화
- var itemsRow = new Array("이송요원1", "이송요원2", "이송요원3", "이송요원4", "이송요원5", "합 계") ; // 항목명
- var colSize = 80;
-
- // 그리드 구성 및 데이터 modify
- for(i=0; i<itemsRow.length; i++){ // 행
- grd_transcallcountlist.valueMatrix(i+1, 0) = itemsRow[i];
- if(i!=(itemsRow.length-1)){
- if(flag=="Init") grd_transcallcountlist.addRow(false, true);
- }
- for(var j=1; j<=getNodesetCount("/root/temp/transcallcountlist"); j++){ // 열
- if(i==0){ // 캡션명 구성
- //grd_transcallcountlist.autoresize = true;
- grd_transcallcountlist.valueMatrix(0, j) = model.getValue("/root/temp/transcallcountlist[" + j + "]/depthngnm");
- grd_transcallcountlist.colwidth(j) = colSize;
- if(flag=="Init"){ // 첫 화면 로딩시
- grd_transcallcountlist.addColumn("text-align:right;", false);
- grd_transcallcountlist.valueMatrix(0, j+1) = "요원별 호출 건수";
- grd_transcallcountlist.colwidth(j+1) = colSize;
- }
- }
- // 데이터 넣기
- grd_transcallcountlist.valueMatrix(i+1, j) = model.getValue("/root/temp/transcallcountlist[" + j + "]/countnum" + (i+1));
-
- if(i!=(itemsRow.length-1)) totalSum[i] = totalSum[i] + parseInt(grd_transcallcountlist.valueMatrix(i+1, j));
- if(i==(itemsRow.length-1)){
- // 합계(병동별) 넣기
- grd_transcallcountlist.valueMatrix(i+1, j) = model.getValue("/root/temp/transcallcountlist[" + j + "]/totalnum");
- totalSum[i] = totalSum[i] + parseInt(grd_transcallcountlist.valueMatrix(i+1, j));
- // datagrid.subtotal(SubtotalType type, Integer groupColumn, Integer totalColumn, [String format], [String style], [Integer captionColumn], [String caption], [Boolean fillText])
- }
- }
- }
- // 요원별 호출 건수 데이터 넣기
- var ColIndex = 1 + parseInt(getNodesetCount("/root/temp/transcallcountlist"));
- for(i=0; i<itemsRow.length; i++){
- grd_transcallcountlist.valueMatrix(i+1, ColIndex) = totalSum[i];
- }
-
- model.refresh();
- return;
- }
- }
-
- // 조회기간 구분 함수
- function fChgFlag(){
- if(model.getValue("/root/main/cond/refflag") == "A"){ // 일별
- ipt_conddd.visible = true;
- ipt_yearmonth.visible = false;
- cpt_dash.visible = false;
- ipt_fromdd.visible = false;
- ipt_todd.visible = false;
- }else if(model.getValue("/root/main/cond/refflag") == "B"){ // 월별
- ipt_conddd.visible = false;
- ipt_yearmonth.visible = true;
- cpt_dash.visible = false;
- ipt_fromdd.visible = false;
- ipt_todd.visible = false;
- }else if(model.getValue("/root/main/cond/refflag") == "C"){ // 자유기간별
- ipt_conddd.visible = false;
- ipt_yearmonth.visible = false;
- cpt_dash.visible = true;
- ipt_fromdd.visible = true;
- ipt_todd.visible = true;
- }
- }
-
- // 엑셀 저장 함수
- function fExcelSave(){
- var fileName = window.fileDialog("save", ",", false, "이송요원호출통계_"+getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- grd_transcallcountlist.saveExcel(fileName, "sheetname:이송요원호출통계;colhiddenextend:true;rowhiddenextend:true;");
- }
-
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInit(); // 초기화
- fSrchTransCallCntInfo("Init"); // 호출 건수 조회
-
- ]]>
- </script>
- <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:207px; height:14px; ">이송요원 호출 통계</caption>
- </group>
- <group id="group3" overflow="scroll" style="left:0px; top:13px; width:1195px; height:757px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
- <button id="button1" class="btn1_letter2" style="left:1063px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- fSrchTransCallCntInfo(); // 호출 건수 조회
-
- ]]>
- </script>
- </button>
- <line id="line13" class="line_4" style="x1:1047px; y1:7px; x2:1047px; y2:29px; "/>
- <caption id="caption2" class="search_name" style="left:400px; top:10px; width:99px; height:17px; ">조회기간 :</caption>
- <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; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //fSrchTransCallCntInfo(); // 호출 건수 조회
- ]]>
- </script>
- </input>
- <caption id="cpt_dash" class="search_no_b" visibility="hidden" style="left:584px; top:10px; width:17px; height:17px; ">~</caption>
- <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; "/>
- <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; "/>
- <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; "/>
- <caption id="caption1" class="search_name" style="left:25px; top:10px; width:105px; height:17px; ">기간구분 :</caption>
- <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; ">
- <choices>
- <item>
- <label>일별</label>
- <value>A</value>
- </item>
- <item>
- <label>월별</label>
- <value>B</value>
- </item>
- <item>
- <label>자유기간별</label>
- <value>C</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //조회구분
- fChgFlag();
- ]]>
- </script>
- </select1>
- <button id="button2" class="btn1_letter2" style="left:1128px; top:7px; width:56px; height:22px; ">
- <caption>엑셀</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExcelSave();
- ]]>
- </script>
- </button>
- </group>
- <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; ">
- <col ref="reflag"/>
- <col ref="data" visibility="visible" style="text-align:right; "/>
- </datagrid>
- <line id="line2" class="line_1" style="x1:0px; y1:55px; x2:1195px; y2:55px; "/>
- </group>
- <group id="group5" scroll="auto" style="left:0px; top:770px; width:1195px; height:14px; "/>
- </xhtml:body>
- </xhtml:html>
|