SMSDT06600_사회사업외부후원실적.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMSDT06600.사회사업 외부후원실적.xrw
  4. * 설 명 : 사회사업 외부후원실적
  5. * 작 성 자 : 박성호
  6. * 작 성 일 : 2008.11.17
  7. * 수정이력 :
  8. * 기 타 :
  9. -->
  10. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  11. <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">
  12. <xhtml:head>
  13. <xhtml:title>사회사업 외부후원실적</xhtml:title>
  14. <model id="model1">
  15. <instance id="instance1">
  16. <root xmlns="">
  17. <main>
  18. <chacinfo>
  19. <chaclist>
  20. <flagnm/>
  21. <supppatcnt/>
  22. <suppamt/>
  23. <patamt/>
  24. </chaclist>
  25. </chacinfo>
  26. <expsinfo>
  27. <expslist>
  28. <flagnm/>
  29. <supppatcnt/>
  30. <suppamt/>
  31. </expslist>
  32. </expsinfo>
  33. <search>
  34. <fromdd/>
  35. <todd/>
  36. <fromentryy/>
  37. <fromendyy/>
  38. <toendyy/>
  39. <toentryy/>
  40. <flag/>
  41. <ioflag/>
  42. <achivflag>C1</achivflag>
  43. </search>
  44. </main>
  45. <send>
  46. <search/>
  47. </send>
  48. <init>
  49. <ioflag>
  50. <A0563/>
  51. </ioflag>
  52. <ioflag1>
  53. <C0029>
  54. <cdnm>- 전 체 -</cdnm>
  55. <cdid/>
  56. </C0029>
  57. </ioflag1>
  58. </init>
  59. <hidden/>
  60. </root>
  61. </instance>
  62. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  63. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  64. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  66. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  67. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  68. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  69. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  70. <script type="javascript" ev:event="xforms-ready">
  71. <![CDATA[
  72. fInit();
  73. ]]>
  74. </script>
  75. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  76. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post"/>
  77. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  78. <submission id="TRSDT06601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" replace="instance" resultref="/root/main/chacinfo"/>
  79. </model>
  80. <script type="javascript">
  81. <![CDATA[
  82. /**========================================================================================================================================
  83. * 조회기간 그리드초기화
  84. =========================================================================================================================================*/
  85. function fInit(){
  86. model.removeNodeset("/root/main/chacinfo/chaclist");
  87. cmb_sumflag.select(0);
  88. // 공통코드 목록 가져오기(입원/외래)
  89. zbcfGetCodeList(new Array("A0563", "C0029"), new Array("/root/init/ioflag", "/root/init/ioflag1") , true);
  90. // 입원/외래
  91. addComboItem("cmb_ioflag", "", "", "above");
  92. var currentDate = getCurrentDate();
  93. var LastDate=currentDate.toDate().getAddDate(-1,"M").getDateFormat();
  94. var LastDateYM=LastDate.substr(0,6);
  95. model.setValue("/root/main/search/fromdd" ,LastDateYM );
  96. model.setValue("/root/main/search/todd" ,LastDateYM );
  97. var CurrentDateYY=currentDate.substring(0,4);
  98. model.makeValue("/root/main/search/fromentryy",CurrentDateYY);
  99. model.makeValue("/root/main/search/toentryy",CurrentDateYY);
  100. // 그리드초기화
  101. model.removeNodeset(grd_list.nodeset);
  102. model.refresh();
  103. }
  104. /**========================================================================================================================================
  105. * 조회
  106. =========================================================================================================================================*/
  107. function fSearch(){
  108. //var fromdd = model.getValue("/root/main/search/fromdd") +"01";
  109. /*
  110. if (cmb_sumflag.value == "1")
  111. {
  112. var fromdd = model.getValue("/root/main/search/fromdd");
  113. var todd = model.getValue("/root/main/search/fromdd");
  114. }
  115. else if (cmb_sumflag.value == "2")
  116. {
  117. var fromdd = model.getValue("/root/main/search/fromdd");
  118. var todd = model.getValue("/root/main/search/fromdd");
  119. }
  120. else
  121. {
  122. var fromdd = model.getValue("/root/main/search/fromentryy");
  123. }
  124. */
  125. var fromdd = model.getValue("/root/main/search/fromdd");
  126. var todd = model.getValue("/root/main/search/todd");
  127. var fromentryy = model.getValue("/root/main/search/fromentryy");
  128. var toentryy = model.getValue("/root/main/search/toentryy");
  129. var frommonth = model.getValue("/root/main/search/fromdd") + "01";
  130. var tomonth = model.getValue("/root/main/search/todd") + "01";
  131. var fromyear = model.getValue("/root/main/search/fromentryy") + "0101";
  132. var toyear = model.getValue("/root/main/search/toentryy") + "0101";
  133. var ioflag = model.getValue("/root/main/search/ioflag");
  134. var flag = model.getValue("/root/main/search/flag");
  135. if (flag == "3")
  136. {
  137. //alert(fromentryy);
  138. //alert(toentryy);
  139. if( ! isValidDateTime( fromyear, 'YYYYMMDD') || ! isValidDateTime( toyear, 'YYYYMMDD') ){
  140. messageBox("입력하신 일자구분이 정확한 날짜타입이 아닙니다.", "I999", "");
  141. model.setFocus("ipt_fromentryy");
  142. return;
  143. }
  144. if( getDateInterval(fromyear, toyear) > 1825 ){
  145. messageBox("조회기간은 최대5년까지 할 수 있습니다.", "I999", "");
  146. model.setFocus("ipt_toentryy");
  147. return;
  148. }
  149. if( getDateInterval(fromyear, toyear) < 0 ){
  150. messageBox("일자구분에서 시작일자가 종료일자보다 미래일자 입니다. 확인하세요!", "I999", "");
  151. model.setFocus("ipt_fromentryy");
  152. return;
  153. }
  154. }
  155. else
  156. {
  157. if( ! isValidDateTime( fromdd, 'YYYYMM') || ! isValidDateTime(todd, 'YYYYMM') ){
  158. messageBox("입력하신 일자구분이 정확한 날짜타입이 아닙니다.", "I999", "");
  159. model.setFocus("ipt_fromdd");
  160. return;
  161. }
  162. if( getDateInterval(frommonth, tomonth) > 365 ){
  163. messageBox("조회기간은 최대1년까지 할 수 있습니다..", "I999", "");
  164. model.setFocus("ipt_todd");
  165. return;
  166. }
  167. if( getDateInterval(frommonth, tomonth) < 0 ){
  168. messageBox("일자구분에서 시작일자가 종료일자보다 미래일자 입니다. 확인하세요!", "I999", "");
  169. model.setFocus("ipt_fromdd");
  170. return;
  171. }
  172. }
  173. model.removeNodeset("/root/send/search");
  174. model.makeValue("/root/send/search/flag", flag);
  175. model.makeValue("/root/send/search/ioflag", ioflag);
  176. model.makeValue("/root/send/search/fromdd", fromdd);
  177. model.makeValue("/root/send/search/todd", todd);
  178. model.makeValue("/root/send/search/fromentryy", fromentryy);
  179. model.makeValue("/root/send/search/toentryy", toentryy);
  180. //grid merge
  181. /*
  182. grd_list.mergeCells = "bycolrec";
  183. grd_list.mergeCol(0) = true;
  184. grd_list.mergeCol(1) = true;
  185. grd_list.mergeCol(2) = false;
  186. grd_list.mergeCol(3) = false;
  187. grd_list.mergeCol(4) = false;
  188. grd_list.mergeCol(5) = false;
  189. grd_list.mergeCol(6) = false;
  190. grd_list.mergeCol(7) = false;
  191. grd_list.mergeCol(8) = false;
  192. grd_list.mergeCol(9) = false;
  193. grd_list.mergeCol(10) = false;
  194. grd_list.mergeCol(11) = false;
  195. grd_list.mergeCol(12) = false;
  196. */
  197. var achivflag = model.getValue("/root/main/search/achivflag");
  198. model.makeValue("/root/send/search/achivflag", achivflag);
  199. if (submit("TRSDT06601", false) == true)
  200. {
  201. }
  202. else
  203. {
  204. }
  205. }
  206. /**========================================================================================================================================
  207. * 엑셀저장 버튼 클릭시
  208. =========================================================================================================================================*/
  209. function fExcel() {
  210. var achivflag = model.getValue("/root/main/search/achivflag");
  211. if (achivflag == "C1")
  212. {
  213. if (grd_list.rows <= 3) {
  214. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  215. return;
  216. }
  217. var fileName = window.fileDialog("save", ",", false, "사회사업 외부후원결정실적", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  218. if (fileName != ""){
  219. grd_list.saveExcel(fileName, "SheetName", false, false, "", "", false);
  220. }
  221. }
  222. else
  223. {
  224. if (grd_exps.rows <= 3) {
  225. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  226. return;
  227. }
  228. var fileName = window.fileDialog("save", ",", false, "사회사업 외부후원지출실적", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  229. if (fileName != ""){
  230. grd_exps.saveExcel(fileName, "SheetName", false, false, "", "", false);
  231. }
  232. }
  233. }
  234. function fComSelect()
  235. {
  236. var CurrentDate=getCurrentDate();
  237. if(cmb_sumflag.value=='1')
  238. {
  239. ipt_fromdd.visible=true;
  240. ipt_todd.visible=true;
  241. ipt_fromentryy.visible=false;
  242. ipt_toentryy.visible=false;
  243. cap1.visible=true;
  244. caption1.visible=true;
  245. caption2.visible=false;
  246. /*
  247. var CurrentDateYM=CurrentDate.substr(0,6);
  248. model.makeValue("/root/main/search/fromdd",CurrentDateYM);
  249. model.makeValue("/root/main/search/todd",CurrentDateYM);
  250. model.removeNodeset("/root/main/search/entryy");
  251. */
  252. }
  253. else if(cmb_sumflag.value=='2')
  254. {
  255. ipt_fromdd.visible=true;
  256. ipt_todd.visible=true;
  257. ipt_fromentryy.visible=false;
  258. ipt_toentryy.visible=false;
  259. cap1.visible=true;
  260. caption1.visible=true;
  261. caption2.visible=false;
  262. /*
  263. var CurrentDateYM=CurrentDate.substr(0,6);
  264. model.makeValue("/root/main/search/fromdd",CurrentDateYM);
  265. model.makeValue("/root/main/search/todd",CurrentDateYM);
  266. model.removeNodeset("/root/main/search/entryy");
  267. */
  268. }
  269. else
  270. {
  271. ipt_fromdd.visible=false;
  272. ipt_todd.visible=false;
  273. ipt_fromentryy.visible=true;
  274. ipt_toentryy.visible=true;
  275. cap1.visible=true;
  276. caption1.visible=false;
  277. caption2.visible=true;
  278. /*
  279. var CurrentDateYY=CurrentDate.substring(0,4);
  280. model.makeValue("/root/main/search/fromentryy",CurrentDateYY);
  281. model.makeValue("/root/main/search/toentryy",CurrentDateYY);
  282. model.removeNodeset("/root/main/search/fromdd");
  283. model.removeNodeset("/root/main/search/todd");
  284. */
  285. }
  286. //model.removeNodeset("/root/send/reqdata");
  287. //model.makeNode("/root/send/reqdata");
  288. model.refresh();
  289. }
  290. // 실적 구분
  291. function fAchivflagChagne(){
  292. // 접수환자실적 A1, 상담환자실적 A2
  293. if(rdo_achivflag.value == 'C1'){
  294. model.removeNodeset("/root/main/chacinfo/chaclist");
  295. model.toggle("case1");
  296. cmb_ioflag.choices.itemset.attribute("nodeset") = "/root/init/ioflag/A0563";
  297. cap_list.attribute("text") = "사회사업 외부후원결정실적";
  298. cmb_ioflag.select(0);
  299. }else{
  300. model.removeNodeset("/root/main/chacinfo/chaclist");
  301. model.toggle("case2");
  302. cmb_ioflag.select(0);
  303. cmb_ioflag.choices.itemset.attribute("nodeset") = "/root/init/ioflag1/C0029";
  304. cap_list.attribute("text") = "사회사업 외부후원지출실적";
  305. // 입원/외래
  306. //addComboItem("cmb_ioflag", "", "", "above");
  307. }
  308. model.refresh();
  309. }
  310. ]]>
  311. </script>
  312. </xhtml:head>
  313. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  314. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  315. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:224px; height:14px; ">사회사업 외부후원실적</caption>
  316. </group>
  317. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  318. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  319. <button id="btn_search0" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  320. <caption>초기화</caption>
  321. <script type="javascript" ev:event="DOMActivate">
  322. <![CDATA[
  323. fInit();
  324. ]]>
  325. </script>
  326. </button>
  327. </group>
  328. <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  329. <line id="line1" class="line_1" style="x1:0px; y1:73px; x2:1190px; y2:72px; "/>
  330. <group id="group4" style="left:0px; top:5px; width:1194px; height:35px; vertical-align:top; ">
  331. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  332. <line id="line2" style="x1:1113px; y1:7px; x2:1113px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  333. <caption id="cap1" style="left:915px; top:8px; width:25px; height:20px; text-align:center; ">~</caption>
  334. <caption id="caption1" class="search_name" style="left:740px; top:10px; width:100px; height:17px; ">조회기간 :</caption>
  335. <caption id="caption2" class="search_name" style="left:739px; top:10px; width:100px; height:17px; ">조회년도:</caption>
  336. <caption id="caption23" class="search_name" style="left:515px; top:10px; width:86px; height:17px; ">조회구분 :</caption>
  337. <select1 id="cmb_ioflag" ref="/root/main/search/ioflag" navindex="1" appearance="minimal" style="left:390px; top:8px; width:85px; height:19px; ">
  338. <choices>
  339. <itemset nodeset="/root/init/ioflag/A0563">
  340. <label ref="cdnm"/>
  341. <value ref="cdid"/>
  342. </itemset>
  343. </choices>
  344. </select1>
  345. <select1 id="cmb_sumflag" ref="/root/main/search/flag" navindex="1" appearance="minimal" style="left:610px; top:8px; width:100px; height:19px; ">
  346. <choices>
  347. <item>
  348. <label>후원단체별</label>
  349. <value>1</value>
  350. </item>
  351. <item>
  352. <label>월별</label>
  353. <value>2</value>
  354. </item>
  355. <item>
  356. <label>년도별</label>
  357. <value>3</value>
  358. </item>
  359. </choices>
  360. <script type="javascript" ev:event="xforms-value-changed">
  361. <![CDATA[
  362. fComSelect();
  363. ]]>
  364. </script>
  365. </select1>
  366. <input id="ipt_fromdd" ref="/root/main/search/fromdd" class="input_search" inputtype="date" format="yyyy-mm" style="left:832px; top:8px; width:73px; height:19px; "/>
  367. <input id="ipt_todd" ref="/root/main/search/todd" class="input_search" inputtype="date" format="yyyy-mm" style="left:945px; top:8px; width:73px; height:19px; "/>
  368. <input id="ipt_fromentryy" ref="/root/main/search/fromentryy" class="input_search" inputtype="date" format="yyyy" style="left:832px; top:8px; width:58px; height:19px; "/>
  369. <input id="ipt_toentryy" ref="/root/main/search/toentryy" class="input_search" inputtype="date" format="yyyy" style="left:946px; top:8px; width:58px; height:19px; "/>
  370. <caption id="caption3" class="search_name" style="left:290px; top:10px; width:93px; height:17px; ">입원/외래 :</caption>
  371. <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  372. <caption>조회</caption>
  373. <script type="javascript" ev:event="DOMActivate">
  374. <![CDATA[
  375. fSearch();
  376. model.refresh();
  377. ]]>
  378. </script>
  379. </button>
  380. <select1 id="rdo_achivflag" ref="/root/main/search/achivflag" overflow="visible" appearance="full" cols="4" rows="1" style="left:30px; top:8px; width:245px; height:20px; border-style:none; ">
  381. <choices>
  382. <item>
  383. <label>외부후원 결정실적</label>
  384. <value>C1</value>
  385. </item>
  386. <item>
  387. <label>외부후원 지출실적</label>
  388. <value>C2</value>
  389. </item>
  390. </choices>
  391. <script type="javascript" ev:event="xforms-select">
  392. <![CDATA[
  393. fAchivflagChagne();
  394. ]]>
  395. </script>
  396. </select1>
  397. </group>
  398. <button id="btn_excel" class="btn2_letter4" style="left:1127px; top:51px; width:64px; height:19px; ">
  399. <caption>엑셀저장</caption>
  400. <script type="javascript" ev:event="DOMActivate">
  401. <![CDATA[
  402. fExcel();
  403. ]]>
  404. </script>
  405. </button>
  406. <switch id="switch1" style="left:0px; top:75px; width:1195px; height:665px; ">
  407. <case id="case1" selected="true">
  408. <datagrid id="grd_list" nodeset="/root/main/chacinfo/chaclist" class="datagrid1" caption="구분^사회사업&#xA;외부후원 지원결정환자수^사회사업&#xA;외부후원 결정액^환자1인당&#xA;외부후원 결정액|구분^사회사업&#xA;외부후원 지원결정환자수^사회사업&#xA;외부후원 결정액^환자1인당&#xA;외부후원 결정액" colsep="^" colwidth="230, 230, 230, 230" dataheight="25" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:0px; top:0px; width:1193px; height:663px; text-align:center; ">
  409. <col ref="flagnm" style="text-align:center; "/>
  410. <col ref="supppatcnt" format="(-)#,###" style="text-align:center; "/>
  411. <col ref="suppamt" format="(-)#,###" style="text-align:center; "/>
  412. <col ref="patamt" format="(-)#,###" style="text-align:center; "/>
  413. </datagrid>
  414. </case>
  415. <case id="case2">
  416. <datagrid id="grd_exps" nodeset="/root/main/chacinfo/chaclist" class="datagrid1" caption="구분^사회사업&#xA;외부후원 지원환자수^사회사업&#xA;외부후원 지출액|구분^사회사업&#xA;외부후원 지원환자수^사회사업&#xA;외부후원 지출액" colsep="^" colwidth="230, 230, 230" dataheight="25" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:0px; top:0px; width:1193px; height:663px; text-align:center; ">
  417. <col ref="flagnm" style="text-align:center; "/>
  418. <col ref="supppatcnt" format="(-)#,###" style="text-align:center; "/>
  419. <col ref="suppamt" format="(-)#,###" style="text-align:center; "/>
  420. </datagrid>
  421. </case>
  422. </switch>
  423. <caption id="cap_list" class="tit_2" style="left:0px; top:55px; width:217px; height:14px; ">사회사업 외부후원결정실적</caption>
  424. </group>
  425. </xhtml:body>
  426. </xhtml:html>