SMLMF00100_배양균코드관리.xfdl 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMLMF00100" position="absolute 0 0 1256 805" titletext="New Form" onload="SMLMF00100_onload">
  5. <Layouts>
  6. <Layout>
  7. <Grid id="grd_cddetl" class="CSS::lis.css" taborder="0" useinputpanel="true" position="absolute 0 97 1256 805" anchor="all" autofittype="none" binddataset="ds_grid_grd_cddetl" positiontype="position" autoenter="select" cellsizingtype="both" oncloseup="grd_cddetl_oncloseup">
  8. <Formats>
  9. <Format id="default">
  10. <Columns>
  11. <Column size="30"/>
  12. <Column size="0"/>
  13. <Column size="0"/>
  14. <Column size="0"/>
  15. <Column size="0"/>
  16. <Column size="324"/>
  17. <Column size="106"/>
  18. <Column size="0"/>
  19. <Column size="120"/>
  20. <Column size="271"/>
  21. <Column size="115"/>
  22. <Column size="0"/>
  23. <Column size="0"/>
  24. <Column size="103"/>
  25. <Column size="99"/>
  26. <Column size="84"/>
  27. <Column size="0"/>
  28. <Column size="0"/>
  29. <Column size="0"/>
  30. </Columns>
  31. <Rows>
  32. <Row size="35" band="head"/>
  33. <Row size="20"/>
  34. </Rows>
  35. <Band id="head">
  36. <Cell/>
  37. <Cell col="1" text="상태"/>
  38. <Cell col="2" text="사용시작일자"/>
  39. <Cell col="3" text="사용종료일자"/>
  40. <Cell col="4" text="배양균코드"/>
  41. <Cell col="5" text="배양균명"/>
  42. <Cell col="6" text="배양균속&#13;&#10;코드"/>
  43. <Cell col="7" text="보고&#13;&#10;그룹"/>
  44. <Cell col="8" text="배양균명(약어)"/>
  45. <Cell col="9" text="배양균명(화면)"/>
  46. <Cell col="10" text="배양균명(출력)"/>
  47. <Cell col="11" text="Division"/>
  48. <Cell col="12" text="GRAM"/>
  49. <Cell col="13" text="감염정보"/>
  50. <Cell col="14" text="감염정보&#13;&#10;항균제"/>
  51. <Cell col="15" text="감염정보&#13;&#10;판정"/>
  52. <Cell col="16" text="checkcolor"/>
  53. <Cell col="17" text="BC&#13;&#10;양성률"/>
  54. <Cell col="18" displaytype="normal" edittype="none" text="ESBL"/>
  55. </Band>
  56. <Band id="body">
  57. <Cell celltype="head" text="expr:currow+1"/>
  58. <Cell col="1" displaytype="image" expr="expr:getRowType(currow) == 2 ?'theme://images/ico_i.png' : (getRowType(currow) == 4 ? 'theme://images/ico_u.png' : (getRowType(currow) == 8 ? 'theme://images/ico_d.png' : 'theme://images/ico_e.png'))"/>
  59. <Cell col="2" displaytype="date" edittype="date" text="bind:baccdfromdd"/>
  60. <Cell col="3" displaytype="date" edittype="date" text="bind:baccdtodd"/>
  61. <Cell col="4" displaytype="text" edittype="text" text="bind:baccd" editlimit="10"/>
  62. <Cell col="5" displaytype="text" edittype="text" text="bind:bacnm" editlimit="80"/>
  63. <Cell col="6" displaytype="combo" edittype="combo" class="input_essential3" text="bind:bacgenscd" editlimit="5" combodataset="ds_init_lb0201" combocodecol="cd" combodatacol="nm"/>
  64. <Cell col="7" displaytype="combo" edittype="combo" text="bind:bacrptgrpcd" combodataset="ds_init_lb0301" combocodecol="cd" combodatacol="nm"/>
  65. <Cell col="8" displaytype="text" edittype="text" text="bind:bacabbrnm" editlimit="20"/>
  66. <Cell col="9" displaytype="text" edittype="text" text="bind:bacscrnnm" editlimit="80"/>
  67. <Cell col="10" displaytype="text" edittype="text" text="bind:bacprntnm" editlimit="10"/>
  68. <Cell col="11" displaytype="text" edittype="text" style="align:left;" text="bind:division"/>
  69. <Cell col="12" displaytype="text" edittype="text" style="align:left;" text="bind:gram"/>
  70. <Cell col="13" displaytype="text" edittype="text" text="bind:infcinfo" editlimit="50"/>
  71. <Cell col="14" displaytype="text" edittype="text" text="bind:infcrefantbiocd" editlimit="10"/>
  72. <Cell col="15" displaytype="text" edittype="text" text="bind:infcrefchar" editlimit="5"/>
  73. <Cell col="16" text="bind:checkcolor"/>
  74. <Cell col="17" displaytype="combo" edittype="combo" text="bind:division2" combodataset="ds_init_bc" combocodecol="cd" combodatacol="nm"/>
  75. <Cell col="18" displaytype="checkbox" edittype="checkbox" text="bind:esbl"/>
  76. </Band>
  77. </Format>
  78. </Formats>
  79. </Grid>
  80. <Static id="caption2" text="배양균코드상세내역" class="tit_2" position="absolute 0 77 142 97" positiontype="position"/>
  81. <Button id="btn_addrow" taborder="1" text="행추가" class="btn2" position="absolute 1200 74 1256 94" anchor="top right" positiontype="position" onclick="btn_addrow_onclick"/>
  82. <Div id="group1" taborder="2" position="absolute 0 25 1256 67" anchor="left top right" positiontype="position" class="div_SA">
  83. <Layouts>
  84. <Layout>
  85. <Shape id="line3" linetype="vertical" class="line_4" position="absolute 1108 7 1108 29" positiontype="position"/>
  86. <Static id="caption1" text="조회구분" class="search_name" position="absolute 8 10 82 30" positiontype="position"/>
  87. <Shape id="line14" linetype="vertical" class="line_4" position="absolute 273 6 273 28" positiontype="position"/>
  88. <Static id="caption4" text="검색구분" class="search_name" position="absolute 776 13 850 30" positiontype="position" anchor="top right"/>
  89. <Combo id="cmb_refflag" taborder="1" class="combo_search" position="absolute 82 10 232 30" positiontype="position" codecolumn="codecolumn" datacolumn="datacolumn" onitemchanged="group1_cmb_refflag_onitemchanged" index="0" value="1" text="사용가능자료">
  90. <Dataset id="innerdataset">
  91. <ColumnInfo>
  92. <Column id="codecolumn" size="256"/>
  93. <Column id="datacolumn" size="256"/>
  94. </ColumnInfo>
  95. <Rows>
  96. <Row>
  97. <Col id="codecolumn">1</Col>
  98. <Col id="datacolumn">사용가능자료</Col>
  99. </Row>
  100. <Row>
  101. <Col id="codecolumn">2</Col>
  102. <Col id="datacolumn">전체자료</Col>
  103. </Row>
  104. </Rows>
  105. </Dataset>
  106. </Combo>
  107. <Button id="btn_ref" taborder="2" text="조회" class="btn1" position="absolute 235 10 291 30" anchor="left top" positiontype="position" onclick="group1_btn_ref_onclick"/>
  108. <Combo id="cmb_search" taborder="3" class="combo_search" position="absolute 850 10 1000 30" positiontype="position" codecolumn="codecolumn" datacolumn="datacolumn" index="0" value="1" text="코드" anchor="top right">
  109. <Dataset id="innerdataset">
  110. <ColumnInfo>
  111. <Column id="codecolumn" size="256"/>
  112. <Column id="datacolumn" size="256"/>
  113. </ColumnInfo>
  114. <Rows>
  115. <Row>
  116. <Col id="codecolumn">1</Col>
  117. <Col id="datacolumn">코드</Col>
  118. </Row>
  119. <Row>
  120. <Col id="codecolumn">2</Col>
  121. <Col id="datacolumn">코드명</Col>
  122. </Row>
  123. </Rows>
  124. </Dataset>
  125. </Combo>
  126. <Edit id="ipt_searchtext" taborder="4" class="input_search" position="absolute 1003 10 1113 30" imemode="hangul" positiontype="position" onkeydown="group1_ipt_searchtext_onkeydown" anchor="top right"/>
  127. <Button id="btn_reset" taborder="5" text="초기화" class="btn1" position="absolute 1175 10 1244 30" anchor="top right" positiontype="position" onclick="group1_btn_reset_onclick"/>
  128. <Button id="btn_search" taborder="6" text="검색" class="btn1" position="absolute 1116 10 1172 30" anchor="top right" onclick="group1_btn_search_onclick"/>
  129. </Layout>
  130. </Layouts>
  131. </Div>
  132. <Button id="btn_save" taborder="4" text="저장" onlbuttonup="btn_save_onlbuttonup" class="btn4" position="absolute 1200 0 1256 20" anchor="top right" positiontype="position" onclick="btn_save_onclick"/>
  133. <Static id="caption6" text="배양균코드관리" class="tit_1" position="absolute 0 0 155 25" positiontype="position"/>
  134. <Button id="btn_excel" taborder="5" text="엑셀" class="btn7" position="absolute 1145 74 1198 94" onclick="btn_excel_onclick" anchor="top right"/>
  135. </Layout>
  136. </Layouts>
  137. <Objects>
  138. <Dataset id="ds_grid_grd_cddetl" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false" oncolumnchanged="ds_grid_grd_cddetl_oncolumnchanged">
  139. <ColumnInfo>
  140. <Column id="baccdfromdd" type="STRING"/>
  141. <Column id="baccdtodd" type="STRING"/>
  142. <Column id="baccd" type="STRING"/>
  143. <Column id="bacnm" type="STRING"/>
  144. <Column id="bacgenscd" type="STRING"/>
  145. <Column id="bacabbrnm" type="STRING"/>
  146. <Column id="bacscrnnm" type="STRING"/>
  147. <Column id="bacprntnm" type="STRING"/>
  148. <Column id="infcinfo" type="STRING"/>
  149. <Column id="infcrefantbiocd" type="STRING"/>
  150. <Column id="infcrefchar" type="STRING"/>
  151. <Column id="checkcolor" type="STRING" size="256"/>
  152. <Column id="esbl" type="STRING" size="256"/>
  153. <Column id="bacrptgrpcd" type="STRING" size="256"/>
  154. <Column id="division" type="STRING" size="256"/>
  155. <Column id="gram" type="STRING" size="256"/>
  156. <Column id="division2" type="STRING" size="256"/>
  157. <Column id="division3" type="STRING" size="256"/>
  158. </ColumnInfo>
  159. </Dataset>
  160. <Dataset id="ds_init_lb0201" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  161. <ColumnInfo>
  162. <Column id="cd" type="STRING" size="256"/>
  163. <Column id="nm" type="STRING" size="256"/>
  164. </ColumnInfo>
  165. </Dataset>
  166. <Dataset id="ds_grid_grd_select" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  167. <ColumnInfo>
  168. <Column id="chk" type="STRING" size="256"/>
  169. <Column id="baccd" type="STRING" size="256"/>
  170. <Column id="bacnm" type="STRING" size="256"/>
  171. <Column id="bacabbrnm" type="STRING" size="256"/>
  172. <Column id="bacscrnnm" type="STRING" size="256"/>
  173. <Column id="bacprntnm" type="STRING" size="256"/>
  174. <Column id="checkcolor" type="STRING" size="256"/>
  175. <Column id="esbl" type="STRING" size="256"/>
  176. </ColumnInfo>
  177. </Dataset>
  178. <Dataset id="ds_init_lb0301" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  179. <ColumnInfo>
  180. <Column id="cd" type="STRING" size="256"/>
  181. <Column id="nm" type="STRING" size="256"/>
  182. </ColumnInfo>
  183. </Dataset>
  184. <Dataset id="ds_database_instcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  185. <Dataset id="ds_init_bc" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  186. <ColumnInfo>
  187. <Column id="cd" type="STRING" size="256"/>
  188. <Column id="nm" type="STRING" size="256"/>
  189. </ColumnInfo>
  190. <Rows>
  191. <Row/>
  192. <Row>
  193. <Col id="cd">P</Col>
  194. <Col id="nm">오염</Col>
  195. </Row>
  196. <Row>
  197. <Col id="cd">C</Col>
  198. <Col id="nm">CNS</Col>
  199. </Row>
  200. </Rows>
  201. </Dataset>
  202. </Objects>
  203. <Bind>
  204. <BindItem id="item41" compid="btn_excel" propid="enable" datasetid="ds_print" columnid="able"/>
  205. </Bind>
  206. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  207. * System Name :
  208. * Job Name :
  209. * Creator :
  210. * Make Date : 2015-11-09
  211. * Description :
  212. *---------------------------------------------------------------------------------------
  213. * Modify Date Modifier Modify Description
  214. *---------------------------------------------------------------------------------------
  215. * 2015-11-09 Live Converter TF->XP
  216. *
  217. *---------------------------------------------------------------------------------------
  218. ****************************************************************************************/
  219. include "com_commonxp::comm_main.xjs";
  220. include "lis_commonxp::LLZ001.xjs";
  221. include "lis_commonxp::LZZ001.xjs";
  222. var lgv_sInstCd = sysf_getUserInfo("dutplceinstcd");
  223. var lgv_sTargetDb = "";
  224. function SMLMF00100_onload(obj:Form, e:LoadEventInfo)
  225. {
  226. frmf_initForm(obj);
  227. lf_initDataSet();
  228. var sCol = grd_cddetl.getBindCellIndex("body", "checkcolor");
  229. if (sCol > -1)
  230. {
  231. grd_cddetl.setFormatColProperty(sCol,"size",0);
  232. }
  233. // 조회
  234. lf_GetCddetlSearch("1");
  235. // 그리드 sort
  236. grdf_setGridSort(grd_cddetl);
  237. }
  238. function lf_GetCddetlSearch(btnf){
  239. var sInDsName = dsf_createDsRow("in_ds_search"
  240. , [{col: "refgbn", val: group1.cmb_refflag.value}
  241. , {col: "searchgbn", val: group1.cmb_search.value}
  242. , {col: "searchnm", val: group1.ipt_searchtext.value}
  243. , {col: "btnflag", val: btnf}
  244. , {col: "cendb", val: lgv_sTargetDb}
  245. , {col: "instcd", val: lgv_sInstCd}]);
  246. ds_grid_grd_cddetl.clearData();
  247. var oParam = {};
  248. oParam.id = "TRLMF00101";
  249. oParam.service = "diagtestbaseinfomngtapp.MicroTestBaseInfoMngt";
  250. oParam.method = "reqGetBacList";
  251. oParam.inds = "cond="+sInDsName;
  252. oParam.outds = "ds_grid_grd_cddetl=baclist";
  253. oParam.async = false;
  254. oParam.callback = "cbf_SMLMF00100";
  255. tranf_submit(oParam);
  256. }
  257. function lf_initDataSet(){
  258. lf_getDbDeptcd("0000|0201|0301|","cbf_SMLMF00100");
  259. }
  260. //저장
  261. function lf_saveCddetlInfo(){
  262. var oParam = {};
  263. oParam.id = "TXLMF00101";
  264. oParam.service = "diagtestbaseinfomngtapp.MicroTestBaseInfoMngt";
  265. oParam.method = "reqExeBacList";
  266. oParam.inds = "cond=ds_grid_grd_cddetl:U";
  267. oParam.outds = "ds_grid_grd_cddetl=baclist";
  268. oParam.async = false;
  269. oParam.callback = "cbf_SMLMF00100";
  270. tranf_submit(oParam);
  271. }
  272. //콜백함수
  273. function cbf_SMLMF00100(strSvcID, nErrorCode, strErrorMag){
  274. if(nErrorCode != 0) sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
  275. if(strSvcID == "TXLMF00101" && nErrorCode==0){
  276. sysf_messageBox("","I001","");
  277. }
  278. lf_changeColor();
  279. }
  280. // 필수 값 체크
  281. function lf_ckeckNull()
  282. {
  283. var bChkValue= frmf_chkMdtGrid(grd_cddetl,[2,3,4],["사용시작일자","사용종료일자","배양균코드"]);
  284. if(bChkValue==true) lf_saveCddetlInfo();
  285. }
  286. //종료된 데이타 색깔 바꾸기
  287. function lf_changeColor(){
  288. var i =0;
  289. var j =0;
  290. if (ds_grid_grd_cddetl.rowcount == 0) return;
  291. var sExpr = "EXPR(checkcolor)";
  292. //Row색깔 투입
  293. ds_grid_grd_cddetl.updatecontrol = false ;
  294. for(j=0; j < ds_grid_grd_cddetl.rowcount; j++){
  295. if (ds_grid_grd_cddetl.getColumn(j,"baccdtodd") < utlf_getCurrentDate()) {
  296. ds_grid_grd_cddetl.setColumn(j, "checkcolor", "yellow");
  297. } else {
  298. ds_grid_grd_cddetl.setColumn(j, "checkcolor", "default");
  299. }
  300. ds_grid_grd_cddetl.setRowType(j,"1");
  301. }
  302. ds_grid_grd_cddetl.updatecontrol = true ;
  303. //색깔변경
  304. for (i=0; i < grd_cddetl.getCellCount('Head'); i++ ) {
  305. grd_cddetl.setCellProperty("Body",i,"background", sExpr);
  306. grd_cddetl.setCellProperty("Body",i,"background2", sExpr);
  307. }
  308. }
  309. //조회버튼
  310. function group1_btn_ref_onclick(obj:Button, e:ClickEventInfo)
  311. {
  312. lf_GetCddetlSearch("1");
  313. }
  314. //검색버튼
  315. function group1_btn_search_onclick(obj:Button, e:ClickEventInfo)
  316. {
  317. lf_GetCddetlSearch("2");
  318. }
  319. //초키화
  320. function group1_btn_reset_onclick(obj:Button, e:ClickEventInfo)
  321. {
  322. ds_grid_grd_cddetl.clearData();
  323. }
  324. //행추가
  325. function btn_addrow_onclick(obj:Button, e:ClickEventInfo)
  326. {
  327. var nRow =0;
  328. var nSeq =0;
  329. var objArg = new Object();
  330. objArg.sDeptFlag = ds_init_lb0201.getColumn(0,"nm");
  331. ds_grid_grd_select.clearData();
  332. frmf_modal("SPLMF10100", "SPLMF10100", objArg, "", "", "", "", "", "", "", "", "", "M");
  333. for(var i=0; i < ds_grid_grd_select.rowcount;i++){
  334. if(ds_grid_grd_select.getColumn(i,"chk")==1){
  335. nRow = ds_grid_grd_cddetl.addRow();
  336. ds_grid_grd_cddetl.setColumn(nRow,"baccdfromdd",utlf_getCurrentDate());
  337. ds_grid_grd_cddetl.setColumn(nRow,"baccdtodd","99991231");
  338. ds_grid_grd_cddetl.setColumn(nRow,"baccd",ds_grid_grd_select.getColumn(i,"baccd"));
  339. ds_grid_grd_cddetl.setColumn(nRow,"bacnm",ds_grid_grd_select.getColumn(i,"bacnm"));
  340. ds_grid_grd_cddetl.setColumn(nRow,"bacabbrnm",ds_grid_grd_select.getColumn(i,"bacabbrnm"));
  341. ds_grid_grd_cddetl.setColumn(nRow,"bacscrnnm",ds_grid_grd_select.getColumn(i,"bacscrnnm"));
  342. ds_grid_grd_cddetl.setColumn(nRow,"bacprntnm",ds_grid_grd_select.getColumn(i,"bacprntnm"));
  343. }
  344. }
  345. }
  346. //저장
  347. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  348. {
  349. lf_ckeckNull();
  350. }
  351. //검색어 입력 후 엔터
  352. function group1_ipt_searchtext_onkeydown(obj:Edit, e:KeyEventInfo)
  353. {
  354. if(e.keycode=="13") lf_GetCddetlSearch("2");
  355. }
  356. // 시작일자 종료일자 체크
  357. function ds_grid_grd_cddetl_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  358. {
  359. var fromdd = ds_grid_grd_cddetl.getColumn(e.row,"baccdfromdd");
  360. var todd = ds_grid_grd_cddetl.getColumn(e.row,"baccdtodd");
  361. // 종료일자체크
  362. if((e.columnid == "baccdtodd") || (e.columnid == "baccdfromdd")){
  363. if(fromdd != "" && todd != "") {
  364. if(fromdd > todd){
  365. sysf_messageBox("종료일자가 시작일자보다 이전 날짜입니다.", "I","");
  366. ds_grid_grd_cddetl.setColumn(e.row,"baccdtodd",ds_grid_grd_cddetl.getOrgColumn(e.row,"baccdtodd"));
  367. }
  368. }
  369. }
  370. }
  371. function grd_cddetl_oncloseup(obj:Grid, e:GridEditEventInfo)
  372. {
  373. grd_cddetl.updateToDataset();
  374. }
  375. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  376. {
  377. var saveName = "배양균코드";
  378. if(!utlf_isNull(saveName)) {
  379. grdf_exportExcel(grd_cddetl, lf_lisGetTitle(this) + "_","sheet",false);
  380. }
  381. }
  382. ]]></Script>
  383. </Form>
  384. </FDL>