SMSDT07100_사회사업장기이식상담실적A.xfdl 19 KB

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