123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMLMF10200" position="absolute 0 0 1256 805" titletext="New Form" onload="SMLMF10200_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="항균제코드관리" class="tit_1" position="absolute 0 0 155 25" positiontype="position"/>
- <Button id="btn_save" taborder="1" text="저장" class="btn4" position="absolute 1200 0 1256 20" anchor="top right" positiontype="position" onclick="btn_save_onclick"/>
- <Grid id="grd_antibiocddetl" taborder="3" 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">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="30"/>
- <Column size="0"/>
- <Column size="110"/>
- <Column size="110"/>
- <Column size="130"/>
- <Column size="210"/>
- <Column size="200"/>
- <Column size="200"/>
- <Column size="210"/>
- <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="checkcolor"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" expr="expr:currow+1"/>
- <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'))"/>
- <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" editlimit="10" editlengthunit="utf8"/>
- <Cell col="5" displaytype="text" edittype="text" text="bind:antibionm" editlimit="50" editlengthunit="utf8"/>
- <Cell col="6" displaytype="text" edittype="text" text="bind:antibioabbrnm" editlimit="20" editlengthunit="utf8"/>
- <Cell col="7" displaytype="text" edittype="text" text="bind:antibioscrnnm" editlimit="50" editlengthunit="utf8"/>
- <Cell col="8" displaytype="text" edittype="text" text="bind:antibioprntnm" editlimit="10" editlengthunit="utf8"/>
- <Cell col="9" text="bind:checkcolor"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_addrow" taborder="4" text="행추가" class="btn2" position="absolute 1200 74 1256 94" anchor="top right" positiontype="position" onclick="btn_addrow_onclick"/>
- <Static id="caption2" text="항균제코드상세내역" class="tit_2" position="absolute 0 77 142 97" positiontype="position"/>
- <Div id="group1" taborder="5" 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" anchor="default" positiontype="position"/>
- <Static id="caption1" text="조회구분" class="search_name" position="absolute 8 10 82 30" anchor="default" positiontype="position"/>
- <Static id="caption4" text="검색구분" class="search_name" position="absolute 776 10 850 30" anchor="top right" positiontype="position"/>
- <Shape id="line2" linetype="vertical" class="line_4" position="absolute 273 7 273 29" anchor="default" positiontype="position"/>
- <Combo id="cmb_refflag" taborder="1" class="combo_search" position="absolute 81 10 231 30" anchor="default" positiontype="position" codecolumn="codecolumn" datacolumn="datacolumn" index="0" value="1" text="사용가능자료">
- <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="2" text="조회" class="btn1" position="absolute 234 10 290 30" anchor="left top" positiontype="position" onclick="btn_ref_onclick"/>
- <Combo id="cmb_search" taborder="3" class="combo_search" position="absolute 850 10 1000 30" anchor="top right" positiontype="position" codecolumn="codecolumn" datacolumn="datacolumn" index="0" value="1" text="코드">
- <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="4" class="input_search" position="absolute 1003 10 1113 30" anchor="top right" imemode="hangul" positiontype="position" onkeydown="group1_ipt_searchtext_onkeydown"/>
- <Button id="btn_reset" taborder="5" text="초기화" class="btn1" position="absolute 1175 10 1244 30" anchor="top right" positiontype="position" onclick="btn_reset_onclick"/>
- <Button id="btn_search" taborder="6" text="검색" onclick="group1_btn_search_onclick" class="btn1" position="absolute 1116 10 1172 30" anchor="top right"/>
- </Layout>
- </Layouts>
- </Div>
- </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="checkcolor" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_database_instcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <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";
- var lgv_sInstCd = sysf_getUserInfo("dutplceinstcd");
- var lgv_sTargetDb = "";
- function SMLMF10200_onload(obj:Form, e:LoadEventInfo)
- {
- frmf_initForm(obj);
-
- lf_getDbDeptcd("0000|0011|");
-
- //조회
- lf_GetAntibiocd("1");
- grd_antibiocddetl.setFormatColProperty(9,"size",0);
-
- // 그리드 sort
- grdf_setGridSort(grd_antibiocddetl);
- }
- function lf_GetAntibiocd(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}
- , {col: "targetdb", val: lgv_sTargetDb}
- , {col: "instcd", val: lgv_sInstCd}]);
- ds_grid_grd_antibiocddetl.clearData();
-
- var oParam = {};
- oParam.id = "TRLMF00201";
- oParam.service = "diagtestbaseinfomngtapp.MicroTestBaseInfoMngt";
- oParam.method = "reqGetUnityAntibioList";
- oParam.inds = "cond="+sInDsName;
- oParam.outds = "ds_grid_grd_antibiocddetl=getUnityAntibioList";
- oParam.async = false;
- oParam.callback = "cbf_SMLMF10200";
- tranf_submit(oParam);
- }
- //저장
- function lf_saveAntibio(){
- var sInDsName2 = dsf_createDsRow("in_ds_search2"
- , [{col: "targetdb", val: lgv_sTargetDb}
- , {col: "instcd", val: lgv_sInstCd}]);
-
- var oParam = {};
- oParam.id = "TXLMF00301";
- oParam.service = "diagtestbaseinfomngtapp.MicroTestBaseInfoMngt";
- oParam.method = "reqExeUnityAntibioList";
- oParam.inds = "cond=ds_grid_grd_antibiocddetl:U";
- oParam.outds = "ds_grid_grd_antibiocddetl=antibiolist";
- oParam.async = false;
- oParam.callback = "cbf_SMLMF10200";
- tranf_submit(oParam);
-
- }
- //콜백함수
- function cbf_SMLMF10200(strSvcID, nErrorCode, strErrorMag){
- if(strSvcID == "TXLMF10201" && nErrorCode==0){
- sysf_messageBox("","I001","");
- }
- //종료된 데이타 색깔표시
- lf_changeColor();
- }
- // 필수값체크
- function lf_ckeckNull()
- {
- var bChkValue= frmf_chkMdtGrid(grd_antibiocddetl,[2,3,4],["사용시작일자","사용종료일자","향균제코드"]);
- if(bChkValue==true) lf_saveAntibio();
- }
- //종료된 데이타 색깔 바꾸기
- 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 btn_ref_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_GetAntibiocd("1");
- }
- //검색
- function group1_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_GetAntibiocd("2");
- }
- //초기화
- function btn_reset_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_grid_grd_antibiocddetl.clearData();
- }
- //행추가
- function btn_addrow_onclick(obj:Button, e:ClickEventInfo)
- {
- var nRow = ds_grid_grd_antibiocddetl.addRow();
- ds_grid_grd_antibiocddetl.setColumn(nRow,"antibiofromdd",utlf_getCurrentDate());
- ds_grid_grd_antibiocddetl.setColumn(nRow,"antibiotodd","99991231");
- }
- //저장
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- var retVal = lf_dupKeyCheckAll(new Array("antibiocd"), ds_grid_grd_antibiocddetl);
- if (retVal > -1)
- {
- sysf_messageBox("항균제코드가 중복됩니다.","I","");
- ds_grid_grd_antibiocddetl.selectRow(retVal);
- return;
- }
- lf_ckeckNull();
- }
- // 검색어 입력 후 엔터키
- function group1_ipt_searchtext_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode=="13") lf_GetAntibiocd("2");
- }
- // 시작일자 종료일자 체크
- 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 lf_dupKeyCheckAll(keyArr, dsParam:Dataset)
- {
- if (keyArr.length == 0) return false;
- for(var i=0;i<dsParam.getRowCount();i++)
- {
- if(!(dsParam.getRowType(i) == Dataset.ROWTYPE_INSERT || dsParam.getRowType(i) == Dataset.ROWTYPE_UPDATE))
- {
- //수정된 데이터하고만 비교 (속도문제)
- continue;
- }
- var keyValue = "";
- for(var colcnt=0; colcnt < keyArr.length; colcnt++)
- {
- if (colcnt == 0)
- {
- keyValue = keyArr[colcnt] +"=='"+ dsParam.getColumn(i, keyArr[colcnt]) +"'";
- }
- else
- {
- keyValue += " && "+ keyArr[colcnt] +"=='"+ dsParam.getColumn(i, keyArr[colcnt]) +"'";
- }
-
- }
- var keycheck = dsParam.findRowExpr(keyValue);
- if (keycheck == i)
- {
- keycheck = dsParam.findRowExpr(keyValue, i+1);
- }
-
- if (keycheck > -1)
- {
- return i;
- }
- }
- return -1;
- }]]></Script>
- </Form>
- </FDL>
|