SMLMF00200_항균제코드관리.xfdl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMLMF00200" position="absolute 0 0 1256 805" titletext="New Form" onload="SMLMF00200_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="항균제코드관리" class="tit_1" position="absolute 0 0 155 25" positiontype="position"/>
  8. <Div id="group1" taborder="1" position="absolute 0 25 1256 67" anchor="left top right" positiontype="position" class="div_SA">
  9. <Layouts>
  10. <Layout>
  11. <Shape id="line3" linetype="vertical" class="line_4" position="absolute 1108 7 1108 29" positiontype="position"/>
  12. <Static id="caption1" text="조회구분" class="search_name" position="absolute 8 10 82 30" positiontype="position"/>
  13. <Static id="caption4" text="검색구분" class="search_name" position="absolute 776 10 850 30" positiontype="position" anchor="top right"/>
  14. <Shape id="line2" linetype="vertical" class="line_4" position="absolute 273 7 273 29" positiontype="position"/>
  15. <Combo id="cmb_refflag" taborder="6" class="combo_search" position="absolute 82 10 232 30" positiontype="position" codecolumn="codecolumn" datacolumn="datacolumn" index="0" value="1" text="사용가능자료" onitemchanged="group1_cmb_refflag_onitemchanged" anchor="left top">
  16. <Dataset id="innerdataset">
  17. <ColumnInfo>
  18. <Column id="codecolumn" size="256"/>
  19. <Column id="datacolumn" size="256"/>
  20. </ColumnInfo>
  21. <Rows>
  22. <Row>
  23. <Col id="codecolumn">1</Col>
  24. <Col id="datacolumn">사용가능자료</Col>
  25. </Row>
  26. <Row>
  27. <Col id="codecolumn">2</Col>
  28. <Col id="datacolumn">전체자료</Col>
  29. </Row>
  30. </Rows>
  31. </Dataset>
  32. </Combo>
  33. <Button id="btn_ref" taborder="7" text="조회" class="btn1" position="absolute 235 10 291 30" anchor="left top" positiontype="position" onclick="group1_btn_ref_onclick"/>
  34. <Combo id="cmb_search" taborder="8" class="combo_search" position="absolute 850 10 1000 30" positiontype="position" codecolumn="codecolumn" datacolumn="datacolumn" index="0" value="1" text="코드" anchor="top right">
  35. <Dataset id="innerdataset">
  36. <ColumnInfo>
  37. <Column id="codecolumn" size="256"/>
  38. <Column id="datacolumn" size="256"/>
  39. </ColumnInfo>
  40. <Rows>
  41. <Row>
  42. <Col id="codecolumn">1</Col>
  43. <Col id="datacolumn">코드</Col>
  44. </Row>
  45. <Row>
  46. <Col id="codecolumn">2</Col>
  47. <Col id="datacolumn">코드명</Col>
  48. </Row>
  49. </Rows>
  50. </Dataset>
  51. </Combo>
  52. <Edit id="ipt_searchtext" taborder="9" class="input_search" position="absolute 1003 10 1113 30" imemode="hangul" positiontype="position" onkeydown="group1_ipt_searchtext_onkeydown" anchor="top right"/>
  53. <Button id="btn_reset" taborder="10" text="초기화" onlbuttonup="btn_reset_onlbuttonup" class="btn1" position="absolute 1175 10 1244 30" anchor="top right" positiontype="position" onclick="group1_btn_reset_onclick"/>
  54. <Button id="btn_search" taborder="11" text="검색" onclick="group1_btn_search_onclick" class="btn1" position="absolute 1116 10 1172 30" anchor="top right"/>
  55. </Layout>
  56. </Layouts>
  57. </Div>
  58. <Static id="caption2" text="항균제코드상세내역" class="tit_2" position="absolute 0 77 142 97" positiontype="position"/>
  59. <Grid id="grd_antibiocddetl" taborder="2" useinputpanel="false" position="absolute 0 97 1256 805" autofittype="col" anchor="all" binddataset="ds_grid_grd_antibiocddetl" positiontype="position" autoenter="select" class="CSS::lis.css" cellsizingtype="col">
  60. <Formats>
  61. <Format id="default">
  62. <Columns>
  63. <Column size="22"/>
  64. <Column size="0"/>
  65. <Column size="90"/>
  66. <Column size="90"/>
  67. <Column size="80"/>
  68. <Column size="198"/>
  69. <Column size="198"/>
  70. <Column size="198"/>
  71. <Column size="198"/>
  72. <Column size="0"/>
  73. <Column size="0"/>
  74. </Columns>
  75. <Rows>
  76. <Row size="24" band="head"/>
  77. <Row size="24"/>
  78. </Rows>
  79. <Band id="head">
  80. <Cell/>
  81. <Cell col="1" text="상태"/>
  82. <Cell col="2" text="사용시작일자"/>
  83. <Cell col="3" text="사용종료일자"/>
  84. <Cell col="4" text="항균제코드"/>
  85. <Cell col="5" text="항균제명"/>
  86. <Cell col="6" text="항균제명(약어)"/>
  87. <Cell col="7" text="항균제명(화면)"/>
  88. <Cell col="8" text="항균제명(출력)"/>
  89. <Cell col="9" text="항균제단위"/>
  90. <Cell col="10" text="checkcolor"/>
  91. </Band>
  92. <Band id="body">
  93. <Cell celltype="head" text="expr:currow+1"/>
  94. <Cell col="1" displaytype="image" expr="expr: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'))"/>
  95. <Cell col="2" displaytype="date" edittype="date" text="bind:antibiofromdd"/>
  96. <Cell col="3" displaytype="date" edittype="date" text="bind:antibiotodd"/>
  97. <Cell col="4" displaytype="text" edittype="text" text="bind:antibiocd"/>
  98. <Cell col="5" displaytype="text" edittype="text" text="bind:antibionm"/>
  99. <Cell col="6" displaytype="text" edittype="text" text="bind:antibioabbrnm"/>
  100. <Cell col="7" displaytype="text" edittype="text" text="bind:antibioscrnnm"/>
  101. <Cell col="8" displaytype="text" edittype="text" text="bind:antibioprntnm"/>
  102. <Cell col="9" displaytype="text" edittype="text" text="bind:antibiounit"/>
  103. <Cell col="10" text="bind:checkcolor"/>
  104. </Band>
  105. </Format>
  106. </Formats>
  107. </Grid>
  108. <Button id="btn_addrow" taborder="3" text="행추가" onlbuttonup="btn_addrow_onlbuttonup" class="btn2" position="absolute 1200 74 1256 94" anchor="top right" positiontype="position" onclick="btn_addrow_onclick"/>
  109. <Button id="btn_save" taborder="4" text="저장" class="btn4" position="absolute 1200 0 1256 20" anchor="top right" positiontype="position" onclick="btn_save_onclick"/>
  110. <Button id="btn_excel" taborder="5" text="엑셀" onclick="btn_excel_onclick" class="btn7" position="absolute 1148 74 1198 94" anchor="top right"/>
  111. </Layout>
  112. </Layouts>
  113. <Objects>
  114. <Dataset id="ds_grid_grd_antibiocddetl" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false" oncolumnchanged="ds_grid_grd_antibiocddetl_oncolumnchanged">
  115. <ColumnInfo>
  116. <Column id="antibiofromdd" type="STRING"/>
  117. <Column id="antibiotodd" type="STRING"/>
  118. <Column id="antibiocd" type="STRING"/>
  119. <Column id="antibionm" type="STRING"/>
  120. <Column id="antibioabbrnm" type="STRING"/>
  121. <Column id="antibioscrnnm" type="STRING"/>
  122. <Column id="antibioprntnm" type="STRING"/>
  123. <Column id="antibiounit" type="STRING"/>
  124. <Column id="checkcolor" type="STRING" size="256"/>
  125. </ColumnInfo>
  126. </Dataset>
  127. <Dataset id="ds_grid_grd_select" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  128. <ColumnInfo>
  129. <Column id="antibiofromdd" type="STRING"/>
  130. <Column id="antibiotodd" type="STRING"/>
  131. <Column id="antibiocd" type="STRING"/>
  132. <Column id="antibionm" type="STRING"/>
  133. <Column id="antibioabbrnm" type="STRING"/>
  134. <Column id="antibioscrnnm" type="STRING"/>
  135. <Column id="antibioprntnm" type="STRING"/>
  136. <Column id="antibiounit" type="STRING"/>
  137. </ColumnInfo>
  138. </Dataset>
  139. <Dataset id="ds_database_instcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  140. </Objects>
  141. <Bind>
  142. <BindItem id="item41" compid="btn_excel" propid="enable" datasetid="ds_print" columnid="able"/>
  143. </Bind>
  144. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  145. * System Name :
  146. * Job Name :
  147. * Creator :
  148. * Make Date : 2015-11-09
  149. * Description :
  150. *---------------------------------------------------------------------------------------
  151. * Modify Date Modifier Modify Description
  152. *---------------------------------------------------------------------------------------
  153. * 2015-11-09 Live Converter TF->XP
  154. *
  155. *---------------------------------------------------------------------------------------
  156. ****************************************************************************************/
  157. include "com_commonxp::comm_main.xjs";
  158. include "lis_commonxp::LLZ001.xjs";
  159. include "lis_commonxp::LZZ001.xjs";
  160. function SMLMF00200_onload(obj:Form, e:LoadEventInfo)
  161. {
  162. frmf_initForm(obj);
  163. lf_getDbDeptcd("0000|");
  164. grd_antibiocddetl.setFormatColProperty(10,"size",0);
  165. //조회
  166. lf_GetAntiSearch("1");
  167. //그리드 sort
  168. grdf_setGridSort(grd_antibiocddetl);
  169. }
  170. function lf_GetAntiSearch(btnf){
  171. var sInDsName = dsf_createDsRow("in_ds_search"
  172. , [{col: "refgbn", val: group1.cmb_refflag.value}
  173. , {col: "searchgbn", val: group1.cmb_search.value}
  174. , {col: "searchnm", val: group1.ipt_searchtext.value}
  175. , {col: "btnflag", val: btnf}
  176. ]);
  177. ds_grid_grd_antibiocddetl.clearData();
  178. var oParam = {};
  179. oParam.id = "TRLMF00201";
  180. oParam.service = "diagtestbaseinfomngtapp.MicroTestBaseInfoMngt";
  181. oParam.method = "reqGetAntibioList";
  182. oParam.inds = "cond="+sInDsName;
  183. oParam.outds = "ds_grid_grd_antibiocddetl=antibiolist";
  184. oParam.async = false;
  185. oParam.callback = "cbf_SMLMF00200";
  186. tranf_submit(oParam);
  187. }
  188. //데이터 저장
  189. function lf_saveAntiInfo(){
  190. var oParam = {};
  191. oParam.id = "TXLMF00301";
  192. oParam.service = "diagtestbaseinfomngtapp.MicroTestBaseInfoMngt";
  193. oParam.method = "reqExeAntibioList";
  194. oParam.inds = "cond=ds_grid_grd_antibiocddetl:U";
  195. oParam.outds = "ds_grid_grd_antibiocddetl=antibiolist";
  196. oParam.async = false;
  197. oParam.callback = "cbf_SMLMF00200";
  198. tranf_submit(oParam);
  199. }
  200. //콜백함수
  201. function cbf_SMLMF00200(strSvcID, nErrorCode, strErrorMag){
  202. if(strSvcID == "TXLMF00101" && nErrorCode==0){
  203. sysf_messageBox("","I001","");
  204. }
  205. lf_changeColor();
  206. }
  207. // 널값체크
  208. function lf_ckeckNull()
  209. {
  210. var bChkValue= frmf_chkMdtGrid(grd_antibiocddetl,[2,3,4],["사용시작일자","사용종료일자","향균제코드"]);
  211. if(bChkValue==true) lf_saveAntiInfo();
  212. }
  213. //종료된 데이타 색깔 바꾸기
  214. function lf_changeColor(){
  215. var i =0;
  216. var j =0;
  217. if (ds_grid_grd_antibiocddetl.rowcount == 0) return;
  218. var sExpr = "EXPR(checkcolor)";
  219. //Row색깔 투입
  220. ds_grid_grd_antibiocddetl.updatecontrol = false ;
  221. for(j=0; j < ds_grid_grd_antibiocddetl.rowcount; j++){
  222. if (ds_grid_grd_antibiocddetl.getColumn(j,"antibiotodd") < utlf_getCurrentDate()) {
  223. ds_grid_grd_antibiocddetl.setColumn(j, "checkcolor", "yellow");
  224. } else {
  225. ds_grid_grd_antibiocddetl.setColumn(j, "checkcolor", "default");
  226. }
  227. ds_grid_grd_antibiocddetl.setRowType(j,"1");
  228. }
  229. ds_grid_grd_antibiocddetl.updatecontrol = true ;
  230. //색깔변경
  231. for (i=0; i < grd_antibiocddetl.getCellCount('Head'); i++ ) {
  232. grd_antibiocddetl.setCellProperty("Body",i,"background", sExpr);
  233. grd_antibiocddetl.setCellProperty("Body",i,"background2", sExpr);
  234. }
  235. }
  236. //조회
  237. function group1_btn_ref_onclick(obj:Button, e:ClickEventInfo)
  238. {
  239. lf_GetAntiSearch("1");
  240. }
  241. //검색
  242. function group1_btn_search_onclick(obj:Button, e:ClickEventInfo)
  243. {
  244. lf_GetAntiSearch("2");
  245. }
  246. // 초기화
  247. function group1_btn_reset_onclick(obj:Button, e:ClickEventInfo)
  248. {
  249. ds_grid_grd_antibiocddetl.clearData();
  250. }
  251. //저장
  252. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  253. {
  254. lf_ckeckNull();
  255. }
  256. //검색어 입력후 엔터키
  257. function group1_ipt_searchtext_onkeydown(obj:Edit, e:KeyEventInfo)
  258. {
  259. if(e.keycode=="13") lf_GetAntiSearch("2");
  260. }
  261. //행추가
  262. function btn_addrow_onclick(obj:Button, e:ClickEventInfo)
  263. {
  264. var nRow =0;
  265. var nSeq =0;
  266. var objArg = new Object();
  267. // objArg.sDeptFlag = ds_init_lb0201.getColumn(0,"nm");
  268. ds_grid_grd_select.clearData();
  269. frmf_modal("SPLMF10200", "SPLMF10200", objArg, "", "", "", "", "", "", "", "", "", "M");
  270. for(var i=0; i < ds_grid_grd_select.rowcount;i++){
  271. if(ds_grid_grd_select.getColumn(i,"chk")==1){
  272. nRow = ds_grid_grd_antibiocddetl.addRow();
  273. ds_grid_grd_antibiocddetl.setColumn(nRow,"antibiofromdd",utlf_getCurrentDate());
  274. ds_grid_grd_antibiocddetl.setColumn(nRow,"antibiotodd","99991231");
  275. ds_grid_grd_antibiocddetl.setColumn(nRow,"antibiocd",ds_grid_grd_select.getColumn(i,"antibiocd"));
  276. ds_grid_grd_antibiocddetl.setColumn(nRow,"antibionm",ds_grid_grd_select.getColumn(i,"antibionm"));
  277. ds_grid_grd_antibiocddetl.setColumn(nRow,"antibioabbrnm",ds_grid_grd_select.getColumn(i,"antibioabbrnm"));
  278. ds_grid_grd_antibiocddetl.setColumn(nRow,"antibioscrnnm",ds_grid_grd_select.getColumn(i,"antibioscrnnm"));
  279. ds_grid_grd_antibiocddetl.setColumn(nRow,"antibioprntnm",ds_grid_grd_select.getColumn(i,"antibioprntnm"));
  280. }
  281. }
  282. }
  283. // 시작일자 종료일자 체크
  284. function ds_grid_grd_antibiocddetl_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  285. {
  286. var fromdd = ds_grid_grd_antibiocddetl.getColumn(e.row,"antibiofromdd");
  287. var todd = ds_grid_grd_antibiocddetl.getColumn(e.row,"antibiotodd");
  288. // 종료일자체크
  289. if((e.columnid == "antibiotodd") || (e.columnid == "antibiofromdd")){
  290. if(fromdd != "" && todd != "") {
  291. if(fromdd > todd){
  292. sysf_messageBox("종료일자가 시작일자보다 이전 날짜입니다.", "I","");
  293. ds_grid_grd_antibiocddetl.setColumn(e.row,"baccdtodd",ds_grid_grd_antibiocddetl.getOrgColumn(e.row,"antibiotodd"));
  294. }
  295. }
  296. }
  297. }
  298. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  299. {
  300. var saveName = "향균제코드";
  301. if(!utlf_isNull(saveName)) {
  302. grdf_exportExcel(grd_antibiocddetl, lf_lisGetTitle(this) + "_","sheet",false);
  303. }
  304. }
  305. ]]></Script>
  306. </Form>
  307. </FDL>