SMAES00800_영상의학연보자료.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>연보자료통계</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <item>
  12. <flag/>
  13. <excuroomnm/>
  14. <month1/>
  15. <month2/>
  16. <month3/>
  17. <month4/>
  18. <month5/>
  19. <month6/>
  20. <month7/>
  21. <month8/>
  22. <month9/>
  23. <month10/>
  24. <month11/>
  25. <month12/>
  26. <prestyearsum/>
  27. <bfyearsum/>
  28. <variation/>
  29. </item>
  30. </list>
  31. </main>
  32. <send>
  33. <execfromdd/>
  34. <exectodd/>
  35. <comparefromdd/>
  36. <comparetodd/>
  37. <orddeptcd/>
  38. <orddrid/>
  39. <execdeptcd/>
  40. <execdrid/>
  41. <globalinstance>
  42. <instance1/>
  43. </globalinstance>
  44. <suppdeptcd/>
  45. <ioflag/>
  46. </send>
  47. <inti/>
  48. <hidden/>
  49. </root>
  50. </instance>
  51. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  52. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  53. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  54. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  55. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  56. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  57. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  58. <script type="javascript">
  59. <![CDATA[
  60. /*** ***/
  61. function setTitle() {
  62. model.removenode("/root/main/list");
  63. var stYearMonth = model.getValue("/root/send/execfromdd") + "01";
  64. var dtYearMonth = stYearMonth.toDate();
  65. var stEndMonth = model.getValue("/root/send/exectodd") + "01";
  66. var dtEndMonth = stEndMonth.toDate();
  67. var stYearHeader = "구분^구분^";
  68. var stMonthHeader = "구분^구분^";
  69. for (var i = 1; i <= 12; i++) {
  70. // 년도
  71. var stYear = dtYearMonth.getDateFormat("YYYY");
  72. // 월
  73. var stMonth = dtYearMonth.getDateFormat("MM");
  74. stYearHeader = stYearHeader + stYear + "년^";
  75. stMonthHeader = stMonthHeader + stMonth + "월^";
  76. if (dtYearMonth.getDateFormat("YYYYMM") > dtEndMonth.getDateFormat("YYYYMM")) {
  77. grd_list.colHidden(1 + i) = true;
  78. } else {
  79. grd_list.colHidden(1 + i) = false;
  80. }
  81. dtYearMonth.getAddDate(1, "M");
  82. }
  83. stYearHeader = stYearHeader + "당해년도합계^전년도합계^증감(%)|";
  84. stMonthHeader = stMonthHeader + "당해년도합계^전년도합계^증감(%)";
  85. grd_list.caption = stYearHeader + stMonthHeader;
  86. }
  87. ]]>
  88. </script>
  89. <script type="javascript" ev:event="xforms-ready">
  90. <![CDATA[
  91. aezfSetSuppDeptcd();
  92. // 진료과/진료의 조회
  93. //submit("TRPMOCOM01", false);
  94. //model.setValue("/root/send/suppdeptcd", model.getValue("/root/send/globalinstance/instance1"));
  95. var fromdd = getCurrentDate().substr(0,4) + "01";
  96. var todd = getCurrentDate().substr(0,6);
  97. var comparefromdd = getCurrentDate().substr(0,4).toDate().getAddDate(0,"Y").getDateFormat("YYYY") + "01";
  98. var comparetodd = comparefromdd.substr(0,4) + todd.substr(4,2);
  99. model.setValue("/root/send/suppdeptcd", model.getValue("/root/send/globalinstance/instance1"));
  100. model.setValue("/root/send/execfromdd", fromdd);
  101. model.setValue("/root/send/exectodd", todd);
  102. model.setValue("/root/send/comparefromdd",comparefromdd);
  103. model.setValue("/root/send/comparetodd",comparetodd);
  104. model.setValue("/root/send/ioflag","");
  105. model.removenode("/root/main/list");
  106. setTitle();
  107. model.refresh();
  108. ]]>
  109. </script>
  110. <submission id="TRAES00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/list"/>
  111. <submission id="TRAES00801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/list"/>
  112. </model>
  113. </xhtml:head>
  114. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  115. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  116. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:14px; ">연보자료통계</caption>
  117. </group>
  118. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  119. <caption id="caption1" class="tit_2" style="left:5px; top:50px; width:200px; height:13px; ">연보자료통계</caption>
  120. <line id="line1" class="line_1" style="x1:0px; y1:65px; x2:1195px; y2:65px; "/>
  121. <button id="btn_excsave" class="btn2_letter4" style="left:1130px; top:45px; width:64px; height:19px; ">
  122. <caption>엑셀저장</caption>
  123. <script type="javascript" ev:event="DOMActivate">
  124. <![CDATA[
  125. // var fileName = window.fileDialog("save", ",", false, "", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*"); // 2009-07-01 엑셀저장 두번째 저장 실패 오류 확인
  126. var filename = window.fileDialog("save",",",false,"excel","xls","All File(*.*)|*.*|Excel File(*.xls)|*.xls"); // 2009-07-01 엑셀저장 두번째 저장 실패 오류 확인 두번째 테스트
  127. if (filename != "") {
  128. grd_list.saveExcel(filename);
  129. }
  130. ]]>
  131. </script>
  132. </button>
  133. <datagrid id="grd_list" nodeset="/root/main/list/item" caption="구분^구분^2006년^2006년^2006년^2006년^2006년^2006년^2006년^2006년^2006년^2006년^2007년^2007년^당해년도합계^전년도합계^증감(%)|구분^구분^3월^4월^5월^6월^7월^8월^9월^10월^11월^12월^1월^2월^당해년도합계^전년도합계^증감(%)" colsep="^" colwidth="70, 112, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 82, 82, 82" fixedcols="2" mergecellsfixedcols="bycolrec" mergecellsfixedrows="bycolrec" rowsep="|" subtotalposition="below" style="left:0px; top:70px; width:1195px; height:670px; ">
  134. <col ref="flag"/>
  135. <col ref="excuroomnm"/>
  136. <col ref="month1" style="text-align:right; "/>
  137. <col ref="month2" style="text-align:right; "/>
  138. <col ref="month3" style="text-align:right; "/>
  139. <col ref="month4" style="text-align:right; "/>
  140. <col ref="month5" style="text-align:right; "/>
  141. <col ref="month6" style="text-align:right; "/>
  142. <col ref="month7" style="text-align:right; "/>
  143. <col ref="month8" style="text-align:right; "/>
  144. <col ref="month9" style="text-align:right; "/>
  145. <col ref="month10" style="text-align:right; "/>
  146. <col ref="month11" style="text-align:right; "/>
  147. <col ref="month12" style="text-align:right; "/>
  148. <col ref="prestyearsum" style="text-align:right; "/>
  149. <col ref="bfyearsum" style="text-align:right; "/>
  150. <col ref="variation" style="text-align:right; "/>
  151. </datagrid>
  152. <group id="group1" style="left:0px; top:10px; width:1195px; height:30px; vertical-align:top; ">
  153. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1193px; height:30px; background-color:#fffbf2; border-color:#ffd799; "/>
  154. <line id="line2" class="line_4" style="x1:1110px; y1:5px; x2:1110px; y2:25px; "/>
  155. <button id="button1" class="btn1_letter2" navindex="4" style="left:1120px; top:4px; width:56px; height:22px; ">
  156. <caption>조회</caption>
  157. <script type="javascript" ev:event="DOMActivate">
  158. <![CDATA[
  159. openLoadingBar("영상의학 연보 자료 조회 중입니다...") ;
  160. if (submit("TRAES00801")) {
  161. var rows = grd_list.rows - grd_list.fixedRows;
  162. if(rows > 0){
  163. grd_list.subtotal("sum", -1, grd_list.colRef("month1"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ",1, "합 계");
  164. grd_list.subtotal("sum", -1, grd_list.colRef("month2"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ",1, "합 계");
  165. grd_list.subtotal("sum", -1, grd_list.colRef("month3"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ",1, "합 계");
  166. grd_list.subtotal("sum", -1, grd_list.colRef("month4"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ",1, "합 계");
  167. grd_list.subtotal("sum", -1, grd_list.colRef("month5"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ",1, "합 계");
  168. grd_list.subtotal("sum", -1, grd_list.colRef("month6"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ",1, "합 계");
  169. grd_list.subtotal("sum", -1, grd_list.colRef("month7"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ",1, "합 계");
  170. grd_list.subtotal("sum", -1, grd_list.colRef("month8"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ",1, "합 계");
  171. grd_list.subtotal("sum", -1, grd_list.colRef("month9"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ",1, "합 계");
  172. grd_list.subtotal("sum", -1, grd_list.colRef("month10"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ",1, "합 계");
  173. grd_list.subtotal("sum", -1, grd_list.colRef("month11"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ",1, "합 계");
  174. grd_list.subtotal("sum", -1, grd_list.colRef("month12"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ",1, "합 계");
  175. grd_list.subtotal("sum", -1, grd_list.colRef("prestyearsum"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ",1, "합 계");
  176. grd_list.subtotal("sum", -1, grd_list.colRef("bfyearsum"), "#,###", "background-color:#CCFFCC; color:#0000ff; font-weight:bold; ", 1, "합 계");
  177. var prestyearsum = grd_list.valueMatrix(grd_list.rows-1, grd_list.colRef("prestyearsum"));
  178. var bfyearsum = grd_list.valueMatrix(grd_list.rows-1, grd_list.colRef("bfyearsum"));
  179. var variation = 0;
  180. if ( bfyearsum == 0 ) {
  181. variation = (( eval(prestyearsum) - eval(bfyearsum))) * 100;
  182. } else {
  183. variation = (( eval(prestyearsum) - eval(bfyearsum) ) / eval(bfyearsum)) * 100;
  184. }
  185. grd_list.valueMatrix(grd_list.rows-1, grd_list.colRef("variation")) = variation.toString().getRound(-1,"HALF_UP");
  186. model.refresh();
  187. }
  188. }
  189. closeLoadingBar() ;//처리중 화면을 close한다.
  190. ]]>
  191. </script>
  192. </button>
  193. <caption id="caption2" class="search_name" style="left:15px; top:7px; width:86px; height:17px; ">조회기간 :</caption>
  194. <input id="ipt_todd" ref="/root/send/exectodd" class="input_default" navindex="2" inputtype="date" format="yyyy-mm" style="left:227px; top:6px; width:100px; height:19px; ">
  195. <script type="javascript" ev:event="xforms-value-changed">
  196. <![CDATA[
  197. var execfromdd = (model.getValue("/root/send/execfromdd") + "01").toDate();
  198. var exectodd = (model.getValue("/root/send/exectodd") + "01").toDate();
  199. if(execfromdd.getAddDate(11, "M") < exectodd)
  200. {
  201. messageBox("1년이상의 자료는 검색할수 없습니다.", "I");
  202. exectodd = execfromdd;
  203. }
  204. model.setValue("/root/send/exectodd", exectodd.getDateFormat("YYYYMM"));
  205. exectodd = exectodd.getAddDate(-12, "M");
  206. exectodd = exectodd.getDateFormat("YYYYMM");
  207. model.setValue("/root/send/comparetodd", exectodd);
  208. setTitle();
  209. model.refresh();
  210. ]]>
  211. </script>
  212. </input>
  213. <caption id="caption5" class="search_no_b" style="left:212px; top:6px; width:12px; height:17px; ">~</caption>
  214. <input id="ipt_fromdd" ref="/root/send/execfromdd" class="input_default" navindex="1" inputtype="date" format="yyyy-mm" style="left:109px; top:6px; width:100px; height:19px; ">
  215. <script type="javascript" ev:event="xforms-value-changed">
  216. <![CDATA[
  217. var execfromdd = (model.getValue("/root/send/execfromdd") + "01").toDate();
  218. var exectodd = (model.getValue("/root/send/exectodd") + "01").toDate();
  219. if(execfromdd < exectodd.getAddDate(-11, "M"))
  220. {
  221. messageBox("1년이상의 자료는 검색할수 없습니다.", "I");
  222. execfromdd = exectodd;
  223. }
  224. model.setValue("/root/send/execfromdd", execfromdd.getDateFormat("YYYYMM"));
  225. execfromdd = execfromdd.getAddDate(-12, "M");
  226. execfromdd = execfromdd.getDateFormat("YYYYMM");
  227. model.setValue("/root/send/comparefromdd", execfromdd);
  228. setTitle();
  229. model.refresh();
  230. ]]>
  231. </script>
  232. </input>
  233. <caption id="caption3" class="search_name" style="left:368px; top:7px; width:86px; height:17px; ">비교기간 :</caption>
  234. <input id="input1" ref="/root/send/comparetodd" class="input_default" disabled="true" navindex="2" inputtype="date" format="yyyy-mm" style="left:580px; top:6px; width:100px; height:19px; ">
  235. <script type="javascript" ev:event="xforms-value-changed">
  236. <![CDATA[
  237. var comparefromdd = (model.getValue("/root/send/comparefromdd") + "01").toDate();
  238. var comparetodd = (model.getValue("/root/send/comparetodd") + "01").toDate();
  239. if(comparefromdd.getAddDate(11, "M") < comparetodd)
  240. {
  241. messageBox("1년이상의 자료는 검색할수 없습니다.", "I");
  242. comparetodd = comparefromdd;
  243. }
  244. model.setValue("/root/send/comparetodd", comparetodd.getDateFormat("YYYYMM"));
  245. comparetodd = comparetodd.getAddDate(12, "M");
  246. comparetodd = comparetodd.getDateFormat("YYYYMM");
  247. model.setValue("/root/send/exectodd", comparetodd);
  248. model.refresh();
  249. ]]>
  250. </script>
  251. </input>
  252. <caption id="caption4" class="search_no_b" style="left:565px; top:6px; width:12px; height:17px; ">~</caption>
  253. <input id="input2" ref="/root/send/comparefromdd" class="input_default" disabled="true" navindex="1" inputtype="date" format="yyyy-mm" style="left:462px; top:6px; width:100px; height:19px; ">
  254. <script type="javascript" ev:event="xforms-value-changed">
  255. <![CDATA[
  256. var comparefromdd = (model.getValue("/root/send/comparefromdd") + "01").toDate();
  257. var comparetodd = (model.getValue("/root/send/comparetodd") + "01").toDate();
  258. if(comparefromdd < comparetodd.getAddDate(-11, "M"))
  259. {
  260. messageBox("1년이상의 자료는 검색할수 없습니다.", "I");
  261. comparefromdd = comparetodd;
  262. }
  263. model.setValue("/root/send/comparefromdd", comparefromdd.getDateFormat("YYYYMM"));
  264. comparefromdd = comparefromdd.getAddDate(12, "M");
  265. comparefromdd = comparefromdd.getDateFormat("YYYYMM");
  266. model.setValue("/root/send/execfromdd", comparefromdd);
  267. model.refresh();
  268. ]]>
  269. </script>
  270. </input>
  271. <select1 id="rdo_ioflag" ref="/root/send/ioflag" appearance="full" cols="4" overflow="visible" style="left:805px; top:7px; width:225px; height:16px; border-style:none; ">
  272. <choices>
  273. <item>
  274. <label>전체</label>
  275. <value/>
  276. </item>
  277. <item>
  278. <label>영상</label>
  279. <value>R</value>
  280. </item>
  281. <item>
  282. <label>건진</label>
  283. <value>S</value>
  284. </item>
  285. <item>
  286. <label>어린이병원</label>
  287. <value>C</value>
  288. </item>
  289. </choices>
  290. </select1>
  291. <caption id="caption7" class="search_name" style="left:730px; top:7px; width:70px; height:17px; ">구분 :</caption>
  292. </group>
  293. </group>
  294. </xhtml:body>
  295. </xhtml:html>