SMLBS00500_헌혈통계.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLBS00500_헌혈통계.xrw
  4. * 설 명 : 수혈환자수
  5. * 설 계 자 : (주)에이씨케이 - 박정은
  6. * 작 성 자 : (주)에이씨케이 - 박정은
  7. * 작 성 일 : 2008.06.12
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <month>
  20. <orddept/>
  21. <a01/>
  22. <a02/>
  23. <a03/>
  24. <a04/>
  25. <a05/>
  26. <a06/>
  27. <a07/>
  28. <a08/>
  29. <a09/>
  30. <a10/>
  31. <a11/>
  32. <a12/>
  33. </month>
  34. <quarter>
  35. <orddept/>
  36. <b01/>
  37. <b02/>
  38. <b03/>
  39. <b04/>
  40. </quarter>
  41. <year>
  42. <orddept/>
  43. <c01/>
  44. <c02/>
  45. <c03/>
  46. <c04/>
  47. <c05/>
  48. <c06/>
  49. <c07/>
  50. <c08/>
  51. <c09/>
  52. <c10/>
  53. </year>
  54. </main>
  55. <send>
  56. <fromdd/>
  57. <todd/>
  58. <gbn/>
  59. <flag/>
  60. <codeflag/>
  61. </send>
  62. <init>
  63. </init>
  64. <hidden>
  65. <ref>
  66. <fromdd/>
  67. <todd/>
  68. <gbn>00</gbn>
  69. <flag/>
  70. <yy/>
  71. <blodgbn>00</blodgbn>
  72. </ref>
  73. <report>
  74. <month/>
  75. <quarter/>
  76. <year/>
  77. </report>
  78. </hidden>
  79. </root>
  80. </instance>
  81. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  82. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  83. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  84. <script type="javascript" ev:event="xforms-ready">
  85. <![CDATA[
  86. fSetInit();
  87. ]]>
  88. </script>
  89. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/LB0605"/>
  90. <submission id="TRLBS00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/month"/>
  91. <submission id="TRLBS00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/quarter"/>
  92. <submission id="TRLBS00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/year"/>
  93. </model>
  94. <script type="javascript">
  95. <![CDATA[
  96. //초기화
  97. function fSetInit(){
  98. model.setValue("/root/hidden/ref/fromdd", getCurrentDate());
  99. model.setValue("/root/hidden/ref/todd" , getCurrentDate());
  100. model.removeNodeset("/root/main/month");
  101. model.removeNodeset("/root/main/quarter");
  102. model.removeNodeset("/root/main/year");
  103. btn_1.selected = true;
  104. btn_2.selected = false;
  105. btn_3.selected = false;
  106. model.toggle("case1");
  107. //공통코드
  108. model.setValue("/root/send/codeflag", "0605|0002|"); // 0605 blodbarcd // 0002 진료과
  109. submit("TRLZZ00101");
  110. model.refresh();
  111. }
  112. // 수혈환자수 조회
  113. function fGetTransPidCnt(){
  114. model.setValue("/root/send/fromdd", model.getValue("/root/hidden/ref/fromdd"));
  115. model.setValue("/root/send/todd", model.getValue("/root/hidden/ref/todd"));
  116. model.setValue("/root/send/gbn", model.getValue("/root/hidden/ref/gbn")); // 1=전체, 2= 입원, 3=외래
  117. //model.setValue("/root/send/flag", model.getValue("/root/hidden/ref/flag")); // 1=월별, 2=분기별, 3=연별
  118. if(model.getValue("/root/hidden/ref/flag")=="1"){
  119. submit("TRLBS00301");
  120. }else if(model.getValue("/root/hidden/ref/flag")=="2"){
  121. submit("TRLBS00302");
  122. }else if(model.getValue("/root/hidden/ref/flag")=="3"){
  123. fYearCaption();
  124. submit("TRLBS00303");
  125. }
  126. }
  127. // 엑셀저장
  128. function fSaveExcel(){
  129. var filename = window.fileDialog("save", ",", false, "Excel", "xls", "All Files(*.*)|*.*|Excel File(*.xls)|*.xls");
  130. if(model.getValue("/root/hidden/ref/flag")=="1"){//월별
  131. if(filename != "") {
  132. grd_month.saveExcel(filename);
  133. }
  134. }else if(model.getValue("/root/hidden/ref/flag")=="2"){//분기별
  135. if(filename != "") {
  136. grd_quarter.saveExcel(filename);
  137. }
  138. }else if(model.getValue("/root/hidden/ref/flag")=="3"){//연별
  139. if(filename != "") {
  140. grd_year.saveExcel(filename);
  141. }
  142. }
  143. }
  144. // 출력
  145. function fExePrint(){
  146. if(model.getValue("/root/hidden/ref/flag")=="1"){ //월별
  147. model.removeNodeset("/root/hidden/report/month");
  148. for(i=1; i<grd_month.rows; i++){
  149. copyNodeListType("/root/hidden/report", "/root/main/month["+i+"]", "arter");
  150. }
  151. model.makeValue("/root/hidden/report/fromdd", model.getValue("/root/hidden/ref/fromdd"));
  152. model.makeValue("/root/hidden/report/todd", model.getValue("/root/hidden/ref/todd"));
  153. exeReportPreview("RPLBS00300", "XMLSTR", "/root/hidden/report");
  154. }else if(model.getValue("/root/hidden/ref/flag")=="2"){ //분기별
  155. model.removeNodeset("/root/hidden/report/quarter");
  156. for(i=1; i<grd_quarter.rows; i++){
  157. copyNodeListType("/root/hidden/report", "/root/main/quarter["+i+"]", "after");
  158. }
  159. model.makeValue("/root/hidden/report/fromdd", model.getValue("/root/hidden/ref/fromdd"));
  160. model.makeValue("/root/hidden/report/todd", model.getValue("/root/hidden/ref/todd"));
  161. exeReportPreview("RPLBS00400", "XMLSTR", "/root/hidden/report");
  162. }else if(model.getValue("/root/hidden/ref/flag")=="3"){ //연별
  163. model.removeNodeset("/root/hidden/report/year");
  164. for(i=1; i<grd_year.rows; i++){
  165. copyNodeListType("/root/hidden/report", "/root/main/year["+i+"]", "after");
  166. }
  167. model.makeValue("/root/hidden/report/fromdd", model.getValue("/root/hidden/ref/fromdd"));
  168. model.makeValue("/root/hidden/report/todd", model.getValue("/root/hidden/ref/todd"));
  169. var sdd = parseInt(model.getValue("/root/hidden/ref/fromdd").substr(0,4));
  170. model.makeValue("/root/hidden/report/title/title1", sdd);
  171. model.makeValue("/root/hidden/report/title/title2", (sdd+1));
  172. model.makeValue("/root/hidden/report/title/title3", (sdd+2));
  173. model.makeValue("/root/hidden/report/title/title4", (sdd+3));
  174. model.makeValue("/root/hidden/report/title/title5", (sdd+4));
  175. model.makeValue("/root/hidden/report/title/title6", (sdd+5));
  176. model.makeValue("/root/hidden/report/title/title7", (sdd+6));
  177. model.makeValue("/root/hidden/report/title/title8", (sdd+7));
  178. model.makeValue("/root/hidden/report/title/title9", (sdd+8));
  179. model.makeValue("/root/hidden/report/title/title10", (sdd+9));
  180. exeReportPreview("RPLBS00500", "XMLSTR", "/root/hidden/report");
  181. }
  182. }
  183. // 연별 캡션 변경
  184. function fYearCaption(){
  185. for(q=1; q<=10; q++){
  186. grd_year.colHidden(q) = true;
  187. }
  188. var fromyy = model.getValue("/root/hidden/ref/fromdd").substr(0,4);
  189. var toyy = model.getValue("/root/hidden/ref/todd").substr(0,4);
  190. var newCap = "진료과";
  191. var cnt = "0";
  192. for(i=fromyy; i<=toyy; i++){
  193. newCap += "^" + i;
  194. cnt ++;
  195. }
  196. if(cnt > 10){
  197. alert("10년이상 조회하면 마비되요");
  198. }
  199. for(z=1; z<=cnt; z++){
  200. grd_year.colHidden(z) = false;
  201. }
  202. grd_year.caption = newCap;
  203. }
  204. ]]>
  205. </script>
  206. </xhtml:head>
  207. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  208. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
  209. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  210. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1195px; height:35px; "/>
  211. <button id="btn_ref" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  212. <caption>조회</caption>
  213. <script type="javascript" ev:event="DOMActivate">
  214. <![CDATA[
  215. // fGetTransPidCnt();
  216. ]]>
  217. </script>
  218. </button>
  219. <line id="line3" class="line_4" style="x1:1108px; y1:6px; x2:1108px; y2:28px; "/>
  220. <caption id="caption5" class="search_name" style="left:383px; top:9px; width:73px; height:17px; ">진료과 :</caption>
  221. <input id="ipt_workfromdd" ref="/root/hidden/ref/fromdd" class="input_search" inputtype="date" style="left:128px; top:8px; width:90px; height:19px; "/>
  222. <input id="ipt_worktodd" ref="/root/hidden/ref/todd" class="input_search" inputtype="date" style="left:233px; top:8px; width:90px; height:19px; "/>
  223. <caption id="caption4" class="search_name" style="left:15px; top:9px; width:110px; height:17px; ">통계 희망일 :</caption>
  224. <caption id="caption9" class="search_no_b" style="left:220px; top:10px; width:13px; height:17px; ">~</caption>
  225. <select1 id="cmb_rtnabnflag" ref="/root/hidden/ref/gbn" appearance="minimal" itemcount="20" style="left:463px; top:8px; width:102px; height:19px; ">
  226. <choices>
  227. <itemset nodeset="/root/init/LB0002">
  228. <label ref="etc01"/>
  229. <value ref="cd"/>
  230. </itemset>
  231. </choices>
  232. </select1>
  233. <select1 id="combo1" ref="/root/hidden/ref/blodgbn" appearance="minimal" style="left:738px; top:8px; width:102px; height:19px; ">
  234. <choices>
  235. <itemset nodeset="/root/init/LB0605">
  236. <label ref="nm"/>
  237. <value ref="cd"/>
  238. </itemset>
  239. </choices>
  240. </select1>
  241. <caption id="caption6" class="search_name" style="left:643px; top:9px; width:86px; height:17px; ">혈액종류 :</caption>
  242. </group>
  243. <switch id="switch1" style="left:0px; top:75px; width:1195px; height:665px; ">
  244. <case id="case1" selected="true">
  245. <caption id="caption32" class="tit_2" style="left:10px; top:5px; width:131px; height:14px; ">일별 헌혈통계</caption>
  246. <line id="line19" class="line_1" style="x1:5px; y1:20px; x2:1188px; y2:20px; "/>
  247. <datagrid id="grd_month" nodeset="/root/main/month" caption="헌혈구분^1월^2월^3월^4월^5월^6월^7월^8월^9월^10월^11월^12월^Total" colsep="^" colwidth="120, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:25px; width:1183px; height:625px; ">
  248. <col ref="orddept"/>
  249. <col ref="a01"/>
  250. <col ref="a02"/>
  251. <col ref="a03"/>
  252. <col ref="a04"/>
  253. <col ref="a05"/>
  254. <col ref="a06"/>
  255. <col ref="a07"/>
  256. <col ref="a08"/>
  257. <col ref="a09"/>
  258. <col ref="a10"/>
  259. <col ref="a11"/>
  260. <col ref="a12"/>
  261. <col ref="bhap"/>
  262. </datagrid>
  263. </case>
  264. <case id="case2">
  265. <caption id="caption2" class="tit_2" style="left:10px; top:5px; width:131px; height:14px; ">월별 헌혈통계</caption>
  266. <line id="line1" class="line_1" style="x1:5px; y1:20px; x2:1188px; y2:20px; "/>
  267. <datagrid id="grd_quarter" nodeset="/root/main/quarter" caption="헌혈구분^1월^2월^3월^4월^5월^6월^7월^8월^9월^10월^11월^12월^Total" colsep="^" colwidth="120, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:25px; width:1183px; height:625px; ">
  268. <col ref="orddept"/>
  269. <col ref="b01"/>
  270. <col ref="b02"/>
  271. <col ref="b03"/>
  272. <col ref="b04"/>
  273. <col/>
  274. <col/>
  275. <col/>
  276. <col/>
  277. <col/>
  278. <col/>
  279. <col/>
  280. <col/>
  281. <col ref="bhap"/>
  282. </datagrid>
  283. </case>
  284. <case id="case3">
  285. <caption id="caption3" class="tit_2" style="left:10px; top:5px; width:131px; height:14px; ">연별 헌혈통계</caption>
  286. <line id="line4" class="line_1" style="x1:5px; y1:20px; x2:1188px; y2:20px; "/>
  287. <datagrid id="grd_year" nodeset="/root/main/year" caption="헌혈구분^^^^^^^^^^^Total" colsep="^" colwidth="100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 80" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:25px; width:1183px; height:625px; ">
  288. <col ref="orddept"/>
  289. <col ref="c01"/>
  290. <col ref="c02"/>
  291. <col ref="c03"/>
  292. <col ref="c04"/>
  293. <col ref="c05"/>
  294. <col ref="c06"/>
  295. <col ref="c07"/>
  296. <col ref="c08"/>
  297. <col ref="c09"/>
  298. <col ref="c10"/>
  299. <col ref="bhap"/>
  300. </datagrid>
  301. </case>
  302. </switch>
  303. <button id="btn_1" class="btn_sw" group="tab" selected="true" style="left:0px; top:54px; width:70px; height:22px; ">
  304. <caption>일별</caption>
  305. <script type="javascript" ev:event="DOMActivate">
  306. <![CDATA[
  307. model.toggle("case1");
  308. model.setValue("/root/hidden/ref/flag", "1"); // 월별
  309. ]]>
  310. </script>
  311. </button>
  312. <button id="btn_2" class="btn_sw" group="tab" selected="true" style="left:70px; top:54px; width:70px; height:22px; ">
  313. <caption>월별</caption>
  314. <script type="javascript" ev:event="DOMActivate">
  315. <![CDATA[
  316. model.toggle("case2");
  317. model.setValue("/root/hidden/ref/flag", "2"); // 분기별
  318. ]]>
  319. </script>
  320. </button>
  321. <button id="btn_3" class="btn_sw" group="tab" selected="true" style="left:140px; top:54px; width:70px; height:22px; ">
  322. <caption>연별</caption>
  323. <script type="javascript" ev:event="DOMActivate">
  324. <![CDATA[
  325. model.toggle("case3");
  326. model.setValue("/root/hidden/ref/flag", "3"); // 연별
  327. //연별캡션 변경
  328. fYearCaption();
  329. ]]>
  330. </script>
  331. </button>
  332. <button id="btn_excel" class="btn2_letter2" style="left:1152px; top:53px; width:42px; height:19px; ">
  333. <caption>엑셀</caption>
  334. <script type="javascript" ev:event="DOMActivate">
  335. <![CDATA[
  336. fSaveExcel();
  337. ]]>
  338. </script>
  339. </button>
  340. </group>
  341. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  342. <button id="btn_reset" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  343. <caption>초기화</caption>
  344. <script type="javascript" ev:event="DOMActivate">
  345. <![CDATA[
  346. fSetInit();
  347. ]]>
  348. </script>
  349. </button>
  350. <line id="line2" class="line_2" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  351. <button id="btn_print" class="btn6_letter2" style="left:0px; top:3px; width:96px; height:22px; ">
  352. <caption>출력</caption>
  353. <script type="javascript" ev:event="DOMActivate">
  354. <![CDATA[
  355. //fExePrint();
  356. ]]>
  357. </script>
  358. </button>
  359. </group>
  360. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  361. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">헌혈통계</caption>
  362. </group>
  363. </xhtml:body>
  364. </xhtml:html>