SMPAS00540_입원수입통계.xrw 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. <?xml version="1.0" encoding="UTF-16"?>
  2. <!--
  3. * 화면 : SMPAS00169_입원수입통계.xrw
  4. * 설명 : 입원수입통계.
  5. * 작성자 : 조영상
  6. * 작성일 : 2007/11/26
  7. -->
  8. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  9. <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">
  10. <xhtml:head>
  11. <xhtml:title>입원수입통계</xhtml:title>
  12. <model id="model1">
  13. <instance id="instance1">
  14. <root xmlns="">
  15. <main>
  16. <h_rcpt>
  17. <rcpt>
  18. <rcpt_rcptid/>
  19. <rcpt_rcptnm/>
  20. <rcpt_outamt_cash/>
  21. <rcpt_outamt_card/>
  22. <rcpt_mid/>
  23. <rcpt_unco/>
  24. <rcpt_uncr/>
  25. <rcpt_keep/>
  26. <rcpt_total/>
  27. <rcpt_cnt/>
  28. </rcpt>
  29. </h_rcpt>
  30. <h_rcpt2>
  31. <rcpt2>
  32. <col1/>
  33. <col2/>
  34. <col3/>
  35. </rcpt2>
  36. </h_rcpt2>
  37. <h_rcptnm>
  38. <rcptnm>
  39. <rcptnm/>
  40. </rcptnm>
  41. </h_rcptnm>
  42. </main>
  43. <send>
  44. <data1>
  45. <fromdd/>
  46. <tm_from/>
  47. <tm_to/>
  48. <rcpt_id/>
  49. <ordtype/>
  50. <rcpt_flag/>
  51. </data1>
  52. </send>
  53. <hidden>
  54. <session>
  55. <userid/>
  56. <usernm/>
  57. <posinstcd/>
  58. <posinstnm/>
  59. <dutplcecd/>
  60. <dutplcenm/>
  61. <dutinstnm/>
  62. </session>
  63. </hidden>
  64. </root>
  65. </instance>
  66. <bind id="bind1" ref="/root/main/receivamtlist/receivamtstats" calculate="now() + ."/>
  67. <bind id="bind2" ref="/root/main/receivamtsumlist/receivamtsumstats/uncnt" calculate="sum(/root/main/receivamtlist/receivamtstats/uncnt);"/>
  68. <bind id="bind3" ref="/root/main/receivamtsumlist/receivamtsumstats/uncoamt" calculate="sum(/root/main/receivamtlist/receivamtstats/uncoamt);"/>
  69. <script type="javascript" ev:event="xforms-ready">
  70. <![CDATA[
  71. makeReportPreview(300,0,893,648,"case2");
  72. fInitialize();
  73. fGetUserInfo2();
  74. btn_all.selected = "true"; //입원전체수익통계로 기본세팅
  75. model.toggle("case1");
  76. //exeReportPreview("RPPAS01722", "XMLSTR", "", "", "false", "", "", "", "", "","", "case2", "", "", "", "1", "75");
  77. ]]>
  78. </script>
  79. <submission id="TRPAS00541" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/main/h_rcpt"/>
  80. <submission id="TRPAS00542" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/main/h_rcpt2"/>
  81. <submission id="TRPAS00543" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/main/h_rcptnm"/>
  82. </model>
  83. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  84. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  85. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  86. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  87. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  88. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  89. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  90. <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
  91. <script type="javascript">
  92. <![CDATA[
  93. //로그인한 사용자 정보조회
  94. function fGetUserInfo2(){
  95. var sUserInfosS = getUserInfos();
  96. sUserInfosS = sUserInfosS + "|";
  97. //alert("sUserInfosS : " + sUserInfosS);
  98. var UserInfosS_Array = sUserInfosS.split("|");
  99. var userid = UserInfosS_Array[0]; //사용자번호
  100. var usernm = UserInfosS_Array[1]; //사용자이름
  101. var posinstcd = UserInfosS_Array[2]; //소속기관코드
  102. var posinstnm = UserInfosS_Array[3]; //소속기관명
  103. var dutplcecd = UserInfosS_Array[4]; //근무지부서코드
  104. var dutplcenm = UserInfosS_Array[5]; //근무지부서명
  105. var dutinstnm = UserInfosS_Array[7]; //근무지기관명
  106. /*
  107. model.makeNode("/root/hidden/session/" + "userid");
  108. model.makeNode("/root/hidden/session/" + "usernm");
  109. model.makeNode("/root/hidden/session/" + "posinstcd");
  110. model.makeNode("/root/hidden/session/" + "posinstnm");
  111. model.makeNode("/root/hidden/session/" + "dutplcecd");
  112. model.makeNode("/root/hidden/session/" + "dutplcenm");
  113. model.makeNode("/root/hidden/session/" + "dutinstnm");
  114. */
  115. model.setValue("/root/hidden/session/userid",userid);
  116. model.setValue("/root/hidden/session/usernm",usernm);
  117. model.setValue("/root/hidden/session/posinstcd",posinstcd);
  118. model.setValue("/root/hidden/session/posinstnm",posinstnm);
  119. model.setValue("/root/hidden/session/dutplcecd",dutplcecd);
  120. model.setValue("/root/hidden/session/dutplcenm",dutplcenm);
  121. model.setValue("/root/hidden/session/dutinstnm",dutinstnm);
  122. }
  123. function fInitialize() {
  124. model.removenodeset("/root/main/h_rcpt/rcpt");
  125. model.removenodeset("/root/main/h_rcpt2/rcpt2");
  126. model.setValue("/root/send/data1/fromdd", getCurrentDate()); // common.js에서 제공하는 함수를 사용하여 오늘 날짜를 구한다.
  127. model.setValue("/root/send/data1/tm_from", "0000");
  128. model.setValue("/root/send/data1/tm_to", "2400");
  129. model.setValue("/root/send/data1/rcpt_id", "");
  130. model.setValue("/root/send/data1/ordtype", "%");
  131. model.setValue("/root/send/data1/rcpt_flag", "");
  132. exeReportPreview("RPPAS00542", "XMLSTR", "", "", "false", "", "", "", "", "","", "case2", "", "", "", "1", "75");
  133. model.refresh();
  134. }
  135. function fSearch() {
  136. //입원전체수입통계
  137. if(switch1.selectedIndex == "0") {
  138. submit("TRPAS00541");
  139. exeReportPreview("RPPAS00541", "XMLSTR", "", "", "false", "", "", "", "", "","", "case1", "", "", "", "1", "75");
  140. grd_rcpt.subtotalPosition = "below";
  141. grd_rcpt.subtotal("sum", -1, 1, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계", false);
  142. grd_rcpt.subtotal("sum", -1, 2, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계", false);
  143. grd_rcpt.subtotal("sum", -1, 3, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계", false);
  144. grd_rcpt.subtotal("sum", -1, 4, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계", false);
  145. grd_rcpt.subtotal("sum", -1, 5, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계", false);
  146. grd_rcpt.subtotal("sum", -1, 6, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계", false);
  147. grd_rcpt.subtotal("sum", -1, 7, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계", false);
  148. }
  149. //수납자별입원수입통계
  150. if(switch1.selectedIndex == "1") {
  151. submit("TRPAS00542");
  152. submit("TRPAS00543");
  153. grd_rcpt1.rebuildStyle();
  154. setRowStyle("grd_rcpt1" , "0" , "총계" , "col1", "equal" ); //총계 색깔 표시
  155. exeReportPreview("RPPAS00542", "XMLSTR", "", "", "false", "", "", "", "", "","", "case2", "", "", "", "0", "75");
  156. }
  157. model.refresh();
  158. }
  159. ]]>
  160. </script>
  161. </xhtml:head>
  162. <xhtml:body pagewidth="1211" pageheight="784">
  163. <group id="group3" style="left:0px; top:0px; width:1211px; height:13px; ">
  164. <caption id="caption60" class="tit_1" style="left:0px; top:0px; width:215px; height:14px; font-family:돋움; vertical-align:middle; ">입원수입통계</caption>
  165. </group>
  166. <group id="group2" style="left:4px; top:23px; width:1203px; height:35px; ">
  167. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1202px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  168. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:198px; height:17px; ">일자:</caption>
  169. <line id="line2" class="line_4" style="x1:1132px; y1:7px; x2:1132px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  170. <button id="btn_search" class="btn1_letter2" style="left:1139px; top:7px; width:56px; height:22px; ">
  171. <caption>조회</caption>
  172. <script type="javascript" ev:event="DOMActivate">
  173. <![CDATA[
  174. fSearch();
  175. ]]>
  176. </script>
  177. </button>
  178. <input id="input7" ref="/root/send/data1/fromdd" class="input_default" navindex="7" autonext="false" inputtype="date" style="left:75px; top:8px; width:85; height:19px; text-align:center; "/>
  179. <button id="button95" class="btn6_letter4" style="left:976px; top:7px; width:80px; height:22px; ">
  180. <caption>액셀저장</caption>
  181. <script type="javascript" ev:event="DOMActivate">
  182. <![CDATA[
  183. var vToday = new Date();
  184. var tmpYear = vToday.getYear();
  185. var tmpMonth = vToday.getMonth()+1;
  186. var tmpDate = vToday.getDate();
  187. //
  188. // model.setValue("/root/documenttitle/title",document.title);
  189. // model.refresh();
  190. // var subjectTitle = model.getValue("/root/documenttitle/title");
  191. if(switch1.selectedIndex == "0") {
  192. //엑셀저장 여부(타이틀별)
  193. var fileName = window.fileDialog("save", "", false, "입원전체수입통계"+tmpYear+tmpMonth+tmpDate, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  194. if (fileName != "")
  195. {
  196. grd_rcpt2.saveExcel(fileName, "입원전체수입통계"+tmpYear+tmpMonth+tmpDate, true, true, "", "", true);
  197. }
  198. }
  199. if(switch1.selectedIndex == "1") {
  200. //엑셀저장 여부(타이틀별)
  201. var fileName = window.fileDialog("save", "", false, "수납자별입원수입통계"+tmpYear+tmpMonth+tmpDate, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  202. if (fileName != "")
  203. {
  204. grd_rcpt1.saveExcel(fileName, "수납자별입원수입통계"+tmpYear+tmpMonth+tmpDate, true, true, "", "", true);
  205. }
  206. }
  207. ]]>
  208. </script>
  209. </button>
  210. <line id="line1" class="line_4" visibility="hidden" style="x1:1063px; y1:7px; x2:1063px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  211. <button id="btn_print" class="btn6_letter2" style="left:1070px; top:7px; width:56px; height:22px; ">
  212. <caption>출력</caption>
  213. <script type="javascript" ev:event="DOMActivate">
  214. <![CDATA[
  215. if(switch1.selectedIndex == "0") {
  216. exeReportPreview("RPPAS00541", "XMLSTR", "", "", "true", "", "", "", "", "","", "case2", "", "", "", "1", "75");
  217. }
  218. if(switch1.selectedIndex == "1") {
  219. exeReportPreview("RPPAS00542", "XMLSTR", "", "", "true", "", "", "", "", "","", "case2", "", "", "", "1", "75");
  220. }
  221. ]]>
  222. </script>
  223. </button>
  224. <input id="input1" ref="/root/send/data1/tm_from" autonext="false" format="hh:nn" style="left:170px; top:8px; width:54px; height:19px; text-align:center; "/>
  225. <input id="input15" ref="/root/send/data1/tm_to" autonext="false" format="hh:nn" style="left:245px; top:8px; width:54px; height:19px; text-align:center; "/>
  226. <caption id="caption25" style="left:222px; top:10px; width:25px; height:14px; text-align:center; ">~</caption>
  227. <input id="input2" ref="/root/send/data1/rcpt_id" visibility="hidden" autonext="false" style="left:384px; top:8px; width:86px; height:19px; "/>
  228. <caption id="caption1" visibility="hidden" style="left:311px; top:9; width:64px; height:20px; font-weight:bold; ">수납자ID :</caption>
  229. <select1 id="radio1" ref="/root/send/data1/ordtype" appearance="full" cols="4" rows="1" overflow="visible" style="left:480px; top:10px; width:235px; height:20px; text-align:center; vertical-align:middle; border-style:none; ">
  230. <choices>
  231. <item>
  232. <label>전체</label>
  233. <value>%</value>
  234. </item>
  235. <item>
  236. <label>입원</label>
  237. <value>I%</value>
  238. </item>
  239. <item>
  240. <label>응급</label>
  241. <value>E%</value>
  242. </item>
  243. <item>
  244. <label>DSC/CHEMO</label>
  245. <value>D%</value>
  246. </item>
  247. </choices>
  248. </select1>
  249. </group>
  250. <group id="grp_btn" scroll="auto" style="left:19px; top:757px; width:1180px; height:27px; "/>
  251. <button id="btn_init" class="btn4_letter3" style="left:1129px; top:760px; width:68px; height:22px; ">
  252. <caption>초기화</caption>
  253. <script type="javascript" ev:event="DOMActivate">
  254. <![CDATA[
  255. fInitialize();
  256. ]]>
  257. </script>
  258. </button>
  259. <switch id="switch1" style="left:5px; top:87px; width:1200px; height:655px; ">
  260. <case id="case1">
  261. <datagrid id="grd_rcpt" nodeset="/root/main/h_rcpt/rcpt" caption="수납자^퇴원금^퇴원금^중간금^미수금^미수입금^보관금^합계^처리건수|수납자^현금^신용카드^중간금^미수금^미수입금^보관금^합계^처리건수" colsep="^" colwidth="100, 150, 150, 130, 130, 133, 130, 140, 95" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:5px; width:1185px; height:635px; ">
  262. <col ref="rcpt_rcptnm"/>
  263. <col ref="rcpt_outamt_cash" format="(-)#,###" style="text-align:right; "/>
  264. <col ref="rcpt_outamt_card" format="(-)#,###" style="text-align:right; "/>
  265. <col ref="rcpt_mid" format="(-)#,###" style="text-align:right; "/>
  266. <col ref="rcpt_unco" format="(-)#,###" style="text-align:right; "/>
  267. <col ref="rcpt_uncr" format="(-)#,###" style="text-align:right; "/>
  268. <col ref="rcpt_keep" format="(-)#,###" style="text-align:right; "/>
  269. <col ref="rcpt_total" format="(-)#,###" style="text-align:right; "/>
  270. <col ref="rcpt_cnt" format="#,###" style="text-align:right; "/>
  271. <script type="javascript" ev:event="ondblclick">
  272. <![CDATA[
  273. if (isDataCell() == true) {
  274. var temp = grd_rcpt.row -1;
  275. model.setvalue("/root/send/data1/rcpt_id", model.getvalue("/root/main/h_rcpt/rcpt["+temp+"]/rcpt_rcptid") );
  276. input2.refresh();
  277. btn_rcptid.dispatch("onclick");
  278. fSearch();
  279. }
  280. ]]>
  281. </script>
  282. </datagrid>
  283. </case>
  284. <case id="case2" selected="true">
  285. <datagrid id="grd_rcpt1" nodeset="/root/main/h_rcpt2/rcpt2" caption="항목^건수^금액" colsep="^" colwidth="109, 60, 117" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:7px; width:290px; height:641px; ">
  286. <col ref="col1" style="text-align:center; "/>
  287. <col ref="col2" type="input" style="text-align:center; "/>
  288. <col ref="col3" type="input" format="(-)#,###" style="text-align:right; "/>
  289. <script type="javascript" ev:event="xforms-value-changed">
  290. <![CDATA[
  291. //if(grd_rcpt1.col=="1" && grd_rcpt1.row=="4" ){
  292. var temp = 0;
  293. for(var a=1; a < 7 ; a++) {
  294. if(a!=7) {
  295. temp = parseInt(model.getvalue("/root/main/h_rcpt2/rcpt2["+a+"]/col2")) + temp;
  296. }
  297. }
  298. model.setvalue("/root/main/h_rcpt2/rcpt2[7]/col2" , temp);
  299. //}
  300. //if(grd_rcpt1.col=="2" && grd_rcpt1.row=="4" ){
  301. var temp = 0;
  302. for(var a=1; a < 7 ; a++) {
  303. if(a!=7) {
  304. temp = parseInt(model.getvalue("/root/main/h_rcpt2/rcpt2["+a+"]/col3")) + temp;
  305. }
  306. }
  307. model.setvalue("/root/main/h_rcpt2/rcpt2[7]/col3" , temp);
  308. //}
  309. exeReportPreview("RPPAS00542", "XMLSTR", "", "", "false", "", "", "", "", "","", "case2", "", "", "", "1", "75");
  310. ]]>
  311. </script>
  312. <script type="javascript" ev:event="ondblclick">
  313. <![CDATA[
  314. if (isDataCell() == true) {
  315. if(grd_rcpt1.col=="0" ) {
  316. if(grd_rcpt1.row != "5" && grd_rcpt1.row != "9" && grd_rcpt1.row != "10" ){
  317. model.setvalue("/root/send/data1/rcpt_flag", model.getvalue("/root/main/h_rcpt2/rcpt2["+grd_rcpt1.row+"]/col1"));
  318. open("SMPAO00500" , "", "" , "" , "" , "/root/send/data1" , "/root/temp/rcpt/data1");
  319. }
  320. }
  321. }
  322. ]]>
  323. </script>
  324. </datagrid>
  325. </case>
  326. <case id="case3"/>
  327. </switch>
  328. <button id="btn_rcptid" class="btn_sw" group="tab" style="left:165px; top:65px; width:160px; height:22px; ">
  329. <caption>2.수납자별 입원 수입통계</caption>
  330. <toggle case="case2" ev:event="onclick"/>
  331. <script type="javascript" ev:event="onclick">
  332. <![CDATA[
  333. caption1.visible = true;
  334. input2.visible = true;
  335. exeReportPreview("RPPAS00542", "XMLSTR", "", "", "false", "", "", "", "", "","", "case2", "", "", "", "1", "75");
  336. ]]>
  337. </script>
  338. </button>
  339. <button id="btn_all" class="btn_sw" group="tab" style="left:5px; top:65px; width:160px; height:22px; ">
  340. <caption>1.전체 입원 수입통계</caption>
  341. <toggle case="case1" ev:event="onclick"/>
  342. <script type="javascript" ev:event="onclick">
  343. <![CDATA[
  344. caption1.visible = false;
  345. input2.visible = false;
  346. ]]>
  347. </script>
  348. </button>
  349. </xhtml:body>
  350. </xhtml:html>