123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>
- <projlist>
- <list>
- <proj>
- <subteam/>
- <usernm/>
- <inputdate/>
- <total/>
- <endtotal/>
- <rate/>
- </proj>
- </list>
- </projlist>
- </main>
- <send>
- <search>
- <appdd/>
- <subteam/>
- <usernm/>
- <posinstcd/>
- <inputdatef/>
- <inputdatet/>
- <suboption/>
- <prcsyn/>
- </search>
- <subtmp/>
- </send>
- <init>
- <endrate>
- <item>
- <name>80</name>
- <id>80</id>
- </item>
- <item>
- <name>100</name>
- <id>100</id>
- </item>
- </endrate>
- <prcsyn>
- <item>
- <name>전체</name>
- <id>-</id>
- </item>
- <item>
- <name>Y</name>
- <id>Y</id>
- </item>
- <item>
- <name>N</name>
- <id>N</id>
- </item>
- </prcsyn>
- <posinstcd>
- <item>
- <name>전체</name>
- <id>-</id>
- </item>
- <item>
- <name>HIT</name>
- <id>H</id>
- </item>
- <item>
- <name>평화IS</name>
- <id>P</id>
- </item>
- </posinstcd>
- <kind>
- <item>
- <name>비율</name>
- <id>rate</id>
- </item>
- <item>
- <name>갯수</name>
- <id>cnt</id>
- </item>
- </kind>
- </init>
- <grd_temp>
- <grid>
- <subteam/>
- <usernm/>
- <inputdate/>
- </grid>
- </grd_temp>
- <viewkind/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- init_grid();
-
- // 업무팀,적용기준일 리스트를 가져 와서 콤보 박스에 뿌려 준다.
- // 적용 기준일의 경우 조건 검색시 null을 제외 했기 때문에 전체 건수와 차이가 난다.
- submit("TRZTP00802");
- submit("TRZTP00902");
-
- addComboItem("combo1", "-전체-", "-", "above");
- addComboItem("combo2", "-전체-", "-", "above");
-
- combo1.select(0);
- combo2.select(0);
- combo3.select(0);
- combo4.select(0);
- combo5.select(0);
- fsetDate()
-
- model.refresh();
- ]]>
- </script>
- <submission id="TRZTP00802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search/appdd" resultref="/root/temp"/>
- <submission id="TRZTP00902" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/subtemp"/>
- <submission id="TRZTP01100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/projlist/list"/>
- <submission id="TXZTP01100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tchartHelper.js"/>
- <script type="javascript">
- <![CDATA[
- function fsetDate()
- {
- nday = new Date() // 오늘의 날짜와 시간을 구함
- t_year = nday.getYear();
- t_mon = nday.getMonth()+1; // 0부터 시작해서 1월이다.
- t_day = nday.getDate();
-
- // 날짜 포맷 맞추기
- if(t_mon < 10)
- t_mon = "0" + t_mon;
- if(t_day < 10)
- t_day = "0" + t_day;
-
- var cur_date = t_year + "-" + t_mon + "-" + t_day;
-
- model.setValue("/root/send/search/inputdatet",cur_date);
- model.setValue("/root/send/search/inputdatef","");
- }
-
- function init_grid()
- {
- // 컬럼 캡션 초기화
- datagrid1.caption = "DEV^SUBTEAM";
-
- var cols = datagrid1.cols-datagrid1.fixedCols;
-
- for( var i = 0; i < cols; i++ ) {
- //그리드의 컬럼 삭제
- datagrid1.removeColumn(false);
- }
-
- // 노드 초기화
- model.removeNodeset("/root/main/projlist/list/proj");
- model.removeNodeset("/root/grd_temp/grid");
- model.resetInstanceNode("/root/grd_temp/grid");
- model.resetInstanceNode("/root/main/projlist/list/proj");
-
- // 차트 초기화
- clearTChart(Tchart1);
- }
-
- function fsearch()
- {
- init_grid();
- submit("TRZTP01100");
-
- // 출력유형
- kind = model.getValue("/root/viewkind");
-
- // 팀별 조회시 DEV 컬럼을 숨겨 버린다. 값이 없으므로 -_-
- if (model.getValue("/root/send/search/suboption") == "-")
- datagrid1.colWidth(0) = 0;
- else
- datagrid1.colWidth(0) = 60;
-
- // 원본 데이터 그리드 : datagrid2
- // 그래프 생성 될 데이터 그리드 : datagrid1
- // 티챠트가 거지 같아서 그리드 이름은 꼭 datagrid1 이어야 제대로 가져 온다.
-
- // 원본 데이터 갯수
- row_cnt = datagrid2.rows;
-
- // 캡션 날짜, inputdate의 최소 날짜에서 최대 날짜 까지를 그리드에 몽땅 그려 준다.
- var min_date = "2100-12-31";
- var max_date = "1900-12-31";
-
- // min,max 날짜 구하기 , full search 할 수 밖에 없다.
- for( i = 1 ; i < row_cnt ; i++ )
- {
- if( min_date > datagrid2.textmatrix(i,2))
- {
- min_date = datagrid2.textmatrix(i,2);
- }
-
- if( max_date < datagrid2.textmatrix(i,2))
- {
- max_date = datagrid2.textmatrix(i,2);
- }
- }
-
- // 구한 날짜를 날짜 형식으로 변형한다. ( 날짜가 하루씩 증가해야 하니까.. )
- var minyear = min_date.substr(0,4);
- var minmon = min_date.substr(5,2);
- var minday = min_date.substr(8,2);
-
- // 날짜 계산을 위해서 여기서 1달 작은 값을 넣고 밑에서는 +1달을 해 준다.
- // 월을 0~11 까지로 출력하기 때문에 이런 뻘짓이 필요하다. 이렇게 안 하면 내년에 1월이 00으로 찍힌다.
- var tmp_min_date = new Date(minyear,minmon-1,minday);
-
- // 성능 대박 향상을 위한 caption_tmp!!! 컬럼 추가 될때 마다 캡션값을 입력하면 컬럼 하나씩 들어가는게 눈에 보인다.
- // 고로.. 변수에 저장해 두었다가 마지막에 찍어 주자.
- var caption_tmp = datagrid1.caption;
-
- // 날짜가 하루 더 많다. 그래서 하루 빼줬다.
- tmp_min_date.setDate(tmp_min_date.getDate()-1);
-
-
- // 컬럼 추가, 그리드 캡션 지정, 최대날짜와 같다면 루프 종료
- // ## 검색된 건수가 없으면 종료, 요거 없으면 무한 루프!!!! ##
- while(row_cnt != 1)
- {
- tmp_min_date.setDate(tmp_min_date.getDate()+1);
-
- // 그리드에서 비교를 위해 날짜 포맷 설정
- ty = tmp_min_date.getYear();
- tm = tmp_min_date.getMonth()+1;
- td = tmp_min_date.getDate();
- if(tm < 10)
- tm = "0" + tm;
- if(td < 10)
- td = "0" + td;
- tt = ty + "-" + tm + "-" + td;
- // 최대날짜가 되면 컬럼 생성을 중지한다.
- if(tt == max_date)
- {
- datagrid1.addColumn("ref:d" + tt + "; type: output;",false);
- datagrid1.caption = caption_tmp + "^" + tt;
- break;
- }
-
- // 최대날짜까지 컬럼 추가
- datagrid1.addColumn("ref:d" + tt + "; type: output;",false);
- caption_tmp = caption_tmp + "^" + tt;
- }
-
- // 로우 생성, subteam,dev 입력
- var add_row_cnt = 1;
- var col_cnt = 2;
- var cmp_dev = "시작은암것두엄는거다";
- var cmp_team = "시작은암것두엄는거다";
-
- // 원본 데이터를 첨 부터 끝까지 읽어 내려가면서 그래프 기준이 될 데이터 그리드를 생성한다.
- for( i = 1 ; i < row_cnt ; i++ )
- {
- // 앞에 이름과 현재 로우의 dev가 다르면 로우를 추가한다. (dev로 sort 해서 가져 왔심)
- // 앞에 이름과 같은데 팀이 달라도 로우를 추가 한다. 두탕 뛰는 개발자 색출
- if (cmp_dev != datagrid2.textmatrix(i,0) || (cmp_dev == datagrid2.textmatrix(i,0) && cmp_team != datagrid2.textmatrix(i,1)))
- {
- datagrid1.addRow(false);
- if (kind == "cnt")
- {
- datagrid1.addRow(false);
- }
- // fixed컬럼에 dev, subteam에 해당팀, 개발자 입력
- datagrid1.textmatrix(add_row_cnt,0) = datagrid2.textmatrix(i,0);
- datagrid1.textmatrix(add_row_cnt,1) = datagrid2.textmatrix(i,1);
- // 팀별로 조회를 할 시 그래프에 팀명을 찍어주기 위해서 DEV에 SUBTEAM을 넣는다.
- if (model.getValue("/root/send/search/suboption") == "-")
- datagrid1.textmatrix(add_row_cnt,0) = datagrid2.textmatrix(i,1);
-
- if (kind == "cnt")
- {
- datagrid1.textmatrix(add_row_cnt,0) = datagrid1.textmatrix(add_row_cnt,0) + "(전체)";
- datagrid1.textmatrix(add_row_cnt+1,0) = datagrid2.textmatrix(i,0) + "(완료)";
- if (model.getValue("/root/send/search/suboption") == "-")
- datagrid1.textmatrix(add_row_cnt+1,0) = datagrid2.textmatrix(i,1) + "(완료)";
- datagrid1.textmatrix(add_row_cnt+1,1) = datagrid2.textmatrix(i,1);
- add_row_cnt = add_row_cnt + 2;
- }
- else
- {
- add_row_cnt = add_row_cnt + 1;
- }
- }
-
- // 데이터 맵핑
- for ( c = 2 ; c < datagrid1.cols ; c++ )
- {
- // input date가 같다면 해당 셀에 데이터 맵핑
- if (datagrid1.textmatrix(0,c) == datagrid2.textmatrix(i,2))
- {
- // 통계 데이터 맵핑
- datagrid1.textmatrix(add_row_cnt-1,c) = datagrid2.textmatrix(i,5);
- if (kind == "cnt")
- {
- datagrid1.textmatrix(add_row_cnt-2,c) = datagrid2.textmatrix(i,3);
- datagrid1.textmatrix(add_row_cnt-1,c) = datagrid2.textmatrix(i,4);
- }
- }
- else
- {
- // 빈 셀은 0으로 채워 준다 -> 값이 비었을 경우 티차트에서 에러 발생.
- if (datagrid1.textmatrix(add_row_cnt-1,c) == "")
- {
- datagrid1.textmatrix(add_row_cnt-1,c) = "0";
- if (kind == "cnt")
- {
- datagrid1.textmatrix(add_row_cnt-2,c) = "0";
- }
- }
- }
- }
- // 현재 행의 개발자,Subteam 을 저장해 두었다가 다음 행과 비교한다.
- cmp_dev = datagrid2.textmatrix(i,0);
- cmp_team = datagrid2.textmatrix(i,1);
- }
-
- // 챠트 그리기
- drawLineAll(Tchart1, datagrid1, "Project Rate Chart");
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="1,1195;2,783;" 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="caption1" class="tit_1" style="left:0px; top:0px; width:250px; height:14px; ">프로젝트진척관리(개인별공정율 차트)</caption>
- </group>
- <group id="group5" scroll="auto" style="left:0px; top:45px; width:1195px; height:730px; ">
- <group id="group6" style="left:0px; top:0px; width:1194px; height:60px; vertical-align:top; ">
- <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:60px; "/>
- <line id="line18" class="line_4" style="x1:1050px; y1:5px; x2:1050px; y2:57px; border-left-style:solid; "/>
- <button id="button1" class="btn1_letter2" style="left:1095px; top:17px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- // 배치 파일이 실행되지 않았을 경우에 발생하는 빈 데이터를 지정된 날짜의 데이터로 채워준다
- if ( model.getValue("/root/send/search/subteam") == "SWAT" && model.getValue("/root/send/search/usernm") == "keiz"
- && model.getValue("/root/send/search/inputdatef") != "" && model.getValue("/root/send/search/inputdatet") != "")
- {
- alert("\n " + model.getValue("/root/send/search/inputdatef") + " ← "
- + model.getValue("/root/send/search/inputdatet") + "\n\n 확실 합니까? 데이터가 덮어 써 집니다.");
- if(messageBox("", "Q002")==6)
- submit("TXZTP01100");
- return;
- }
- fsearch();
- ]]>
- </script>
- </button>
- <caption id="caption2" class="search_name" style="left:6px; top:8px; width:64px; height:17px; ">업무팀</caption>
- <select1 id="combo1" ref="/root/send/search/subteam" class="combo_search" appearance="minimal" style="left:75px; top:7px; width:109px; height:19px; ">
- <choices>
- <itemset nodeset="/root/subtemp/combo">
- <label ref="subteam"/>
- <value ref="value"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption3" class="search_name" style="left:228px; top:8px; width:89px; height:17px; ">적용기준일</caption>
- <select1 id="combo2" ref="/root/send/search/appdd" class="combo_search" appearance="minimal" style="left:319px; top:7px; width:85px; height:19px; ">
- <choices>
- <itemset nodeset="/root/temp/combo">
- <label ref="appdd"/>
- <value ref="value"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption9" class="search_name" style="left:228px; top:33px; width:94px; height:17px; ">개발자 소속</caption>
- <select1 id="combo3" ref="/root/send/search/posinstcd" class="combo_search" appearance="minimal" style="left:327px; top:32px; width:70px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/posinstcd/item">
- <label ref="name"/>
- <value ref="id"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption5" class="search_name" style="left:438px; top:8px; width:64px; height:17px; ">기간</caption>
- <input id="input1" ref="/root/send/search/inputdatef" class="input_search" inputtype="date" mask="include" style="left:492px; top:7px; width:85px; height:19px; "/>
- <caption id="caption6" style="left:582px; top:10px; width:13px; height:12px; ">
- <![CDATA[~]]>
- </caption>
- <input id="input2" ref="/root/send/search/inputdatet" class="input_search" inputtype="date" mask="include" style="left:599px; top:7px; width:85px; height:19px; "/>
- <caption id="caption7" class="search_name" style="left:700px; top:8px; width:76px; height:17px; ">출력유형</caption>
- <caption id="caption4" class="search_name" style="left:865px; top:8px; width:69px; height:17px; ">개발자</caption>
- <input id="input3" ref="/root/send/search/usernm" style="left:937px; top:7px; width:63px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if (event.keycode == 13)
- {
- input3.value = input3.currentText;
- fsearch();
- }
- ]]>
- </script>
- </input>
- <select1 id="combo4" ref="/root/viewkind" class="combo_search" appearance="minimal" style="left:782px; top:7px; width:70px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/kind/item">
- <label ref="name"/>
- <value ref="id"/>
- </itemset>
- </choices>
- </select1>
- <bool id="bool1" ref="/root/send/subtmp" style="left:186px; top:7px; width:25px; height:20px; ">
- <hint>
- <![CDATA[체크 : 팀별]]>
- </hint>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- // 체크박스 클릭시 팀별로 본다
- model.setValue("/root/send/search/suboption","-");
- model.setValue("/root/send/search/usernm","");
- model.setValue("/root/send/search/posinstcd","-");
- input3.disabled = true;
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-deselect">
- <![CDATA[
- model.setValue("/root/send/search/suboption","");
- input3.disabled = false;
- ]]>
- </script>
- </bool>
- <caption id="caption21" class="search_name" style="left:5px; top:35px; width:115px; height:17px; ">공정률적용여부</caption>
- <select1 id="combo5" ref="/root/send/search/prcsyn" class="combo_search" appearance="minimal" style="left:130px; top:35px; width:65px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/prcsyn/item">
- <label ref="name"/>
- <value ref="id"/>
- </itemset>
- </choices>
- </select1>
- </group>
- <line id="line20" class="line_1" style="x1:0px; y1:86px; x2:1194px; y2:86px; "/>
- <caption id="caption8" class="tit_2" style="left:5px; top:71px; width:195px; height:13px; ">프로젝트 진척관리 완료내역</caption>
- <group id="group2" style="left:800px; top:65px; width:395px; height:20px; ">
- <button id="button3" class="btn2_letter4" disable.background-image="../../../com/commonweb/images/dis_btn2_letter4.gif" style="left:325px; top:0px; width:64px; height:19px; background-image:../../../com/commonweb/images/btn2_letter4.gif; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
-
- if (fileName != "")
- {
- datagrid1.saveExcel(fileName);
- }
- ]]>
- </script>
- </button>
- <button id="button6" class="btn2_letter3" disable.background-image="../../../com/commonweb/images/dis_btn2_letter3.gif" style="left:268px; top:0px; width:53px; height:19px; background-image:../../../com/commonweb/images/btn2_letter3.gif; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //다중행 삭제 가능 +_+
- var selectedRows = datagrid1.selectedRows;
- var arr = new Array(selectedRows);
-
- if(selectedRows <= 0) {
- alert("삭제할 행을 선택해주세요.");
- return;
- }
-
- for ( var i = 0 ; i < arr.length ; i ++ )
- {
- arr[i] = datagrid1.selectedRow(i);
- }
-
- for ( var i = arr.length - 1 ; i >= 0 ; i-- )
- {
- // deleteRow(수정할 row,리프레쉬여부) , false로 설정하여 마지막에 한번에 refresh 한다.
- datagrid1.deleteRow(arr[i],false);
- }
-
- clearTChart(Tchart1);
- datagrid1.refresh();
- drawLineAll(Tchart1, datagrid1, "Project Rate Chart");
- ]]>
- </script>
- </button>
- </group>
- <datagrid id="datagrid1" nodeset="/root/grd_temp/grid" caption="DEV^SUBTEAM" colsep="^" colwidth="60, 70" dataheight="23" defaultrows="0" extendlastcol="scroll" fixedcols="2" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" tooltip="true" style="left:340px; top:90px; width:855px; height:230px; ">
- <col ref="usernm"/>
- <col ref="subteam"/>
- </datagrid>
- <datagrid id="datagrid2" nodeset="/root/main/projlist/list/proj" caption="DEV^SUBTEAM^DATE^전체^완료^비율" colsep="^" colwidth="60, 70, 72, 37, 40, 40" dataheight="23" defaultrows="0" extendlastcol="scroll" fixedcols="3" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:90px; width:340px; height:230px; ">
- <col ref="usernm"/>
- <col ref="subteam"/>
- <col ref="inputdate"/>
- <col ref="total" format="#,###"/>
- <col ref="endtotal" format="#,###"/>
- <col ref="rate" format="###%"/>
- </datagrid>
- <object id="Tchart1" clsid="{fab9b41c-87d6-474d-ab7e-f07d78f2422e}" style="left:0px; top:325px; width:1195px; height:395px; "/>
- </group>
- <group id="group3" style="left:0px; top:13px; width:1190px; height:27px; ">
- <button id="button7" class="btn4_letter3" disable.background-image="../../../com/commonweb/images/dis_btn4_letter3.gif" style="left:1120px; top:2px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- init_grid();
- model.resetInstanceNode("/root/send");
- combo1.select(0);
- combo2.select(0);
- combo3.select(0);
- combo4.select(0);
- input3.value = "";
- model.setValue("/root/send/search/suboption","");
- input3.disabled = false;
- fsetDate();
- model.refresh();
- ]]>
- </script>
- </button>
- <line id="line1" class="line_6" style="x1:0px; y1:25px; x2:1189px; y2:25px; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|