SMAHS00700_건진수입.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <?xml version="1.0" encoding="UTF-8"?>
  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. <healexamincm>
  11. <item>
  12. <rcptexecdd/>
  13. <cmpyflag/>
  14. <totcnt/>
  15. <mcnt/>
  16. <fcnt/>
  17. <totamt/>
  18. <discamt/>
  19. <cmpyamt/>
  20. <payinsubamt/>
  21. <ownuncoamt/>
  22. <cashamt/>
  23. <cardamt/>
  24. <mdlrcptamt/>
  25. <onlineamt/>
  26. </item>
  27. </healexamincm>
  28. <export/>
  29. </main>
  30. <send>
  31. <srchfromdd/>
  32. <srchtodd/>
  33. <srchinstcd/>
  34. <srchyear/>
  35. <srchmonth/>
  36. <srchhealexamflag/>
  37. <srchsuppdeptcd/>
  38. </send>
  39. <hidden>
  40. </hidden>
  41. <init>
  42. <baseinfo>
  43. <yearlst/>
  44. <monthlst/>
  45. <srchhealexamflag/>
  46. </baseinfo>
  47. </init>
  48. </root>
  49. </instance>
  50. <script type="javascript" ev:event="xforms-ready">
  51. <![CDATA[
  52. //건진구분 조회
  53. zbcfGetCodeList( new Array("A0068" ), new Array("/root/init/baseinfo/srchhealexamflag") );
  54. addComboItem("cmb_healexamflag","전체","%","above");
  55. cmb_healexamflag.select(0);
  56. // 기관코드 초기화
  57. model.setValue("/root/send/srchinstcd" , getUserInfo("posinstcd"));
  58. // 공통코드 조회
  59. zbcfGetCodeList( new Array("P0167","R0009"),
  60. new Array("/root/init/baseinfo/yearlst" ,"/root/init/baseinfo/monthlst" ) );
  61. // 일자초기화
  62. model.setValue("/root/send/srchyear" , getCurrentDate().substr(0,4));
  63. model.setValue("/root/send/srchmonth" , getCurrentDate().substr(4,2));
  64. cmb_year.dispatch("xforms-select");
  65. //부서코드 초기화
  66. model.setValue("/root/send/srchsuppdeptcd" , getUserInfo("dutplcecd"));
  67. model.refresh();
  68. ]]>
  69. </script>
  70. <submission id="TRZBC00101"/>
  71. <script type="javascript">
  72. <![CDATA[
  73. /*
  74. * 건진종류 소계 및 총계를 생성한다.
  75. */
  76. function fSetRcptSum1() {
  77. // 그리드 merge 및 합계 초기화
  78. grd_healexamincm.autoMerge = false;
  79. grd_healexamincm.mergeCells = "bycolrec";
  80. grd_healexamincm.subtotalPosition = "below";
  81. grd_healexamincm.multiTotals = true;
  82. grd_healexamincm.subtotal("clear", 0, 0);
  83. for(var i =0; i < grd_healexamincm.cols ; i++) {
  84. // 소계
  85. if(i >= grd_healexamincm.colRef("totamt") && i <= grd_healexamincm.colRef("mdlrcptamt")) {
  86. grd_healexamincm.subtotal("sum", -1 , i ,"format:(-,+)#,###; roundmode:round; roundpostion:2", "background-color:#808080; color:#ffffff; font-weight:bold ", grd_healexamincm.colRef("rcptexecdd") , "월총계" );
  87. }
  88. // 화면 merge
  89. if( i == grd_healexamincm.colRef("rcptexecdd")) {
  90. grd_healexamincm.mergeCol(i) = true;
  91. }else{
  92. grd_healexamincm.mergeCol(i) = false;
  93. }
  94. }
  95. grd_healexamincm.merge();
  96. }
  97. /*
  98. * 일자 초기화 (srchfromdd , srchtodd)
  99. */
  100. function fDate(vYear , vMon) {
  101. var dd = new Date(vYear, vMon ,0);
  102. model.setValue("/root/send/srchfromdd" , vYear + vMon + "01");
  103. model.setValue("/root/send/srchtodd" , vYear + vMon + dd.getDate());
  104. }
  105. //총합계 항목 구분표시_2011.09.02 By 김금련
  106. function fSetRcptSum() {
  107. var idx = grd_healexamincm.rows;
  108. grd_healexamincm.rebuildStyle();
  109. for( var i=1 ; i < grd_healexamincm.rows; i++){
  110. var rcptexecdd =model.getValue("/root/main/healexamincm/item["+i +"]/rcptexecdd")
  111. if(rcptexecdd == "") {
  112. grd_healexamincm.rowstyle( i , "data", "background-color") = "#99ccff";
  113. grd_healexamincm.rowstyle( i , "data", "font-weight") = "bold";
  114. }
  115. }
  116. }
  117. ]]>
  118. </script>
  119. <submission id="TRAHS00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/healexamincm"/>
  120. </model>
  121. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  122. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  123. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  124. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  125. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  126. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  127. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  128. <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
  129. </xhtml:head>
  130. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1206;">
  131. <group id="group3" style="left:0px; top:0px; width:1211px; height:13px; ">
  132. <caption id="caption60" class="tit_1" style="left:0px; top:0px; width:183px; height:14px; font-family:돋움; vertical-align:middle; ">건진수입</caption>
  133. </group>
  134. <group id="group2" style="left:4px; top:23px; width:1203px; height:35px; ">
  135. <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; "/>
  136. <caption id="caption7" class="search_name" style="left:25px; top:9px; width:87px; height:17px; ">건진구분 :</caption>
  137. <select1 id="cmb_healexamflag" ref="/root/send/srchhealexamflag" navindex="1" appearance="minimal" style="left:115px; top:8px; width:100px; height:19px; ">
  138. <choices>
  139. <itemset nodeset="/root/init/baseinfo/srchhealexamflag/A0068">
  140. <label ref="cdnm"/>
  141. <value ref="cdid"/>
  142. </itemset>
  143. </choices>
  144. </select1>
  145. <caption id="caption3" class="search_name" style="left:228px; top:9px; width:73px; height:17px; ">기간 :</caption>
  146. <input id="ipt_fromdd" ref="/root/send/srchfromdd" class="input_search" navindex="2" inputtype="date" style="left:295px; top:8px; width:105px; height:19px; "/>
  147. <caption id="caption93" class="search_n_b" style="left:406px; top:10px; width:12px; height:17px; font-weight:bolder; ">~</caption>
  148. <input id="input1" ref="/root/send/srchtodd" class="input_search" navindex="3" inputtype="date" style="left:423px; top:8px; width:105px; height:19px; "/>
  149. <caption id="caption2" class="search_name" visibility="hidden" style="left:600px; top:11px; width:73px; height:17px; ">연도 :</caption>
  150. <select1 id="cmb_year" ref="/root/send/srchyear" visibility="hidden" appearance="minimal" style="left:665px; top:11px; width:60px; height:19px; ">
  151. <choices>
  152. <itemset nodeset="/root/init/baseinfo/yearlst/P0167">
  153. <label ref="cdnm"/>
  154. <value ref="cdid"/>
  155. </itemset>
  156. </choices>
  157. <script type="javascript" ev:event="xforms-select">
  158. <![CDATA[
  159. fDate(cmb_year.value , cmb_month.value);
  160. ]]>
  161. </script>
  162. </select1>
  163. <caption id="caption1" class="search_name" visibility="hidden" style="left:730px; top:10px; width:73px; height:17px; ">월 :</caption>
  164. <select1 id="cmb_month" ref="/root/send/srchmonth" visibility="hidden" appearance="minimal" style="left:780px; top:9px; width:55px; height:19px; ">
  165. <choices>
  166. <itemset nodeset="/root/init/baseinfo/monthlst/R0009">
  167. <label ref="cdnm"/>
  168. <value ref="cdid"/>
  169. </itemset>
  170. </choices>
  171. <script type="javascript" ev:event="xforms-select">
  172. <![CDATA[
  173. fDate(cmb_year.value , cmb_month.value);
  174. ]]>
  175. </script>
  176. </select1>
  177. <button id="btn_dutyprnt" class="btn6_letter6" visibility="hidden" style="left:877px; top:7px; width:104px; height:22px; ">
  178. <caption>업무일지출력</caption>
  179. <script type="javascript" ev:event="DOMActivate">
  180. <![CDATA[
  181. //2011.01.13 c y w 건진센터 업무일지 출력기능, 서식 추가.
  182. if( grd_healexamincm.row != "" ) {
  183. //일계
  184. var totcnt = 0;
  185. var mcnt = 0;
  186. var fcnt = 0;
  187. var totamt = 0;
  188. var discamt = 0;
  189. var cmpyamt = 0;
  190. var ownuncoamt = 0;
  191. var cashamt = 0;
  192. var cardamt = 0;
  193. var mdlrcptamt = 0;
  194. var onlineamt = 0;
  195. // 월계
  196. var mtotcnt = 0;
  197. var mmcnt = 0;
  198. var mfcnt = 0;
  199. var mtotamt = 0;
  200. var mdiscamt = 0;
  201. var mcmpyamt = 0;
  202. var mownuncoamt = 0;
  203. var mcashamt = 0;
  204. var mcardamt = 0;
  205. var mmdlrcptamt = 0;
  206. var monlineamt = 0;
  207. var rcptexecdd = model.getValue("/root/main/healexamincm/item["+ grd_healexamincm.row +"]/rcptexecdd");
  208. for( var i = 1; i <= grd_healexamincm.rows-2; i++ ){
  209. if( rcptexecdd == model.getValue("/root/main/healexamincm/item["+ i +"]/rcptexecdd") ){
  210. //일계 Sum
  211. totcnt = totcnt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/totcnt"));
  212. mcnt = mcnt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/mcnt"));
  213. fcnt = fcnt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/fcnt"));
  214. totamt = totamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/totamt"));
  215. discamt = discamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/discamt"));
  216. cmpyamt = cmpyamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/cmpyamt"));
  217. ownuncoamt = ownuncoamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/ownuncoamt"));
  218. cashamt = cashamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/cashamt"));
  219. cardamt = cardamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/cardamt"));
  220. mdlrcptamt = mdlrcptamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/mdlrcptamt"));
  221. onlineamt = onlineamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/onlineamt"));
  222. }
  223. //월계 Sum
  224. if( "" != model.getValue("/root/main/healexamincm/item["+ i +"]/rcptexecdd") ){
  225. mtotcnt = mtotcnt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/totcnt"));
  226. mmcnt = mmcnt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/mcnt"));
  227. mfcnt = mfcnt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/fcnt"));
  228. mtotamt = mtotamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/totamt"));
  229. mdiscamt = mdiscamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/discamt"));
  230. mcmpyamt = mcmpyamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/cmpyamt"));
  231. mownuncoamt = mownuncoamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/ownuncoamt"));
  232. mcashamt = mcashamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/cashamt"));
  233. mcardamt = mcardamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/cardamt"));
  234. mmdlrcptamt = mmdlrcptamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/mdlrcptamt"));
  235. monlineamt = monlineamt + parseInt(model.getValue("/root/main/healexamincm/item["+ i +"]/onlineamt"));
  236. }
  237. }
  238. model.makeValue("/root/main/rexduty/rcptexecdd" , rcptexecdd );
  239. model.makeValue("/root/main/rexduty/totcnt" , totcnt );
  240. model.makeValue("/root/main/rexduty/mcnt" , mcnt );
  241. model.makeValue("/root/main/rexduty/fcnt" , fcnt );
  242. model.makeValue("/root/main/rexduty/totamt" , totamt );
  243. model.makeValue("/root/main/rexduty/discamt" , discamt );
  244. model.makeValue("/root/main/rexduty/cmpyamt" , cmpyamt );
  245. model.makeValue("/root/main/rexduty/ownuncoamt" , ownuncoamt );
  246. model.makeValue("/root/main/rexduty/cashamt" , cashamt );
  247. model.makeValue("/root/main/rexduty/cardamt" , cardamt );
  248. model.makeValue("/root/main/rexduty/mdlrcptamt" , mdlrcptamt );
  249. model.makeValue("/root/main/rexduty/onlineamt" , onlineamt );
  250. model.makeValue("/root/main/rexduty/mtotcnt" , mtotcnt );
  251. model.makeValue("/root/main/rexduty/mmcnt" , mmcnt );
  252. model.makeValue("/root/main/rexduty/mfcnt" , mfcnt );
  253. model.makeValue("/root/main/rexduty/mtotamt" , mtotamt );
  254. model.makeValue("/root/main/rexduty/mdiscamt" , mdiscamt );
  255. model.makeValue("/root/main/rexduty/mcmpyamt" , mcmpyamt );
  256. model.makeValue("/root/main/rexduty/mownuncoamt" , mownuncoamt );
  257. model.makeValue("/root/main/rexduty/mcashamt" , mcashamt );
  258. model.makeValue("/root/main/rexduty/mcardamt" , mcardamt );
  259. model.makeValue("/root/main/rexduty/mmdlrcptamt" , mmdlrcptamt );
  260. model.makeValue("/root/main/rexduty/monlineamt" , monlineamt );
  261. exeReportPreview("RPAHS00702", "XMLSTR" , "" , "" , "false" , "", "", "", "", "false");
  262. } else {
  263. messageBox("출력할 일자의 건진수입 정보를 선택 후","C003");
  264. }
  265. model.refresh();
  266. ]]>
  267. </script>
  268. </button>
  269. <button id="btn_excelsave" class="btn6_letter4" visibility="visible" style="left:986px; top:7px; width:80px; height:22px; ">
  270. <caption>액셀저장</caption>
  271. <script type="javascript" ev:event="DOMActivate">
  272. <![CDATA[
  273. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  274. grd_healexamincm.saveExcel(fileName, "SheetName", true, true, "", "", false);
  275. ]]>
  276. </script>
  277. </button>
  278. <button id="btn_prt" class="btn6_letter2" style="left:1070px; top:7px; width:56px; height:22px; ">
  279. <caption>출력</caption>
  280. <script type="javascript" ev:event="DOMActivate">
  281. <![CDATA[
  282. // 매개변수
  283. model.makeValue("/root/main/export/srchfromdd", model.getValue("/root/send/srchfromdd").toDate().getDateFormat("YYYY/MM/DD"));
  284. model.makeValue("/root/main/export/srchtodd", model.getValue("/root/send/srchtodd").toDate().getDateFormat("YYYY/MM/DD"));
  285. exeReportPreview("RPAHS00701", "XMLSTR", "/root/main/export","", "false","","","","","false");
  286. ]]>
  287. </script>
  288. </button>
  289. <line id="line2" class="line_4" style="x1:1132px; y1:7px; x2:1132px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  290. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1139px; top:7px; width:56px; height:22px; ">
  291. <caption>조회</caption>
  292. <script type="javascript" ev:event="DOMActivate">
  293. <![CDATA[
  294. var ret = submit("TRAHS00701");
  295. if(ret) {
  296. fSetRcptSum();
  297. model.refresh();
  298. }
  299. ]]>
  300. </script>
  301. </button>
  302. </group>
  303. <datagrid id="grd_healexamincm" nodeset="/root/main/healexamincm/item" caption="일자^구분^총인원^남자인원^여자인원^총진료비^할인액^단체미수^공단미수^개인미수^현금수납^통장수납^카드수납^절사액^선수대체" colsep="^" colwidth="100, 50, 60, 60, 60, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105" mergecellsfixedcols="bycol" mergecellsfixedrows="byrowrec" multitotal="true" rowsep="|" subtotalposition="below" style="left:4px; top:65px; width:1203px; height:707px; text-align:center; ">
  304. <col ref="rcptexecdd" format="yyyy-mm-dd" style="font-weight:bold; text-align:center; "/>
  305. <col ref="cmpyflag"/>
  306. <col ref="totcnt"/>
  307. <col ref="mcnt"/>
  308. <col ref="fcnt"/>
  309. <col ref="totamt" format="(-,+)#,###" style="text-align:right; "/>
  310. <col ref="discamt" format="(-,+)#,###" style="text-align:right; "/>
  311. <col ref="cmpyamt" format="(-,+)#,###" style="text-align:right; "/>
  312. <col ref="payinsubamt" format="(-,+)#,###" style="text-align:right; "/>
  313. <col ref="ownuncoamt" visibility="hidden" format="(-,+)#,###" style="text-align:right; "/>
  314. <col ref="cashamt" format="(-,+)#,###" style="text-align:right; "/>
  315. <col ref="onlineamt" visibility="hidden" format="(-,+)#,###" style="text-align:right; "/>
  316. <col ref="cardamt" format="(-,+)#,###" style="text-align:right; "/>
  317. <col ref="restamt" format="(-,+)#,###" style="text-align:right; "/>
  318. <col ref="mdlrcptamt" format="(-,+)#,###" style="text-align:right; "/>
  319. </datagrid>
  320. </xhtml:body>
  321. </xhtml:html>