SMLLS00800_장비별검사건수.xfdl 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMLLS00800" position="absolute 0 0 1256 805" titletext="장비별검사건수" onload="SMLLS00800_onload" oninit="SMLLS00800_oninit">
  5. <Layouts>
  6. <Layout>
  7. <Tab id="swt_statflag" class="sw_box" position="absolute 0 77 1256 805" anchor="all" positiontype="position" onchanged="swt_statflag_onchanged">
  8. <Tabpages>
  9. <Tabpage id="dd" text="일별 통계">
  10. <Layouts>
  11. <Layout>
  12. <Grid id="grd_dd" position="absolute 0 0 1256 701" style="align:right middle;" anchor="all" positiontype="position" binddataset="ds_grid_grd_dd">
  13. <Formats>
  14. <Format id="default">
  15. <Columns>
  16. <Column size="30" band="left"/>
  17. <Column size="150" band="left"/>
  18. <Column size="40"/>
  19. <Column size="40"/>
  20. <Column size="40"/>
  21. <Column size="40"/>
  22. <Column size="40"/>
  23. <Column size="40"/>
  24. <Column size="40"/>
  25. <Column size="40"/>
  26. <Column size="40"/>
  27. <Column size="40"/>
  28. <Column size="40"/>
  29. <Column size="40"/>
  30. <Column size="40"/>
  31. <Column size="40"/>
  32. <Column size="40"/>
  33. <Column size="40"/>
  34. <Column size="40"/>
  35. <Column size="40"/>
  36. <Column size="40"/>
  37. <Column size="40"/>
  38. <Column size="40"/>
  39. <Column size="40"/>
  40. <Column size="40"/>
  41. <Column size="40"/>
  42. <Column size="40"/>
  43. <Column size="40"/>
  44. <Column size="40"/>
  45. <Column size="40"/>
  46. <Column size="40"/>
  47. <Column size="40"/>
  48. <Column size="40"/>
  49. <Column size="60"/>
  50. </Columns>
  51. <Rows>
  52. <Row size="22" band="head"/>
  53. <Row size="20"/>
  54. </Rows>
  55. <Band id="head">
  56. <Cell text="No."/>
  57. <Cell col="1" text="검사항목"/>
  58. <Cell col="2" text="01"/>
  59. <Cell col="3" text="02"/>
  60. <Cell col="4" text="03"/>
  61. <Cell col="5" text="04"/>
  62. <Cell col="6" text="05"/>
  63. <Cell col="7" text="06"/>
  64. <Cell col="8" text="07"/>
  65. <Cell col="9" text="08"/>
  66. <Cell col="10" text="09"/>
  67. <Cell col="11" text="10"/>
  68. <Cell col="12" text="11"/>
  69. <Cell col="13" text="12"/>
  70. <Cell col="14" text="13"/>
  71. <Cell col="15" text="14"/>
  72. <Cell col="16" text="15"/>
  73. <Cell col="17" text="16"/>
  74. <Cell col="18" text="17"/>
  75. <Cell col="19" text="18"/>
  76. <Cell col="20" text="19"/>
  77. <Cell col="21" text="20"/>
  78. <Cell col="22" text="21"/>
  79. <Cell col="23" text="22"/>
  80. <Cell col="24" text="23"/>
  81. <Cell col="25" text="24"/>
  82. <Cell col="26" text="25"/>
  83. <Cell col="27" text="26"/>
  84. <Cell col="28" text="27"/>
  85. <Cell col="29" text="28"/>
  86. <Cell col="30" text="29"/>
  87. <Cell col="31" text="30"/>
  88. <Cell col="32" text="31"/>
  89. <Cell col="33" text="Total"/>
  90. </Band>
  91. <Band id="body">
  92. <Cell celltype="head" displaytype="normal" expr="expr:currow+1"/>
  93. <Cell col="1" style="align:left middle;" text="bind:tclsscrnnm"/>
  94. <Cell col="2" displaytype="number" style="align:right;" text="bind:d01"/>
  95. <Cell col="3" displaytype="number" style="align:right;" text="bind:d02"/>
  96. <Cell col="4" displaytype="number" style="align:right;" text="bind:d03"/>
  97. <Cell col="5" displaytype="normal" style="align:right;" text="bind:d04"/>
  98. <Cell col="6" displaytype="number" style="align:right;" text="bind:d05"/>
  99. <Cell col="7" displaytype="number" style="align:right;" text="bind:d06"/>
  100. <Cell col="8" displaytype="number" style="align:right;" text="bind:d07"/>
  101. <Cell col="9" displaytype="number" style="align:right;" text="bind:d08"/>
  102. <Cell col="10" displaytype="number" style="align:right;" text="bind:d09"/>
  103. <Cell col="11" displaytype="number" style="align:right;" text="bind:d10"/>
  104. <Cell col="12" displaytype="number" style="align:right;" text="bind:d11"/>
  105. <Cell col="13" displaytype="number" style="align:right;" text="bind:d12"/>
  106. <Cell col="14" displaytype="number" style="align:right;" text="bind:d13"/>
  107. <Cell col="15" displaytype="number" style="align:right;" text="bind:d14"/>
  108. <Cell col="16" displaytype="number" style="align:right;" text="bind:d15"/>
  109. <Cell col="17" displaytype="number" style="align:right;" text="bind:d16"/>
  110. <Cell col="18" displaytype="number" style="align:right;" text="bind:d17"/>
  111. <Cell col="19" displaytype="number" style="align:right;" text="bind:d18"/>
  112. <Cell col="20" displaytype="number" style="align:right;" text="bind:d19"/>
  113. <Cell col="21" displaytype="number" style="align:right;" text="bind:d20"/>
  114. <Cell col="22" displaytype="number" style="align:right;" text="bind:d21"/>
  115. <Cell col="23" displaytype="number" style="align:right;" text="bind:d22"/>
  116. <Cell col="24" displaytype="number" style="align:right;" text="bind:d23"/>
  117. <Cell col="25" displaytype="number" style="align:right;" text="bind:d24"/>
  118. <Cell col="26" displaytype="number" style="align:right;" text="bind:d25"/>
  119. <Cell col="27" displaytype="number" style="align:right;" text="bind:d26"/>
  120. <Cell col="28" displaytype="number" style="align:right;" text="bind:d27"/>
  121. <Cell col="29" displaytype="number" style="align:right;" text="bind:d28"/>
  122. <Cell col="30" displaytype="number" style="align:right;" text="bind:d29"/>
  123. <Cell col="31" displaytype="number" style="align:right;" text="bind:d30"/>
  124. <Cell col="32" displaytype="number" style="align:right;" text="bind:d31"/>
  125. <Cell col="33" displaytype="number" style="align:right;" text="bind:total"/>
  126. <Cell col="34"/>
  127. </Band>
  128. </Format>
  129. </Formats>
  130. </Grid>
  131. </Layout>
  132. </Layouts>
  133. </Tabpage>
  134. <Tabpage id="mm" text="월별 통계">
  135. <Layouts>
  136. <Layout>
  137. <Grid id="grd_mm" position="absolute 0 0 1256 701" style="align:right middle;" anchor="all" positiontype="position" autofittype="col" binddataset="ds_grid_grd_mm">
  138. <Formats>
  139. <Format id="default">
  140. <Columns>
  141. <Column size="30"/>
  142. <Column size="315"/>
  143. <Column size="70"/>
  144. <Column size="70"/>
  145. <Column size="70"/>
  146. <Column size="70"/>
  147. <Column size="70"/>
  148. <Column size="70"/>
  149. <Column size="70"/>
  150. <Column size="70"/>
  151. <Column size="70"/>
  152. <Column size="70"/>
  153. <Column size="70"/>
  154. <Column size="70"/>
  155. <Column size="70"/>
  156. </Columns>
  157. <Rows>
  158. <Row size="22" band="head"/>
  159. <Row size="20"/>
  160. </Rows>
  161. <Band id="head">
  162. <Cell text="No."/>
  163. <Cell col="1" text="검사항목"/>
  164. <Cell col="2" text="01"/>
  165. <Cell col="3" text="02"/>
  166. <Cell col="4" text="03"/>
  167. <Cell col="5" text="04"/>
  168. <Cell col="6" text="05"/>
  169. <Cell col="7" text="06"/>
  170. <Cell col="8" text="07"/>
  171. <Cell col="9" text="08"/>
  172. <Cell col="10" text="09"/>
  173. <Cell col="11" text="10"/>
  174. <Cell col="12" text="11"/>
  175. <Cell col="13" text="12"/>
  176. <Cell col="14" text="Total"/>
  177. </Band>
  178. <Band id="body">
  179. <Cell celltype="head" expr="expr:currow+1"/>
  180. <Cell col="1" style="align:left middle;" text="bind:tclsscrnnm"/>
  181. <Cell col="2" displaytype="number" style="align:right;" text="bind:d01"/>
  182. <Cell col="3" displaytype="number" style="align:right;" text="bind:d02"/>
  183. <Cell col="4" displaytype="number" style="align:right;" text="bind:d03"/>
  184. <Cell col="5" displaytype="number" style="align:right;" text="bind:d04"/>
  185. <Cell col="6" displaytype="number" style="align:right;" text="bind:d05"/>
  186. <Cell col="7" displaytype="number" style="align:right;" text="bind:d06"/>
  187. <Cell col="8" displaytype="number" style="align:right;" text="bind:d07"/>
  188. <Cell col="9" displaytype="number" style="align:right;" text="bind:d08"/>
  189. <Cell col="10" displaytype="number" style="align:right;" text="bind:d09"/>
  190. <Cell col="11" displaytype="number" style="align:right;" text="bind:d10"/>
  191. <Cell col="12" displaytype="number" style="align:right;" text="bind:d11"/>
  192. <Cell col="13" displaytype="number" style="align:right;" text="bind:d12"/>
  193. <Cell col="14" displaytype="number" style="align:right;" text="bind:total"/>
  194. </Band>
  195. </Format>
  196. </Formats>
  197. </Grid>
  198. </Layout>
  199. </Layouts>
  200. </Tabpage>
  201. <Tabpage id="yy" text="연별 통계">
  202. <Layouts>
  203. <Layout>
  204. <Grid id="grd_yy" position="absolute 0 0 1256 701" style="align:center middle;" anchor="all" positiontype="position">
  205. <Formats>
  206. <Format id="default"/>
  207. </Formats>
  208. </Grid>
  209. </Layout>
  210. </Layouts>
  211. </Tabpage>
  212. </Tabpages>
  213. </Tab>
  214. <Static id="caption6" class="tit_1" position="absolute 2 2 147 27" anchor="default" positiontype="position" text="장비별 검사 건수"/>
  215. <Button id="btn_print" class="btn6" visible="false" position="absolute 1200 0 1256 20" anchor="top right" positiontype="position" text="출력" onlbuttonup="btn_print_onlbuttonup"/>
  216. <Button id="btn_excel" class="btn7" position="absolute 1154 0 1256 20" anchor="top right" positiontype="position" text="EXCEL저장" onclick="btn_excel_onclick"/>
  217. <Div id="grp_sea" anchor="left top right" taborder="6" style="align:center top;" class="div_SA2" position="absolute 0 28 1256 70">
  218. <Layouts>
  219. <Layout width="1256" height="42">
  220. <Static id="caption4" text="통계 희망일" class="search_name" position="absolute 8 10 118 30" anchor="default"/>
  221. <Calendar id="ipt_workfromdd" taborder="1" class="input_search" position="absolute 99 10 189 30" anchor="default" dateformat="yyyy-MM-dd" value="null"/>
  222. <Static id="caption9" text="~" position="absolute 189 10 205 30" anchor="default" style="align:center middle;"/>
  223. <Calendar id="ipt_worktodd" taborder="2" class="input_search" position="absolute 205 10 295 30" anchor="default" dateformat="yyyy-MM-dd" value="null"/>
  224. <Static id="caption1" text="검사시행부서" class="search_name" position="absolute 319 10 432 30" anchor="default"/>
  225. <Combo id="combo1" taborder="3" position="absolute 418 10 520 30" anchor="default" innerdataset="@ds_init_lb0111" codecolumn="cd" datacolumn="nm" onitemchanged="grp_sea_combo1_onitemchanged"/>
  226. <Static id="caption5" text="장비" class="search_name" position="absolute 544 10 605 30" anchor="default"/>
  227. <Combo id="cmb_rtnabnflag" taborder="4" position="absolute 591 10 758 30" anchor="default" innerdataset="@ds_init_lb1111" codecolumn="cd" datacolumn="nm"/>
  228. <Button id="btn_ref" taborder="5" text="조회" onlbuttonup="btn_ref_onlbuttonup" class="btn1" position="absolute 1189 10 1245 30" anchor="top right"/>
  229. </Layout>
  230. </Layouts>
  231. </Div>
  232. </Layout>
  233. </Layouts>
  234. <Objects>
  235. <Dataset id="ds_init_lb0111" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  236. <ColumnInfo>
  237. <Column id="cd" type="STRING" size="256"/>
  238. <Column id="nm" type="STRING" size="256"/>
  239. </ColumnInfo>
  240. </Dataset>
  241. <Dataset id="ds_init_lb1111" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  242. <ColumnInfo>
  243. <Column id="cd" type="STRING" size="256"/>
  244. <Column id="nm" type="STRING" size="256"/>
  245. </ColumnInfo>
  246. </Dataset>
  247. <Dataset id="ds_grid_grd_dd" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" onrowposchanged="ds_grid_grd_rslt_onrowposchanged">
  248. <ColumnInfo>
  249. <column id="tclsscrnnm" type="STRING" size="256"/>
  250. <column id="tclsprntnm" type="STRING" size="256"/>
  251. <column id="d01" type="STRING" size="256"/>
  252. <column id="d02" type="STRING" size="256"/>
  253. <column id="d03" type="STRING" size="256"/>
  254. <column id="d04" type="STRING" size="256"/>
  255. <column id="d05" type="STRING" size="256"/>
  256. <column id="d06" type="STRING" size="256"/>
  257. <column id="d07" type="STRING" size="256"/>
  258. <column id="d08" type="STRING" size="256"/>
  259. <column id="d09" type="STRING" size="256"/>
  260. <column id="d10" type="STRING" size="256"/>
  261. <column id="d11" type="STRING" size="256"/>
  262. <column id="d12" type="STRING" size="256"/>
  263. <column id="d13" type="STRING" size="256"/>
  264. <column id="d14" type="STRING" size="256"/>
  265. <column id="d15" type="STRING" size="256"/>
  266. <column id="d16" type="STRING" size="256"/>
  267. <column id="d17" type="STRING" size="256"/>
  268. <column id="d18" type="STRING" size="256"/>
  269. <column id="d19" type="STRING" size="256"/>
  270. <column id="d20" type="STRING" size="256"/>
  271. <column id="d21" type="STRING" size="256"/>
  272. <column id="d22" type="STRING" size="256"/>
  273. <column id="d23" type="STRING" size="256"/>
  274. <column id="d24" type="STRING" size="256"/>
  275. <column id="d25" type="STRING" size="256"/>
  276. <column id="d26" type="STRING" size="256"/>
  277. <column id="d27" type="STRING" size="256"/>
  278. <column id="d28" type="STRING" size="256"/>
  279. <column id="d29" type="STRING" size="256"/>
  280. <column id="d30" type="STRING" size="256"/>
  281. <column id="d31" type="STRING" size="256"/>
  282. <column id="total" type="STRING" size="256"/>
  283. </ColumnInfo>
  284. </Dataset>
  285. <Dataset id="ds_grid_grd_mm" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" onrowposchanged="ds_grid_grd_rslt_onrowposchanged">
  286. <ColumnInfo>
  287. <column id="tclsscrnnm" type="STRING" size="256"/>
  288. <column id="tclsprntnm" type="STRING" size="256"/>
  289. <column id="d01" type="STRING" size="256"/>
  290. <column id="d02" type="STRING" size="256"/>
  291. <column id="d03" type="STRING" size="256"/>
  292. <column id="d04" type="STRING" size="256"/>
  293. <column id="d05" type="STRING" size="256"/>
  294. <column id="d06" type="STRING" size="256"/>
  295. <column id="d07" type="STRING" size="256"/>
  296. <column id="d08" type="STRING" size="256"/>
  297. <column id="d09" type="STRING" size="256"/>
  298. <column id="d10" type="STRING" size="256"/>
  299. <column id="d11" type="STRING" size="256"/>
  300. <column id="d12" type="STRING" size="256"/>
  301. <Column id="total" type="STRING" size="256"/>
  302. </ColumnInfo>
  303. </Dataset>
  304. <Dataset id="ds_temp_header" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" onrowposchanged="ds_grid_grd_rslt_onrowposchanged">
  305. <ColumnInfo>
  306. <Column id="colref" type="STRING" size="256"/>
  307. <Column id="caption" type="STRING" size="256"/>
  308. <Column id="type" type="STRING" size="256"/>
  309. </ColumnInfo>
  310. </Dataset>
  311. <Dataset id="ds_temp_row" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" onrowposchanged="ds_grid_grd_rslt_onrowposchanged"/>
  312. <Dataset id="ds_data_yystats" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" onrowposchanged="ds_grid_grd_rslt_onrowposchanged">
  313. <ColumnInfo>
  314. <Column id="tclsscrnnm" type="STRING" size="255"/>
  315. <Column id="tclsprntnm" type="STRING" size="255"/>
  316. <Column id="rsltdispseq" type="STRING" size="255"/>
  317. <Column id="instcd" type="STRING" size="255"/>
  318. <Column id="lastreptdt" type="STRING" size="255"/>
  319. <Column id="stats" type="STRING" size="255"/>
  320. </ColumnInfo>
  321. </Dataset>
  322. <Dataset id="ds_grid_grd_yy" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" onrowposchanged="ds_grid_grd_rslt_onrowposchanged"/>
  323. </Objects>
  324. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  325. * System Name :
  326. * Job Name :
  327. * Creator :
  328. * Make Date : 2015-11-13
  329. * Description :
  330. *---------------------------------------------------------------------------------------
  331. * Modify Date Modifier Modify Description
  332. *---------------------------------------------------------------------------------------
  333. * 2015-11-13 Live Converter TF->XP
  334. *
  335. *---------------------------------------------------------------------------------------
  336. ****************************************************************************************/
  337. include "com_commonxp::comm_main.xjs";
  338. include "lis_commonxp::LZZ001.xjs";
  339. include "lis_commonxp::LLZ001.xjs";
  340. function SMLLS00800_oninit(obj:Form, e:InitEventInfo)
  341. {
  342. //폼 초기화 함수
  343. frmf_initForm(obj);
  344. }
  345. function SMLLS00800_onload(obj:Form, e:LoadEventInfo)
  346. {
  347. lf_getDbDeptcd("0111|1111|","cbf_SMLLS00800");
  348. lf_setInit(obj, e); //초기화 함수 호출
  349. }
  350. //초기화 함수
  351. function lf_setInit(obj, e) {
  352. }
  353. //통계희망일, 검사시행부서, 장비, 조회구분(일,월,연) 에 따른 조회
  354. function lf_getStats() {
  355. var refflag = "";
  356. var sDsName = "";
  357. if(swt_statflag.tabindex == 0) {
  358. refflag = "d";
  359. sDsName = "ds_grid_grd_dd";
  360. } else if(swt_statflag.tabindex == 1) {
  361. refflag = "m";
  362. sDsName = "ds_grid_grd_mm";
  363. } else if(swt_statflag.tabindex == 2) {
  364. lf_getYYStats();
  365. return;
  366. }
  367. var sectcd = grp_sea.combo1.value; // 계코드
  368. var testeqmtcd = grp_sea.cmb_rtnabnflag.value; // 장비코드
  369. var statshopefromdd = grp_sea.ipt_workfromdd.value; // 통계희망시작일
  370. var statshopetodd = grp_sea.ipt_worktodd.value; // 통계희망종료일
  371. var sInDsName = dsf_createDsRow("ds_temp_search"
  372. , [{col: "sectcd", val:sectcd }
  373. , {col: "testeqmtcd", val:testeqmtcd }
  374. , {col: "statshopefromdd", val:statshopefromdd }
  375. , {col: "statshopetodd", val:statshopetodd }
  376. , {col: "refflag", val:refflag }
  377. ]);
  378. var oParam = {};
  379. oParam.id = "TRLLS00801";
  380. oParam.service = "statsmngtapp.GeneralTestStatsRefMngt";
  381. oParam.method = "reqGetEqmtTestStats";
  382. oParam.inds = "cond="+sInDsName;
  383. oParam.outds = sDsName + "=getEqmtTestStats";
  384. oParam.async = false;
  385. oParam.callback = "cbf_SMLLS00800";
  386. tranf_submit(oParam);
  387. }
  388. //연별 통계 조회
  389. function lf_getYYStats() {
  390. ds_grid_grd_yy.clearData(); // 연별그리드 초기화
  391. var sectcd = grp_sea.combo1.value; // 계코드
  392. var testeqmtcd = grp_sea.cmb_rtnabnflag.value; // 장비코드
  393. var statshopefromdd = grp_sea.ipt_workfromdd.value; // 통계희망시작일
  394. var statshopetodd = grp_sea.ipt_worktodd.value; // 통계희망종료일
  395. var sInDsName = dsf_createDsRow("ds_temp_search"
  396. , [{col: "sectcd", val:sectcd }
  397. , {col: "testeqmtcd", val:testeqmtcd }
  398. , {col: "statshopefromdd", val:statshopefromdd }
  399. , {col: "statshopetodd", val:statshopetodd }
  400. ]);
  401. ds_temp_header.clearData();
  402. ds_data_yystats.clearData();
  403. var oParam = {};
  404. oParam.id = "TRLLS00802";
  405. oParam.service = "statsmngtapp.GeneralTestStatsRefMngt";
  406. oParam.method = "reqGetEqmtTestYYStats";
  407. oParam.inds = "cond="+sInDsName;
  408. oParam.outds = "ds_temp_header=header ds_grid_grd_yy=row ds_data_yystats=getEqmtTestYYStats";
  409. oParam.async = false;
  410. oParam.callback = "cbf_SMLLS00800";
  411. tranf_submit(oParam);
  412. }
  413. //연도별 통계 Total계산
  414. function lf_getTotal() {
  415. var r=0;
  416. var i=0;
  417. //Column 합계
  418. var colsum = 0;
  419. var rowsum = 0;
  420. for(r = 0; r < ds_grid_grd_yy.rowcount; r++) {
  421. colsum = 0;
  422. for(i = 0; i < ds_grid_grd_yy.colcount; i++) {
  423. if(utlf_isDigit(ds_grid_grd_yy.getColumn(r, i))) {
  424. colsum += toNumber(ds_grid_grd_yy.getColumn(r, i));
  425. }
  426. }
  427. ds_grid_grd_yy.setColumn(r, "total", colsum);
  428. }
  429. //Row 합계
  430. var addRw = ds_grid_grd_yy.addRow();
  431. for(i = 0; i <= ds_grid_grd_yy.colcount; i++) {
  432. rowsum = 0;
  433. for(r = 0; r < ds_grid_grd_yy.rowcount-1; r++) {
  434. if(!utlf_isNull(ds_grid_grd_yy.getColumn(r, i))) {
  435. rowsum += toNumber(ds_grid_grd_yy.getColumn(r, i));
  436. }
  437. }
  438. if(utlf_isNull(rowsum)){
  439. ds_grid_grd_yy.setColumn(addRw, i, "Total");
  440. } else {
  441. ds_grid_grd_yy.setColumn(addRw, i, rowsum);
  442. }
  443. }
  444. swt_statflag.yy.grd_yy.redraw();
  445. }
  446. // 엑셀 저장
  447. function lf_exeSaveToExcel() {
  448. var pGridId = "";
  449. var pGridNm = "";
  450. if(swt_statflag.tabindex == 0){
  451. pGridId = swt_statflag.dd.grd_dd;
  452. pGridNm = "일별통계";
  453. }else if(swt_statflag.tabindex == 1){
  454. pGridId = swt_statflag.mm.grd_mm;
  455. pGridNm = "월별통계";
  456. }else{
  457. pGridId = swt_statflag.yy.grd_yy;
  458. pGridNm = "연별통계";
  459. }
  460. grdf_exportExcel(pGridId, lf_lisGetTitle(this) + "_" + pGridNm, "sheet1", false);
  461. }
  462. // callback 함수
  463. function cbf_SMLLS00800(strSvcID, nErrorCode, strErrorMag) {
  464. if(nErrorCode != 0) {
  465. sysf_messageBox("ID: "+ strSvcID + " Error: " + strErrorMag, "E009", "");
  466. }else{
  467. switch(strSvcID){
  468. case "TRLZZ00101":
  469. var toDay = utlf_getCurrentDate();
  470. grp_sea.ipt_workfromdd.value = toDay; // 통계희망시작일 = 현재일자
  471. grp_sea.ipt_worktodd.value = toDay; // 통계희망종료일 = 현재일자
  472. grp_sea.combo1.value = "00"; // 계코드를 '전체'로 지정
  473. grp_sea.cmb_rtnabnflag.value = "00"; // 장비코드를 '전체'로 지정
  474. swt_statflag.tabindex = 0; // 초기시 일별그리드 표시
  475. break;
  476. case "TRLLS00801":
  477. break;
  478. case "TRLLS00802":
  479. //caption 정보
  480. var gridCaption = ds_temp_header.getColumn(0, "caption");
  481. if(utlf_isNull(gridCaption)) return;
  482. var gridColCapArray = gridCaption.split("^");
  483. //ref(Column) 정보
  484. var gridColRef = ds_temp_header.getColumn(0, "colref");
  485. var gridColRefArray = gridColRef.split("^");
  486. //type 정보
  487. var gridColType = ds_temp_header.getColumn(0, "type");
  488. var gridColTypeArray = gridColType.split("^");
  489. swt_statflag.yy.grd_yy.binddataset = "";
  490. swt_statflag.yy.grd_yy.deleteContentsRow("head",0);
  491. swt_statflag.yy.grd_yy.deleteContentsRow("body",0);
  492. swt_statflag.yy.grd_yy.appendContentsRow("head");
  493. swt_statflag.yy.grd_yy.appendContentsRow("body");
  494. swt_statflag.yy.grd_yy.binddataset = "ds_grid_grd_yy";
  495. swt_statflag.yy.grd_yy.setCellProperty("Head",0,"text", "No.");
  496. swt_statflag.yy.grd_yy.setCellProperty("body",0,"expr","expr:currow+1");
  497. swt_statflag.yy.grd_yy.setCellProperty("body",0,"celltype","head");
  498. swt_statflag.yy.grd_yy.setCellProperty("body",i,"align","center");
  499. for( var i = 1; i <= gridColRefArray.length; i++ ) {
  500. if(i == 1) {
  501. ds_grid_grd_yy.addColumn(gridColRefArray[i-1], "STRING", 150); // Grid 속성 지정
  502. swt_statflag.yy.grd_yy.appendContentsCol();
  503. swt_statflag.yy.grd_yy.setCellProperty("Head", i , "text", gridColCapArray[i-1]);
  504. swt_statflag.yy.grd_yy.setCellProperty("body",i,"text","bind:"+gridColRefArray[i-1]);
  505. swt_statflag.yy.grd_yy.setCellProperty("body",i,"align","left");
  506. } else {
  507. ds_grid_grd_yy.addColumn(gridColRefArray[i-1], "STRING", 60);
  508. swt_statflag.yy.grd_yy.appendContentsCol();
  509. swt_statflag.yy.grd_yy.setCellProperty("Head", i , "text", gridColCapArray[i-1]);
  510. swt_statflag.yy.grd_yy.setCellProperty("body",i,"text","bind:"+gridColRefArray[i-1]);
  511. swt_statflag.yy.grd_yy.setCellProperty("body",i,"displaytype","number");
  512. }
  513. }
  514. for(var i=0; i<swt_statflag.yy.grd_yy.getFormatColCount(); i++){
  515. if(i==0) {
  516. swt_statflag.yy.grd_yy.setFormatColProperty(0, "No.", 30);
  517. } else if(i==1){
  518. swt_statflag.yy.grd_yy.setFormatColProperty(i, "size", 200);
  519. }else{
  520. swt_statflag.yy.grd_yy.setFormatColProperty(i, "size", 60);
  521. swt_statflag.yy.grd_yy.setFormatColProperty(i, "displaytype", "number");
  522. }
  523. }
  524. lf_getTotal(); //연도별 Total 계산
  525. break;
  526. default:
  527. break;
  528. }
  529. }
  530. }
  531. function btn_ref_onlbuttonup(obj:Button, e:MouseEventInfo)
  532. {
  533. lf_getStats();
  534. }
  535. // btn_ddstats_onlbuttonup, btn_mmstats_onlbuttonup, btn_yystats_onlbuttonup 통합
  536. function swt_statflag_onchanged(obj:Tab, e:TabIndexChangeEventInfo)
  537. {
  538. lf_gridInit();
  539. }
  540. function btn_print_onlbuttonup(obj:Button, e:MouseEventInfo)
  541. {
  542. }
  543. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  544. {
  545. lf_exeSaveToExcel();
  546. }
  547. function grp_sea_combo1_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  548. {
  549. lf_setEqmtcd();
  550. }
  551. function lf_setEqmtcd(){
  552. var sectcd = grp_sea.combo1.value;
  553. //물질
  554. var sFilter = "cd =='00' || etc01 =='" + sectcd + "'";
  555. if(sectcd != "00"){
  556. ds_init_lb1111.filter(sFilter);
  557. }else{
  558. ds_init_lb1111.filter("");
  559. }
  560. grp_sea.cmb_rtnabnflag.index = 0;
  561. }
  562. ]]></Script>
  563. </Form>
  564. </FDL>