123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMLQS00100_정도관리통계.xrw
- * 설 명 : 정도관리 통계
- * 설 계 자 : PHis
- * 작 성 자 : PHis
- * 작 성 일 : 2009.07.02
- * 수정이력 :
- * 기 타 :
- -->
- <?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>
- <stslist/>
- </main>
- <send>
- <year/>
- <yyyy/>
- <mm/>
- <codeflag/>
- <basecdid/>
- </send>
- <init>
- </init>
- <hidden>
- <stsflag>1</stsflag>
- <stsfromdd/>
- <ststodd/>
- <stskind>00</stskind>
- <stskind2>1</stskind2>
- <stsdept>00</stsdept>
- <stsflag2>1</stsflag2>
- <stseqmt>00</stseqmt>
- </hidden>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../lis/commonweb/js/LLZ001.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fSetInit(); //초기화 함수 호출
- //initCalendar();
- ]]>
- </script>
- <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/LB0000"/>
- <submission id="TRLQS00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/stslist"/>
- </model>
- <script type="javascript">
- <![CDATA[
- //화면 open시 초기화
- function fSetInit() {
- var toDay = getCurrentDate();
-
- model.setValue("/root/hidden/stsfromdd", toDay);
- model.setValue("/root/hidden/ststodd" , toDay);
-
- model.setValue("/root/send/codeflag","0000|0111|0701|"); //0000:사용자부서코드, 0111:시행부서계 0707: 장비코드
- submit("TRLZZ00101");
- model.setValue("/root/send/codeflag","0704|"); //0704: 접수구분
- model.setValue("/root/send/basecdid", model.getValue("/root/init/LB0000/nm"));
- submit("TRLZZ00101"); //부서에 따른 접수구분 조회
- model.setValue("/root/init/LB0704[cd = '00']/nm", "- 전 체 -");
-
-
- //해당일에 대한 마지막 일자 가져와서 그리드 컬럼 숨기기
- var lastDay = getLastDay(toDay) + 4;
- for(i = lastDay; i > (grd_stsList.cols-1); i--){
- grd_stsList.colHidden(i) = true;
- }
- model.refresh();
- }
-
- //통계 희망 월 선택 시 그리드 셋팅 위해 해당월의 마지막 날짜 구함
- function getLastDay(Day){
-
- var year = Day.substr(0,4); //년
- var month = Day.substr(4,2); //월
-
- with(new Date(year, month, 1, 12)) { //MM = 1 .. 12
- setDate(0);
- return getDate();
- }
- }
-
- //조회하고자 하는 월별 그리드 셋팅하기
- function fGrdSet(stsflag){
-
- if(stsflag == 1){ //일별의 경우
- var day = model.getValue("/root/hidden/stsfromdd");
- var lastCol = getLastDay(day) + 3; //선택된 월의 마지막날 + 3(부서명,구분,Total 컬럼)
-
- for(i = 2; i <= grd_stsList.cols; i++){ //부서명때문에 2부터 시작(부서명은 아침채혈일때만 보임)
- if(i <= lastCol){
- grd_stsList.colHidden(i) = false;
- if(i >3){
- grd_stsList.colWidth(i) = 40;
- }
- }else{
- grd_stsList.colHidden(i) = true;
- }
- }
- grd_stsList.caption = "구분^검사명^Total^1^2^3^4^5^6^7^8^9^10^11^12^13^14^15^16^17^18^19^20^21^22^23^24^25^26^27^28^29^30^31";
- }else if(stsflag == 3){ //연별의 경우
- var fromdd = parseInt(model.getValue("/root/hidden/stsfromdd").substr(0,4));
- var todd = parseInt(model.getValue("/root/hidden/ststodd").substr(0,4));
- var year = fromdd+"^";
- var yearlength;
- for(i = fromdd+1; i <= todd; i++){
- year += i +"^" ;
- }
- model.setValue("/root/send/year", year);
-
- yearlength = year.split("^").length;
-
- for(i = 4; i<=grd_stsList.cols; i++){
- if(i <yearlength+3){
- grd_stsList.colHidden(i) = false;
- grd_stsList.colWidth(i) = 80;
- }else{
- grd_stsList.colHidden(i) = true;
- }
- }
- grd_stsList.caption = "구분^검사명^Total^"+ year;
-
- }
- model.refresh();
- }
-
- //조회구분 선택시 통계희망월 포멧 지정 및 그리드 컬럼 지정하기
- function fShowHopeddnGridSet(){
-
- model.removeNodeset("/root/main/stslist");
-
- if(radio1.value == 3){ //연별
- model.setValue("/root/hidden/stsfromdd", getCurrentDate().substr(0, 4));
- model.setValue("/root/hidden/ststodd", getCurrentDate().substr(0, 4));
- grd_stsList.colWidth(4) = 80;
- for(i = 5; i<= grd_stsList.cols;i++){
- grd_stsList.colHidden(i) = true;
- }
- ipt_stsfromdd.attribute("format") = "yyyy";
- ipt_ststodd.visible = true; //todd날짜
- caption9.visible = true;
- grd_stsList.caption = "구분^검사명^Total^"+ model.getValue("/root/hidden/stsfromdd");
- model.setValue("/root/send/year", getCurrentDate().substr(0, 4));
-
- }else{
- ipt_ststodd.visible = false;
- caption9.visible = false;
- if(radio1.value == 1){ //일별
-
- ipt_stsfromdd.attribute("format") = "yyyy-mm";
- model.setValue("/root/hidden/stsfromdd", getCurrentDate().substr(0, 6));
- fGrdSet(1);
- }else{ //월별
- model.setValue("/root/hidden/stsfromdd", getCurrentDate().substr(0, 4));
- ipt_stsfromdd.attribute("format") = "yyyy";
- for(i = 2; i <= grd_stsList.cols; i++){ //부서명때문에 2부터 시작(부서명은 아침채혈일때만 보임)
- if(i <= 15){
- grd_stsList.colHidden(i) = false;
- if(i >3){
- grd_stsList.colWidth(i) = 75;
- }
- }else{
- grd_stsList.colHidden(i) = true;
- }
- }
- grd_stsList.caption = "구분^검사명^Total^1^2^3^4^5^6^7^8^9^10^11^12^13^14^15^16^17^18^19^20^21^22^23^24^25^26^27^28^29^30^31";
- }
- }
-
- model.refresh();
- }
-
- //조회
- function fGetStats(){
-
- var fromdd = model.getValue("/root/hidden/stsfromdd");
- var lastday = getLastDay(fromdd);
-
- model.makeValue("/root/send/stsflag" , model.getValue("/root/hidden/stsflag")); //조회구분 1: 일별, 2: 월별, 3: 연별
- model.makeValue("/root/send/stsfromdd" , fromdd); //조회시작
- model.makeValue("/root/send/ststodd" , model.getValue("/root/hidden/ststodd")); //조회끝
- model.makeValue("/root/send/stskind" , model.getValue("/root/hidden/stskind")); //통계구분 1: 시행부서, 2: 진료과, 3: 진료의, 4: 채혈자, 5: 시간대별 (단, 병동 및 아침채혈의 경우 1: 병동별)
- model.makeValue("/root/send/stskind2" , model.getValue("/root/hidden/stskind2")); //결과상태 1: 전체, 2: 완료, 3: 제외
- model.makeValue("/root/send/stsflag2" , model.getValue("/root/hidden/stsflag2")); //통계구분 1: 시행부서별, 2: 장비별
- model.makeValue("/root/send/stsdept" , model.getValue("/root/hidden/stsdept")); //시행부서
- model.makeValue("/root/send/stseqmt" , model.getValue("/root/hidden/stseqmt")); //시행부서
- model.makeValue("/root/send/lastday" , lastday); //연별조회시 사용
- model.makeValue("/root/send/deptflag" , model.getValue("/root/init/LB0000/nm"));
-
- submit("TRLQS00101");
-
- grd_stsList.colStyle(3, "data", "background-color") = "#ffe79d"; //total col 색 변경
- for(i = 1; i < grd_stsList.rows; i++){
- if(model.getValue("/root/main/stslist[" + i + "]/stsflag1") == "0"){ //합계 row 색 변경
- grd_stsList.rowStyle(i, "data", "background-color") = "#7BE6B7";
- }
- }
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group3" scroll="auto" style="left:0px; top:40px; width:1193px; height:719px; ">
- <group id="group1" style="left:0px; top:0px; width:1192px; height:55px; vertical-align:middle; ">
- <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1192px; height:55px; "/>
- <button id="btn_ref" class="btn1_letter2" style="left:1116px; top:17px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(model.getValue("/root/hidden/stsflag") == 3){
- var fromdd = parseInt(model.getValue("/root/hidden/stsfromdd").substr(0,4));
- var todd = parseInt(model.getValue("/root/hidden/ststodd").substr(0,4));
- if(todd - fromdd >9 ){
- alert("10년 이내로 조회 가능합니다\n조회기간을 다시 선택하세요");
- return;
- }
- }
- fGetStats();
- ]]>
- </script>
- </button>
- <line id="line3" class="line_4" style="x1:1093px; y1:7px; x2:1093px; y2:49px; "/>
- <input id="ipt_stsfromdd" ref="/root/hidden/stsfromdd" class="input_search" inputtype="date" format="yyyy-mm" style="left:463px; top:9px; width:95px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var stsflag = model.getValue("/root/hidden/stsflag");
- model.removeNodeset("/root/main/stslist");
- fGrdSet(stsflag);
- ]]>
- </script>
- </input>
- <input id="ipt_ststodd" ref="/root/hidden/ststodd" class="input_search" visibility="hidden" inputtype="date" format="yyyy" style="left:573px; top:9px; width:95px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var stsflag = model.getValue("/root/hidden/stsflag");
- model.removeNodeset("/root/main/stslist");
- fGrdSet(stsflag);
- ]]>
- </script>
- </input>
- <caption id="caption4" class="search_name" style="left:365px; top:9px; width:115px; height:17px; ">조회기간 :</caption>
- <caption id="caption9" class="search_no_b" visibility="hidden" style="left:560px; top:9px; width:23px; height:17px; ">~</caption>
- <caption id="cap_eqmt" class="search_name" visibility="hidden" style="left:729px; top:31px; width:94px; height:17px; ">장 비 :</caption>
- <select1 id="cbo_eqmt" ref="/root/hidden/stseqmt" visibility="hidden" appearance="minimal" style="left:825px; top:31px; width:110px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/LB0701">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </select1>
- <caption id="cap_dept" class="search_name" visibility="visible" style="left:729px; top:31px; width:94px; height:17px; ">시행 부서 :</caption>
- <select1 id="cbo_dept" ref="/root/hidden/stsdept" visibility="visible" appearance="minimal" style="left:825px; top:31px; width:110px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/LB0111">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </select1>
- <select1 id="radio2" ref="/root/hidden/stskind2" visibility="hidden" appearance="full" cellspacing="10" cols="3" overflow="visible" style="left:103px; top:30px; width:202px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>전 체</label>
- <value>1</value>
- </item>
- <item>
- <label>완 료</label>
- <value>2</value>
- </item>
- <item>
- <label>제 외</label>
- <value>3</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- model.removeNodeset("/root/main/stslist");
- model.refresh();
- ]]>
- </script>
- </select1>
- <caption id="caption1" class="search_name" style="left:5px; top:9px; width:96px; height:17px; ">조회구분 :</caption>
- <select1 id="radio1" ref="/root/hidden/stsflag" appearance="full" cellspacing="20" cols="3" overflow="visible" style="left:95px; top:9px; width:210px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>일별</label>
- <value>1</value>
- </item>
- <item>
- <label>월별</label>
- <value>2</value>
- </item>
- <item>
- <label>연별</label>
- <value>3</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- fShowHopeddnGridSet();
- ]]>
- </script>
- </select1>
- <caption id="caption2" class="search_name" visibility="hidden" style="left:5px; top:31px; width:95px; height:17px; ">결과구분 :</caption>
- <select1 id="cbo_1" ref="/root/hidden/stskind" visibility="visible" appearance="minimal" style="left:462px; top:30px; width:122px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/LB0704">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption3" class="search_name" visibility="visible" style="left:365px; top:31px; width:94px; height:17px; ">접수구분 :</caption>
- <select1 id="cbo_if" ref="/root/hidden/stsflag2" visibility="visible" appearance="minimal" style="left:825px; top:10px; width:111px; height:19px; ">
- <choices>
- <item>
- <label>시행부서별</label>
- <value>1</value>
- </item>
- <item>
- <label>검사장비별</label>
- <value>2</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- if(cbo_if.value == "2"){
- cap_dept.visible = false;
- cbo_dept.visible = false;
- cap_eqmt.visible = true;
- cbo_eqmt.visible = true;
- }else{
- cap_dept.visible = true;
- cbo_dept.visible = true;
- cap_eqmt.visible = false;
- cbo_eqmt.visible = false;
- }
- ]]>
- </script>
- </select1>
- <caption id="caption16" class="search_name" visibility="visible" style="left:729px; top:11px; width:94px; height:17px; ">통계 구분 :</caption>
- </group>
- <line id="line1" class="line_1" style="x1:0px; y1:71px; x2:1193px; y2:71px; "/>
- <caption id="caption6" class="tit_2" style="left:5px; top:57px; width:134px; height:13px; ">통계 리스트</caption>
- <datagrid id="grd_stsList" nodeset="/root/main/stslist" caption="구분^검사명^Total^1^2^3^4^5^6^7^8^9^10^11^12^13^14^15^16^17^18^19^20^21^22^23^24^25^26^27^28^29^30^31" colsep="^" colwidth="90,120, 60, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40" dataheight="23" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" style="left:0px; top:76px; width:1193px; height:639px; text-align:center; ">
- <col ref="itemnm1" style="text-align:left; "/>
- <col ref="itemnm2" style="text-align:left; "/>
- <col ref="total" format="#,###.#" style="text-align:right; "/>
- <col ref="d01" format="#,###.#" style="text-align:right; "/>
- <col ref="d02" format="#,###.#" style="text-align:right; "/>
- <col ref="d03" format="#,###.#" style="text-align:right; "/>
- <col ref="d04" format="#,###.#" style="text-align:right; "/>
- <col ref="d05" format="#,###.#" style="text-align:right; "/>
- <col ref="d06" format="#,###.#" style="text-align:right; "/>
- <col ref="d07" format="#,###.#" style="text-align:right; "/>
- <col ref="d08" format="#,###.#" style="text-align:right; "/>
- <col ref="d09" format="#,###.#" style="text-align:right; "/>
- <col ref="d10" format="#,###.#" style="text-align:right; "/>
- <col ref="d11" format="#,###.#" style="text-align:right; "/>
- <col ref="d12" format="#,###.#" style="text-align:right; "/>
- <col ref="d13" format="#,###.#" style="text-align:right; "/>
- <col ref="d14" format="#,###.#" style="text-align:right; "/>
- <col ref="d15" format="#,###.#" style="text-align:right; "/>
- <col ref="d16" format="#,###.#" style="text-align:right; "/>
- <col ref="d17" format="#,###.#" style="text-align:right; "/>
- <col ref="d18" format="#,###.#" style="text-align:right; "/>
- <col ref="d19" format="#,###.#" style="text-align:right; "/>
- <col ref="d20" format="#,###.#" style="text-align:right; "/>
- <col ref="d21" format="#,###.#" style="text-align:right; "/>
- <col ref="d22" format="#,###.#" style="text-align:right; "/>
- <col ref="d23" format="#,###.#" style="text-align:right; "/>
- <col ref="d24" format="#,###.#" style="text-align:right; "/>
- <col ref="d25" format="#,###.#" style="text-align:right; "/>
- <col ref="d26" format="#,###.#" style="text-align:right; "/>
- <col ref="d27" format="#,###.#" style="text-align:right; "/>
- <col ref="d28" format="#,###.#" style="text-align:right; "/>
- <col ref="d29" format="#,###.#" style="text-align:right; "/>
- <col ref="d30" format="#,###.#" style="text-align:right; "/>
- <col ref="d31" format="#,###.#" style="text-align:right; "/>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_stsList.gridToInstance();
- ]]>
- </script>
- </datagrid>
- </group>
- <caption id="caption10" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">정도 관리 통계</caption>
- <group id="group5" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
- <line id="line2" class="line_2" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
- <button id="btn_print" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
- <caption>출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //fPrint();
- ]]>
- </script>
- </button>
- <button id="btn_excel" class="btn6_letter5" style="left:0px; top:3px; width:92px; height:22px; ">
- <caption>EXCEL저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- /*var flagnm;
- var flag = model.getValue("/root/hidden/bcollflag");
- if(flag == 0){
- flagnm = "";
- }else if(flag == 1){
- flagnm = "통계_";
- }else if(flag == 2){
- flagnm = "통계_";
- }else if(flag == 3){
- flagnm = "통계_";
- }*/
- var fileName = window.fileDialog("save", ",", false, "정도관리_" +getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != ""){
- grd_stsList.saveExcel(fileName);
- }
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|