SMSDT06200_사회사업헌혈증수입지출현황.xfdl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMSDT06200" position="absolute 0 0 1200 805" titletext="사회사업헌혈증수입지출현황" oninit="SMSDT06200_oninit" onload="SMSDT06200_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="사회사업 헌혈증수입지출현황" class="tit_1" position="absolute 0 0 230 25"/>
  8. <Div id="group5" taborder="1" position="absolute 0 770 1195 797">
  9. <Layouts>
  10. <Layout>
  11. <Shape id="line37" linetype="vertical" class="line_6" position="absolute 0 0 1194 6"/>
  12. <Button id="btn_search0" taborder="1" text="초기화" class="btn4" position="absolute 1126 5 1194 27"/>
  13. </Layout>
  14. </Layouts>
  15. </Div>
  16. <Static id="caption21" text="사회사업 헌혈증 수입지출 실적" class="tit_2" position="absolute 0 81 232 103"/>
  17. <Shape id="line1" linetype="horizontal" class="line_10" position="absolute 0 95 1195 106" anchor="left top right"/>
  18. <Div id="group4" taborder="2" class="div_SA" position="absolute 0 25 1195 65" anchor="left top right">
  19. <Layouts>
  20. <Layout>
  21. <Calendar id="ipt_fromdd" taborder="5" autoselect="true" autoskip="true" dateformat="yyyy-MM" editformat="yyyy-MM" class="input_search" position="absolute 331 11 404 30" mask="yyyy-mm" onchanged="group4_ipt_fromdd_onchanged"/>
  22. <Calendar id="ipt_todd" taborder="6" autoselect="true" dateformat="yyyy-MM" editformat="yyyy-MM" class="input_search" position="absolute 444 11 517 30" mask="yyyy-mm" onchanged="group4_ipt_todd_onchanged"/>
  23. <Calendar id="ipt_fromentryy" taborder="7" autoselect="true" autoskip="true" dateformat="yyyy" editformat="yyyy" class="input_search" position="absolute 331 11 389 30" mask="yyyy" onchanged="group4_ipt_fromentryy_onchanged"/>
  24. <Static id="caption2" text="조회년도:" class="search_name" position="absolute 238 13 338 30"/>
  25. <Calendar id="ipt_toentryy" taborder="8" autoselect="true" dateformat="yyyy" editformat="yyyy" class="input_search" position="absolute 444 11 502 30" mask="yyyy" onchanged="group4_ipt_toentryy_onchanged"/>
  26. <Button id="button2" taborder="9" text="조회" class="btn1" position="absolute 1123 9 1179 31" anchor="top right" onclick="group4_button2_onclick"/>
  27. <Static id="caption23" text="조회구분 :" class="search_name" position="absolute 15 12 101 29"/>
  28. <Shape id="line2" linetype="vertical" position="absolute 1110 9 1116 31" anchor="top right"/>
  29. <Static id="cap1" text="~" position="absolute 420 11 429 31"/>
  30. <Static id="caption1" text="조회기간 :" class="search_name" position="absolute 239 13 339 30"/>
  31. <Combo id="cmb_reqflag" taborder="10" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 110 11 195 30" onitemchanged="group4_cmb_reqflag_onitemchanged">
  32. <Dataset id="innerdataset">
  33. <ColumnInfo>
  34. <Column id="codecolumn"/>
  35. <Column id="datacolumn"/>
  36. </ColumnInfo>
  37. <Rows>
  38. <Row>
  39. <Col id="codecolumn">1</Col>
  40. <Col id="datacolumn">월별</Col>
  41. </Row>
  42. <Row>
  43. <Col id="codecolumn">2</Col>
  44. <Col id="datacolumn">년도별</Col>
  45. </Row>
  46. </Rows>
  47. </Dataset>
  48. </Combo>
  49. </Layout>
  50. </Layouts>
  51. </Div>
  52. <Button id="btn_excel" taborder="3" text="엑셀저장" class="btn7" position="absolute 1115 78 1195 97" anchor="top right" onclick="btn_excel_onclick"/>
  53. <Grid id="grd_brgstincmexpsprescond" class="datagrid2" taborder="4" binddataset="ds_main_brgstincmexpspres_brgstincmexpsprescond" useinputpanel="false" position="absolute 0 102 1195 766" autoenter="select" cellsizingtype="col" anchor="all">
  54. <Formats>
  55. <Format id="default">
  56. <Columns>
  57. <Column size="199"/>
  58. <Column size="188"/>
  59. <Column size="189"/>
  60. <Column size="206"/>
  61. <Column size="185"/>
  62. </Columns>
  63. <Rows>
  64. <Row size="24" band="head"/>
  65. <Row size="24" band="head"/>
  66. <Row size="24"/>
  67. </Rows>
  68. <Band id="head">
  69. <Cell rowspan="2" text="구분" taborder="undefined"/>
  70. <Cell col="1" rowspan="2" text="헌혈증수입(수증)" taborder="undefined"/>
  71. <Cell col="2" rowspan="2" text="헌혈증지출(기증)" taborder="undefined"/>
  72. <Cell col="3" rowspan="2" text="헌혈증환산액" taborder="undefined"/>
  73. <Cell col="4" rowspan="2" text="헌혈증지원환자수" taborder="undefined"/>
  74. </Band>
  75. <Band id="body">
  76. <Cell text="bind:cond"/>
  77. <Cell col="1" text="bind:incmcnt"/>
  78. <Cell col="2" text="bind:expscnt"/>
  79. <Cell col="3" displaytype="number" text="bind:expsamt"/>
  80. <Cell col="4" text="bind:patcnt"/>
  81. </Band>
  82. </Format>
  83. </Formats>
  84. </Grid>
  85. </Layout>
  86. </Layouts>
  87. <Objects>
  88. <Dataset id="ds_main_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  89. <ColumnInfo>
  90. <Column id="reqflag" type="STRING" size="256"/>
  91. <Column id="fromdd" type="STRING" size="256"/>
  92. <Column id="todd" type="STRING" size="256"/>
  93. <Column id="fromentryy" type="STRING" size="256"/>
  94. <Column id="fromendyy" type="STRING" size="256"/>
  95. <Column id="toendyy" type="STRING" size="256"/>
  96. <Column id="toentryy" type="STRING" size="256"/>
  97. </ColumnInfo>
  98. <Rows>
  99. <Row>
  100. <Col id="reqflag">1</Col>
  101. <Col id="fromdd"/>
  102. <Col id="todd"/>
  103. <Col id="fromentryy"/>
  104. <Col id="fromendyy"/>
  105. <Col id="toendyy"/>
  106. <Col id="toentryy"/>
  107. </Row>
  108. </Rows>
  109. </Dataset>
  110. <Dataset id="ds_main_brgstincmexpspres_brgstincmexpsprescond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  111. <ColumnInfo>
  112. <Column id="cond" type="STRING" size="256" sumtext="구분"/>
  113. <Column id="incmcnt" type="STRING" size="256" sumtext="헌혈증수입(수증)"/>
  114. <Column id="expscnt" type="STRING" size="256" sumtext="헌혈증지출(기증)"/>
  115. <Column id="expsamt" type="STRING" size="256" sumtext="헌혈증환산액"/>
  116. <Column id="patcnt" type="STRING" size="256" sumtext="헌혈증환산액"/>
  117. </ColumnInfo>
  118. </Dataset>
  119. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  120. </Objects>
  121. <Bind>
  122. <BindItem id="item0" compid="group4.cmb_reqflag" propid="value" datasetid="ds_main_search" columnid="reqflag"/>
  123. <BindItem id="item1" compid="group4.ipt_fromentryy" propid="value" datasetid="ds_main_search" columnid="fromentryy"/>
  124. <BindItem id="item2" compid="group4.ipt_toentryy" propid="value" datasetid="ds_main_search" columnid="toentryy"/>
  125. <BindItem id="item3" compid="group4.ipt_fromdd" propid="value" datasetid="ds_main_search" columnid="fromdd"/>
  126. <BindItem id="item4" compid="group4.ipt_todd" propid="value" datasetid="ds_main_search" columnid="todd"/>
  127. </Bind>
  128. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  129. * System Name :
  130. * Job Name :
  131. * Creator :
  132. * Make Date : 2016-05-24
  133. * Description :
  134. *---------------------------------------------------------------------------------------
  135. * Modify Date Modifier Modify Description
  136. *---------------------------------------------------------------------------------------
  137. * 2016-05-24 Live Converter TF->XP
  138. *
  139. *---------------------------------------------------------------------------------------
  140. ****************************************************************************************/
  141. include "com_commonxp::comm_main.xjs";
  142. function SMSDT06200_oninit(obj:Form, e:InitEventInfo)
  143. {
  144. frmf_initForm(obj);
  145. }
  146. function SMSDT06200_onload(obj:Form, e:LoadEventInfo)
  147. {
  148. grdf_initGrid(grd_brgstincmexpsprescond);
  149. fInit();
  150. }
  151. function fInit()
  152. {
  153. group4.ipt_fromentryy.visible=false;
  154. group4.ipt_toentryy.visible=false;
  155. group4.caption1.visible=true;
  156. group4.caption2.visible=false;
  157. ds_main_brgstincmexpspres_brgstincmexpsprescond.clearData();
  158. var CurrentDate = utlf_getCurrentDate();
  159. var CurrentDateYM = String(CurrentDate).substr(0,6);
  160. var LastDate = CurrentDate.toDate().getAddDate(-1,"M").getDateFormat(); //현재 월-1월을 셋팅
  161. var LastDateYM = String(LastDate).substr(0,6);
  162. dsf_makeValue(ds_main_search, "fromdd", "string",LastDateYM);
  163. dsf_makeValue(ds_main_search, "todd", "string",LastDateYM);
  164. var CurrentDateYY = String(CurrentDate).substring(0,4);
  165. dsf_makeValue(ds_main_search, "fromentryy", "string", CurrentDateYY);
  166. dsf_makeValue(ds_main_search, "toentryy", "string",CurrentDateYY);
  167. }
  168. function group4_cmb_reqflag_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  169. {
  170. if(obj.value=='1')
  171. {
  172. group4.ipt_fromdd.visible=true;
  173. group4.ipt_todd.visible=true;
  174. group4.ipt_fromentryy.visible=false;
  175. group4.ipt_toentryy.visible=false;
  176. group4.cap1.visible=true;
  177. group4.caption1.visible=true;
  178. group4.caption2.visible=false;
  179. }
  180. else
  181. {
  182. group4.ipt_fromdd.visible=false;
  183. group4.ipt_todd.visible=false;
  184. group4.ipt_fromentryy.visible=true;
  185. group4.ipt_toentryy.visible=true;
  186. group4.cap1.visible=true;
  187. group4.caption1.visible=false;
  188. group4.caption2.visible=true;
  189. }
  190. fReqBrgstIncmExpsCond(); //조회함수
  191. }
  192. function fReqBrgstIncmExpsCond()
  193. {
  194. ds_send_reqdata.clearData();
  195. var fdate = ds_main_search.getColumn(0, "fromdd");
  196. var todate = ds_main_search.getColumn(0, "todd");
  197. var reqflag = ds_main_search.getColumn(0, "reqflag");
  198. var fromentryy = ds_main_search.getColumn(0, "fromentryy");
  199. var toentryy = ds_main_search.getColumn(0, "toentryy");
  200. var fromdd = String(fdate).substr(4,2);
  201. var todd = String(todate).substr(4,2);
  202. var fromendyy = String(fdate).substr(0,4);
  203. var toendyy = String(todate).substr(0,4);
  204. if(reqflag=='1')
  205. {
  206. dsf_makeValue(ds_send_reqdata, "fromdd", "String",fromdd);
  207. dsf_makeValue(ds_send_reqdata, "todd", "String",todd);
  208. dsf_makeValue(ds_send_reqdata, "fromendyy", "String",fromendyy);
  209. dsf_makeValue(ds_send_reqdata, "toendyy", "String",toendyy);
  210. }
  211. else
  212. {
  213. dsf_makeValue(ds_send_reqdata, "fromentryy", "String",fromentryy);
  214. dsf_makeValue(ds_send_reqdata, "toentryy", "String",toentryy);
  215. }
  216. dsf_makeValue(ds_send_reqdata, "reqflag", "String",reqflag);
  217. if(reqflag=='1')
  218. {
  219. if(utlf_isNull(fromdd))
  220. {
  221. sysf_messageBox("조회시작일자는","I003");
  222. group4.ipt_fromdd.setFocus();
  223. return;
  224. }
  225. if(utlf_isNull(todd))
  226. {
  227. sysf_messageBox("조회종료일자는","I003");
  228. group4.ipt_todd.setFocus();
  229. return;
  230. }
  231. if(fdate > todate)
  232. {
  233. sysf_messageBox("조회시작일보다 큰 조회종료일을 입력하십시요.","I");
  234. group4.ipt_todd.setFocus();
  235. return;
  236. }
  237. var dateintval = utlf_getDateInterval(fdate+"01",todate+"31");
  238. if(dateintval > "370")
  239. {
  240. sysf_messageBox("조회기간은 최대 1년까지 할 수 있습니다","I");
  241. group4.ipt_fromdd.setFocus();
  242. return;
  243. }
  244. }
  245. else
  246. {
  247. if(utlf_isNull(fromentryy))
  248. {
  249. sysf_messageBox("조회시작연도는","I003");
  250. group4.ipt_fromentryy.setFocus();
  251. return;
  252. }
  253. if(utlf_isNull(toentryy))
  254. {
  255. sysf_messageBox("조회종료연도는","I003");
  256. group4.ipt_toentryy.setFocus();
  257. return;
  258. }
  259. if(fromentryy>toentryy)
  260. {
  261. sysf_messageBox("조회시작일보다 큰 조회종료일을 입력하십시요.","I");
  262. group4.ipt_todd.setFocus();
  263. return;
  264. }
  265. var dateintval = utlf_getDateInterval(fromentryy+"0101",toentryy+"1231");
  266. if(dateintval > "1980")
  267. {
  268. sysf_messageBox("조회기간은 최대 5년까지 할 수 있습니다","I");
  269. group4.ipt_fromdd.setFocus();
  270. return;
  271. }
  272. }
  273. var oParam = {};
  274. oParam.id = "TRSDT06201";
  275. oParam.service = "stscmcnwapp.SoclEndStats";
  276. oParam.method = "reqGetBrgstIncmExpsPresCond";
  277. oParam.inds = "req=ds_send_reqdata";
  278. oParam.outds = "ds_main_brgstincmexpspres_brgstincmexpsprescond=brgstincmexpsprescond";
  279. oParam.async = false;
  280. //oParam.callback = "cf_TRSDT06201";
  281. tranf_submit(oParam);
  282. var idxRow = ds_main_brgstincmexpspres_brgstincmexpsprescond.rowcount;
  283. var reqflag = ds_main_search.getColumn(0, "reqflag");
  284. var cond = ds_main_brgstincmexpspres_brgstincmexpsprescond.getColumn(0, "cond");
  285. if(cond == '합계')
  286. {
  287. ds_main_brgstincmexpspres_brgstincmexpsprescond.clearData();
  288. }
  289. else
  290. {
  291. if(reqflag=='2')
  292. {
  293. for(var i = 0; i < idxRow;i++)
  294. {
  295. var cond2 = ds_main_brgstincmexpspres_brgstincmexpsprescond.getColumn(i, "cond");
  296. if(utlf_isNull(cond2))
  297. {
  298. ds_main_brgstincmexpspres_brgstincmexpsprescond.deleteRow(i);
  299. }
  300. }
  301. }
  302. }
  303. }
  304. function group4_ipt_fromentryy_onchanged(obj:Calendar, e:ChangeEventInfo)
  305. {
  306. ds_main_search.setColumn(0, "fromentryy", String(obj.value).substr(0,4));
  307. }
  308. function group4_ipt_toentryy_onchanged(obj:Calendar, e:ChangeEventInfo)
  309. {
  310. ds_main_search.setColumn(0, "toentryy", String(obj.value).substr(0,4));
  311. }
  312. function group4_ipt_fromdd_onchanged(obj:Calendar, e:ChangeEventInfo)
  313. {
  314. ds_main_search.setColumn(0, "fromdd", String(obj.value).substr(0,6));
  315. }
  316. function group4_ipt_todd_onchanged(obj:Calendar, e:ChangeEventInfo)
  317. {
  318. ds_main_search.setColumn(0, "todd", String(obj.value).substr(0,6));
  319. }
  320. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  321. {
  322. fExcel();
  323. }
  324. function fExcel()
  325. {
  326. if(ds_main_brgstincmexpspres_brgstincmexpsprescond.rowcount == 0)
  327. {
  328. sysf_messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  329. return;
  330. }
  331. grdf_exportExcel(grd_brgstincmexpsprescond, "헌혈증수입지출현황", "SheetName", "true", "", "");
  332. }
  333. function group4_button2_onclick(obj:Button, e:ClickEventInfo)
  334. {
  335. fReqBrgstIncmExpsCond();
  336. }
  337. ]]></Script>
  338. </Form>
  339. </FDL>