SMAES00800_영상의학연보자료.xfdl 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMAES00800" position="absolute 0 0 1197 771" titletext="연보자료통계" oninit="SMAES00800_oninit" onload="SMAES00800_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption1" text="연보자료통계" class="tit_2" position="absolute 0 77 200 94"/>
  8. <Shape id="line1" linetype="horizontal" class="line_1" position="absolute 0 93 1195 99" anchor="left top right"/>
  9. <Button id="btn_excsave" taborder="1" text="엑셀저장" class="btn7" position="absolute 1115 70 1194 92" onclick="btn_excsave_onclick" anchor="top right"/>
  10. <Grid id="grd_list" taborder="2" binddataset="ds_main_list" useinputpanel="false" position="absolute 0 98 1195 768" autofittype="col" anchor="all">
  11. <Formats>
  12. <Format id="default">
  13. <Columns>
  14. <Column size="70"/>
  15. <Column size="112"/>
  16. <Column size="62"/>
  17. <Column size="62"/>
  18. <Column size="62"/>
  19. <Column size="62"/>
  20. <Column size="62"/>
  21. <Column size="62"/>
  22. <Column size="62"/>
  23. <Column size="62"/>
  24. <Column size="62"/>
  25. <Column size="62"/>
  26. <Column size="62"/>
  27. <Column size="62"/>
  28. <Column size="82"/>
  29. <Column size="82"/>
  30. <Column size="82"/>
  31. </Columns>
  32. <Rows>
  33. <Row size="24" band="head"/>
  34. <Row size="24" band="head"/>
  35. <Row size="24"/>
  36. <Row size="24" band="summ"/>
  37. </Rows>
  38. <Band id="head">
  39. <Cell rowspan="2" colspan="2" text="구분" taborder="undefined"/>
  40. <Cell col="2" text="2006년" taborder="undefined"/>
  41. <Cell col="3" text="2006년" taborder="undefined"/>
  42. <Cell col="4" text="2006년" taborder="undefined"/>
  43. <Cell col="5" text="2006년" taborder="undefined"/>
  44. <Cell col="6" text="2006년" taborder="undefined"/>
  45. <Cell col="7" text="2006년" taborder="undefined"/>
  46. <Cell col="8" text="2006년" taborder="undefined"/>
  47. <Cell col="9" text="2006년" taborder="undefined"/>
  48. <Cell col="10" text="2006년" taborder="undefined"/>
  49. <Cell col="11" text="2006년" taborder="undefined"/>
  50. <Cell col="12" text="2007년" taborder="undefined"/>
  51. <Cell col="13" text="2007년" taborder="undefined"/>
  52. <Cell col="14" rowspan="2" text="당해년도합계" taborder="undefined"/>
  53. <Cell col="15" rowspan="2" text="전년도합계" taborder="undefined"/>
  54. <Cell col="16" rowspan="2" text="증감(%)" taborder="undefined"/>
  55. <Cell row="1" col="2" text="3월"/>
  56. <Cell row="1" col="3" text="4월"/>
  57. <Cell row="1" col="4" text="5월"/>
  58. <Cell row="1" col="5" text="6월"/>
  59. <Cell row="1" col="6" text="7월"/>
  60. <Cell row="1" col="7" text="8월"/>
  61. <Cell row="1" col="8" text="9월"/>
  62. <Cell row="1" col="9" text="10월"/>
  63. <Cell row="1" col="10" text="11월"/>
  64. <Cell row="1" col="11" text="12월"/>
  65. <Cell row="1" col="12" text="1월"/>
  66. <Cell row="1" col="13" text="2월"/>
  67. </Band>
  68. <Band id="body">
  69. <Cell celltype="none" style="background:powderblue;background2:powderblue;" text="bind:flag" suppress="1" suppressalign="middle"/>
  70. <Cell col="1" celltype="none" style="background:powderblue;background2:powderblue;" text="bind:excuroomnm"/>
  71. <Cell col="2" displaytype="number"/>
  72. <Cell col="3" displaytype="number"/>
  73. <Cell col="4" displaytype="number"/>
  74. <Cell col="5" displaytype="number"/>
  75. <Cell col="6" displaytype="number"/>
  76. <Cell col="7" displaytype="number"/>
  77. <Cell col="8" displaytype="number"/>
  78. <Cell col="9" displaytype="number"/>
  79. <Cell col="10" displaytype="number"/>
  80. <Cell col="11" displaytype="number"/>
  81. <Cell col="12" displaytype="number"/>
  82. <Cell col="13" displaytype="number"/>
  83. <Cell col="14" displaytype="number" text="bind:prestyearsum"/>
  84. <Cell col="15" displaytype="number" text="bind:bfyearsum"/>
  85. <Cell col="16" displaytype="number" text="bind:variation"/>
  86. </Band>
  87. <Band id="summary">
  88. <Cell/>
  89. <Cell col="1" text="합 계"/>
  90. <Cell col="2" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;"/>
  91. <Cell col="3" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;"/>
  92. <Cell col="4" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;"/>
  93. <Cell col="5" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;"/>
  94. <Cell col="6" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;"/>
  95. <Cell col="7" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;"/>
  96. <Cell col="8" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;"/>
  97. <Cell col="9" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;"/>
  98. <Cell col="10" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;"/>
  99. <Cell col="11" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;"/>
  100. <Cell col="12" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;"/>
  101. <Cell col="13" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;"/>
  102. <Cell col="14" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;" text="expr:getSum(&quot;prestyearsum&quot;)"/>
  103. <Cell col="15" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;" text="expr:getSum(&quot;bfyearsum&quot;)"/>
  104. <Cell col="16" displaytype="number" style="background:#ccffccff;background2:#ccffccff;font:arial,9,bold;" text="bind:variation" mask="#0"/>
  105. </Band>
  106. </Format>
  107. </Formats>
  108. </Grid>
  109. <Div id="group1" taborder="3" position="absolute 0 25 1195 65" class="div_SA" anchor="left top right">
  110. <Layouts>
  111. <Layout>
  112. <Shape id="line2" linetype="vertical" class="line_4" position="absolute 1107 10 1113 30" anchor="top right"/>
  113. <Button id="button1" taborder="3" text="조회" class="btn1" position="absolute 1123 9 1179 31" anchor="top right" onclick="group1_button1_onclick"/>
  114. <Static id="caption2" text="조회기간 :" class="search_name" position="absolute 15 12 86 29" anchor="default"/>
  115. <Static id="caption5" text="~" class="search_no_b" position="absolute 197 13 209 30" anchor="default"/>
  116. <Static id="caption3" text="비교기간 :" class="search_name" position="absolute 352 13 423 30" anchor="default"/>
  117. <Static id="caption4" text="~" class="search_no_b" position="absolute 532 12 544 29" anchor="default"/>
  118. <Radio id="rdo_ioflag" taborder="8" columncount="4" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 755 12 1074 28" anchor="default">
  119. <Dataset id="innerdataset">
  120. <ColumnInfo>
  121. <Column id="codecolumn"/>
  122. <Column id="datacolumn"/>
  123. </ColumnInfo>
  124. <Rows>
  125. <Row>
  126. <Col id="codecolumn"/>
  127. <Col id="datacolumn">전체</Col>
  128. </Row>
  129. <Row>
  130. <Col id="codecolumn">R</Col>
  131. <Col id="datacolumn">영상</Col>
  132. </Row>
  133. <Row>
  134. <Col id="codecolumn">S</Col>
  135. <Col id="datacolumn">건진</Col>
  136. </Row>
  137. <Row>
  138. <Col id="codecolumn">C</Col>
  139. <Col id="datacolumn">어린이병원</Col>
  140. </Row>
  141. </Rows>
  142. </Dataset>
  143. </Radio>
  144. <Static id="caption7" text="구분 :" class="search_name" position="absolute 706 12 751 29" anchor="default"/>
  145. <cp_monthCal id="ipt_fromdd" titletext="monthCalendar" taborder="9" text="cp_monthCal00" scrollbars="none" visible="true" position="absolute 91 11 191 31"/>
  146. <cp_monthCal id="ipt_todd" titletext="monthCalendar" taborder="10" text="cp_monthCal00" scrollbars="none" visible="true" position="absolute 211 11 311 31"/>
  147. <cp_monthCal id="input2" titletext="monthCalendar" taborder="11" text="cp_monthCal00" scrollbars="none" position="absolute 426 11 526 31" enable="false"/>
  148. <cp_monthCal id="input1" titletext="monthCalendar" taborder="12" text="cp_monthCal00" scrollbars="none" position="absolute 546 11 646 31" enable="false"/>
  149. </Layout>
  150. </Layouts>
  151. </Div>
  152. <Static id="caption6" text="연보자료통계" class="tit_1" position="absolute 0 0 200 25"/>
  153. <Shape id="line00" class="line_1" position="absolute 0 92 1195 98" anchor="left top right"/>
  154. <Shape id="line02" class="line_1" position="absolute 0 94 1195 100" anchor="left top right"/>
  155. </Layout>
  156. </Layouts>
  157. <Objects>
  158. <Dataset id="ds_main_list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  159. <ColumnInfo>
  160. <Column id="flag" type="STRING"/>
  161. <Column id="excuroomnm" type="STRING"/>
  162. <Column id="month1" type="STRING"/>
  163. <Column id="month2" type="STRING"/>
  164. <Column id="month3" type="STRING"/>
  165. <Column id="month4" type="STRING"/>
  166. <Column id="month5" type="STRING"/>
  167. <Column id="month6" type="STRING"/>
  168. <Column id="month7" type="STRING"/>
  169. <Column id="month8" type="STRING"/>
  170. <Column id="month9" type="STRING"/>
  171. <Column id="month10" type="STRING"/>
  172. <Column id="month11" type="STRING"/>
  173. <Column id="month12" type="STRING"/>
  174. <Column id="prestyearsum" type="STRING"/>
  175. <Column id="bfyearsum" type="STRING"/>
  176. <Column id="variation" type="STRING"/>
  177. </ColumnInfo>
  178. </Dataset>
  179. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  180. <ColumnInfo>
  181. <Column id="execfromdd" type="STRING" size="256"/>
  182. <Column id="exectodd" type="STRING" size="256"/>
  183. <Column id="comparefromdd" type="STRING" size="256"/>
  184. <Column id="comparetodd" type="STRING" size="256"/>
  185. <Column id="orddeptcd" type="STRING" size="256"/>
  186. <Column id="orddrid" type="STRING" size="256"/>
  187. <Column id="execdeptcd" type="STRING" size="256"/>
  188. <Column id="execdrid" type="STRING" size="256"/>
  189. <Column id="instance1" type="STRING" size="256"/>
  190. <Column id="suppdeptcd" type="STRING" size="256"/>
  191. <Column id="ioflag" type="STRING" size="256"/>
  192. </ColumnInfo>
  193. <Rows>
  194. <Row>
  195. <Col id="execfromdd"/>
  196. <Col id="exectodd"/>
  197. <Col id="comparefromdd"/>
  198. <Col id="comparetodd"/>
  199. <Col id="orddeptcd"/>
  200. <Col id="orddrid"/>
  201. <Col id="execdeptcd"/>
  202. <Col id="execdrid"/>
  203. <Col id="instance1"/>
  204. <Col id="suppdeptcd"/>
  205. <Col id="ioflag"/>
  206. </Row>
  207. </Rows>
  208. </Dataset>
  209. <Dataset id="ds_send_globalinstance" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  210. <ColumnInfo>
  211. <Column id="instance1" type="STRING" size="256"/>
  212. </ColumnInfo>
  213. <Rows>
  214. <Row/>
  215. </Rows>
  216. </Dataset>
  217. </Objects>
  218. <Bind>
  219. <BindItem id="item4" compid="group1.rdo_ioflag" propid="value" datasetid="ds_send" columnid="ioflag"/>
  220. </Bind>
  221. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  222. * System Name :
  223. * Job Name :
  224. * Creator :
  225. * Make Date : 2015-11-13
  226. * Description :
  227. *---------------------------------------------------------------------------------------
  228. * Modify Date Modifier Modify Description
  229. *---------------------------------------------------------------------------------------
  230. * 2015-11-13 Live Converter TF->XP
  231. *
  232. *---------------------------------------------------------------------------------------
  233. ****************************************************************************************/
  234. include "com_commonxp::comm_main.xjs";
  235. include "com_basiccodexp::ZBC001.xjs";
  236. include "ast_examcurexp::AEZ0001.xjs";
  237. var arErrorCode = new HashArray();
  238. /******************************************************************
  239. * Argument :
  240. * Description : 초기화
  241. ******************************************************************/
  242. function SMAES00800_oninit(obj:Form, e:InitEventInfo)
  243. {
  244. frmf_initForm(obj);
  245. }
  246. function SMAES00800_onload(obj:Form, e:LoadEventInfo)
  247. {
  248. lf_aezfSetSuppDeptcd();
  249. ds_send_globalinstance.setColumn(0, "instance1", frmf_getParameter("AST_DEPTCD"));
  250. var fromdd = utlf_getCurrentDate().substr(0, 4) + "01";
  251. var todd = utlf_getCurrentDate();
  252. var comparefromdd = utlf_getCurrentDate().substr(0,4).toDate().getAddDate(0,"Y").getDateFormat("YYYY") + "01";
  253. var comparetodd = comparefromdd.substr(0,4) + todd.substr(4,2);
  254. ds_send.setColumn(0, "suppdeptcd", ds_send_globalinstance.getColumn(0, "instance1"));
  255. ds_send.setColumn(0, "execfromdd", fromdd);
  256. ds_send.setColumn(0, "exectodd", todd);
  257. ds_send.setColumn(0, "comparefromdd",comparefromdd);
  258. ds_send.setColumn(0, "comparetodd",comparetodd);
  259. ds_send.setColumn(0, "ioflag","");
  260. ds_main_list.clearData();
  261. //조회기간 달력 set
  262. group1.ipt_fromdd.setData(fromdd);
  263. group1.ipt_todd.setData(todd);
  264. //비교기간 달력 set
  265. group1.input2.setData(comparefromdd);
  266. group1.input1.setData(comparetodd);
  267. //조회기간 event
  268. group1.ipt_fromdd.setCallEvent("fn_Cal");
  269. group1.ipt_todd.setCallEvent("fn_toCal");
  270. //비교기간 event
  271. group1.input2.setCallEvent("fn_compareCal");
  272. group1.input1.setCallEvent("fn_compareToCal");
  273. setTitle();
  274. }
  275. /******************************************************************
  276. * Argument :
  277. * Description : 조회기간(fromdd) event
  278. ******************************************************************/
  279. function fn_Cal(){
  280. var execfromdd = group1.ipt_fromdd.getData();
  281. var exectodd = group1.ipt_todd.getData();
  282. var execFrom = (execfromdd + "01").toDate();
  283. var execTo = (exectodd + "01").toDate();
  284. var setExecFromdd = "";
  285. var setCompareFromdd = "";
  286. if( execFrom < execTo.getAddDate(-11, "M") )
  287. {
  288. sysf_messageBox("1년이상의 자료는 검색할수 없습니다.", "I");
  289. execFrom = execTo;
  290. }
  291. setExecFromdd = execFrom.getDateFormat("YYYYMM");
  292. ds_send.setColumn(0, "execfromdd", setExecFromdd);
  293. group1.ipt_fromdd.setData(setExecFromdd);
  294. setCompareFromdd = execFrom.getAddDate(-12, "M");
  295. setCompareFromdd = setCompareFromdd.getDateFormat("YYYYMM");
  296. ds_send.setColumn(0, "comparefromdd", setCompareFromdd);
  297. group1.input2.setData(setCompareFromdd);
  298. if( execFrom > execTo ){
  299. sysf_messageBox("시작일이 종료일보다 클 수 없습니다.", "I");
  300. group1.ipt_fromdd.setFocus();
  301. return;
  302. }
  303. setTitle();
  304. }
  305. /******************************************************************
  306. * Argument :
  307. * Description : 조회기간(todd) event
  308. ******************************************************************/
  309. function fn_toCal(){
  310. var execfromdd = group1.ipt_fromdd.getData();
  311. var exectodd = group1.ipt_todd.getData();
  312. var execFrom = (execfromdd + "01").toDate();
  313. var execTo = (exectodd + "01").toDate();
  314. var setExecTodd = "";
  315. var setCompareTodd = "";
  316. if( execFrom.getAddDate(11, "M") < execTo )
  317. {
  318. sysf_messageBox("1년이상의 자료는 검색할수 없습니다.", "I");
  319. execTo = execFrom;
  320. }
  321. setExecTodd = execTo.getDateFormat("YYYYMM");
  322. ds_send.setColumn(0, "exectodd", setExecTodd);
  323. group1.ipt_todd.setData(setExecTodd); //종료일
  324. setCompareTodd = execTo.getAddDate(-12, "M");
  325. setCompareTodd = setCompareTodd.getDateFormat("YYYYMM");
  326. ds_send.setColumn(0, "comparetodd", setCompareTodd);
  327. group1.input1.setData(setCompareTodd); //비교종료일
  328. if( execfromdd > exectodd ){
  329. sysf_messageBox("종료일이 시작일보다 작을 수 없습니다..", "I");
  330. group1.ipt_todd.setFocus();
  331. return;
  332. }
  333. setTitle();
  334. }
  335. /******************************************************************
  336. * Argument :
  337. * Description : 비교기간(fromdd) event
  338. ******************************************************************/
  339. function fn_compareCal(){
  340. var comparefromdd = group1.input2.getData();
  341. var comparetodd = group1.input1.getData();
  342. var cFromdd = (comparefromdd + "01").toDate();
  343. var cTodd = (comparetodd + "01").toDate();
  344. var setCompareFromdd = "";
  345. var setExecFromdd = "";
  346. if( cFromdd < cTodd.getAddDate(-11, "M") )
  347. {
  348. sysf_messageBox("1년이상의 자료는 검색할수 없습니다.", "I");
  349. cFromdd = cTodd;
  350. }
  351. setCompareFromdd = cFromdd.getDateFormat("YYYYMM");
  352. ds_send.setColumn(0, "execfromdd", setCompareFromdd);
  353. group1.input2.setData(setCompareFromdd);
  354. setExecFromdd = execTo.getAddDate(-12, "M");
  355. setExecFromdd = setExecFromdd.getDateFormat("YYYYMM");
  356. ds_send.setColumn(0, "comparefromdd", setExecFromdd);
  357. group1.input1.setData(setExecFromdd);
  358. setTitle();
  359. }
  360. /******************************************************************
  361. * Argument :
  362. * Description : 비교기간(todd) event
  363. ******************************************************************/
  364. function fn_compareToCal(){
  365. var comparefromdd = group1.input2.getData();
  366. var comparetodd = group1.input1.getData();
  367. var cFromdd = (comparefromdd + "01").toDate();
  368. var cTodd = (comparetodd + "01").toDate();
  369. var setCompareTodd = "";
  370. var setExecTodd = "";
  371. if( cFromdd.getAddDate(-11, "M") < cTodd )
  372. {
  373. sysf_messageBox("1년이상의 자료는 검색할수 없습니다.", "I");
  374. cTodd = cFromdd;
  375. }
  376. setCompareTodd = cFromdd.getDateFormat("YYYYMM");
  377. //ds_send.setColumn(0, "execfromdd", setCompareTodd);
  378. ds_send.setColumn(0, "comparefromdd", setCompareTodd);
  379. group1.input2.setData(setCompareTodd);
  380. setExecTodd = cTodd.getAddDate(-12, "M");
  381. setExecTodd = setExecTodd.getDateFormat("YYYYMM");
  382. ds_send.setColumn(0, "comparetodd", setExecTodd);
  383. group1.input1.setData(setExecTodd);
  384. setTitle();
  385. }
  386. /******************************************************************
  387. * Argument :
  388. * Description : setTitle
  389. ******************************************************************/
  390. function setTitle() {
  391. ds_main_list.clearData();
  392. // 그리드 초기화
  393. var mergeCol = grd_list.getCellCount("Head");
  394. if( mergeCol != 28 ){
  395. mergeCol = 29 - mergeCol;
  396. grd_list.splitContentsCell("Head", 0, 2, 0, mergeCol, true);
  397. for( var j = mergeCol; j <= 13; j++ ){
  398. grd_list.setFormatColProperty(j, "size", 62);
  399. }
  400. }
  401. var stYearMonth = group1.ipt_fromdd.getData() + "01";
  402. var dtYearMonth = stYearMonth.toDate();
  403. var stEndMonth = group1.ipt_todd.getData() + "01";
  404. var dtEndMonth = stEndMonth.toDate();;
  405. var fromYear = dtYearMonth.getDateFormat("YYYY");
  406. var toYear = dtEndMonth.getDateFormat("YYYY");
  407. var colIdx = 16;
  408. var colNum = 2;
  409. for( var i = 0; i < 12; i++ ){
  410. var stYear = dtYearMonth.getDateFormat("YYYY");
  411. var stMonth = dtYearMonth.getDateFormat("MM");
  412. if( dtYearMonth.getDateFormat("YYYYMM") <= dtEndMonth.getDateFormat("YYYYMM") ){
  413. grd_list.setCellProperty("Head", i+1, "text", stYear + "년");
  414. grd_list.setCellProperty("Head", colIdx, "text", stMonth + "월");
  415. } else {
  416. grd_list.setFormatColProperty(colNum, "size", 0);
  417. }
  418. colIdx = colIdx + 1;
  419. colNum = colNum + 1;
  420. dtYearMonth.getAddDate(1, "M");
  421. }
  422. var stNum = 0;
  423. var dtNum = 0;
  424. var lastCol = 0;
  425. if( fromYear == toYear ){
  426. stNum = utlf_diffMonth(stYearMonth, stEndMonth) + 2;
  427. grd_list.mergeContentsCell("Head" , 0, 2, 0, stNum, 2, false);
  428. } else {
  429. stNum = utlf_diffMonth(stYearMonth, fromYear+"1201") + 3 ;
  430. dtNum = utlf_diffMonth(toYear+"0101", stEndMonth);
  431. lastCol = stNum + dtNum;
  432. grd_list.mergeContentsCell("Head" , 0, stNum, 0, lastCol, stNum, false);
  433. grd_list.mergeContentsCell("Head" , 0, 2, 0, stNum - 1, 2, false);
  434. }
  435. }
  436. /******************************************************************
  437. * Argument :
  438. * Description : 조회 button event
  439. ******************************************************************/
  440. function group1_button1_onclick(obj:Button, e:ClickEventInfo)
  441. {
  442. frmf_openLoadingBar("영상의학 연보 자료 조회 중입니다...");
  443. var oParam = {};
  444. oParam.id = "TRAES00801";
  445. oParam.service = "examcurestatsapp.ImgMediSc";
  446. oParam.method = "reqGetYYReptData";
  447. oParam.inds = "req=ds_send";
  448. oParam.outds = "ds_main_list=item";
  449. oParam.async = false;
  450. oParam.callback = "cf_TRAES00801";
  451. tranf_submit(oParam);
  452. var nRow = ds_main_list.rowcount;
  453. var prestyearsum = ds_main_list.getSum("prestyearsum");
  454. var bfyearsum = ds_main_list.getSum("bfyearsum");
  455. var variation = 0;
  456. if( bfyearsum == 0 ) {
  457. variation = (( eval(prestyearsum) - eval(bfyearsum))) * 100;
  458. } else {
  459. variation = (( eval(prestyearsum) - eval(bfyearsum) ) / eval(bfyearsum)) * 100;
  460. }
  461. variation = variation.toString().getRound(-1,"HALF_UP");
  462. grd_list.setCellProperty("summ", 16,"text", variation);
  463. frmf_closeLoadingBar() ;//처리중 화면을 close한다.
  464. }
  465. function cf_TRAES00801(sSvcId, nErrorCode, sErrorMsg) {
  466. arErrorCode.push(sSvcId, nErrorCode);
  467. ds_main_list.updateColID("systkey", "excuroomnm");
  468. var colid = 2;
  469. var sum = 0;
  470. for(var i = 0; i < ds_main_list.colcount ; i++) {
  471. if(ds_main_list.getColID(i).substr(0,5) == "month") {
  472. grd_list.setCellProperty("body",colid,"text","bind:"+ds_main_list.getColID(i));
  473. sum = ds_main_list.getSum(ds_main_list.getColID(i));
  474. grd_list.setCellProperty("summ", colid,"text",sum);
  475. colid++;
  476. }
  477. }
  478. }
  479. /******************************************************************
  480. * Argument :
  481. * Description : excel 저장
  482. ******************************************************************/
  483. function btn_excsave_onclick(obj:Button, e:ClickEventInfo)
  484. {
  485. if( ds_main_list.rowcount > 1 ){
  486. grdf_exportExcel(grd_list, "연보자료통계", "연보자료통계", false, "", "user", false);
  487. } else {
  488. sysf_messageBox("조회된 데이터가 ", "I004");
  489. }
  490. }
  491. ]]></Script>
  492. </Form>
  493. </FDL>