SPPAO02000_연말정산.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPPAO01901_연말정산.xrw
  4. * 설 명 : 연말정산영수증
  5. * 설 계 자 : 조영상
  6. * 작 성 자 : 조영상.
  7. * 작 성 일 : 2008.03.10
  8. * 수정이력 :
  9. * 기 타 : test
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  12. <?xml-stylesheet href="../../../../../../CMCProject/application/webapps/com/commonweb/css/common.css" type="text/css" ?>
  13. <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">
  14. <xhtml:head>
  15. <xhtml:title>연말정산영수증 출력</xhtml:title>
  16. <model id="model1">
  17. <instance id="instance1">
  18. <root xmlns="">
  19. <main>
  20. <h_rcpt>
  21. <rcpt>
  22. <rcpt_orddd/>
  23. <rcpt_outhospdd/>
  24. <rcpt_rcptexecdd/>
  25. <rcpt_ordtype/>
  26. <rcpt_totamt/>
  27. <rcpt_insuamt/>
  28. <rcpt_owntotamt/>
  29. <rcpt_cardamt/>
  30. <rcpt_cashamt_cash/>
  31. <rcpt_cashamt/>
  32. <rcpt_allamt/>
  33. <rcpt_discamt/>
  34. <rcpt_reduamt/>
  35. <rcpt_uncoamt/>
  36. </rcpt>
  37. </h_rcpt>
  38. <ptbs/>
  39. <incomeamt/>
  40. <protectyn>Y</protectyn>
  41. </main>
  42. <send>
  43. <data1>
  44. <pid/>
  45. <instcd/>
  46. <gijun/>
  47. <fromdd/>
  48. <todd/>
  49. <sum_flag/>
  50. </data1>
  51. </send>
  52. <init>
  53. <Z0007list>
  54. <Z0007/>
  55. </Z0007list>
  56. <PAM>
  57. <P1000list>
  58. <P1000/>
  59. </P1000list>
  60. </PAM>
  61. </init>
  62. </root>
  63. </instance>
  64. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  65. <submission id="TRPAO02001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/main/h_rcpt"/>
  66. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  67. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  68. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  69. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  71. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  72. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  73. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  74. <script type="javascript" ev:event="xforms-ready">
  75. <![CDATA[
  76. //makeReportPreview(0,500,1195,1000);
  77. makeReportPreview(0,0,0,0);
  78. fGetUserInfo2();
  79. fBaseCode();
  80. fInitialize();
  81. ]]>
  82. </script>
  83. <script type="javascript">
  84. <![CDATA[
  85. function fInitialize(){
  86. model.setValue("/root/send/data1/instcd" , model.getValue("/root/hidden/session/posinstcd"));
  87. model.setValue("/root/send/data1/gijun" , "rcptdd");
  88. var openDate = model.getValue("/root/init/PAM/P1000list/P1000/cdnm");
  89. //6월이전은 과거일자, 6월부터는 현재일자 설정 되도록 수정 - 20140219
  90. if(getCurrentDate().substr(4, 2) >= "06"){
  91. var lastDate = getCurrentDate();
  92. }else{
  93. var lastDate = getCurrentDate().toDate().getAddDate(-1,"Y").getDateFormat();
  94. }
  95. if((lastDate.substr(0, 4) + "0101") < openDate){
  96. model.setValue("/root/send/data1/fromdd" , openDate);
  97. }else{
  98. model.setValue("/root/send/data1/fromdd" , lastDate.substr(0,4) + "0101");
  99. }
  100. model.setValue("/root/send/data1/todd" , lastDate.substr(0,4) + "1231");
  101. model.setValue("/root/send/data1/sum_flag" , "day");
  102. model.resetinstancenode("/root/main/patinfo/patinfolist");
  103. model.removeNodeset("/root/main/h_rcpt/rcpt");
  104. exeReportPreview("RPPAO02000", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "75");
  105. model.refresh();
  106. }
  107. //쓰지마세요
  108. function fSearch(){
  109. model.copynode("/root/main/ptbs" , "/root/main/patinfo/patinfolist");
  110. model.removeNodeset("/root/main/h_rcpt/rcpt");
  111. fSearch2();
  112. }
  113. function fSearch2(){
  114. // 특이환자 체크 (실사용)
  115. // if (!fCheckPatient(model.getvalue("/root/main/patinfo/patinfolist/pid"), "A")) {
  116. // return;
  117. // }
  118. model.setValue("/root/send/data1/pid", model.getvalue("/root/main/patinfo/patinfolist/pid"));
  119. //2011년도 이전데이터 제한추가 by 조중래 20130527
  120. if(model.getValue("/root/send/data1/fromdd") < "20110101"){
  121. messageBox("2011년 이전 데이터는 OCS프로그램에서 조회하시기 바랍니다. ", "E000");
  122. return;
  123. }
  124. submit("TRPAO02001");
  125. fCostSum();
  126. exeReportPreview("RPPAO02000", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "75");
  127. datagrid1.subtotal("sum", -1, 2, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계 ", false);
  128. datagrid1.subtotal("sum", -1, 3, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계 ", false);
  129. datagrid1.subtotal("sum", -1, 4, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계 ", false);
  130. datagrid1.subtotal("sum", -1, 5, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계 ", false);
  131. datagrid1.subtotal("sum", -1, 6, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계 ", false);
  132. datagrid1.subtotal("sum", -1, 7, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계 ", false);
  133. datagrid1.subtotal("sum", -1, 8, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계 ", false);
  134. datagrid1.subtotal("sum", -1, 9, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계 ", false);
  135. datagrid1.subtotal("sum", -1, 10, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계 ", false);
  136. datagrid1.subtotal("sum", -1, 11, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계 ", false);
  137. datagrid1.subtotal("sum", -1, 12, "format:(-)#,###; roundmode:round; roundpostion:2", "background-color:#fcd2c1; color:#0000; font-weight:bold; ", 0, "합계 ", false);
  138. }
  139. function fBaseCode(){
  140. //병원 오픈일자 가져오는 원무공통코드조회
  141. pamfGetCodeList(new Array("P1000"), new Array("/root/init/PAM/P1000list"));
  142. zbcfGetCodeList(new Array("Z0007"), new Array("/root/init/Z0007list"));
  143. }
  144. //로그인한 사용자 정보조회
  145. function fGetUserInfo2(){
  146. var sUserInfosS = getUserInfos();
  147. sUserInfosS = sUserInfosS + "|";
  148. var UserInfosS_Array = sUserInfosS.split("|");
  149. var userid = UserInfosS_Array[0]; //사용자번호
  150. var usernm = UserInfosS_Array[1]; //사용자이름
  151. var posinstcd = UserInfosS_Array[2]; //소속기관코드
  152. var posinstnm = UserInfosS_Array[3]; //소속기관명
  153. model.makeNode("/root/hidden/session/" + "userid");
  154. model.makeNode("/root/hidden/session/" + "usernm");
  155. model.makeNode("/root/hidden/session/" + "posinstcd");
  156. model.makeNode("/root/hidden/session/" + "posinstnm");
  157. model.setValue("/root/hidden/session/userid",userid);
  158. model.setValue("/root/hidden/session/usernm",usernm);
  159. model.setValue("/root/hidden/session/posinstcd",posinstcd);
  160. model.setValue("/root/hidden/session/posinstnm",posinstnm);
  161. }
  162. //총소득공제대상액
  163. function fCostSum(){
  164. var sum_incomeamt = 0;
  165. for(var a=1; a<=getNodesetCount("/root/main/h_rcpt/rcpt"); a++){
  166. sum_incomeamt = parseInt(model.getvalue("/root/main/h_rcpt/rcpt[" + a + "]/rcpt_allamt")) + sum_incomeamt;
  167. }
  168. model.makevalue("/root/main/incomeamt", sum_incomeamt);
  169. }
  170. ]]>
  171. </script>
  172. </model>
  173. </xhtml:head>
  174. <xhtml:body guideline="1,1193;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  175. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  176. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:375px; height:14px; ">연말정산영수증 출력(최종수정일 11/10 23:00)</caption>
  177. </group>
  178. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  179. <import id="import1" src="../../../pam/patinfomngtweb/xrw/SSPMC00100_인적사항.xrw" style="left:0px; top:0px; width:1195px; height:205px; "/>
  180. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:209px; width:1194px; height:32px; "/>
  181. <caption id="caption7" class="search_name" style="left:10px; top:216px; width:65px; height:17px; ">병원</caption>
  182. <caption id="caption5" class="search_name" style="left:235px; top:216px; width:83px; height:17px; ">조회기준</caption>
  183. <select1 id="combo1" ref="/root/send/data1/instcd" class="combo_default" appearance="minimal" itemcount="30" style="left:70px; top:216px; width:150px; height:19px; text-align:left; ">
  184. <choices>
  185. <itemset nodeset="/root/init/Z0007list/Z0007">
  186. <label ref="cdnm"/>
  187. <value ref="cdid"/>
  188. </itemset>
  189. </choices>
  190. </select1>
  191. <select1 id="combo2" ref="/root/send/data1/gijun" class="combo_default" appearance="minimal" itemcount="30" style="left:320px; top:216px; width:85px; height:19px; text-align:left; ">
  192. <choices>
  193. <item>
  194. <label>수납일자</label>
  195. <value>rcptdd</value>
  196. </item>
  197. </choices>
  198. </select1>
  199. <caption id="caption1" class="search_name" style="left:422px; top:216px; width:83px; height:17px; ">기준일자</caption>
  200. <input id="input5" ref="/root/send/data1/fromdd" class="input_default" autonext="false" inputtype="date" maxlength="12" style="left:510px; top:216px; width:85px; height:19px; text-align:left; "/>
  201. <input id="input3" ref="/root/send/data1/todd" class="input_default" autonext="false" inputtype="date" maxlength="12" style="left:620px; top:216px; width:85px; height:19px; text-align:left; "/>
  202. <line id="line12" class="line_1" style="x1:0px; y1:249px; x2:1194px; y2:249px; "/>
  203. <datagrid id="datagrid1" nodeset="/root/main/h_rcpt/rcpt" caption="진료,조제일자^구분&#xA;(입원,외래)^진료비(약제비)내역^진료비(약제비)내역^진료비(약제비)내역^진료비(약제비)내역^진료비(약제비)내역^소득공제대상액^소득공제대상액^소득공제대상액^계정감면^임의감면^미수액|진료,조제일자^구분&#xA;(입원,외래)^총액^급여^급여^비급여^환자부담총액^카드^현금영수증^현금^계정감면^임의감면^미수액|진료,조제일자^구분&#xA;(입원,외래)^총액^보험자부담액^환자부담액^환자부담(급여)^환자부담총액^카드^현금영수증^현금^계정감면^임의감면^미수액" colsep="^" colwidth="140, 70, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" explorerbar="sort" mergecellsfixedrows="bycolrec" rowsep="|" subtotalposition="below" style="left:0px; top:255px; width:1195px; height:485px; ">
  204. <col ref="rcpt_orddd"/>
  205. <col ref="rcpt_ordtype" style="text-align:center; "/>
  206. <col ref="rcpt_totamt" format="(-)#,###" style="text-align:right; "/>
  207. <col ref="rcpt_insuamt" format="(-)#,###" style="text-align:right; "/>
  208. <col ref="rcpt_ownpayamt" format="(-)#,###" style="text-align:right; "/>
  209. <col ref="rcpt_ownnopayamt" format="(-)#,###" style="text-align:right; "/>
  210. <col ref="rcpt_owntotamt" format="(-)#,###" style="text-align:right; "/>
  211. <col ref="rcpt_cardamt" format="(-)#,###" style="text-align:right; "/>
  212. <col ref="rcpt_cashamt_cash" format="(-)#,###" style="text-align:right; "/>
  213. <col ref="rcpt_cashamt" format="(-)#,###" style="text-align:right; "/>
  214. <col ref="rcpt_discamt" format="(-)#,###" style="text-align:right; "/>
  215. <col ref="rcpt_reduamt" format="(-)#,###" style="text-align:right; "/>
  216. <col ref="rcpt_uncoamt" format="(-)#,###" style="text-align:right; "/>
  217. </datagrid>
  218. <button id="btn_search2" class="btn1_letter2" style="left:1127px; top:214px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  219. <caption>조회</caption>
  220. <script type="javascript" ev:event="DOMActivate">
  221. <![CDATA[
  222. fSearch2();
  223. ]]>
  224. </script>
  225. </button>
  226. <caption id="caption2" style="left:595px; top:219px; width:25px; height:15px; text-align:center; ">~</caption>
  227. <button id="btn_print" class="btn6_letter2" disable.background-image="../../../com/commonweb/images/dis_btn6_letter2.gif" style="left:1066px; top:214px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn6_letter2.gif; ">
  228. <caption>출력</caption>
  229. <script type="javascript" ev:event="DOMActivate">
  230. <![CDATA[
  231. exeReportPreview("RPPAO02000", "XMLSTR", "", "", "true", "", "", "", "", "","", "", "", "", "", "1", "");
  232. ]]>
  233. </script>
  234. </button>
  235. <select1 id="radio1" ref="/root/send/data1/sum_flag" appearance="full" cols="3" overflow="visible" style="left:775px; top:216px; width:145px; height:20px; border-style:none; ">
  236. <choices>
  237. <item>
  238. <label>일자별</label>
  239. <value>day</value>
  240. </item>
  241. <item>
  242. <label>월별</label>
  243. <value>month</value>
  244. </item>
  245. <item>
  246. <label>총합</label>
  247. <value>total</value>
  248. </item>
  249. </choices>
  250. </select1>
  251. <select id="checkbox1" ref="/root/main/protectyn" overflow="visible" appearance="full" style="left:950px; top:218px; width:90px; height:15px; border-style:none; ">
  252. <choices>
  253. <item>
  254. <label>주민번호보호</label>
  255. <value>Y</value>
  256. </item>
  257. </choices>
  258. </select>
  259. </group>
  260. <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
  261. <line id="line23" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  262. <button id="btn_init" class="btn4_letter3" disable.background-image="../../../com/commonweb/images/dis_btn4_letter3.gif" style="left:1126px; top:5px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
  263. <caption>초기화</caption>
  264. <script type="javascript" ev:event="DOMActivate">
  265. <![CDATA[
  266. fInitialize();
  267. ]]>
  268. </script>
  269. </button>
  270. <caption id="caption4" style="left:122px; top:7px; width:724px; height:15px; color:#ff0000; ">* 연말정산 시 감면금액 포함여부는 원무공통코드(PK079)로 관리되며, 현금금액에 표시되나 현금영수증 발행의 대상은 되지않습니다.</caption>
  271. <button id="button1" class="btn3_letter6" style="left:10px; top:3px; width:104px; height:22px; ">
  272. <caption>감면내역조회</caption>
  273. <script type="javascript" ev:event="DOMActivate">
  274. <![CDATA[
  275. var instcd = model.getValue("/root/send/data1/instcd");
  276. var pid = model.getValue("/root/send/data1/pid");
  277. var fromdd = model.getValue("/root/send/data1/fromdd");
  278. var todd = model.getValue("/root/send/data1/todd");
  279. if (pid == null || pid == "") {
  280. alert("조회대상이 선택되지 않았습니다.");
  281. return;
  282. } else if (fromdd == null || fromdd == "" || todd == null || todd == "") {
  283. alert("시작일자 및 종료일자는 반드시 입력해야합니다.");
  284. return;
  285. }
  286. setParameter("SPPAO02001_INSTCD", instcd);
  287. setParameter("SPPAO02001_PID", pid);
  288. setParameter("SPPAO02001_FROMDD", fromdd);
  289. setParameter("SPPAO02001_TODD", todd);
  290. open("SPPAO02001");
  291. ]]>
  292. </script>
  293. </button>
  294. </group>
  295. <caption id="caption3" class="search_name" style="left:720px; top:229px; width:60px; height:17px; ">구분</caption>
  296. </xhtml:body>
  297. </xhtml:html>