SMSDT06200_사회사업헌혈증수입지출현황.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMSDT06200.사회사업헌혈증수입지출현황.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. <brgstincmexpspres>
  19. <brgstincmexpsprescond>
  20. <cond/>
  21. <incmcnt/>
  22. <expscnt/>
  23. <expsamt/>
  24. </brgstincmexpsprescond>
  25. </brgstincmexpspres>
  26. <search>
  27. <reqflag>1</reqflag>
  28. <fromdd/>
  29. <todd/>
  30. <fromentryy/>
  31. <fromendyy/>
  32. <toendyy/>
  33. <toentryy/>
  34. </search>
  35. </main>
  36. <send>
  37. <reqdata/>
  38. </send>
  39. <init/>
  40. <hidden/>
  41. </root>
  42. </instance>
  43. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  44. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  45. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  46. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  47. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  48. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  49. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  50. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  51. <script type="javascript" ev:event="xforms-ready">
  52. <![CDATA[
  53. fInit();
  54. ]]>
  55. </script>
  56. <submission id="TRSDT04002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" replace="instance" resultref="/root/main/cnstinfo"/>
  57. <bind id="bfreqcntconsult" ref="/root/main/cnstinfo/cnstlist/bfreqcntconsult" calculate="../reqtot - ../bfreqcnt"/>
  58. <bind id="bfreplcntreply" ref="/root/main/cnstinfo/cnstlist/bfreplcntreply" calculate="../repltot - ../bfreplcnt"/>
  59. <submission id="TRSDT06201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" replace="instance" resultref="/root/main/brgstincmexpspres"/>
  60. </model>
  61. <script type="javascript">
  62. <![CDATA[
  63. /**========================================================================================================================================
  64. * 조회기간 그리드초기화
  65. =========================================================================================================================================*/
  66. function fInit()
  67. {
  68. //cmb_reqflag.select(0);
  69. //ipt_fromdd.visible=true;
  70. //ipt_todd.visible=true;
  71. ipt_fromentryy.visible=false;
  72. ipt_toentryy.visible=false;
  73. caption1.visible=true;
  74. caption2.visible=false;
  75. model.removeNodeset("/root/main/brgstincmexpspres");
  76. var CurrentDate=getCurrentDate();
  77. var CurrentDateYM=CurrentDate.substr(0,6);
  78. var LastDate=CurrentDate.toDate().getAddDate(-1,"M").getDateFormat(); //현재 월-1월을 셋팅
  79. var LastDateYM=LastDate.substr(0,6);
  80. model.makeValue("/root/main/search/fromdd",LastDateYM);
  81. model.makeValue("/root/main/search/todd",LastDateYM);
  82. var CurrentDateYY=CurrentDate.substring(0,4);
  83. model.makeValue("/root/main/search/fromentryy",CurrentDateYY);
  84. model.makeValue("/root/main/search/toentryy",CurrentDateYY);
  85. model.refresh();
  86. }
  87. /**========================================================================================================================================
  88. * 조회
  89. =========================================================================================================================================*/
  90. function fReqBrgstIncmExpsCond()
  91. {
  92. model.removeNodeset("/root/send/reqdata");
  93. model.makeNode("/root/send/reqdata");
  94. model.refresh();
  95. var fdate=model.getValue("/root/main/search/fromdd");
  96. var todate=model.getValue("/root/main/search/todd");
  97. var reqflag=model.getValue("/root/main/search/reqflag");
  98. var fromentryy=model.getValue("/root/main/search/fromentryy");
  99. var toentryy=model.getValue("/root/main/search/toentryy");
  100. var fromdd=fdate.substr(4,2);
  101. var todd=todate.substr(4,2);
  102. var fromendyy=fdate.substr(0,4);
  103. var toendyy=todate.substr(0,4);
  104. //alert(todd.substring(6,2));
  105. if(reqflag=='1')
  106. {
  107. model.makeValue("/root/send/reqdata/fromdd",fromdd);
  108. model.makeValue("/root/send/reqdata/todd",todd);
  109. model.makeValue("/root/send/reqdata/fromendyy",fromendyy);
  110. model.makeValue("/root/send/reqdata/toendyy",toendyy);
  111. }
  112. else
  113. {
  114. model.makeValue("/root/send/reqdata/fromentryy",fromentryy);
  115. model.makeValue("/root/send/reqdata/toentryy",toentryy);
  116. }
  117. model.makeValue("/root/send/reqdata/reqflag",reqflag);
  118. if(reqflag=='1')
  119. {
  120. if(isNull(fromdd))
  121. {
  122. messageBox("조회시작일자는","I003");
  123. model.setFocus("ipt_fromdd");
  124. return;
  125. }
  126. if(isNull(todd))
  127. {
  128. messageBox("조회종료일자는","I003");
  129. model.setFocus("ipt_todd");
  130. return;
  131. }
  132. if(fdate>todate)
  133. {
  134. messageBox("조회시작일보다 큰 조회종료일을 입력하십시요.","I");
  135. model.setFocus("ipt_todd");
  136. return;
  137. }
  138. var dateintval=getDateInterval(fdate+"01",todate+"31");
  139. //alert(dateintval);
  140. if(dateintval>"370")
  141. {
  142. messageBox("조회기간은 최대 1년까지 할 수 있습니다","I");
  143. model.setFocus("ipt_fromdd");
  144. return;
  145. }
  146. }
  147. else
  148. {
  149. if(isNull(fromentryy))
  150. {
  151. messageBox("조회시작연도는","I003");
  152. model.setFocus("ipt_fromentryy");
  153. return;
  154. }
  155. if(isNull(toentryy))
  156. {
  157. messageBox("조회종료연도는","I003");
  158. model.setFocus("ipt_toentryy");
  159. return;
  160. }
  161. if(fromentryy>toentryy)
  162. {
  163. messageBox("조회시작일보다 큰 조회종료일을 입력하십시요.","I");
  164. model.setFocus("ipt_todd");
  165. return;
  166. }
  167. var dateintval=getDateInterval(fromentryy+"0101",toentryy+"1231");
  168. if(dateintval>"1980")
  169. {
  170. messageBox("조회기간은 최대 5년까지 할 수 있습니다","I");
  171. model.setFocus("ipt_fromdd");
  172. return;
  173. }
  174. }
  175. submit("TRSDT06201");
  176. var idxRow=grd_brgstincmexpsprescond.rows;
  177. var fixRow=grd_brgstincmexpsprescond.fixedRows;
  178. var reqflag=model.getValue("/root/main/search/reqflag");
  179. var cond=model.getValue("/root/main/brgstincmexpspres/brgstincmexpsprescond"+"["+1+"]/cond");
  180. if(cond=='합계')
  181. {
  182. //데이터가 없을 때 모든 행 remove
  183. model.removeNodeset("/root/main/brgstincmexpspres/brgstincmexpsprescond");
  184. }
  185. else
  186. {
  187. if(reqflag=='2')
  188. {
  189. for(i=1;i<=idxRow-fixRow;i++)
  190. {
  191. var cond2=model.getValue("/root/main/brgstincmexpspres/brgstincmexpsprescond"+"["+i+"]/cond");
  192. // 년도별로 조회시 아래 공데이터 들어가 있을때 삭제 처리
  193. if(isNull(cond2))
  194. {
  195. grd_brgstincmexpsprescond.removeRow(false);
  196. }
  197. }
  198. }
  199. }
  200. model.refresh();
  201. }
  202. /**========================================================================================================================================
  203. * 초기화
  204. =========================================================================================================================================*/
  205. function fResetBrgstIncmExps()
  206. {
  207. model.removeNodeset("/root/main/brgstincmexpspres");
  208. model.refresh();
  209. }
  210. /**========================================================================================================================================
  211. * 엑셀저장 버튼 클릭시
  212. =========================================================================================================================================*/
  213. function fExcel() {
  214. if (grd_brgstincmexpsprescond.rows <= 2) {
  215. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  216. return;
  217. }
  218. var fileName = window.fileDialog("save", ",", false, "헌혈증수입지출현황", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  219. if (fileName != ""){
  220. grd_brgstincmexpsprescond.saveExcel(fileName, "SheetName", false, false, "", "", false);
  221. }
  222. }
  223. ]]>
  224. </script>
  225. </xhtml:head>
  226. <xhtml:body guideline="1,1195;1,1191;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  227. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  228. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">사회사업 헌혈증수입지출현황</caption>
  229. </group>
  230. <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  231. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  232. <button id="btn_search0" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  233. <caption>초기화</caption>
  234. <script type="javascript" ev:event="DOMActivate">
  235. <![CDATA[
  236. fResetBrgstIncmExps();
  237. ]]>
  238. </script>
  239. </button>
  240. </group>
  241. <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  242. <caption id="caption21" class="tit_2" style="left:0px; top:55px; width:232px; height:14px; ">사회사업 헌혈증 수입지출 실적</caption>
  243. <line id="line1" class="line_1" style="x1:0px; y1:73px; x2:1190px; y2:72px; "/>
  244. <group id="group4" style="left:0px; top:5px; width:1194px; height:35px; vertical-align:top; ">
  245. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  246. <button id="button2" class="btn1_letter2" navindex="4" style="left:1123px; top:7px; width:56px; height:22px; ">
  247. <caption>조회</caption>
  248. <script type="javascript" ev:event="DOMActivate">
  249. <![CDATA[
  250. fReqBrgstIncmExpsCond();
  251. ]]>
  252. </script>
  253. </button>
  254. <caption id="caption23" class="search_name" style="left:15px; top:10px; width:86px; height:17px; ">조회구분 :</caption>
  255. <line id="line2" style="x1:1113px; y1:7px; x2:1113px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  256. <caption id="cap1" style="left:415px; top:8px; width:25px; height:20px; text-align:center; ">~</caption>
  257. <input id="ipt_fromdd" ref="/root/main/search/fromdd" class="input_search" navindex="2" inputtype="date" format="yyyy-mm" style="left:332px; top:8px; width:73px; height:19px; "/>
  258. <input id="ipt_todd" ref="/root/main/search/todd" class="input_search" navindex="3" inputtype="date" format="yyyy-mm" style="left:445px; top:8px; width:73px; height:19px; "/>
  259. <caption id="caption1" class="search_name" style="left:240px; top:10px; width:100px; height:17px; ">조회기간 :</caption>
  260. <select1 id="cmb_reqflag" ref="/root/main/search/reqflag" navindex="1" appearance="minimal" style="left:110px; top:10px; width:85px; height:19px; ">
  261. <choices>
  262. <item>
  263. <label>월별</label>
  264. <value>1</value>
  265. </item>
  266. <item>
  267. <label>년도별</label>
  268. <value>2</value>
  269. </item>
  270. </choices>
  271. <script type="javascript" ev:event="xforms-value-changed">
  272. <![CDATA[
  273. var CurrentDate=getCurrentDate();
  274. if(cmb_reqflag.value=='1')
  275. {
  276. ipt_fromdd.visible=true;
  277. ipt_todd.visible=true;
  278. ipt_fromentryy.visible=false;
  279. ipt_toentryy.visible=false;
  280. cap1.visible=true;
  281. caption1.visible=true;
  282. caption2.visible=false;
  283. var CurrentDateYM=CurrentDate.substr(0,6);
  284. var LastDateYM=CurrentDate.toDate().getAddDate(-1,"M").getDateFormat();
  285. var fdate=model.getValue("/root/main/search/fromdd");
  286. var todate=model.getValue("/root/main/search/todd");
  287. //var dateintval=getDateInterval(fdate+"01",todate+"31");
  288. //model.makeValue("/root/main/search/fromdd",LastDateYM);
  289. //model.makeValue("/root/main/search/todd",LastDateYM);
  290. model.removeNodeset("/root/send/reqdata/entryy");
  291. }
  292. else
  293. {
  294. ipt_fromdd.visible=false;
  295. ipt_todd.visible=false;
  296. ipt_fromentryy.visible=true;
  297. ipt_toentryy.visible=true;
  298. cap1.visible=true;
  299. caption1.visible=false;
  300. caption2.visible=true;
  301. model.removeNodeset("/root/send/reqdata/fromdd");
  302. model.removeNodeset("/root/send/reqdata/todd");
  303. //model.removeNodeset("");
  304. }
  305. model.removeNodeset("/root/send/reqdata");
  306. model.makeNode("/root/send/reqdata");
  307. model.refresh();
  308. fReqBrgstIncmExpsCond(); //조회함수
  309. ]]>
  310. </script>
  311. </select1>
  312. <input id="ipt_fromentryy" ref="/root/main/search/fromentryy" class="input_search" navindex="2" inputtype="date" format="yyyy" style="left:332px; top:8px; width:58px; height:19px; "/>
  313. <caption id="caption2" class="search_name" style="left:239px; top:10px; width:100px; height:17px; ">조회년도:</caption>
  314. <input id="ipt_toentryy" ref="/root/main/search/toentryy" class="input_search" navindex="2" inputtype="date" format="yyyy" style="left:446px; top:8px; width:58px; height:19px; "/>
  315. </group>
  316. <button id="btn_excel" class="btn2_letter4" style="left:1126px; top:50px; width:64px; height:19px; ">
  317. <caption>엑셀저장</caption>
  318. <script type="javascript" ev:event="DOMActivate">
  319. <![CDATA[
  320. fExcel();
  321. ]]>
  322. </script>
  323. </button>
  324. <datagrid id="grd_brgstincmexpsprescond" nodeset="/root/main/brgstincmexpspres/brgstincmexpsprescond" class="datagrid2" caption="구분^헌혈증수입(수증)^헌혈증지출(기증)^헌혈증환산액^헌혈증지원환자수^reply^장소^장소^장소^장소명^장소^담당자|구분^헌혈증수입(수증)^헌혈증지출(기증)^헌혈증환산액^헌혈증지원환자수^reply^장소^장소^장소^장소명^장소^담당자" colsep="^" colwidth="199, 188, 189, 206, 185" dataheight="25" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:1px; top:76px; width:1190px; height:664px; ">
  325. <col ref="cond" style="text-align:center; "/>
  326. <col ref="incmcnt" style="text-align:center; "/>
  327. <col ref="expscnt" style="text-align:center; "/>
  328. <col ref="expsamt" format="(-)#,###" style="text-align:center; "/>
  329. <col ref="patcnt" style="text-align:center; "/>
  330. </datagrid>
  331. </group>
  332. </xhtml:body>
  333. </xhtml:html>