SMLBP00300_혈액반납폐기율.xrw 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLBP00300_혈액반납폐기율.xrw
  4. * 설 명 : 혈액반납폐기율
  5. * 설 계 자 : (주)에이씨케이 - 이재민
  6. * 작 성 자 : (주)에이씨케이 - 이재민
  7. * 작 성 일 : 2010.01.19
  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>
  18. <main>
  19. <ddstat>
  20. <chk/>
  21. <blodtest/>
  22. <delive/>
  23. <rtn/>
  24. <perc/>
  25. <d01/>
  26. <d02/>
  27. <d03/>
  28. <d04/>
  29. <d05/>
  30. <d06/>
  31. <d07/>
  32. <d08/>
  33. <d09/>
  34. <d10/>
  35. <d11/>
  36. <d12/>
  37. <d13/>
  38. <d14/>
  39. <d15/>
  40. <d16/>
  41. <d17/>
  42. <d18/>
  43. <d19/>
  44. <d20/>
  45. <d21/>
  46. <d22/>
  47. <d23/>
  48. <d24/>
  49. <d25/>
  50. <d26/>
  51. <d27/>
  52. <d28/>
  53. <d29/>
  54. <d30/>
  55. <d31/>
  56. </ddstat>
  57. <mmstat>
  58. <chk/>
  59. <blodtest/>
  60. <t1/>
  61. <m1/>
  62. <p1/>
  63. <t2/>
  64. <m2/>
  65. <p2/>
  66. <t3/>
  67. <m3/>
  68. <p3/>
  69. <t4/>
  70. <m4/>
  71. <p4/>
  72. <t5/>
  73. <m5/>
  74. <p5/>
  75. <t6/>
  76. <m6/>
  77. <p6/>
  78. <t7/>
  79. <m7/>
  80. <p7/>
  81. <t8/>
  82. <m8/>
  83. <p8/>
  84. <t9/>
  85. <m9/>
  86. <p9/>
  87. <t10/>
  88. <m10/>
  89. <p10/>
  90. <t11/>
  91. <m11/>
  92. <p11/>
  93. <t12/>
  94. <m12/>
  95. <p12/>
  96. </mmstat>
  97. <yystat>
  98. <chk/>
  99. <blodtest/>
  100. <d1/>
  101. <d2/>
  102. <d3/>
  103. <d4/>
  104. <d5/>
  105. <d6/>
  106. <d7/>
  107. <d8/>
  108. <d9/>
  109. </yystat>
  110. <ccstat>
  111. <chk/>
  112. <blod/>
  113. <resndesc/>
  114. <hap/>
  115. <pa/>
  116. <m1/>
  117. <m2/>
  118. <m3/>
  119. <m4/>
  120. <m5/>
  121. <m6/>
  122. <m7/>
  123. <m8/>
  124. <m9/>
  125. <m10/>
  126. <m11/>
  127. <m12/>
  128. </ccstat>
  129. <cystat>
  130. <chk/>
  131. <blod/>
  132. <resndesc/>
  133. <hap/>
  134. <pa/>
  135. <d1/>
  136. <d2/>
  137. <d3/>
  138. </cystat>
  139. </main>
  140. <send>
  141. <rtnabnflag/>
  142. <refflag/>
  143. <cls/>
  144. <stathopefromdd/>
  145. <stathopetodd/>
  146. <perc/>
  147. <mon/>
  148. <code/>
  149. <bloodnm/>
  150. <list/>
  151. <dept/>
  152. <res/>
  153. </send>
  154. <init>
  155. </init>
  156. <hidden>
  157. <rtnabnflag>1</rtnabnflag>
  158. <cls/>
  159. <stathopefromdd/>
  160. <stathopetodd/>
  161. <perc/>
  162. <code>2</code>
  163. <bloodnm/>
  164. <list/>
  165. </hidden>
  166. </root>
  167. </instance>
  168. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  169. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  170. <script type="javascript" ev:event="xforms-ready">
  171. <![CDATA[
  172. model.toggle("dd");
  173. btn_ddstat.selected = true;
  174. fSetInit();
  175. ]]>
  176. </script>
  177. <submission id="TRLBP00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main"/>
  178. <submission id="TRLBP00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main"/>
  179. <submission id="TRLBP00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main"/>
  180. <submission id="TRLBP00304" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main"/>
  181. </model>
  182. <script type="javascript">
  183. <![CDATA[
  184. function fDvisible() { //일별
  185. grd_dd.fixedcellcheckbox(0, 1) = true;
  186. fSetInit();
  187. var toDay = getCurrentDate();
  188. var toDays = toDay.substr(0,6)
  189. ipt_worktodd.attribute("format") = "yyyy-mm";
  190. ipt_workfromdd.attribute("format") = "yyyy-mm";
  191. model.setValue("/root/hidden/stathopefromdd", toDays);
  192. model.setValue("/root/hidden/stathopetodd", toDays);
  193. caption9.visible = false;
  194. ipt_worktodd.visible = false;
  195. btn_ddstat.selected == true
  196. combo2.visible = false;
  197. cmb_rtnabnflag.visible = true;
  198. model.refresh();
  199. }
  200. function fMvisible() { //월별
  201. grd_mm.fixedcellcheckbox(0, 1) = true;
  202. fSetInit();
  203. var toDay = getCurrentDate();
  204. var toDays = toDay.substr(0,4)
  205. ipt_worktodd.attribute("format") = "yyyy";
  206. ipt_workfromdd.attribute("format") = "yyyy";
  207. model.setValue("/root/hidden/stathopefromdd", toDays);
  208. model.setValue("/root/hidden/stathopetodd", toDays);
  209. caption9.visible = false;
  210. ipt_worktodd.visible = false;
  211. combo2.visible = false;
  212. cmb_rtnabnflag.visible = true;
  213. model.refresh();
  214. }
  215. function fYvisible() { //년별
  216. grd_yy.fixedcellcheckbox(0, 1) = true;
  217. fSetInit();
  218. var toDay = getCurrentDate();
  219. var toDays = toDay.substr(0,4)
  220. ipt_worktodd.attribute("format") = "yyyy";
  221. ipt_workfromdd.attribute("format") = "yyyy";
  222. model.setValue("/root/hidden/stathopefromdd", toDays);
  223. model.setValue("/root/hidden/stathopetodd", toDays);
  224. caption9.visible = true;
  225. ipt_worktodd.visible = true;
  226. combo2.visible = false;
  227. cmb_rtnabnflag.visible = true;
  228. fHidden();
  229. model.refresh();
  230. }
  231. function fHidden(){ //그리드 숨기기
  232. grd_yy.colHidden(3) = true;
  233. grd_yy.colHidden(4) = true;
  234. grd_yy.colHidden(5) = true;
  235. grd_yy.colHidden(6) = true;
  236. grd_yy.colHidden(7) = true;
  237. grd_yy.colHidden(8) = true;
  238. grd_yy.colHidden(9) = true;
  239. grd_yy.colHidden(10) = true;
  240. grd_yy.colHidden(11) = true;
  241. grd_cy.colHidden(6) = true;
  242. grd_cy.colHidden(7) = true;
  243. grd_cy.colHidden(8) = true;
  244. grd_cy.colHidden(9) = true;
  245. grd_cy.colHidden(10) = true;
  246. grd_cy.colHidden(11) = true;
  247. grd_cy.colHidden(12) = true;
  248. grd_cy.colHidden(13) = true;
  249. grd_cy.colHidden(14) = true;
  250. grd_cy.colHidden(15) = true;
  251. grd_cy.colHidden(16) = true;
  252. grd_cy.colHidden(17) = true;
  253. }
  254. //사유월별
  255. function fCvisible() {
  256. grd_cm.fixedcellcheckbox(0, 1) = true;
  257. fSetInit();
  258. var toDay = getCurrentDate();
  259. var toDays = toDay.substr(0,4)
  260. ipt_worktodd.attribute("format") = "yyyy";
  261. ipt_workfromdd.attribute("format") = "yyyy";
  262. model.setValue("/root/hidden/stathopefromdd", toDays);
  263. model.setValue("/root/hidden/stathopetodd", toDays);
  264. caption9.visible = false;
  265. ipt_worktodd.visible = false;
  266. combo2.visible = true;
  267. cmb_rtnabnflag.visible = false;
  268. model.refresh();
  269. }
  270. //사유년별
  271. function fCyvisible() {
  272. grd_cy.fixedcellcheckbox(0, 1) = true;
  273. fSetInit();
  274. var toDay = getCurrentDate();
  275. var toDays = toDay.substr(0,4)
  276. ipt_worktodd.attribute("format") = "yyyy";
  277. ipt_workfromdd.attribute("format") = "yyyy";
  278. model.setValue("/root/hidden/stathopefromdd", toDays);
  279. model.setValue("/root/hidden/stathopetodd", toDays);
  280. caption9.visible = true;
  281. ipt_worktodd.visible = true;
  282. combo2.visible = true;
  283. cmb_rtnabnflag.visible = false;
  284. fHidden();
  285. model.refresh();
  286. }
  287. //초기화
  288. function fSetInit() {
  289. grd_dd.fixedcellcheckbox(0, 1) = true;
  290. var toDay = getCurrentDate();
  291. var toDays = toDay.substr(0,6)
  292. ipt_worktodd.attribute("format") = "yyyy-mm";
  293. ipt_workfromdd.attribute("format") = "yyyy-mm";
  294. model.setValue("/root/hidden/rtnabnflag", "1");
  295. model.setValue("/root/hidden/cls", "1");
  296. model.setValue("/root/hidden/stathopefromdd", toDays);
  297. model.setValue("/root/hidden/stathopetodd", toDays);
  298. model.removeNodeset("/root/main/ddstat");
  299. model.removeNodeset("/root/main/mmstat");
  300. model.removeNodeset("/root/main/yystat");
  301. model.removeNodeset("/root/main/ccstat");
  302. model.removeNodeset("/root/main/cystat");
  303. //body.removeChild("ivr_report");
  304. grd_dd.seqrowheader = 0;
  305. grd_dd.frozenRows = 1;
  306. grd_dd.frozenCols = 5;
  307. //body.removeChild("ivr_report");
  308. //makeReportPreview(0, 0, 1193, 645, "mm");
  309. //makeReportPreview(0, 0, 1193, 645, "yy");
  310. model.refresh();
  311. }
  312. //조회
  313. function fSetStat() {
  314. model.resetInstanceNode("/root/main/ddstat");
  315. var mons = (model.getValue("/root/hidden/stathopefromdd"));
  316. var mon = null;
  317. mon = mons.substr(4,2);
  318. model.setValue("/root/send/mon",mon)
  319. model.setValue("/root/send/rtnabnflag", model.getValue("/root/hidden/rtnabnflag"));
  320. model.setValue("/root/send/cls", model.getValue("/root/hidden/cls"));
  321. model.setValue("/root/send/stathopefromdd", model.getValue("/root/hidden/stathopefromdd"));
  322. model.setValue("/root/send/stathopetodd", model.getValue("/root/hidden/stathopetodd"));
  323. model.setValue("/root/send/code", model.getValue("/root/hidden/code"));
  324. model.setValue("/root/send/bloodnm", model.getValue("/root/hidden/bloodnm"));
  325. model.setValue("/root/send/perc", model.getValue("/root/hidden/perc"));
  326. if(btn_ddstat.selected == true) {
  327. model.setValue("/root/send/refflag", "1");
  328. submit("TRLBP00301");
  329. grd_dd.rowStyle(1,"all","background-color") = "#f7a08b"
  330. grd_dd.seqrowheader = 0;
  331. grd_dd.frozenRows = 1;
  332. grd_dd.frozenCols = 5;
  333. model.setValue("root/send/list", "");
  334. model.setValue("root/send/dept", "");
  335. model.refresh();
  336. } else if(btn_mmstat.selected == true) {
  337. fGetMMStat();
  338. } else if(btn_yystat.selected == true) {
  339. fGetYYStat();
  340. } else if(btn_ccstat.selected == true) {
  341. fGetCCStat();
  342. } else if(btn_cystat.selected == true) {
  343. fGetCYStat();
  344. }
  345. }
  346. //월별통계
  347. function fGetMMStat() {
  348. model.resetInstanceNode("/root/main/mmstat");
  349. model.setValue("/root/send/rtnabnflag", model.getValue("/root/hidden/rtnabnflag"));
  350. model.setValue("/root/send/refflag", "2");
  351. model.setValue("/root/send/cls", model.getValue("/root/hidden/cls"));
  352. model.setValue("/root/send/stathopefromdd", model.getValue("/root/hidden/stathopefromdd"));
  353. model.setValue("/root/send/stathopetodd", model.getValue("/root/hidden/stathopetodd"));
  354. model.setValue("/root/send/perc", model.getValue("/root/hidden/perc"));
  355. submit("TRLBP00302");
  356. grd_mm.rowStyle(2,"all","background-color") = "#f7a08b"
  357. grd_mm.seqrowheader = 0;
  358. grd_mm.frozenRows = 1;
  359. grd_mm.frozenCols = 2;
  360. model.setValue("root/send/list", "");
  361. model.setValue("root/send/dept", "");
  362. model.refresh();
  363. //exeReportPreview("RPLBP00200", "XMLFILE", "/root/send", "TRLBP00301", "", "", "", "", "", "", "", "mm");
  364. }
  365. //년별통계
  366. function fGetYYStat() {
  367. var fromyy = parseInt(model.getValue("/root/hidden/stathopefromdd").substr(0,4));
  368. var toyy = parseInt(model.getValue("/root/hidden/stathopetodd").substr(0,4));
  369. if(toyy - fromyy < 0){
  370. alert("종료일이 시작일보다 작습니다");
  371. return;
  372. }
  373. if(toyy - fromyy >= 3){
  374. alert("조회는 3년까지만 제공합니다");
  375. return;
  376. }
  377. fHidden();
  378. model.removeNodeset("/root/main/yystat");
  379. var newCap = "^구분";
  380. var newCap2 = "|^구분^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%";
  381. var cnt = "0";
  382. var yearval = 0;
  383. if((toyy-2) == fromyy ){
  384. grd_yy.colHidden(9) = false;
  385. grd_yy.colHidden(10) = false;
  386. grd_yy.colHidden(11) = false;
  387. }
  388. grd_yy.colHidden(3) = false;
  389. grd_yy.colHidden(4) = false;
  390. grd_yy.colHidden(5) = false;
  391. newCap += "^ " + fromyy + "년^ " + fromyy + "년^ " + fromyy + "년";
  392. for(i=1; i<11; i++){
  393. yearval = fromyy + i;
  394. if(yearval <= toyy){
  395. newCap += "^ " + yearval + "년" + "^ " + yearval + "년" + "^ " + yearval + "년";
  396. grd_yy.colHidden(6) = false;
  397. grd_yy.colHidden(7) = false;
  398. grd_yy.colHidden(8) = false;
  399. }
  400. }
  401. grd_yy.caption = newCap + newCap2;
  402. model.refresh();
  403. model.setValue("/root/send/rtnabnflag", model.getValue("/root/hidden/rtnabnflag"));
  404. model.setValue("/root/send/refflag", "3");
  405. model.setValue("/root/send/cls", model.getValue("/root/hidden/cls"));
  406. model.setValue("/root/send/stathopefromdd", model.getValue("/root/hidden/stathopefromdd"));
  407. model.setValue("/root/send/stathopetodd", model.getValue("/root/hidden/stathopetodd"));
  408. model.setValue("/root/send/perc", model.getValue("/root/hidden/perc"));
  409. model.setValue("/root/send/perc", model.getValue("/root/hidden/perc"));
  410. submit("TRLBP00301");
  411. grd_yy.rowStyle(2,"all","background-color") = "#f7a08b"
  412. grd_yy.seqrowheader = 0;
  413. grd_yy.frozenRows = 1;
  414. grd_yy.frozenCols = 2;
  415. model.setValue("root/send/list", "");
  416. model.setValue("root/send/dept", "");
  417. model.refresh();
  418. //exeReportPreview("RPLBP00100", "XMLFILE", "/root/send", "TRLBP00301", "", "", "", "", "", "", "", "yy");
  419. }
  420. //유형(월별)
  421. function fGetCCStat() {
  422. grd_cm.rebuildStyle();
  423. model.resetInstanceNode("/root/main/ccstat");
  424. model.setValue("/root/send/rtnabnflag", model.getValue("/root/hidden/rtnabnflag"));
  425. model.setValue("/root/send/refflag", "4");
  426. model.setValue("/root/send/cls", model.getValue("/root/hidden/cls"));
  427. model.setValue("/root/send/stathopefromdd", model.getValue("/root/hidden/stathopefromdd"));
  428. model.setValue("/root/send/mon", model.getValue("/root/hidden/stathopefromdd"));
  429. model.setValue("/root/send/perc", model.getValue("/root/hidden/perc"));
  430. submit("TRLBP00303");
  431. grd_cm.rowStyle(1,"all","background-color") = "#f7a08b"
  432. for (i = 1; i < grd_cm.rows; i++){
  433. if(model.getValue("/root/main/ccstat[" + i + "]/resndesc" )== "[소계]"){
  434. grd_cm.rowStyle(i,"all","background-color") = "#C0C0C0 "
  435. }
  436. }
  437. grd_cm.seqrowheader = 0;
  438. grd_cm.frozenRows = 1;
  439. model.setValue("root/send/list", "");
  440. model.setValue("root/send/dept", "");
  441. model.setValue("root/send/res", "");
  442. model.refresh();
  443. }
  444. //유형별(년별)
  445. function fGetCYStat() {
  446. var fromyy = parseInt(model.getValue("/root/hidden/stathopefromdd").substr(0,4));
  447. var toyy = parseInt(model.getValue("/root/hidden/stathopetodd").substr(0,4));
  448. if(toyy - fromyy < 0){
  449. alert("종료일이 시작일보다 작습니다");
  450. return;
  451. }
  452. if(toyy - fromyy >= 3){
  453. alert("조회는 3년까지만 제공합니다");
  454. return;
  455. }
  456. fHidden();
  457. grd_cy.rebuildStyle();
  458. grd_yy.refresh();
  459. model.removeNodeset("/root/main/yystat");
  460. grd_yy.gridToInstance();
  461. var newCap = "^구분^사유^총건수^%";
  462. var cnt = "0";
  463. var yearval = 0;
  464. if((toyy-2) == fromyy ){
  465. grd_cy.colHidden(6) = false;
  466. grd_cy.colHidden(7) = false;
  467. grd_cy.colHidden(8) = false;
  468. }
  469. grd_cy.colHidden(6) = false;
  470. newCap += "^ " + fromyy + "년 ";
  471. for(i=1; i<11; i++){
  472. yearval = fromyy + i;
  473. if(yearval <= toyy){
  474. newCap += "^ " + yearval + "년";
  475. grd_cy.colHidden(7) = false;
  476. }
  477. }
  478. grd_cy.caption = newCap
  479. model.refresh();
  480. model.setValue("/root/send/rtnabnflag", model.getValue("/root/hidden/rtnabnflag"));
  481. model.setValue("/root/send/refflag", "5");
  482. model.setValue("/root/send/cls", model.getValue("/root/hidden/cls"));
  483. model.setValue("/root/send/stathopefromdd", model.getValue("/root/hidden/stathopefromdd"));
  484. model.setValue("/root/send/stathopetodd", model.getValue("/root/hidden/stathopetodd"));
  485. model.setValue("/root/send/perc", model.getValue("/root/hidden/perc"));
  486. submit("TRLBP00304");
  487. grd_cy.rowStyle(1,"all","background-color") = "#f7a08b"
  488. for (i = 1; i < grd_cy.rows; i++){
  489. if(model.getValue("/root/main/cystat[" + i + "]/resndesc" )== "[소계]"){
  490. grd_cy.rowStyle(i,"all","background-color") = "#C0C0C0"
  491. }
  492. }
  493. grd_cy.seqrowheader = 0;
  494. grd_cy.frozenRows = 1;
  495. grd_cy.frozenCols = 2;
  496. model.setValue("root/send/list", "");
  497. model.setValue("root/send/dept", "");
  498. model.refresh();
  499. //exeReportPreview("RPLBP00100", "XMLFILE", "/root/send", "TRLBP00301", "", "", "", "", "", "", "", "yy");
  500. }
  501. //정리
  502. function fList() { //일별
  503. if (btn_ddstat.selected == true){
  504. if(model.getValue("/root/send/cls") == 2) {
  505. var list = "";
  506. var dept = "";
  507. for (i = 1; i < grd_dd.rows; i++){
  508. if(model.getValue("/root/main/ddstat[" + i + "]/chk" )== "1"){
  509. list = list + "," + model.getValue("/root/main/ddstat[" + i + "]/blodtest");
  510. }
  511. }
  512. model.setValue("/root/send/list" , list);
  513. fSetStat()
  514. }else if (btn_ddstat.selected == true){
  515. if(model.getValue("/root/send/cls") == 1) {
  516. var dept = "";
  517. for (i = 1; i < grd_dd.rows; i++){
  518. if(model.getValue("/root/main/ddstat[" + i + "]/chk" )== "1"){
  519. dept = dept + "," + model.getValue("/root/main/ddstat[" + i + "]/blodtest");
  520. }
  521. }
  522. model.setValue("/root/send/dept" , dept);
  523. fSetStat()
  524. }
  525. }
  526. }
  527. if (btn_mmstat.selected == true){ //월별
  528. if(model.getValue("/root/send/cls") == 2) {
  529. var list = "";
  530. for (i = 1; i < grd_mm.rows; i++){
  531. if(model.getValue("/root/main/mmstat[" + i + "]/chk" )== "1"){
  532. list = list + "," + model.getValue("/root/main/mmstat[" + i + "]/blodtest");
  533. }
  534. }
  535. model.setValue("/root/send/list" , list);
  536. fGetMMStat()
  537. }else if (btn_mmstat.selected == true){
  538. if(model.getValue("/root/send/cls") == 1) {
  539. var dept = "";
  540. for (i = 1; i < grd_mm.rows; i++){
  541. if(model.getValue("/root/main/mmstat[" + i + "]/chk" )== "1"){
  542. dept = dept + "," + model.getValue("/root/main/mmstat[" + i + "]/blodtest");
  543. }
  544. }
  545. model.setValue("/root/send/dept" , dept);
  546. fGetMMStat()
  547. }
  548. }
  549. }
  550. if (btn_yystat.selected == true){ //연별
  551. if(model.getValue("/root/send/cls") == 2) {
  552. var list = "";
  553. for (i = 1; i < grd_yy.rows; i++){
  554. if(model.getValue("/root/main/yystat[" + i + "]/chk" )== "1"){
  555. list = list + "," + model.getValue("/root/main/yystat[" + i + "]/blodtest");
  556. }
  557. }
  558. model.setValue("/root/send/list" , list);
  559. fGetYYStat()
  560. }else if (btn_yystat.selected == true){
  561. if(model.getValue("/root/send/cls") == 1) {
  562. var dept = "";
  563. for (i = 1; i < grd_yy.rows; i++){
  564. if(model.getValue("/root/main/yystat[" + i + "]/chk" )== "1"){
  565. dept = dept + "," + model.getValue("/root/main/yystat[" + i + "]/blodtest");
  566. }
  567. }
  568. model.setValue("/root/send/dept" , dept);
  569. fGetYYStat()
  570. }
  571. }
  572. }
  573. if (btn_ccstat.selected == true){ //유형월별
  574. if(model.getValue("/root/send/cls") == 2) {
  575. var list = "";
  576. var res = "";
  577. for (i = 1; i < grd_cm.rows; i++){
  578. if(model.getValue("/root/main/ccstat[" + i + "]/chk" )== "1"){
  579. list = list + "," + model.getValue("/root/main/ccstat[" + i + "]/blod" ) + model.getValue("/root/main/ccstat[" + i + "]/resndesc");
  580. }
  581. }
  582. model.setValue("/root/send/list" , list);
  583. fGetCCStat()
  584. }else if (btn_ccstat.selected == true){
  585. if(model.getValue("/root/send/cls") == 1) {
  586. var dept = "";
  587. for (i = 1; i < grd_cm.rows; i++){
  588. if(model.getValue("/root/main/ccstat[" + i + "]/chk" )== "1"){
  589. dept = dept + "," + model.getValue("/root/main/ccstat[" + i + "]/blod") + model.getValue("/root/main/ccstat[" + i + "]/resndesc");
  590. }
  591. }
  592. model.setValue("/root/send/dept" , dept);
  593. fGetCCStat()
  594. }
  595. }
  596. }
  597. if (btn_cystat.selected == true){ //유형연별
  598. if(model.getValue("/root/send/cls") == 2) {
  599. var list = "";
  600. var res = "";
  601. for (i = 1; i < grd_cy.rows; i++){
  602. if(model.getValue("/root/main/cystat[" + i + "]/chk" )== "1"){
  603. list = list + "," + model.getValue("/root/main/cystat[" + i + "]/blod" ) + model.getValue("/root/main/cystat[" + i + "]/resndesc");
  604. }
  605. }
  606. model.setValue("/root/send/list" , list);
  607. fGetCYStat()
  608. }else if (btn_cystat.selected == true){
  609. if(model.getValue("/root/send/cls") == 1) {
  610. var dept = "";
  611. for (i = 1; i < grd_cy.rows; i++){
  612. if(model.getValue("/root/main/cystat[" + i + "]/chk" )== "1"){
  613. dept = dept + "," + model.getValue("/root/main/cystat[" + i + "]/blod") + model.getValue("/root/main/cystat[" + i + "]/resndesc");
  614. }
  615. }
  616. model.setValue("/root/send/dept" , dept);
  617. fGetCYStat()
  618. }
  619. }
  620. }
  621. }
  622. //엑셀저장
  623. function fSaveExcel() {
  624. var filename = window.fileDialog("save",",",false,"excel","xls","All File(*.*)|*.*|Excel File(*.xls)|*.xls");
  625. if(filename != "") {
  626. if(btn_ddstat.selected == true) {
  627. grd_dd.saveExcel(filename);
  628. }else if(btn_mmstat.selected == true) {
  629. grd_mm.saveExcel(filename);
  630. }else if(btn_yystat.selected == true) {
  631. grd_yy.saveExcel(filename);
  632. }else if(btn_ccstat.selected == true) {
  633. grd_cm.saveExcel(filename);
  634. }else if(btn_cystat.selected == true) {
  635. grd_cy.saveExcel(filename);
  636. }
  637. }
  638. }
  639. ]]>
  640. </script>
  641. </xhtml:head>
  642. <xhtml:body guideline="2,769;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  643. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
  644. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  645. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1195px; height:35px; "/>
  646. <button id="btn_ref" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  647. <caption>조회</caption>
  648. <script type="javascript" ev:event="DOMActivate">
  649. <![CDATA[
  650. fSetStat();
  651. ]]>
  652. </script>
  653. </button>
  654. <line id="line3" class="line_4" style="x1:1108px; y1:6px; x2:1108px; y2:28px; "/>
  655. <caption id="caption5" class="search_name" style="left:386px; top:9px; width:112px; height:17px; ">반환폐기구분 :</caption>
  656. <caption id="caption2" class="search_name" style="left:615px; top:9px; width:64px; height:17px; ">분류 :</caption>
  657. <select id="chx_perc" ref="/root/hidden/perc" overflow="visible" appearance="full" checkvalue="1,0" type="checkbox" style="left:873px; top:10px; width:35px; height:13px; border-style:none; ">
  658. <choices>
  659. <item>
  660. <label/>
  661. <value>1</value>
  662. </item>
  663. </choices>
  664. </select>
  665. <caption id="caption1" class="search_name" style="left:792px; top:9px; width:74px; height:17px; ">마취과 :</caption>
  666. <input id="ipt_workfromdd" ref="/root/hidden/stathopefromdd" class="input_search" inputtype="date" style="left:189px; top:8px; width:80px; height:19px; "/>
  667. <input id="ipt_worktodd" ref="/root/hidden/stathopetodd" class="input_search" visibility="hidden" inputtype="date" style="left:298px; top:8px; width:80px; height:19px; "/>
  668. <caption id="caption4" class="search_name" style="left:10px; top:9px; width:110px; height:17px; ">통계 희망일 :</caption>
  669. <caption id="caption9" class="search_no_b" visibility="hidden" style="left:277px; top:10px; width:13px; height:17px; ">~</caption>
  670. <select1 id="cmb_rtnabnflag" ref="/root/hidden/rtnabnflag" appearance="minimal" style="left:503px; top:8px; width:102px; height:19px; ">
  671. <choices>
  672. <item>
  673. <label>반환</label>
  674. <value>1</value>
  675. </item>
  676. <item>
  677. <label>폐기</label>
  678. <value>2</value>
  679. </item>
  680. <item>
  681. <label>잔여혈액폐기</label>
  682. <value>3</value>
  683. </item>
  684. <item>
  685. <label>취소</label>
  686. <value>4</value>
  687. </item>
  688. </choices>
  689. </select1>
  690. <select1 id="cmb_cls" ref="/root/hidden/cls" appearance="minimal" style="left:682px; top:8px; width:100px; height:19px; ">
  691. <choices>
  692. <item>
  693. <label>진료과별</label>
  694. <value>1</value>
  695. </item>
  696. <item>
  697. <label>혈액종류별</label>
  698. <value>2</value>
  699. </item>
  700. </choices>
  701. </select1>
  702. <input id="input1" ref="/root/hidden/bloodnm" style="left:1000px; top:8px; width:100px; height:19px; "/>
  703. <caption id="caption3" class="search_name" style="left:923px; top:9px; width:73px; height:17px; ">혈액명 :</caption>
  704. <select1 id="combo2" ref="/root/hidden/rtnabnflag" visibility="hidden" appearance="minimal" style="left:503px; top:8px; width:102px; height:19px; ">
  705. <choices>
  706. <item>
  707. <label>반환</label>
  708. <value>1</value>
  709. </item>
  710. <item>
  711. <label>폐기</label>
  712. <value>2</value>
  713. </item>
  714. </choices>
  715. </select1>
  716. </group>
  717. <switch id="swt_statflag" class="sw_box" style="left:0px; top:75px; width:1195px; height:663px; ">
  718. <case id="dd" selected="true">
  719. <datagrid id="grd_dd" nodeset="/root/main/ddstat" caption="^구분^총출고^건수^%^01^02^03^04^05^06^07^08^09^10^11^12^13^14^15^16^17^18^19^20^21^22^23^24^25^26^27^28^29^30^31" colsep="^" colwidth="25, 120, 50, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" style="left:5px; top:37px; width:1180px; height:616px; text-align:center; ">
  720. <col checkvalue="1,0" ref="chk" type="checkbox"/>
  721. <col ref="blodtest" style="text-align:left; "/>
  722. <col ref="delive"/>
  723. <col ref="rtn"/>
  724. <col ref="perc"/>
  725. <col ref="d01"/>
  726. <col ref="d02"/>
  727. <col ref="d03"/>
  728. <col ref="d04"/>
  729. <col ref="d05"/>
  730. <col ref="d06"/>
  731. <col ref="d07"/>
  732. <col ref="d08"/>
  733. <col ref="d09"/>
  734. <col ref="d10"/>
  735. <col ref="d11"/>
  736. <col ref="d12"/>
  737. <col ref="d13"/>
  738. <col ref="d14"/>
  739. <col ref="d15"/>
  740. <col ref="d16"/>
  741. <col ref="d17"/>
  742. <col ref="d18"/>
  743. <col ref="d19"/>
  744. <col ref="d20"/>
  745. <col ref="d21"/>
  746. <col ref="d22"/>
  747. <col ref="d23"/>
  748. <col ref="d24"/>
  749. <col ref="d25"/>
  750. <col ref="d26"/>
  751. <col ref="d27"/>
  752. <col ref="d28"/>
  753. <col ref="d29"/>
  754. <col ref="d30"/>
  755. <col ref="d31"/>
  756. <script type="javascript" ev:event="onaftersort">
  757. <![CDATA[
  758. grd_dd.gridToInstance();
  759. ]]>
  760. </script>
  761. </datagrid>
  762. <line id="line1" class="line_1" style="x1:5px; y1:31px; x2:1184px; y2:31px; "/>
  763. <caption id="caption7" class="tit_2" style="left:5px; top:15px; width:131px; height:13px; ">일별 통계</caption>
  764. </case>
  765. <case id="mm">
  766. <datagrid id="grd_mm" nodeset="/root/main/mmstat" caption="^구분^1월^1월^1월^2월^2월^2월^3월^3월^3월^4월^4월^4월^5월^5월^5월^6월^6월^6월^7월^7월^7월^8월^8월^8월^9월^9월^9월^10월^10월^10월^11월^11월^11월^12월^12월^12월^12|^구분^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^%^총출고^건수^백분률^백분률" colsep="^" colwidth="25, 120, 50, 40, 35, 50, 40, 35, 50, 40, 35, 50, 40, 35, 50, 40, 35, 50, 45, 35, 50, 40, 35, 50, 40, 35, 50, 40, 35, 50, 40, 35, 50, 40, 35, 50, 40, 50" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" style="left:5px; top:37px; width:1180px; height:616px; ">
  767. <col checkvalue="1,0" ref="chk" type="checkbox"/>
  768. <col ref="blodtest"/>
  769. <col ref="t1"/>
  770. <col ref="m1"/>
  771. <col ref="p1"/>
  772. <col ref="t2"/>
  773. <col ref="m2"/>
  774. <col ref="p2"/>
  775. <col ref="t3"/>
  776. <col ref="m3"/>
  777. <col ref="p3"/>
  778. <col ref="t4"/>
  779. <col ref="m4"/>
  780. <col ref="p4"/>
  781. <col ref="t5"/>
  782. <col ref="m5"/>
  783. <col ref="p5"/>
  784. <col ref="t6"/>
  785. <col ref="m6"/>
  786. <col ref="p6"/>
  787. <col ref="t7"/>
  788. <col ref="m7"/>
  789. <col ref="p7"/>
  790. <col ref="t8"/>
  791. <col ref="m8"/>
  792. <col ref="p8"/>
  793. <col ref="t9"/>
  794. <col ref="m9"/>
  795. <col ref="p9"/>
  796. <col ref="t10"/>
  797. <col ref="m10"/>
  798. <col ref="p10"/>
  799. <col ref="t11"/>
  800. <col ref="m11"/>
  801. <col ref="p11"/>
  802. <col ref="t12"/>
  803. <col ref="m12"/>
  804. <col ref="p12"/>
  805. <script type="javascript" ev:event="onaftersort">
  806. <![CDATA[
  807. grd_mm.gridToInstance();
  808. ]]>
  809. </script>
  810. </datagrid>
  811. <line id="line4" class="line_1" style="x1:5px; y1:31px; x2:1184px; y2:31px; "/>
  812. <caption id="caption8" class="tit_2" style="left:5px; top:15px; width:131px; height:14px; ">월별통계</caption>
  813. </case>
  814. <case id="yy">
  815. <datagrid id="grd_yy" nodeset="/root/main/yystat" caption="^구분^d1^d2^d3^d4^d5^d6^d7^d8^d9" colsep="^" colwidth="25, 120, 80, 80, 80, 80, 80, 80, 80, 80, 80" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" style="left:5px; top:37px; width:1180px; height:616px; ">
  816. <col checkvalue="1,0" ref="chk" type="checkbox"/>
  817. <col ref="blodtest"/>
  818. <col ref="d1"/>
  819. <col ref="d2"/>
  820. <col ref="d3"/>
  821. <col ref="d4"/>
  822. <col ref="d5"/>
  823. <col ref="d6"/>
  824. <col ref="d7"/>
  825. <col ref="d8"/>
  826. <col ref="d9"/>
  827. <script type="javascript" ev:event="onaftersort">
  828. <![CDATA[
  829. grd_yy.gridToInstance();
  830. ]]>
  831. </script>
  832. </datagrid>
  833. <caption id="caption10" class="tit_2" style="left:5px; top:15px; width:131px; height:14px; ">년별 통계</caption>
  834. <line id="line5" class="line_1" style="x1:5px; y1:31px; x2:1184px; y2:31px; "/>
  835. </case>
  836. <case id="cc">
  837. <line id="line6" class="line_1" style="x1:5px; y1:31px; x2:1184px; y2:31px; "/>
  838. <caption id="caption11" class="tit_2" style="left:5px; top:15px; width:131px; height:14px; ">사유별 통계(월별)</caption>
  839. <datagrid id="grd_cm" nodeset="/root/main/ccstat" caption="^구분^사유^총건수^%^1월^2월^3월^4월^5월^6월^7월^8월^9월^10월^11월^12월" colsep="^" colwidth="25, 120, 160, 60, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" style="left:5px; top:37px; width:1180px; height:616px; text-align:center; ">
  840. <col checkvalue="1,0" ref="chk" type="checkbox"/>
  841. <col ref="blod" style="text-align:left; "/>
  842. <col ref="resndesc"/>
  843. <col ref="hap"/>
  844. <col ref="pa"/>
  845. <col ref="m1"/>
  846. <col ref="m2"/>
  847. <col ref="m3"/>
  848. <col ref="m4"/>
  849. <col ref="m5"/>
  850. <col ref="m6"/>
  851. <col ref="m7"/>
  852. <col ref="m8"/>
  853. <col ref="m9"/>
  854. <col ref="m10"/>
  855. <col ref="m11"/>
  856. <col ref="m12"/>
  857. <script type="javascript" ev:event="onaftersort">
  858. <![CDATA[
  859. grd_cm.gridToInstance();
  860. ]]>
  861. </script>
  862. </datagrid>
  863. </case>
  864. <case id="cy">
  865. <line id="line2" class="line_1" style="x1:5px; y1:31px; x2:1184px; y2:31px; "/>
  866. <caption id="caption6" class="tit_2" style="left:5px; top:15px; width:136px; height:14px; ">사유별 통계(연별)</caption>
  867. <datagrid id="grd_cy" nodeset="/root/main/cystat" caption="^구분^사유^총건수^%^d1^d2^d3" colsep="^" colwidth="25, 120, 100, 80, 80, 80, 80, 80" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" style="left:5px; top:36px; width:1180px; height:616px; ">
  868. <col checkvalue="1,0" ref="chk" type="checkbox"/>
  869. <col ref="blod"/>
  870. <col ref="resndesc"/>
  871. <col ref="hap"/>
  872. <col ref="pa"/>
  873. <col ref="d1"/>
  874. <col ref="d2"/>
  875. <col ref="d3"/>
  876. <script type="javascript" ev:event="onaftersort">
  877. <![CDATA[
  878. grd_cy.gridToInstance();
  879. ]]>
  880. </script>
  881. </datagrid>
  882. </case>
  883. </switch>
  884. <button id="btn_mmstat" class="btn_sw" group="tab" style="left:74px; top:55px; width:75px; height:22px; ">
  885. <caption>월별 통계</caption>
  886. <toggle case="mm" ev:event="DOMActivate"/>
  887. <script type="javascript" ev:event="DOMActivate">
  888. <![CDATA[
  889. fMvisible();
  890. ]]>
  891. </script>
  892. </button>
  893. <button id="btn_yystat" class="btn_sw" group="tab" style="left:148px; top:55px; width:75px; height:22px; ">
  894. <caption>연별 통계</caption>
  895. <toggle case="yy" ev:event="DOMActivate"/>
  896. <script type="javascript" ev:event="DOMActivate">
  897. <![CDATA[
  898. fYvisible();
  899. ]]>
  900. </script>
  901. </button>
  902. <button id="btn_ccstat" class="btn_sw" group="tab" style="left:222px; top:55px; width:75px; height:22px; ">
  903. <caption>유형(월별)</caption>
  904. <toggle case="cc" ev:event="DOMActivate"/>
  905. <script type="javascript" ev:event="DOMActivate">
  906. <![CDATA[
  907. fCvisible();
  908. ]]>
  909. </script>
  910. </button>
  911. <button id="btn_cystat" class="btn_sw" group="tab" style="left:296px; top:55px; width:75px; height:22px; ">
  912. <caption>유형(연별)</caption>
  913. <toggle case="cy" ev:event="DOMActivate"/>
  914. <script type="javascript" ev:event="DOMActivate">
  915. <![CDATA[
  916. fCyvisible();
  917. ]]>
  918. </script>
  919. </button>
  920. <button id="btn_excel" class="btn2_letter2" style="left:1153px; top:54px; width:42px; height:19px; ">
  921. <caption>엑셀</caption>
  922. <script type="javascript" ev:event="DOMActivate">
  923. <![CDATA[
  924. fSaveExcel();
  925. ]]>
  926. </script>
  927. </button>
  928. <button id="btn_ddstat" class="btn_sw" group="tab" style="left:0px; top:55px; width:75px; height:22px; ">
  929. <caption>일별 통계</caption>
  930. <toggle case="dd" ev:event="DOMActivate"/>
  931. <script type="javascript" ev:event="DOMActivate">
  932. <![CDATA[
  933. fDvisible();
  934. ]]>
  935. </script>
  936. </button>
  937. <select1 id="combo1" ref="/root/hidden/code" appearance="minimal" style="left:120px; top:18px; width:65px; height:19px; ">
  938. <choices>
  939. <item>
  940. <label>불출일</label>
  941. <value>2</value>
  942. </item>
  943. <item>
  944. <label>준비일</label>
  945. <value>1</value>
  946. </item>
  947. </choices>
  948. </select1>
  949. </group>
  950. <caption id="caption12" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">혈액반환폐기율</caption>
  951. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  952. <button id="btn_reset" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  953. <caption>초기화</caption>
  954. <script type="javascript" ev:event="DOMActivate">
  955. <![CDATA[
  956. window.reload();
  957. ]]>
  958. </script>
  959. </button>
  960. <line id="line7" class="line_2" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  961. <button id="btn_print" class="btn6_letter2" style="left:0px; top:3px; width:96px; height:22px; ">
  962. <caption>정리</caption>
  963. <script type="javascript" ev:event="onclick">
  964. <![CDATA[
  965. fList();
  966. ]]>
  967. </script>
  968. </button>
  969. </group>
  970. </xhtml:body>
  971. </xhtml:html>