SMLLS00100_채혈통계.xrw 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLS00100_외래채혈통계.xrw
  4. * 설 명 : 채혈 통계
  5. * 설 계 자 : PHis
  6. * 작 성 자 : PHis
  7. * 작 성 일 : 2008.11.28
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>채혈 통계</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <stslist/>
  20. <weeklist>
  21. <list>
  22. <sun/>
  23. <mon/>
  24. <tue/>
  25. <wed/>
  26. <thu/>
  27. <fri/>
  28. <sat/>
  29. <sun_cnt/>
  30. <mon_cnt/>
  31. <tue_cnt/>
  32. <wed_cnt/>
  33. <thu_cnt/>
  34. <fri_cnt/>
  35. <sat_cnt/>
  36. </list>
  37. </weeklist>
  38. </main>
  39. <send>
  40. <year/>
  41. <yyyy/>
  42. <mm/>
  43. </send>
  44. <init>
  45. </init>
  46. <hidden>
  47. <stsflag>1</stsflag>
  48. <stsfromdd/>
  49. <ststodd/>
  50. <stskind>1</stskind>
  51. <stskind2>1</stskind2>
  52. <ioflag>0</ioflag>
  53. <bcollflag>0</bcollflag>
  54. <btbcollflag>-</btbcollflag>
  55. <calendar>
  56. <year/>
  57. <month/>
  58. </calendar>
  59. </hidden>
  60. </root>
  61. </instance>
  62. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  63. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  64. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  66. <script type="javascript" src="../../../lis/commonweb/js/LLZ001.js"/>
  67. <script type="javascript" ev:event="xforms-ready">
  68. <![CDATA[
  69. fSetInit(); //초기화 함수 호출
  70. //initCalendar();
  71. ]]>
  72. </script>
  73. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init"/>
  74. <submission id="TRLLS00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/stslist"/>
  75. <submission id="TRLLS00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/weeklist/list"/>
  76. </model>
  77. <script type="javascript">
  78. <![CDATA[
  79. //화면 open시 초기화
  80. function fSetInit() {
  81. var toDay = getCurrentDate();
  82. grd_stsList.colHidden(1) = true;
  83. model.setValue("/root/hidden/stsfromdd", toDay);
  84. model.setValue("/root/hidden/ststodd" , toDay);
  85. //해당일에 대한 마지막 일자 가져와서 그리드 컬럼 숨기기
  86. var lastDay = getLastDay(toDay) + 4;
  87. for(i = lastDay; i > (grd_stsList.cols-1); i--){
  88. grd_stsList.colHidden(i) = true;
  89. }
  90. model.toggle("case1");
  91. model.refresh();
  92. }
  93. //통계 희망 월 선택 시 그리드 셋팅 위해 해당월의 마지막 날짜 구함
  94. function getLastDay(Day){
  95. var year = Day.substr(0,4); //년
  96. var month = Day.substr(4,2); //월
  97. with(new Date(year, month, 1, 12)) { //MM = 1 .. 12
  98. setDate(0);
  99. return getDate();
  100. }
  101. }
  102. //조회하고자 하는 월별 그리드 셋팅하기
  103. function fGrdSet(stsflag){
  104. if(stsflag == 1){ //일별의 경우
  105. var day = model.getValue("/root/hidden/stsfromdd");
  106. var lastCol = getLastDay(day) + 3; //선택된 월의 마지막날 + 3(부서명,구분,Total 컬럼)
  107. for(i = 2; i <= grd_stsList.cols; i++){ //부서명때문에 2부터 시작(부서명은 아침채혈일때만 보임)
  108. if(i <= lastCol){
  109. grd_stsList.colHidden(i) = false;
  110. if(i >3){
  111. grd_stsList.colWidth(i) = 40;
  112. }
  113. }else{
  114. grd_stsList.colHidden(i) = true;
  115. }
  116. }
  117. 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";
  118. }else if(stsflag == 3){ //연별의 경우
  119. var fromdd = parseInt(model.getValue("/root/hidden/stsfromdd").substr(0,4));
  120. var todd = parseInt(model.getValue("/root/hidden/ststodd").substr(0,4));
  121. var year = fromdd+"^";
  122. var yearlength;
  123. for(i = fromdd+1; i <= todd; i++){
  124. year += i +"^" ;
  125. }
  126. model.setValue("/root/send/year", year);
  127. yearlength = year.split("^").length;
  128. for(i = 4; i<=grd_stsList.cols; i++){
  129. if(i <yearlength+3){
  130. grd_stsList.colHidden(i) = false;
  131. grd_stsList.colWidth(i) = 80;
  132. }else{
  133. grd_stsList.colHidden(i) = true;
  134. }
  135. }
  136. grd_stsList.caption = "부서명^구분^Total^"+ year;
  137. }
  138. model.refresh();
  139. }
  140. //조회구분 선택시 통계희망월 포멧 지정 및 그리드 컬럼 지정하기
  141. function fShowHopeddnGridSet(){
  142. model.removeNodeset("/root/main/stslist");
  143. if(radio1.value == 3){ //연별
  144. model.setValue("/root/hidden/stsfromdd", getCurrentDate().substr(0, 4));
  145. model.setValue("/root/hidden/ststodd", getCurrentDate().substr(0, 4));
  146. grd_stsList.colWidth(4) = 80;
  147. for(i = 5; i<= grd_stsList.cols;i++){
  148. grd_stsList.colHidden(i) = true;
  149. }
  150. ipt_stsfromdd.attribute("format") = "yyyy";
  151. ipt_ststodd.visible = true; //todd날짜
  152. caption9.visible = true;
  153. grd_stsList.caption = "부서명^구분^Total^"+ model.getValue("/root/hidden/stsfromdd");
  154. model.setValue("/root/send/year", getCurrentDate().substr(0, 4));
  155. }else{
  156. ipt_ststodd.visible = false;
  157. caption9.visible = false;
  158. if(radio1.value == 1){ //일별
  159. ipt_stsfromdd.attribute("format") = "yyyy-mm";
  160. model.setValue("/root/hidden/stsfromdd", getCurrentDate().substr(0, 6));
  161. fGrdSet(1);
  162. }else{ //월별
  163. model.setValue("/root/hidden/stsfromdd", getCurrentDate().substr(0, 4));
  164. ipt_stsfromdd.attribute("format") = "yyyy";
  165. for(i = 2; i <= grd_stsList.cols; i++){ //부서명때문에 2부터 시작(부서명은 아침채혈일때만 보임)
  166. if(i <= 15){
  167. grd_stsList.colHidden(i) = false;
  168. if(i >3){
  169. grd_stsList.colWidth(i) = 75;
  170. }
  171. }else{
  172. grd_stsList.colHidden(i) = true;
  173. }
  174. }
  175. 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";
  176. }
  177. }
  178. model.refresh();
  179. }
  180. //조회
  181. function fGetStats(){
  182. var fromdd = model.getValue("/root/hidden/stsfromdd");
  183. var lastday = getLastDay(fromdd);
  184. model.makeValue("/root/send/stsflag" , model.getValue("/root/hidden/stsflag")); //조회구분 1: 일별, 2: 월별, 3: 연별
  185. model.makeValue("/root/send/stsfromdd" , fromdd); //조회시작
  186. model.makeValue("/root/send/ststodd" , model.getValue("/root/hidden/ststodd")); //조회끝
  187. model.makeValue("/root/send/stskind" , model.getValue("/root/hidden/stskind")); //통계구분 1: 시행부서, 2: 진료과, 3: 진료의, 4: 채혈자, 5: 시간대별 (단, 병동 및 아침채혈의 경우 1: 병동별)
  188. model.makeValue("/root/send/stskind2" , model.getValue("/root/hidden/stskind2")); //통계구분2 1:바코드, 2: 환자, 3: 처방건수
  189. model.makeValue("/root/send/bcollflag" , model.getValue("/root/hidden/bcollflag")); //채혈구분 0: 채혈, 1: 외래채혈, 2: 병동채혈, 3: 아침채혈
  190. model.makeValue("/root/send/btbcollflag" , model.getValue("/root/hidden/btbcollflag")); //아침채혈구분 -: 전체, 1: BT, 2: TT(아침채혈만 사용)
  191. model.makeValue("/root/send/ioflag" , model.getValue("/root/hidden/ioflag")); //입원/외래 구분
  192. model.makeValue("/root/send/lastday" , lastday); //연별조회시 사용
  193. submit("TRLLS00101");
  194. grd_stsList.colStyle(3, "data", "background-color") = "#ffe79d";
  195. grd_stsList.rowStyle(1, "data", "background-color") = "#7BE6B7";
  196. }
  197. //통계 종류에따라 조건 변경 flag 1: 채혈, 2: 외래채혈, 3:병동채혈, 4:아침채혈
  198. function fSwitch(flag){
  199. model.toggle("case1");
  200. btn_excel.visible = true;
  201. if(flag == 1){
  202. if(cbo_2.value == "4" || cbo_2.value == "5"){ //외래채혈의 통계구분이 채혈자별이나 시간대별일 경우
  203. cbo_1.value = "1"; //통계구분을 시행부서별로 초기화
  204. }
  205. cbo_1.visible = true; //통계구분 콤보
  206. cbo_2.visible = false;
  207. cbo_3.visible = false;
  208. cbo_io.visible = true; //입원외래 콤보
  209. caption5.visible = true;
  210. caption16.visible = false;
  211. cbo_bt.visible = false; //채혈구분 콤보(아침채혈일 경우에만 사용)
  212. cbo_io.value = "0";
  213. model.setValue("/root/hidden/bcollflag", "0");
  214. grd_stsList.colHidden(1) = true; //병동명(아침채혈에만 사용)
  215. }else if(flag == 2){
  216. cbo_1.visible = false;
  217. cbo_2.visible = true;
  218. cbo_3.visible = false;
  219. cbo_io.visible = true;
  220. caption5.visible = true;
  221. caption16.visible = false;
  222. cbo_bt.visible = false;
  223. cbo_io.value = "0";
  224. model.setValue("/root/hidden/bcollflag", "1");
  225. grd_stsList.colHidden(1) = true;
  226. }else if(flag == 3){
  227. cbo_1.visible = false;
  228. cbo_2.visible = false;
  229. cbo_3.visible = true;
  230. cbo_io.visible = false;
  231. caption5.visible = false;
  232. caption16.visible = false;
  233. cbo_bt.visible = false;
  234. cbo_io.value = "-"; //입원외래 구분이 없기때문에 -로 강제 변경
  235. cbo_1.value = "1"; //통계구분을 병동별로 초기화
  236. model.setValue("/root/hidden/bcollflag", "2");
  237. grd_stsList.colHidden(1) = true;
  238. }else if(flag == 4){
  239. cbo_1.visible = false;
  240. cbo_2.visible = false;
  241. cbo_3.visible = true;
  242. cbo_io.visible = false;
  243. caption5.visible = false;
  244. caption16.visible = true;
  245. cbo_bt.visible = true;
  246. cbo_io.value = "-";
  247. cbo_1.value = "1"; //통계구분을 병동별로 초기화
  248. model.setValue("/root/hidden/bcollflag", "3");
  249. grd_stsList.colHidden(1) = false;
  250. }
  251. model.removeNodeset("/root/main/stslist");
  252. grd_stsList.rebuildStyle();
  253. model.refresh();
  254. }
  255. ///////////////////////////////////////////////////////////////달력편///////////////////////////////////////////////////////////
  256. var beforeId = "";
  257. function initCalendar() {
  258. var curDate = getCurrentDate().toDate();
  259. model.setValue("/root/hidden/calendar/year", curDate.getDateFormat('YYYY'));
  260. model.setValue("/root/hidden/calendar/month", curDate.getDateFormat('MM'));
  261. model.refresh();
  262. setCalendar(curDate);
  263. }
  264. function setCalendar(dateObj) {
  265. // 그리드 초기화
  266. model.removeNodeset("/root/main/weeklist/list");
  267. grd_calendar.rebuild();
  268. dateObj.setDate(1);
  269. var startDay = dateObj.getDay();
  270. var days = dateObj.getMonthDay();
  271. var rows = Math.ceil( ( startDay + days ) / 7 );
  272. for( var i = 0; i < rows; i++ )
  273. grd_calendar.addRow(false);
  274. grd_calendar.rebuild();
  275. var rowIndex = grd_calendar.fixedRows;
  276. var colIndex = startDay;
  277. for( var i = 1; i <= days; i++ ) {
  278. grd_calendar.valueMatrix(rowIndex, colIndex) = i;
  279. colIndex++;
  280. if( colIndex == 7 ) {
  281. colIndex = 0;
  282. rowIndex++;
  283. }
  284. }
  285. fGetCalendar();// 통계조회
  286. }
  287. function setCellColor(gridObj) {
  288. var calRow = gridObj.row;
  289. var calCol = gridObj.col;
  290. var tmpCalCol;
  291. if( calCol < 7 )
  292. tmpCalCol = calCol + 7;
  293. else
  294. tmpCalCol = calCol - 7;
  295. gridObj.rebuildStyle();
  296. gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  297. gridObj.cellStyle("background-color", calRow, tmpCalCol) = "#daa7d9";
  298. }
  299. function fGetCalendar(){
  300. model.setValue("/root/send/yyyy", model.getValue("/root/hidden/calendar/year"));
  301. model.setValue("/root/send/mm", model.getValue("/root/hidden/calendar/month"));
  302. submit("TRLLS00102");
  303. }
  304. ]]>
  305. </script>
  306. </xhtml:head>
  307. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  308. <switch id="switch1" style="left:0px; top:39px; width:1195px; height:744px; ">
  309. <case id="case1" selected="true">
  310. <group id="group3" scroll="auto" style="left:0px; top:22px; width:1193px; height:719px; ">
  311. <group id="group1" style="left:0px; top:0px; width:1192px; height:55px; vertical-align:middle; ">
  312. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1192px; height:55px; "/>
  313. <button id="btn_ref" class="btn1_letter2" style="left:1116px; top:17px; width:56px; height:22px; ">
  314. <caption>조회</caption>
  315. <script type="javascript" ev:event="DOMActivate">
  316. <![CDATA[
  317. if(model.getValue("/root/hidden/stsflag") == 3){
  318. var fromdd = parseInt(model.getValue("/root/hidden/stsfromdd").substr(0,4));
  319. var todd = parseInt(model.getValue("/root/hidden/ststodd").substr(0,4));
  320. if(todd - fromdd >9 ){
  321. alert("10년 이내로 조회 가능합니다\n조회기간을 다시 선택하세요");
  322. return;
  323. }
  324. }
  325. fGetStats();
  326. ]]>
  327. </script>
  328. </button>
  329. <line id="line3" class="line_4" style="x1:1093px; y1:7px; x2:1093px; y2:49px; "/>
  330. <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; ">
  331. <script type="javascript" ev:event="xforms-value-changed">
  332. <![CDATA[
  333. var stsflag = model.getValue("/root/hidden/stsflag");
  334. model.removeNodeset("/root/main/stslist");
  335. fGrdSet(stsflag);
  336. ]]>
  337. </script>
  338. </input>
  339. <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; ">
  340. <script type="javascript" ev:event="xforms-value-changed">
  341. <![CDATA[
  342. var stsflag = model.getValue("/root/hidden/stsflag");
  343. model.removeNodeset("/root/main/stslist");
  344. fGrdSet(stsflag);
  345. ]]>
  346. </script>
  347. </input>
  348. <caption id="caption4" class="search_name" style="left:365px; top:9px; width:115px; height:17px; ">조회기간 :</caption>
  349. <caption id="caption9" class="search_no_b" visibility="hidden" style="left:560px; top:9px; width:23px; height:17px; ">~</caption>
  350. <select1 id="cbo_io" ref="/root/hidden/ioflag" visibility="visible" appearance="minimal" style="left:825px; top:31px; width:110px; height:19px; ">
  351. <choices>
  352. <item>
  353. <label>- 전 체 -</label>
  354. <value>0</value>
  355. </item>
  356. <item>
  357. <label>입 원</label>
  358. <value>I</value>
  359. </item>
  360. <item>
  361. <label>외 래</label>
  362. <value>O</value>
  363. </item>
  364. <item>
  365. <label>응 급</label>
  366. <value>E</value>
  367. </item>
  368. <item>
  369. <label>건 진</label>
  370. <value>S</value>
  371. </item>
  372. </choices>
  373. </select1>
  374. <caption id="caption5" class="search_name" visibility="visible" style="left:729px; top:31px; width:94px; height:17px; ">입원/외래 :</caption>
  375. <select1 id="radio2" ref="/root/hidden/stskind2" appearance="full" cellspacing="10" cols="3" overflow="visible" style="left:463px; top:31px; width:202px; height:20px; border-style:none; ">
  376. <choices>
  377. <item>
  378. <label>바코드</label>
  379. <value>1</value>
  380. </item>
  381. <item>
  382. <label>환자</label>
  383. <value>2</value>
  384. </item>
  385. <item>
  386. <label>처방건수</label>
  387. <value>3</value>
  388. </item>
  389. </choices>
  390. <script type="javascript" ev:event="xforms-select">
  391. <![CDATA[
  392. model.removeNodeset("/root/main/stslist");
  393. model.refresh();
  394. ]]>
  395. </script>
  396. </select1>
  397. <caption id="caption1" class="search_name" style="left:5px; top:9px; width:90px; height:17px; ">조회구분 :</caption>
  398. <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; ">
  399. <choices>
  400. <item>
  401. <label>일별</label>
  402. <value>1</value>
  403. </item>
  404. <item>
  405. <label>월별</label>
  406. <value>2</value>
  407. </item>
  408. <item>
  409. <label>연별</label>
  410. <value>3</value>
  411. </item>
  412. </choices>
  413. <script type="javascript" ev:event="xforms-select">
  414. <![CDATA[
  415. fShowHopeddnGridSet();
  416. ]]>
  417. </script>
  418. </select1>
  419. <caption id="caption2" class="search_name" style="left:365px; top:32px; width:95px; height:17px; ">통계구분2 :</caption>
  420. <select1 id="cbo_1" ref="/root/hidden/stskind" visibility="visible" appearance="minimal" style="left:96px; top:31px; width:122px; height:19px; ">
  421. <choices>
  422. <item>
  423. <label>시행부서별</label>
  424. <value>1</value>
  425. </item>
  426. <item>
  427. <label>진료과별</label>
  428. <value>2</value>
  429. </item>
  430. <item>
  431. <label>진료의사별</label>
  432. <value>3</value>
  433. </item>
  434. </choices>
  435. </select1>
  436. <select1 id="cbo_2" ref="/root/hidden/stskind" visibility="hidden" appearance="minimal" style="left:96px; top:31px; width:122px; height:19px; ">
  437. <choices>
  438. <item>
  439. <label>시행부서별</label>
  440. <value>1</value>
  441. </item>
  442. <item>
  443. <label>진료과별</label>
  444. <value>2</value>
  445. </item>
  446. <item>
  447. <label>진료의사별</label>
  448. <value>3</value>
  449. </item>
  450. <item>
  451. <label>채혈자별</label>
  452. <value>4</value>
  453. </item>
  454. <item>
  455. <label>시간대별</label>
  456. <value>5</value>
  457. </item>
  458. </choices>
  459. </select1>
  460. <select1 id="cbo_3" ref="/root/hidden/stskind" visibility="hidden" appearance="minimal" style="left:96px; top:31px; width:122px; height:19px; ">
  461. <choices>
  462. <item>
  463. <label>병동별</label>
  464. <value>1</value>
  465. </item>
  466. </choices>
  467. </select1>
  468. <caption id="caption3" class="search_name" visibility="visible" style="left:5px; top:32px; width:94px; height:17px; ">통계구분 :</caption>
  469. <select1 id="cbo_bt" ref="/root/hidden/btbcollflag" visibility="hidden" appearance="minimal" style="left:825px; top:10px; width:111px; height:19px; ">
  470. <choices>
  471. <item>
  472. <label>- 전 체 -</label>
  473. <value>-</value>
  474. </item>
  475. <item>
  476. <label>Bleeding Time</label>
  477. <value>1</value>
  478. </item>
  479. <item>
  480. <label>Tuberculin Test</label>
  481. <value>2</value>
  482. </item>
  483. </choices>
  484. </select1>
  485. <caption id="caption16" class="search_name" visibility="hidden" style="left:729px; top:11px; width:94px; height:17px; ">채혈 구분 :</caption>
  486. </group>
  487. <line id="line1" class="line_1" style="x1:0px; y1:71px; x2:1193px; y2:71px; "/>
  488. <caption id="caption6" class="tit_2" style="left:5px; top:57px; width:134px; height:13px; ">통계 리스트</caption>
  489. <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="110,100, 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" frozenrows="1" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" style="left:0px; top:76px; width:1193px; height:639px; text-align:center; ">
  490. <col ref="stsnm2" style="text-align:left; "/>
  491. <col ref="stsnm" style="text-align:left; "/>
  492. <col ref="total" format="#,###.#" style="text-align:right; "/>
  493. <col ref="d01" format="#,###.#" style="text-align:right; "/>
  494. <col ref="d02" format="#,###.#" style="text-align:right; "/>
  495. <col ref="d03" format="#,###.#" style="text-align:right; "/>
  496. <col ref="d04" format="#,###.#" style="text-align:right; "/>
  497. <col ref="d05" format="#,###.#" style="text-align:right; "/>
  498. <col ref="d06" format="#,###.#" style="text-align:right; "/>
  499. <col ref="d07" format="#,###.#" style="text-align:right; "/>
  500. <col ref="d08" format="#,###.#" style="text-align:right; "/>
  501. <col ref="d09" format="#,###.#" style="text-align:right; "/>
  502. <col ref="d10" format="#,###.#" style="text-align:right; "/>
  503. <col ref="d11" format="#,###.#" style="text-align:right; "/>
  504. <col ref="d12" format="#,###.#" style="text-align:right; "/>
  505. <col ref="d13" format="#,###.#" style="text-align:right; "/>
  506. <col ref="d14" format="#,###.#" style="text-align:right; "/>
  507. <col ref="d15" format="#,###.#" style="text-align:right; "/>
  508. <col ref="d16" format="#,###.#" style="text-align:right; "/>
  509. <col ref="d17" format="#,###.#" style="text-align:right; "/>
  510. <col ref="d18" format="#,###.#" style="text-align:right; "/>
  511. <col ref="d19" format="#,###.#" style="text-align:right; "/>
  512. <col ref="d20" format="#,###.#" style="text-align:right; "/>
  513. <col ref="d21" format="#,###.#" style="text-align:right; "/>
  514. <col ref="d22" format="#,###.#" style="text-align:right; "/>
  515. <col ref="d23" format="#,###.#" style="text-align:right; "/>
  516. <col ref="d24" format="#,###.#" style="text-align:right; "/>
  517. <col ref="d25" format="#,###.#" style="text-align:right; "/>
  518. <col ref="d26" format="#,###.#" style="text-align:right; "/>
  519. <col ref="d27" format="#,###.#" style="text-align:right; "/>
  520. <col ref="d28" format="#,###.#" style="text-align:right; "/>
  521. <col ref="d29" format="#,###.#" style="text-align:right; "/>
  522. <col ref="d30" format="#,###.#" style="text-align:right; "/>
  523. <col ref="d31" format="#,###.#" style="text-align:right; "/>
  524. <script type="javascript" ev:event="onaftersort">
  525. <![CDATA[
  526. grd_stsList.gridToInstance();
  527. ]]>
  528. </script>
  529. </datagrid>
  530. </group>
  531. </case>
  532. <case id="case2">
  533. <group id="group2" scroll="auto" style="left:0px; top:22px; width:1193px; height:719px; ">
  534. <multilinegrid id="grd_calendar" nodeset="/root/main/weeklist/list" class="gridcalendar2" autoresize="true" caption="일^월^화^수^목^금^토" colsep="^" colwidth="170, 170, 170, 170, 170, 170, 170" extendlastcol="noscroll" focuscolor="transparent" rowsep="|" mergecellsfixedrows="bycolrec" style="left:0px; top:85px; width:1193px; height:595px; ">
  535. <row>
  536. <col class="color_sun" ref="sun" style="font-weight:bolder; text-align:center; border-bottom-width:0px; "/>
  537. <col ref="mon" style="font-weight:bolder; text-align:center; border-bottom-width:0px; "/>
  538. <col ref="tue" style="font-weight:bolder; text-align:center; border-bottom-width:0px; "/>
  539. <col ref="wed" style="font-weight:bolder; text-align:center; border-bottom-width:0px; "/>
  540. <col ref="thu" style="font-weight:bolder; text-align:center; border-bottom-width:0px; "/>
  541. <col ref="fri" style="font-weight:bolder; text-align:center; border-bottom-width:0px; "/>
  542. <col class="color_sat" ref="sat" style="font-weight:bolder; text-align:center; border-bottom-width:0px; "/>
  543. </row>
  544. <row>
  545. <col ref="sun_cnt" style="text-align:center; border-top-width:0px; "/>
  546. <col ref="mon_cnt" style="text-align:center; border-top-width:0px; "/>
  547. <col ref="tue_cnt" style="text-align:center; border-top-width:0px; "/>
  548. <col ref="wed_cnt" style="text-align:center; border-top-width:0px; "/>
  549. <col ref="thu_cnt" style="text-align:center; border-top-width:0px; "/>
  550. <col ref="fri_cnt" style="text-align:center; border-top-width:0px; "/>
  551. <col ref="sat_cnt" style="text-align:center; border-top-width:0px; "/>
  552. </row>
  553. <script type="javascript" ev:event="onclick">
  554. <![CDATA[
  555. // setCellColor(grd_calendar);
  556. ]]>
  557. </script>
  558. <script type="javascript" ev:event="onrowchanged">
  559. <![CDATA[
  560. setCellColor(grd_calendar);
  561. ]]>
  562. </script>
  563. <script type="javascript" ev:event="oncolchanged">
  564. <![CDATA[
  565. setCellColor(grd_calendar);
  566. ]]>
  567. </script>
  568. </multilinegrid>
  569. <group id="grp_calendar" style="left:0px; top:21px; width:1193px; height:65px; ">
  570. <shape id="rectangle1" class="calendar_header" appearance="rectangle" style="left:0px; top:0px; width:1193px; height:65px; "/>
  571. <button id="button131" class="icon_pre_year" style="left:480px; top:27px; width:16px; height:16px; ">
  572. <caption/>
  573. <script type="javascript" ev:event="DOMActivate">
  574. <![CDATA[
  575. var isMonth = model.getValue("/root/hidden/calendar/month");
  576. var isYear = model.getValue("/root/hidden/calendar/year");
  577. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'Y');
  578. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  579. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  580. model.refresh();
  581. setCalendar(isDate);
  582. ]]>
  583. </script>
  584. </button>
  585. <button id="button132" class="icon_next_year" style="left:695px; top:27px; width:16px; height:16px; ">
  586. <caption/>
  587. <script type="javascript" ev:event="DOMActivate">
  588. <![CDATA[
  589. var isMonth = model.getValue("/root/hidden/calendar/month");
  590. var isYear = model.getValue("/root/hidden/calendar/year");
  591. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'Y');
  592. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  593. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  594. model.refresh();
  595. setCalendar(isDate);
  596. ]]>
  597. </script>
  598. </button>
  599. <button id="btn_premonth" class="icon_pre_month" style="left:499px; top:27px; width:16px; height:16px; ">
  600. <caption/>
  601. <script type="javascript" ev:event="DOMActivate">
  602. <![CDATA[
  603. var isMonth = model.getValue("/root/hidden/calendar/month");
  604. var isYear = model.getValue("/root/hidden/calendar/year");
  605. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'M');
  606. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  607. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  608. model.refresh();
  609. setCalendar(isDate);
  610. ]]>
  611. </script>
  612. </button>
  613. <button id="button134" class="icon_next_month" style="left:676px; top:27px; width:16px; height:16px; ">
  614. <caption/>
  615. <script type="javascript" ev:event="DOMActivate">
  616. <![CDATA[
  617. var isMonth = model.getValue("/root/hidden/calendar/month");
  618. var isYear = model.getValue("/root/hidden/calendar/year");
  619. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'M');
  620. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  621. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  622. model.refresh();
  623. setCalendar(isDate);
  624. ]]>
  625. </script>
  626. </button>
  627. <output id="opt_year" ref="/root/hidden/calendar/year" class="calendar_output" style="left:525px; top:24px; width:50px; height:19px; font-size:12pt; "/>
  628. <output id="opt_month" ref="/root/hidden/calendar/month" class="calendar_output" style="left:600px; top:24px; width:40px; height:19px; font-size:12pt; "/>
  629. <caption id="caption101" class="calendar_output" style="left:575px; top:24px; width:20px; height:19px; font-size:12pt; ">년</caption>
  630. <caption id="caption102" class="calendar_output" style="left:640px; top:24px; width:20px; height:19px; font-size:12pt; ">월</caption>
  631. <button id="btn_cal" class="btn1_letter2" visibility="hidden" style="left:1116px; top:22px; width:56px; height:22px; ">
  632. <caption>조회</caption>
  633. <script type="javascript" ev:event="DOMActivate">
  634. <![CDATA[
  635. fGetCalendar();
  636. ]]>
  637. </script>
  638. </button>
  639. </group>
  640. <group id="group4" style="left:0px; top:680px; width:360px; height:35px; ">
  641. <button id="button111" class="icon_month" style="left:0px; top:3px; width:27px; height:27px; ">
  642. <caption>01</caption>
  643. </button>
  644. <button id="button112" class="icon_month" style="left:30px; top:3px; width:27px; height:27px; ">
  645. <caption>02</caption>
  646. </button>
  647. <button id="button113" class="icon_month" style="left:60px; top:3px; width:27px; height:27px; ">
  648. <caption>03</caption>
  649. </button>
  650. <button id="button114" class="icon_month" style="left:90px; top:3px; width:27px; height:27px; ">
  651. <caption>04</caption>
  652. </button>
  653. <button id="button115" class="icon_month" style="left:120px; top:3px; width:27px; height:27px; ">
  654. <caption>05</caption>
  655. </button>
  656. <button id="button116" class="icon_month" style="left:150px; top:3px; width:27px; height:27px; ">
  657. <caption>06</caption>
  658. </button>
  659. <button id="button117" class="icon_month" style="left:180px; top:3px; width:27px; height:27px; ">
  660. <caption>07</caption>
  661. </button>
  662. <button id="button118" class="icon_month" style="left:210px; top:3px; width:27px; height:27px; ">
  663. <caption>08</caption>
  664. </button>
  665. <button id="button119" class="icon_month" style="left:240px; top:3px; width:27px; height:27px; ">
  666. <caption>09</caption>
  667. </button>
  668. <button id="button110" class="icon_month" style="left:270px; top:3px; width:27px; height:27px; ">
  669. <caption>10</caption>
  670. </button>
  671. <button id="button121" class="icon_month" style="left:300px; top:3px; width:27px; height:27px; ">
  672. <caption>11</caption>
  673. </button>
  674. <button id="button122" class="icon_month" style="left:330px; top:3px; width:27px; height:27px; ">
  675. <caption>12</caption>
  676. </button>
  677. <script type="javascript" ev:event="onclick">
  678. <![CDATA[
  679. var trgObj = document.controls.item(event.target);
  680. if( trgObj.elementName == "xforms:button" ) {
  681. var btnMark = trgObj.label;
  682. //alert(btnMark);
  683. model.setValue("/root/hidden/calendar/month", btnMark);
  684. var isMonth = model.getValue("/root/hidden/calendar/month");
  685. var isYear = model.getValue("/root/hidden/calendar/year");
  686. var isDate = (isYear+isMonth+1).toDate();
  687. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  688. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  689. model.refresh();
  690. setCalendar(isDate);
  691. if(beforeId != ""){
  692. beforeObj = document.controls(beforeId);
  693. if(beforeObj != null) beforeObj.disabled = "false";
  694. }
  695. trgObj.disabled = "true";
  696. beforeId = trgObj.attribute("id");
  697. }
  698. ]]>
  699. </script>
  700. </group>
  701. <line id="line4" class="line_1" style="x1:0px; y1:16px; x2:1193px; y2:16px; "/>
  702. <caption id="caption7" class="tit_2" style="left:5px; top:2px; width:157px; height:14px; ">외래채혈 환자수 달력편</caption>
  703. </group>
  704. </case>
  705. </switch>
  706. <caption id="caption10" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">채혈 통계</caption>
  707. <group id="group5" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  708. <line id="line2" class="line_2" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  709. <button id="btn_print" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
  710. <caption>출력</caption>
  711. <script type="javascript" ev:event="DOMActivate">
  712. <![CDATA[
  713. //fPrint();
  714. ]]>
  715. </script>
  716. </button>
  717. <button id="btn_excel" class="btn6_letter5" style="left:0px; top:3px; width:92px; height:22px; ">
  718. <caption>EXCEL저장</caption>
  719. <script type="javascript" ev:event="DOMActivate">
  720. <![CDATA[
  721. var flagnm;
  722. var flag = model.getValue("/root/hidden/bcollflag");
  723. if(flag == 0){
  724. flagnm = "채혈";
  725. }else if(flag == 1){
  726. flagnm = "외래채혈통계_";
  727. }else if(flag == 2){
  728. flagnm = "병동채혈통계_";
  729. }else if(flag == 3){
  730. flagnm = "아침채혈통계_";
  731. }
  732. var fileName = window.fileDialog("save", ",", false, flagnm+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  733. if (fileName != ""){
  734. grd_stsList.saveExcel(fileName);
  735. }
  736. ]]>
  737. </script>
  738. </button>
  739. </group>
  740. <button id="button3" class="btn_sw" group="tab" selected="true" style="left:1px; top:40px; width:70px; height:22px; ">
  741. <caption>채혈</caption>
  742. <script type="javascript" ev:event="DOMActivate">
  743. <![CDATA[
  744. fSwitch(1);
  745. //model.toggle("case1");
  746. ]]>
  747. </script>
  748. </button>
  749. <button id="button1" class="btn_sw" visibility="visible" group="tab" style="left:71px; top:40px; width:70px; height:22px; ">
  750. <caption>외래채혈</caption>
  751. <script type="javascript" ev:event="DOMActivate">
  752. <![CDATA[
  753. fSwitch(2);
  754. //model.toggle("case2");
  755. ]]>
  756. </script>
  757. </button>
  758. <button id="button4" class="btn_sw" visibility="visible" group="tab" style="left:141px; top:40px; width:70px; height:22px; ">
  759. <caption>병동채혈</caption>
  760. <script type="javascript" ev:event="DOMActivate">
  761. <![CDATA[
  762. fSwitch(3);
  763. //model.toggle("case3");
  764. ]]>
  765. </script>
  766. </button>
  767. <button id="button5" class="btn_sw" visibility="visible" group="tab" style="left:211px; top:40px; width:70px; height:22px; ">
  768. <caption>아침채혈</caption>
  769. <script type="javascript" ev:event="DOMActivate">
  770. <![CDATA[
  771. fSwitch(4);
  772. //model.toggle("case4");
  773. ]]>
  774. </script>
  775. </button>
  776. <button id="button6" class="btn_sw" visibility="visible" group="tab" style="left:281px; top:40px; width:70px; height:22px; ">
  777. <caption>달력편</caption>
  778. <script type="javascript" ev:event="DOMActivate">
  779. <![CDATA[
  780. model.toggle("case2");
  781. btn_excel.visible = false;
  782. initCalendar();
  783. ]]>
  784. </script>
  785. </button>
  786. </xhtml:body>
  787. </xhtml:html>