123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMLMF00200" position="absolute 0 0 1256 805" titletext="New Form" onload="SMLMF00200_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="항균제코드관리" class="tit_1" position="absolute 0 0 155 25" positiontype="position"/>
- <Div id="group1" taborder="1" position="absolute 0 25 1256 67" anchor="left top right" positiontype="position" class="div_SA">
- <Layouts>
- <Layout>
- <Shape id="line3" linetype="vertical" class="line_4" position="absolute 1108 7 1108 29" positiontype="position"/>
- <Static id="caption1" text="조회구분" class="search_name" position="absolute 8 10 82 30" positiontype="position"/>
- <Static id="caption4" text="검색구분" class="search_name" position="absolute 776 10 850 30" positiontype="position" anchor="top right"/>
- <Shape id="line2" linetype="vertical" class="line_4" position="absolute 273 7 273 29" positiontype="position"/>
- <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">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn" size="256"/>
- <Column id="datacolumn" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">1</Col>
- <Col id="datacolumn">사용가능자료</Col>
- </Row>
- <Row>
- <Col id="codecolumn">2</Col>
- <Col id="datacolumn">전체자료</Col>
- </Row>
- </Rows>
- </Dataset>
- </Combo>
- <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"/>
- <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">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn" size="256"/>
- <Column id="datacolumn" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">1</Col>
- <Col id="datacolumn">코드</Col>
- </Row>
- <Row>
- <Col id="codecolumn">2</Col>
- <Col id="datacolumn">코드명</Col>
- </Row>
- </Rows>
- </Dataset>
- </Combo>
- <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"/>
- <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"/>
- <Button id="btn_search" taborder="11" text="검색" onclick="group1_btn_search_onclick" class="btn1" position="absolute 1116 10 1172 30" anchor="top right"/>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption2" text="항균제코드상세내역" class="tit_2" position="absolute 0 77 142 97" positiontype="position"/>
- <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">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="22"/>
- <Column size="0"/>
- <Column size="90"/>
- <Column size="90"/>
- <Column size="80"/>
- <Column size="198"/>
- <Column size="198"/>
- <Column size="198"/>
- <Column size="198"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="상태"/>
- <Cell col="2" text="사용시작일자"/>
- <Cell col="3" text="사용종료일자"/>
- <Cell col="4" text="항균제코드"/>
- <Cell col="5" text="항균제명"/>
- <Cell col="6" text="항균제명(약어)"/>
- <Cell col="7" text="항균제명(화면)"/>
- <Cell col="8" text="항균제명(출력)"/>
- <Cell col="9" text="항균제단위"/>
- <Cell col="10" text="checkcolor"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow+1"/>
- <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'))"/>
- <Cell col="2" displaytype="date" edittype="date" text="bind:antibiofromdd"/>
- <Cell col="3" displaytype="date" edittype="date" text="bind:antibiotodd"/>
- <Cell col="4" displaytype="text" edittype="text" text="bind:antibiocd"/>
- <Cell col="5" displaytype="text" edittype="text" text="bind:antibionm"/>
- <Cell col="6" displaytype="text" edittype="text" text="bind:antibioabbrnm"/>
- <Cell col="7" displaytype="text" edittype="text" text="bind:antibioscrnnm"/>
- <Cell col="8" displaytype="text" edittype="text" text="bind:antibioprntnm"/>
- <Cell col="9" displaytype="text" edittype="text" text="bind:antibiounit"/>
- <Cell col="10" text="bind:checkcolor"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <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"/>
- <Button id="btn_save" taborder="4" text="저장" class="btn4" position="absolute 1200 0 1256 20" anchor="top right" positiontype="position" onclick="btn_save_onclick"/>
- <Button id="btn_excel" taborder="5" text="엑셀" onclick="btn_excel_onclick" class="btn7" position="absolute 1148 74 1198 94" anchor="top right"/>
- </Layout>
- </Layouts>
- <Objects>
- <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">
- <ColumnInfo>
- <Column id="antibiofromdd" type="STRING"/>
- <Column id="antibiotodd" type="STRING"/>
- <Column id="antibiocd" type="STRING"/>
- <Column id="antibionm" type="STRING"/>
- <Column id="antibioabbrnm" type="STRING"/>
- <Column id="antibioscrnnm" type="STRING"/>
- <Column id="antibioprntnm" type="STRING"/>
- <Column id="antibiounit" type="STRING"/>
- <Column id="checkcolor" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grid_grd_select" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="antibiofromdd" type="STRING"/>
- <Column id="antibiotodd" type="STRING"/>
- <Column id="antibiocd" type="STRING"/>
- <Column id="antibionm" type="STRING"/>
- <Column id="antibioabbrnm" type="STRING"/>
- <Column id="antibioscrnnm" type="STRING"/>
- <Column id="antibioprntnm" type="STRING"/>
- <Column id="antibiounit" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_database_instcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item41" compid="btn_excel" propid="enable" datasetid="ds_print" columnid="able"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2015-11-09
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2015-11-09 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- include "lis_commonxp::LLZ001.xjs";
- include "lis_commonxp::LZZ001.xjs";
- function SMLMF00200_onload(obj:Form, e:LoadEventInfo)
- {
- frmf_initForm(obj);
-
- lf_getDbDeptcd("0000|");
-
- grd_antibiocddetl.setFormatColProperty(10,"size",0);
- //조회
- lf_GetAntiSearch("1");
- //그리드 sort
- grdf_setGridSort(grd_antibiocddetl);
- }
- function lf_GetAntiSearch(btnf){
- var sInDsName = dsf_createDsRow("in_ds_search"
- , [{col: "refgbn", val: group1.cmb_refflag.value}
- , {col: "searchgbn", val: group1.cmb_search.value}
- , {col: "searchnm", val: group1.ipt_searchtext.value}
- , {col: "btnflag", val: btnf}
- ]);
- ds_grid_grd_antibiocddetl.clearData();
- var oParam = {};
- oParam.id = "TRLMF00201";
- oParam.service = "diagtestbaseinfomngtapp.MicroTestBaseInfoMngt";
- oParam.method = "reqGetAntibioList";
- oParam.inds = "cond="+sInDsName;
- oParam.outds = "ds_grid_grd_antibiocddetl=antibiolist";
- oParam.async = false;
- oParam.callback = "cbf_SMLMF00200";
- tranf_submit(oParam);
- }
- //데이터 저장
- function lf_saveAntiInfo(){
-
- var oParam = {};
- oParam.id = "TXLMF00301";
- oParam.service = "diagtestbaseinfomngtapp.MicroTestBaseInfoMngt";
- oParam.method = "reqExeAntibioList";
- oParam.inds = "cond=ds_grid_grd_antibiocddetl:U";
- oParam.outds = "ds_grid_grd_antibiocddetl=antibiolist";
- oParam.async = false;
- oParam.callback = "cbf_SMLMF00200";
- tranf_submit(oParam);
- }
- //콜백함수
- function cbf_SMLMF00200(strSvcID, nErrorCode, strErrorMag){
- if(strSvcID == "TXLMF00101" && nErrorCode==0){
- sysf_messageBox("","I001","");
- }
- lf_changeColor();
- }
- // 널값체크
- function lf_ckeckNull()
- {
- var bChkValue= frmf_chkMdtGrid(grd_antibiocddetl,[2,3,4],["사용시작일자","사용종료일자","향균제코드"]);
- if(bChkValue==true) lf_saveAntiInfo();
- }
- //종료된 데이타 색깔 바꾸기
- function lf_changeColor(){
- var i =0;
- var j =0;
- if (ds_grid_grd_antibiocddetl.rowcount == 0) return;
- var sExpr = "EXPR(checkcolor)";
- //Row색깔 투입
- ds_grid_grd_antibiocddetl.updatecontrol = false ;
- for(j=0; j < ds_grid_grd_antibiocddetl.rowcount; j++){
- if (ds_grid_grd_antibiocddetl.getColumn(j,"antibiotodd") < utlf_getCurrentDate()) {
- ds_grid_grd_antibiocddetl.setColumn(j, "checkcolor", "yellow");
- } else {
- ds_grid_grd_antibiocddetl.setColumn(j, "checkcolor", "default");
- }
- ds_grid_grd_antibiocddetl.setRowType(j,"1");
- }
- ds_grid_grd_antibiocddetl.updatecontrol = true ;
- //색깔변경
- for (i=0; i < grd_antibiocddetl.getCellCount('Head'); i++ ) {
- grd_antibiocddetl.setCellProperty("Body",i,"background", sExpr);
- grd_antibiocddetl.setCellProperty("Body",i,"background2", sExpr);
- }
- }
- //조회
- function group1_btn_ref_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_GetAntiSearch("1");
- }
- //검색
- function group1_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_GetAntiSearch("2");
- }
- // 초기화
- function group1_btn_reset_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_grid_grd_antibiocddetl.clearData();
- }
- //저장
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_ckeckNull();
- }
- //검색어 입력후 엔터키
- function group1_ipt_searchtext_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode=="13") lf_GetAntiSearch("2");
- }
- //행추가
- function btn_addrow_onclick(obj:Button, e:ClickEventInfo)
- {
- var nRow =0;
- var nSeq =0;
- var objArg = new Object();
- // objArg.sDeptFlag = ds_init_lb0201.getColumn(0,"nm");
- ds_grid_grd_select.clearData();
- frmf_modal("SPLMF10200", "SPLMF10200", objArg, "", "", "", "", "", "", "", "", "", "M");
-
- for(var i=0; i < ds_grid_grd_select.rowcount;i++){
- if(ds_grid_grd_select.getColumn(i,"chk")==1){
- nRow = ds_grid_grd_antibiocddetl.addRow();
- ds_grid_grd_antibiocddetl.setColumn(nRow,"antibiofromdd",utlf_getCurrentDate());
- ds_grid_grd_antibiocddetl.setColumn(nRow,"antibiotodd","99991231");
- ds_grid_grd_antibiocddetl.setColumn(nRow,"antibiocd",ds_grid_grd_select.getColumn(i,"antibiocd"));
- ds_grid_grd_antibiocddetl.setColumn(nRow,"antibionm",ds_grid_grd_select.getColumn(i,"antibionm"));
- ds_grid_grd_antibiocddetl.setColumn(nRow,"antibioabbrnm",ds_grid_grd_select.getColumn(i,"antibioabbrnm"));
- ds_grid_grd_antibiocddetl.setColumn(nRow,"antibioscrnnm",ds_grid_grd_select.getColumn(i,"antibioscrnnm"));
- ds_grid_grd_antibiocddetl.setColumn(nRow,"antibioprntnm",ds_grid_grd_select.getColumn(i,"antibioprntnm"));
- }
- }
- }
- // 시작일자 종료일자 체크
- function ds_grid_grd_antibiocddetl_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- var fromdd = ds_grid_grd_antibiocddetl.getColumn(e.row,"antibiofromdd");
- var todd = ds_grid_grd_antibiocddetl.getColumn(e.row,"antibiotodd");
-
- // 종료일자체크
- if((e.columnid == "antibiotodd") || (e.columnid == "antibiofromdd")){
- if(fromdd != "" && todd != "") {
- if(fromdd > todd){
- sysf_messageBox("종료일자가 시작일자보다 이전 날짜입니다.", "I","");
- ds_grid_grd_antibiocddetl.setColumn(e.row,"baccdtodd",ds_grid_grd_antibiocddetl.getOrgColumn(e.row,"antibiotodd"));
- }
- }
- }
- }
- function btn_excel_onclick(obj:Button, e:ClickEventInfo)
- {
- var saveName = "향균제코드";
-
- if(!utlf_isNull(saveName)) {
- grdf_exportExcel(grd_antibiocddetl, lf_lisGetTitle(this) + "_","sheet",false);
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|