SMLQS00100_정도관리통계.xfdl 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMLQS00100" position="absolute 0 0 1256 805" titletext="정도관리 통계" oninit="model1_oninit" onload="SMLQS00100_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption10" class="tit_1" position="absolute 0 0 135 25" anchor="default" positiontype="position" text="정도 관리 통계"/>
  8. <Button id="btn_excel" taborder="1" text="EXCEL저장" onlbuttonup="btn_excel_onlbuttonup" class="btn7" position="absolute 1158 0 1256 20" style="align:left middle;" anchor="top right" onclick="btn_excel_onclick"/>
  9. <Div id="grp_sea" anchor="left top right" taborder="2" style="align:center top;" position="absolute 0 25 1256 92" class="div_SA">
  10. <Layouts>
  11. <Layout>
  12. <Combo id="cbo_eqmt" taborder="9" visible="false" position="absolute 734 35 844 55" style="align:left middle;" anchor="default" innerdataset="@ds_init_lb0701" codecolumn="cd" datacolumn="nm"/>
  13. <Static id="cap_eqmt" text="장비" class="search_name" visible="false" position="absolute 658 35 728 55" style="align:left middle;" anchor="default"/>
  14. <Static id="caption16" text="통계구분" class="search_name" position="absolute 658 12 732 32" style="align:left middle;" anchor="default"/>
  15. <Combo id="cbo_if" taborder="2" position="absolute 732 11 843 31" style="align:left middle;" anchor="default" innerdataset="@ds_cond_stsflag2" codecolumn="value" datacolumn="label" index="0" value="1" text="시행부서별" onitemchanged="grp_sea_cbo_if_onitemchanged"/>
  16. <Static id="cap_dept" text="시행부서" class="search_name" position="absolute 658 35 732 55" style="align:left middle;" anchor="default"/>
  17. <Combo id="cbo_dept" taborder="3" position="absolute 732 35 842 55" style="align:left middle;" anchor="default" innerdataset="@ds_init_lb0111" codecolumn="cd" datacolumn="nm"/>
  18. <Static id="caption3" text="접수구분" class="search_name" position="absolute 308 35 382 55" style="align:left middle;" anchor="default"/>
  19. <Static id="caption4" text="조회기간" class="search_name" position="absolute 308 10 382 30" style="align:left middle;" anchor="default"/>
  20. <Radio id="radio1" taborder="7" columncount="3" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 82 10 284 30" style="align:left middle;" anchor="default" index="0" value="1" onitemchanged="grp_sea_radio1_onitemchanged">
  21. <Dataset id="innerdataset">
  22. <ColumnInfo>
  23. <Column id="codecolumn" size="256"/>
  24. <Column id="datacolumn" size="256"/>
  25. </ColumnInfo>
  26. <Rows>
  27. <Row>
  28. <Col id="codecolumn">1</Col>
  29. <Col id="datacolumn">일별</Col>
  30. </Row>
  31. <Row>
  32. <Col id="codecolumn">2</Col>
  33. <Col id="datacolumn">월별</Col>
  34. </Row>
  35. <Row>
  36. <Col id="codecolumn">3</Col>
  37. <Col id="datacolumn">연별</Col>
  38. </Row>
  39. </Rows>
  40. </Dataset>
  41. </Radio>
  42. <Radio id="radio2" taborder="8" columncount="3" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" visible="false" position="absolute 82 34 284 54" style="align:left middle;" anchor="default" index="0" value="1">
  43. <Dataset id="innerdataset">
  44. <ColumnInfo>
  45. <Column id="codecolumn" size="256"/>
  46. <Column id="datacolumn" size="256"/>
  47. </ColumnInfo>
  48. <Rows>
  49. <Row>
  50. <Col id="codecolumn">1</Col>
  51. <Col id="datacolumn">전 체</Col>
  52. </Row>
  53. <Row>
  54. <Col id="codecolumn">2</Col>
  55. <Col id="datacolumn">완 료</Col>
  56. </Row>
  57. <Row>
  58. <Col id="codecolumn">3</Col>
  59. <Col id="datacolumn">제 외</Col>
  60. </Row>
  61. </Rows>
  62. </Dataset>
  63. </Radio>
  64. <Static id="caption2" text="결과구분" class="search_name" visible="false" position="absolute 8 35 103 55" style="align:left middle;" anchor="default"/>
  65. <Static id="caption1" text="조회구분" class="search_name" position="absolute 8 10 82 30" style="align:left middle;" anchor="default"/>
  66. <Combo id="cbo_1" taborder="10" position="absolute 382 34 482 54" style="align:left middle;" anchor="default" innerdataset="@ds_init_lb0704" codecolumn="cd" datacolumn="nm"/>
  67. <Button id="btn_ref" taborder="1" text="조회" onlbuttonup="btn_ref_onlbuttonup" class="btn1" position="absolute 1188 10 1244 30" anchor="top right" onclick="grp_sea_btn_ref_onclick"/>
  68. <Static id="caption9" text="~" position="absolute 464 10 483 30" style="align:center;" visible="true" anchor="default"/>
  69. <Calendar id="ipt_stsfromdd" taborder="13" position="absolute 381 9 468 30" anchor="default"/>
  70. <Calendar id="ipt_ststodd" taborder="14" position="absolute 481 9 569 30" anchor="default"/>
  71. </Layout>
  72. </Layouts>
  73. </Div>
  74. <Static id="caption6" text="통계 리스트" class="tit_2" position="absolute 0 102 155 122"/>
  75. <Grid id="grd_stsList" taborder="3" useinputpanel="false" position="absolute 0 122 1256 805" style="align:center middle;" anchor="all" binddataset="ds_grid_grd_stsList">
  76. <Formats>
  77. <Format id="default">
  78. <Columns>
  79. <Column size="30"/>
  80. <Column size="90"/>
  81. <Column size="120"/>
  82. <Column size="60"/>
  83. <Column size="40"/>
  84. <Column size="40"/>
  85. <Column size="40"/>
  86. <Column size="40"/>
  87. <Column size="40"/>
  88. <Column size="40"/>
  89. <Column size="40"/>
  90. <Column size="40"/>
  91. <Column size="40"/>
  92. <Column size="40"/>
  93. <Column size="40"/>
  94. <Column size="40"/>
  95. <Column size="40"/>
  96. <Column size="40"/>
  97. <Column size="40"/>
  98. <Column size="40"/>
  99. <Column size="40"/>
  100. <Column size="40"/>
  101. <Column size="40"/>
  102. <Column size="40"/>
  103. <Column size="40"/>
  104. <Column size="40"/>
  105. <Column size="40"/>
  106. <Column size="40"/>
  107. <Column size="40"/>
  108. <Column size="40"/>
  109. <Column size="40"/>
  110. <Column size="40"/>
  111. <Column size="40"/>
  112. <Column size="40"/>
  113. <Column size="40"/>
  114. </Columns>
  115. <Rows>
  116. <Row size="22" band="head"/>
  117. <Row size="20"/>
  118. </Rows>
  119. <Band id="head">
  120. <Cell text="No."/>
  121. <Cell col="1" text="구분"/>
  122. <Cell col="2" text="검사명"/>
  123. <Cell col="3" text="Total"/>
  124. <Cell col="4" text="1"/>
  125. <Cell col="5" text="2"/>
  126. <Cell col="6" text="3"/>
  127. <Cell col="7" text="4"/>
  128. <Cell col="8" text="5"/>
  129. <Cell col="9" text="6"/>
  130. <Cell col="10" text="7"/>
  131. <Cell col="11" text="8"/>
  132. <Cell col="12" text="9"/>
  133. <Cell col="13" text="10"/>
  134. <Cell col="14" text="11"/>
  135. <Cell col="15" text="12"/>
  136. <Cell col="16" text="13"/>
  137. <Cell col="17" text="14"/>
  138. <Cell col="18" text="15"/>
  139. <Cell col="19" text="16"/>
  140. <Cell col="20" text="17"/>
  141. <Cell col="21" text="18"/>
  142. <Cell col="22" text="19"/>
  143. <Cell col="23" text="20"/>
  144. <Cell col="24" text="21"/>
  145. <Cell col="25" text="22"/>
  146. <Cell col="26" text="23"/>
  147. <Cell col="27" text="24"/>
  148. <Cell col="28" text="25"/>
  149. <Cell col="29" text="26"/>
  150. <Cell col="30" text="27"/>
  151. <Cell col="31" text="28"/>
  152. <Cell col="32" text="29"/>
  153. <Cell col="33" text="30"/>
  154. <Cell col="34" text="31"/>
  155. </Band>
  156. <Band id="body">
  157. <Cell expr="expr:currow+1"/>
  158. <Cell col="1" style="align:left middle;" text="bind:itemnm1"/>
  159. <Cell col="2" style="align:left middle;" text="bind:itemnm2"/>
  160. <Cell col="3" displaytype="number" style="align:right middle;background:#ffe79dff;background2:#ffe79d;" text="bind:total" mask="#,###.#"/>
  161. <Cell col="4" displaytype="number" style="align:right middle;" text="bind:d01" mask="#,###.#"/>
  162. <Cell col="5" displaytype="number" style="align:right middle;" text="bind:d02" mask="#,###.#"/>
  163. <Cell col="6" displaytype="number" style="align:right middle;" text="bind:d03" mask="#,###.#"/>
  164. <Cell col="7" displaytype="number" style="align:right middle;" text="bind:d04" mask="#,###.#"/>
  165. <Cell col="8" displaytype="number" style="align:right middle;" text="bind:d05" mask="#,###.#"/>
  166. <Cell col="9" displaytype="number" style="align:right middle;" text="bind:d06" mask="#,###.#"/>
  167. <Cell col="10" displaytype="number" style="align:right middle;" text="bind:d07" mask="#,###.#"/>
  168. <Cell col="11" displaytype="number" style="align:right middle;" text="bind:d08" mask="#,###.#"/>
  169. <Cell col="12" displaytype="number" style="align:right middle;" text="bind:d09" mask="#,###.#"/>
  170. <Cell col="13" displaytype="number" style="align:right middle;" text="bind:d10" mask="#,###.#"/>
  171. <Cell col="14" displaytype="number" style="align:right middle;" text="bind:d11" mask="#,###.#"/>
  172. <Cell col="15" displaytype="number" style="align:right middle;" text="bind:d12" mask="#,###.#"/>
  173. <Cell col="16" displaytype="number" style="align:right middle;" text="bind:d13" mask="#,###.#"/>
  174. <Cell col="17" displaytype="number" style="align:right middle;" text="bind:d14" mask="#,###.#"/>
  175. <Cell col="18" displaytype="number" style="align:right middle;" text="bind:d15" mask="#,###.#"/>
  176. <Cell col="19" displaytype="number" style="align:right middle;" text="bind:d16" mask="#,###.#"/>
  177. <Cell col="20" displaytype="number" style="align:right middle;" text="bind:d17" mask="#,###.#"/>
  178. <Cell col="21" displaytype="number" style="align:right middle;" text="bind:d18" mask="#,###.#"/>
  179. <Cell col="22" displaytype="number" style="align:right middle;" text="bind:d19" mask="#,###.#"/>
  180. <Cell col="23" displaytype="number" style="align:right middle;" text="bind:d20" mask="#,###.#"/>
  181. <Cell col="24" displaytype="number" style="align:right middle;" text="bind:d21" mask="#,###.#"/>
  182. <Cell col="25" displaytype="number" style="align:right middle;" text="bind:d22" mask="#,###.#"/>
  183. <Cell col="26" displaytype="number" style="align:right middle;" text="bind:d23" mask="#,###.#"/>
  184. <Cell col="27" displaytype="number" style="align:right middle;" text="bind:d24" mask="#,###.#"/>
  185. <Cell col="28" displaytype="number" style="align:right middle;" text="bind:d25" mask="#,###.#"/>
  186. <Cell col="29" displaytype="number" style="align:right middle;" text="bind:d26" mask="#,###.#"/>
  187. <Cell col="30" displaytype="number" style="align:right middle;" text="bind:d27" mask="#,###.#"/>
  188. <Cell col="31" displaytype="number" style="align:right middle;" text="bind:d28" mask="#,###.#"/>
  189. <Cell col="32" displaytype="number" style="align:right middle;" text="bind:d29" mask="#,###.#"/>
  190. <Cell col="33" displaytype="number" style="align:right middle;" text="bind:d30" mask="#,###.#"/>
  191. <Cell col="34" displaytype="number" style="align:right middle;" text="bind:d31" mask="#,###.#"/>
  192. </Band>
  193. </Format>
  194. </Formats>
  195. </Grid>
  196. </Layout>
  197. </Layouts>
  198. <Objects>
  199. <Dataset id="ds_cond_stsflag2" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  200. <ColumnInfo>
  201. <Column id="label" type="STRING" size="256"/>
  202. <Column id="value" type="STRING" size="256"/>
  203. </ColumnInfo>
  204. <Rows>
  205. <Row>
  206. <Col id="label">시행부서별</Col>
  207. <Col id="value">1</Col>
  208. </Row>
  209. <Row>
  210. <Col id="label">검사장비별</Col>
  211. <Col id="value">2</Col>
  212. </Row>
  213. </Rows>
  214. </Dataset>
  215. <Dataset id="ds_init_lb0704" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  216. <ColumnInfo>
  217. <Column id="cd" type="STRING" size="256"/>
  218. <Column id="nm" type="STRING" size="256"/>
  219. </ColumnInfo>
  220. </Dataset>
  221. <Dataset id="ds_init_lb0111" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  222. <ColumnInfo>
  223. <Column id="cd" type="STRING" size="256"/>
  224. <Column id="nm" type="STRING" size="256"/>
  225. </ColumnInfo>
  226. </Dataset>
  227. <Dataset id="ds_init_lb0701" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  228. <ColumnInfo>
  229. <Column id="cd" type="STRING" size="256"/>
  230. <Column id="nm" type="STRING" size="256"/>
  231. </ColumnInfo>
  232. </Dataset>
  233. <Dataset id="ds_init_lb0000" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  234. <ColumnInfo>
  235. <Column id="cd" type="STRING" size="256"/>
  236. <Column id="nm" type="STRING" size="256"/>
  237. </ColumnInfo>
  238. </Dataset>
  239. <Dataset id="ds_grid_grd_stsList" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  240. <ColumnInfo>
  241. <column id="stsflag1" type="STRING" size="256"/>
  242. <column id="itemnm1" type="STRING" size="256"/>
  243. <column id="itemnm2" type="STRING" size="256"/>
  244. <column id="total" type="STRING" size="256"/>
  245. <column id="d01" type="STRING" size="256"/>
  246. <column id="d02" type="STRING" size="256"/>
  247. <column id="d03" type="STRING" size="256"/>
  248. <column id="d04" type="STRING" size="256"/>
  249. <column id="d05" type="STRING" size="256"/>
  250. <column id="d06" type="STRING" size="256"/>
  251. <column id="d07" type="STRING" size="256"/>
  252. <column id="d08" type="STRING" size="256"/>
  253. <column id="d09" type="STRING" size="256"/>
  254. <column id="d10" type="STRING" size="256"/>
  255. <column id="d11" type="STRING" size="256"/>
  256. <column id="d12" type="STRING" size="256"/>
  257. <column id="d13" type="STRING" size="256"/>
  258. <column id="d14" type="STRING" size="256"/>
  259. <column id="d15" type="STRING" size="256"/>
  260. <column id="d16" type="STRING" size="256"/>
  261. <column id="d17" type="STRING" size="256"/>
  262. <column id="d18" type="STRING" size="256"/>
  263. <column id="d19" type="STRING" size="256"/>
  264. <column id="d20" type="STRING" size="256"/>
  265. <column id="d21" type="STRING" size="256"/>
  266. <column id="d22" type="STRING" size="256"/>
  267. <column id="d23" type="STRING" size="256"/>
  268. <column id="d24" type="STRING" size="256"/>
  269. <column id="d25" type="STRING" size="256"/>
  270. <column id="d26" type="STRING" size="256"/>
  271. <column id="d27" type="STRING" size="256"/>
  272. <column id="d28" type="STRING" size="256"/>
  273. <column id="d29" type="STRING" size="256"/>
  274. <column id="d30" type="STRING" size="256"/>
  275. <column id="d31" type="STRING" size="256"/>
  276. </ColumnInfo>
  277. </Dataset>
  278. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  279. <ColumnInfo>
  280. <Column id="stsflag" type="STRING" size="256"/>
  281. <Column id="stsfromdd" type="STRING" size="256"/>
  282. <Column id="ststodd" type="STRING" size="256"/>
  283. <Column id="stskind" type="STRING" size="256"/>
  284. <Column id="stskind2" type="STRING" size="256"/>
  285. <Column id="stsdept" type="STRING" size="256"/>
  286. <Column id="stsflag2" type="STRING" size="256"/>
  287. <Column id="stseqmt" type="STRING" size="256"/>
  288. </ColumnInfo>
  289. <Rows>
  290. <Row>
  291. <Col id="stsflag">1</Col>
  292. <Col id="stskind">00</Col>
  293. <Col id="stskind2">1</Col>
  294. <Col id="stsdept">00</Col>
  295. <Col id="stsflag2">1</Col>
  296. <Col id="stseqmt">00</Col>
  297. </Row>
  298. </Rows>
  299. </Dataset>
  300. </Objects>
  301. <Bind>
  302. <BindItem id="item0" compid="grp_sea.radio1" propid="value" datasetid="ds_hidden" columnid="stsflag"/>
  303. <BindItem id="item1" compid="grp_sea.radio2" propid="value" datasetid="ds_hidden" columnid="stskind2"/>
  304. <BindItem id="item2" compid="grp_sea.ipt_stsfromdd" propid="value" datasetid="ds_hidden" columnid="stsfromdd"/>
  305. <BindItem id="item3" compid="grp_sea.ipt_ststodd" propid="value" datasetid="ds_hidden" columnid="ststodd"/>
  306. <BindItem id="item4" compid="grp_sea.cbo_1" propid="value" datasetid="ds_hidden" columnid="stskind"/>
  307. <BindItem id="item5" compid="grp_sea.cbo_if" propid="value" datasetid="ds_hidden" columnid="stsflag2"/>
  308. <BindItem id="item6" compid="grp_sea.cbo_dept" propid="value" datasetid="ds_hidden" columnid="stsdept"/>
  309. <BindItem id="item7" compid="grp_sea.cbo_eqmt" propid="value" datasetid="ds_hidden" columnid="stseqmt"/>
  310. </Bind>
  311. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  312. * System Name :
  313. * Job Name :
  314. * Creator :
  315. * Make Date : 2015-05-01
  316. * Description :
  317. *---------------------------------------------------------------------------------------
  318. * Modify Date Modifier Modify Description
  319. *---------------------------------------------------------------------------------------
  320. * 2015-05-01 Live Converter TF->XP
  321. *
  322. *---------------------------------------------------------------------------------------
  323. ****************************************************************************************/
  324. include "com_commonxp::comm_main.xjs";
  325. include "lis_commonxp::LZZ001.xjs";
  326. include "lis_commonxp::LPZ001.xjs";
  327. include "lis_commonxp::LLZ001.xjs";
  328. var instcd = "";
  329. var seaval = ""; // 검색값
  330. var strText = ""; // Grid Head text
  331. var sendYear = "";
  332. function model1_oninit(obj:Form, e:InitEventInfo)
  333. {
  334. frmf_initForm(obj);
  335. }
  336. function SMLQS00100_onload(obj:Form, e:LoadEventInfo)
  337. {
  338. lf_setInit();
  339. }
  340. function lf_setInit() {
  341. var toDay = utlf_getCurrentDate();
  342. //grp_sea.ipt_stsfromdd.value = toDay;
  343. //grp_sea.ipt_ststodd.value =toDay;
  344. ds_hidden.setColumn(0, "stsfromdd", toDay);
  345. ds_hidden.setColumn(0, "ststodd", toDay);
  346. //grp_sea.ipt_stsfromdd.setCallEvent("lf_calFromChng");
  347. //grp_sea.ipt_ststodd.setCallEvent("lf_calToChng");
  348. // 초기정보 조회(0000:사용자부서코드, 0111:시행부서계 0707: 장비코드)
  349. dsf_createDsRow("ds_temp_search"
  350. , [{col: "codeflag", val: "0000|0111|0701|"}
  351. , {col: "basecdid", val: ""}
  352. , {col: "menuparam", val: ""}]);
  353. var oParam = {};
  354. oParam.id = "TRLZZ00101";
  355. oParam.service = "diagtestapplib.DiagTestBaseInfoMngt";
  356. oParam.method = "reqGetInitCodeInfo";
  357. oParam.inds = "cond=ds_temp_search";
  358. oParam.outds = "ds_init_lb0111=0111 ds_init_lb0701=0701 ds_init_lb0000=0000";
  359. oParam.async = false;
  360. oParam.callback = "cf_TRLZZ00101";
  361. tranf_submit(oParam);
  362. }
  363. function lf_getStats() {
  364. var fromdd = grp_sea.ipt_stsfromdd.value;
  365. fromdd = fromdd + "01";
  366. var lastday = utlf_getLastDate(fromdd);
  367. var stsflag = grp_sea.radio1.value; // 조회구분 1: 일별, 2: 월별, 3: 연별
  368. var stsfromdd = fromdd;
  369. var ststodd = grp_sea.ipt_ststodd.value;
  370. var stskind = grp_sea.cbo_1.value; // 통계구분 1: 시행부서, 2: 진료과, 3: 진료의, 4: 채혈자, 5: 시간대별 (단, 병동 및 아침채혈의 경우 1: 병동별)
  371. var stskind2 = grp_sea.radio2.value; // 결과상태 1: 전체, 2: 완료, 3: 제외
  372. var stsflag2 = grp_sea.cbo_if.value; // 통계구분 1: 시행부서별, 2: 장비별
  373. var stsdept = grp_sea.cbo_dept.value; // 시행부서
  374. var stseqmt = grp_sea.cbo_eqmt.value; // 시행부서
  375. var deptflag = ds_init_lb0000.getColumn(0, "nm");
  376. var sInDsName = dsf_createDsRow("ds_temp_search"
  377. , [{col: "stsflag", val:stsflag }
  378. , {col: "stsfromdd", val:stsfromdd }
  379. , {col: "ststodd", val:ststodd }
  380. , {col: "stsflag2", val:stsflag2 }
  381. , {col: "stskind", val:stskind }
  382. , {col: "stskind2", val:stskind2 }
  383. , {col: "stsdept", val:stsdept }
  384. , {col: "stseqmt", val:stseqmt }
  385. , {col: "lastday", val:lastday }
  386. , {col: "year", val:sendYear }
  387. , {col: "deptflag", val:deptflag }
  388. ]);
  389. var oParam = {};
  390. oParam.id = "TRLQS00101";
  391. oParam.service = "grademngtprintapp.MaterialStatsReference";
  392. oParam.method = "reqGetQCSts";
  393. oParam.inds = "cond=ds_temp_search";
  394. oParam.outds = "ds_grid_grd_stsList=stslist";
  395. oParam.async = false;
  396. oParam.callback = "cf_TRLZZ00101";
  397. tranf_submit(oParam);
  398. }
  399. //통계 희망 월 선택 시 그리드 셋팅 위해 해당월의 마지막 날짜 구함
  400. function getLastDay(dt) {
  401. var year = dt.substr(0,4); //년
  402. var month = dt.substr(4,2); //월
  403. with(new Date(year, month, 1, 12)) { //MM = 1 .. 12
  404. setDate(0);
  405. return getDate();
  406. }
  407. }
  408. //조회하고자 하는 월별 그리드 셋팅하기
  409. function lf_grdSet(stsflag)
  410. {
  411. for(var i=4; i<grd_stsList.getFormatColCount(); i++)
  412. {
  413. grd_stsList.setCellProperty("head", i, "text", "");
  414. grd_stsList.setFormatColProperty(i, "size", 0);
  415. }
  416. // 일별
  417. if(stsflag == "1")
  418. {
  419. var day = grp_sea.ipt_stsfromdd.value+"01";
  420. var lastCol = utlf_getLastDate(day)+3; // 선택된 월의 마지막날 + 3(부서명,구분,Total 컬럼)
  421. // 부서명때문에 2부터 시작(부서명은 아침채혈일때만 보임)
  422. for(var i=2; i<grd_stsList.getFormatColCount(); i++)
  423. {
  424. if(i<=lastCol)
  425. {
  426. grd_stsList.setFormatColProperty(i, "size", 80);
  427. if(i >3)
  428. {
  429. grd_stsList.setFormatColProperty(i, "size", 40);
  430. }
  431. }
  432. else
  433. {
  434. grd_stsList.setFormatColProperty(i, "size", 0);
  435. }
  436. }
  437. strText = "구분^검사명^Total^1^2^3^4^5^6^7^8^9^10^11^12^13^14^15^16^17^18^19^20^21^22^23^24^25^26^27^28^29^30^31";
  438. var arrTx = strText.split("^");
  439. var cnt = 0;
  440. for(var i=1; i < grd_stsList.getFormatColCount(); i++)
  441. {
  442. if(!utlf_isNull(arrTx[cnt]))
  443. {
  444. grd_stsList.setCellProperty("head", i, "text", arrTx[cnt]);
  445. cnt++;
  446. }
  447. }
  448. // 연별
  449. }
  450. else if(stsflag == "3")
  451. {
  452. //var dayFrom = grp_sea.ipt_stsfromdd.value;
  453. //var dayTo = grp_sea.ipt_ststodd.value;
  454. var dayFrom = ds_hidden.getColumn(0, "stsfromdd");
  455. var dayTo = ds_hidden.getColumn(0, "ststodd");
  456. var fromdd = toNumber(dayFrom.substr(0,4));
  457. var todd = toNumber(dayTo.substr(0,4));
  458. var year = fromdd+"^";
  459. var yearlength = 0;
  460. for(var i=fromdd+1; i<=todd; i++)
  461. {
  462. year += i +"^" ;
  463. }
  464. sendYear = year;
  465. yearlength = year.split("^").length;
  466. for(var i=4; i<grd_stsList.getFormatColCount()-1; i++)
  467. {
  468. if(i<yearlength+3)
  469. {
  470. grd_stsList.setFormatColProperty(i, "size", 80);
  471. }else{
  472. grd_stsList.setFormatColProperty(i, "size", 0);
  473. }
  474. }
  475. strText = "구분^검사명^Total^"+year;
  476. trace(">>>>>>>>>>>>>>>>>>> "+strText);
  477. var arrTx = strText.split("^");
  478. var cnt = 0;
  479. for(var i=1; i<grd_stsList.getFormatColCount(); i++) {
  480. if(!utlf_isNull(arrTx[cnt])) {
  481. grd_stsList.setCellProperty("head", i, "text", arrTx[cnt]);
  482. cnt++;
  483. }
  484. }
  485. }
  486. }
  487. //조회구분 선택시 통계희망월 포멧 지정 및 그리드 컬럼 지정하기
  488. function lf_showHopeddnGridSet() {
  489. for(var i=4; i<grd_stsList.getFormatColCount(); i++){
  490. grd_stsList.setCellProperty("head", i, "text", "");
  491. grd_stsList.setFormatColProperty(i, "size", 0);
  492. }
  493. var strFrom = "";
  494. var strTo = "";
  495. var difFromTo = 0;
  496. var toDay = utlf_getCurrentDate();
  497. // 연별
  498. if(grp_sea.radio1.value == "3") {
  499. //grp_sea.ipt_stsfromdd.value = utlf_getCurrentDate().substr(0, 4);
  500. //grp_sea.ipt_ststodd.value = utlf_getCurrentDate().substr(0, 4);
  501. ds_hidden.setColumn(0, "stsfromdd", utlf_getCurrentDate().substr(0, 4));
  502. ds_hidden.setColumn(0, "ststodd", utlf_getCurrentDate().substr(0, 4));
  503. grp_sea.ipt_stsfromdd.dateformat = 'yyyy';
  504. grp_sea.ipt_ststodd.dateformat = 'yyyy';
  505. grd_stsList.setFormatColProperty(4, "size", 80);
  506. for(var i=5; i<grd_stsList.getFormatColCount()-1; i++)
  507. {
  508. grd_stsList.setFormatColProperty(i, "size", 80);
  509. }
  510. grp_sea.ipt_ststodd.visible = true; // todd 날짜
  511. grp_sea.caption9.visible = true;
  512. //strFrom = grp_sea.ipt_stsfromdd.value;
  513. strFrom = ds_hidden.getColumn(0, "stsfromdd");
  514. strTo = ds_hidden.getColumn(0, "ststodd");
  515. difFromTo = strTo - strFrom;
  516. for(var i=4; i<grd_stsList.getFormatColCount(); i++) {
  517. if(difFromTo >= 0) {
  518. grd_stsList.setCellProperty("head", i, "text", strFrom);
  519. strFrom++;
  520. difFromTo--;
  521. }else{
  522. grd_stsList.setFormatColProperty(i, "size", 0);
  523. }
  524. }
  525. sendYear = toDay.substr(0, 4);
  526. }
  527. else
  528. {
  529. grp_sea.ipt_ststodd.visible = false;
  530. grp_sea.caption9.visible = false;
  531. // 일별
  532. if(grp_sea.radio1.value == "1")
  533. {
  534. //grp_sea.ipt_stsfromdd.value = toDay.substr(0, 6);
  535. ds_hidden.setColumn(0, "stsfromdd", utlf_getCurrentDate().substr(0, 6));
  536. grp_sea.ipt_stsfromdd.dateformat = 'yyyy-MM-dd';
  537. grp_sea.ipt_ststodd.dateformat = 'yyyy-MM-dd';
  538. lf_grdSet(1);
  539. }
  540. else // 월별
  541. {
  542. //grp_sea.ipt_stsfromdd.value = toDay.substr(0, 4);
  543. ds_hidden.setColumn(0, "stsfromdd", utlf_getCurrentDate().substr(0, 6));
  544. grp_sea.ipt_stsfromdd.dateformat = 'yyyy-MM';
  545. // 부서명때문에 2부터 시작(부서명은 아침채혈일때만 보임)
  546. for(var i=2; i < grd_stsList.getFormatColCount(); i++)
  547. {
  548. if(i<=15)
  549. {
  550. grd_stsList.setFormatColProperty(i, "size", 80);
  551. if(i>3)
  552. {
  553. grd_stsList.setFormatColProperty(i, "size", 75);
  554. }
  555. }
  556. else
  557. {
  558. grd_stsList.setFormatColProperty(i, "size", 0);
  559. }
  560. }
  561. strText = "구분^검사명^Total^1^2^3^4^5^6^7^8^9^10^11^12";
  562. var arrTx = strText.split("^");
  563. var cnt = 0;
  564. for(var i=1; i<grd_stsList.getFormatColCount(); i++) {
  565. if(!utlf_isNull(arrTx[cnt])) {
  566. grd_stsList.setCellProperty("head", i, "text", arrTx[cnt]);
  567. cnt++;
  568. }
  569. }
  570. }
  571. }
  572. }
  573. // callback 함수
  574. function cf_TRLZZ00101(strSvcID, nErrorCode, strErrorMag) {
  575. if(nErrorCode != 0) {
  576. sysf_messageBox("ID: "+ strSvcID + " Error: " + strErrorMag, "E009", "");
  577. }else{
  578. switch(strSvcID){
  579. case "TRLZZ00101":
  580. grdf_setGridSort(grd_stsList);
  581. // 부서에 따른 접수구분 조회 (704: 접수구분)
  582. var basecdid = ds_init_lb0000.getColumn(0, "nm");
  583. dsf_createDsRow("ds_temp_search"
  584. , [{col: "codeflag", val: "0704|"}
  585. , {col: "basecdid", val: basecdid}
  586. , {col: "menuparam", val: ""}]);
  587. var oParam = {};
  588. oParam.id = "TRLZZ00101_1";
  589. oParam.service = "diagtestapplib.DiagTestBaseInfoMngt";
  590. oParam.method = "reqGetInitCodeInfo";
  591. oParam.inds = "cond=ds_temp_search";
  592. oParam.outds = "ds_init_lb0704=0704";
  593. oParam.async = true;
  594. oParam.callback = "cf_TRLZZ00101";
  595. tranf_submit(oParam);
  596. break;
  597. case "TRLZZ00101_1":
  598. var fRow = ds_init_lb0704.findRow("cd", "00");
  599. ds_init_lb0704.setColumn(fRow, "nm", "- 전 체 -");
  600. grp_sea.cbo_1.index = 0;
  601. grp_sea.cbo_dept.index = 0;
  602. grp_sea.cbo_eqmt.index = 0;
  603. //해당일에 대한 마지막 일자 가져와서 그리드 컬럼 숨기기
  604. var strDate = utlf_getCurrentDate();
  605. var sDt = utlf_getLastDate(strDate);
  606. var lastDay = toNumber(sDt.substr(6, 2))+4;
  607. for(var i=lastDay; i>grd_stsList.getFormatColCount()-1; i--)
  608. {
  609. grd_stsList.setFormatColProperty(i-1, "size", 0);
  610. }
  611. break;
  612. case "TRLQS00101":
  613. grdf_setRowStyle(grd_stsList , "3" , "0" , "stsflag1" , "equal" );
  614. break;
  615. default:
  616. break;
  617. }
  618. }
  619. }
  620. function btn_ref_onlbuttonup(obj:Button, e:MouseEventInfo)
  621. {
  622. if(grp_sea.radio1.value == "3")
  623. {
  624. var fromdd = ds_hidden.getColumn(0, "stsfromdd");
  625. var todd = ds_hidden.getColumn(0, "ststodd");
  626. if((todd - fromdd) >9) {
  627. alert("10년 이내로 조회 가능합니다\n조회기간을 다시 선택하세요");
  628. return;
  629. }
  630. }
  631. lf_getStats();
  632. }
  633. function lf_calFromChng(r) {
  634. var stsflag = grp_sea.radio1.value;
  635. lf_grdSet(stsflag);
  636. }
  637. function lf_calToChng(r) {
  638. var stsflag = grp_sea.radio1.value;
  639. lf_grdSet(stsflag);
  640. }
  641. function grp_sea_radio1_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  642. {
  643. lf_showHopeddnGridSet();
  644. }
  645. function grp_sea_cbo_if_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  646. {
  647. if(grp_sea.cbo_if.value == "2"){
  648. grp_sea.cap_dept.visible = false;
  649. grp_sea.cbo_dept.visible = false;
  650. grp_sea.cap_eqmt.visible = true;
  651. grp_sea.cbo_eqmt.visible = true;
  652. }else{
  653. grp_sea.cap_dept.visible = true;
  654. grp_sea.cbo_dept.visible = true;
  655. grp_sea.cap_eqmt.visible = false;
  656. grp_sea.cbo_eqmt.visible = false;
  657. }
  658. }
  659. function btn_excel_onlbuttonup(obj:Button, e:MouseEventInfo)
  660. {
  661. var sTitle = "정도관리_"+utlf_getCurrentDate();
  662. grdf_exportExcel(grd_stsList, lf_lisGetTitle(this) + "_" + sTitle+".xls", sTitle, false);
  663. }]]></Script>
  664. </Form>
  665. </FDL>