123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMLMF10100" position="absolute 0 0 1256 805" titletext="New Form" onload="SMLMF10100_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="배양균코드관리" class="tit_1" position="absolute 0 0 155 25" positiontype="position"/>
- <Shape id="line1" class="line_1" position="absolute 0 118 1194 118" linetype="horizontal" positiontype="position"/>
- <Static id="caption2" text="배양균코드상세내역" class="tit_2" position="absolute 0 77 142 97" positiontype="position"/>
- <Grid id="grd_cddetl" class="CSS::lis.css" taborder="1" useinputpanel="false" position="absolute 0 97 1256 805" autofittype="col" anchor="all" binddataset="ds_grid_grd_cddetl" positiontype="position" autoenter="select" cellsizingtype="both">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="30"/>
- <Column size="90"/>
- <Column size="90"/>
- <Column size="68"/>
- <Column size="300"/>
- <Column size="100"/>
- <Column size="200"/>
- <Column size="100"/>
- <Column size="0"/>
- <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="Division"/>
- <Cell col="9" text="GRAM"/>
- <Cell col="10" text="checkcolor"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" expr="expr:currow+1"/>
- <Cell col="1" displaytype="date" edittype="date" text="bind:baccdfromdd"/>
- <Cell col="2" displaytype="date" edittype="date" text="bind:baccdtodd"/>
- <Cell col="3" displaytype="text" edittype="text" text="bind:baccd" editlimit="10" editlengthunit="utf8"/>
- <Cell col="4" displaytype="text" edittype="text" text="bind:bacnm" editlimit="80" editlengthunit="utf8"/>
- <Cell col="5" displaytype="text" edittype="text" text="bind:bacabbrnm" editlimit="20" editlengthunit="utf8"/>
- <Cell col="6" displaytype="text" edittype="text" text="bind:bacscrnnm" editlimit="80" editlengthunit="utf8"/>
- <Cell col="7" displaytype="text" edittype="text" text="bind:bacprntnm" editlimit="10" editlengthunit="utf8"/>
- <Cell col="8" displaytype="text" edittype="text" text="bind:division"/>
- <Cell col="9" displaytype="text" edittype="text" text="bind:gram"/>
- <Cell col="10" text="bind:checkcolor"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_addrow" taborder="2" text="행추가" onlbuttonup="btn_addrow_onlbuttonup" class="btn2" position="absolute 1200 74 1256 94" anchor="top right" positiontype="position" onclick="btn_addrow_onclick"/>
- <Div id="group1" taborder="3" 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"/>
- <Shape id="line14" linetype="vertical" class="line_4" position="absolute 273 6 273 28" anchor="default" positiontype="position"/>
- <Static id="caption4" text="검색구분" class="search_name" position="absolute 776 10 850 30" anchor="top right" positiontype="position"/>
- <Combo id="cmb_refflag" taborder="11" 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="12" text="조회" onlbuttonup="btn_ref_onlbuttonup" class="btn1" position="absolute 234 10 290 30" anchor="left top" positiontype="position" onclick="btn_ref_onclick"/>
- <Combo id="cmb_search" taborder="13" 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="14" 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="15" text="초기화" onlbuttonup="btn_reset_onlbuttonup" class="btn1" position="absolute 1175 10 1244 30" anchor="top right" positiontype="position" onclick="btn_reset_onclick"/>
- <Button id="btn_search" taborder="16" text="검색" onclick="group1_btn_search_onclick" class="btn1" position="absolute 1116 10 1172 30" anchor="top right"/>
- </Layout>
- </Layouts>
- </Div>
- <Button id="btn_save" taborder="4" text="저장" class="btn4" position="absolute 1200 0 1256 20" anchor="top right" positiontype="position" onclick="btn_save_onclick"/>
- </Layout>
- </Layouts>
- <Objects>
- <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">
- <ColumnInfo>
- <Column id="baccdfromdd" type="STRING"/>
- <Column id="baccdtodd" type="STRING"/>
- <Column id="baccd" type="STRING"/>
- <Column id="bacnm" type="STRING"/>
- <Column id="bacabbrnm" type="STRING"/>
- <Column id="bacscrnnm" type="STRING"/>
- <Column id="bacprntnm" type="STRING"/>
- <Column id="checkcolor" type="STRING" size="256"/>
- <Column id="division" type="STRING" size="256"/>
- <Column id="gram" 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";
- function SMLMF10100_onload(obj:Form, e:LoadEventInfo)
- {
- frmf_initForm(obj);
-
- lf_getDbDeptcd("0000|");
-
- lf_GetBaccd("1");
- grd_cddetl.setFormatColProperty(11,"size",0);
- grdf_setGridSort(grd_cddetl);
- }
- var lgv_sInstCd = sysf_getUserInfo("dutplceinstcd"); // 병원코드
- var lgv_sTargetDb = "";
- function lf_GetBaccd(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_cddetl.clearData();
-
- var oParam = {};
- oParam.id = "TRLMF00101";
- oParam.service = "diagtestbaseinfomngtapp.MicroTestBaseInfoMngt";
- oParam.method = "reqGetUnityBacList";
- oParam.inds = "cond="+sInDsName;
- oParam.outds = "ds_grid_grd_cddetl=getUnityBacList";
- oParam.async = false;
- oParam.callback = "cbf_SMLMF10100";
- tranf_submit(oParam);
- }
- //저장
- function lf_saveBac(){
- var sInDsName2 = dsf_createDsRow("in_ds_search2"
- , [{col: "targetdb", val: lgv_sTargetDb}
- , {col: "instcd", val: lgv_sInstCd}]);
-
- var oParam = {};
- oParam.id = "TXLMF00101";
- oParam.service = "diagtestbaseinfomngtapp.MicroTestBaseInfoMngt";
- oParam.method = "reqExeUnityBacList";
- oParam.inds = "cond=ds_grid_grd_cddetl:U";
- oParam.outds = "ds_grid_grd_cddetl=baclist";
- oParam.async = false;
- oParam.callback = "cbf_SMLMF10100";
- tranf_submit(oParam);
- }
- //콜백함수
- function cbf_SMLMF10100(strSvcID, nErrorCode, strErrorMag){
- if(strSvcID == "TXLMF10101" && nErrorCode==0){
- sysf_messageBox("","I001","");
- }
- //종료된 데이타 색깔표시
- lf_changeColor();
- }
- function lf_ckeckNull()
- {
- var bChkValue= frmf_chkMdtGrid(grd_cddetl,[2,3,4],["사용시작일자","사용종료일자","배양균코드"]);
- if(bChkValue==true) lf_saveBac();
- }
- //종료된 데이타 색깔 바꾸기
- function lf_changeColor(){
- var i =0;
- var j =0;
- if (ds_grid_grd_cddetl.rowcount == 0) return;
- var sExpr = "EXPR(checkcolor)";
- //Row색깔 투입
- ds_grid_grd_cddetl.updatecontrol = false ;
- for(j=0; j < ds_grid_grd_cddetl.rowcount; j++){
- if (ds_grid_grd_cddetl.getColumn(j,"baccdtodd") < utlf_getCurrentDate()) {
- ds_grid_grd_cddetl.setColumn(j, "checkcolor", "yellow");
- } else {
- ds_grid_grd_cddetl.setColumn(j, "checkcolor", "default");
- }
- ds_grid_grd_cddetl.setRowType(j,"1");
- }
- ds_grid_grd_cddetl.updatecontrol = true ;
- //색깔변경
- for (i=0; i < grd_cddetl.getCellCount('Head'); i++ ) {
- grd_cddetl.setCellProperty("Body",i,"background", sExpr);
- grd_cddetl.setCellProperty("Body",i,"background2", sExpr);
- }
- }
- //저장
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- var retVal = lf_dupKeyCheckAll(new Array("baccd"), ds_grid_grd_cddetl);
- if (retVal > -1)
- {
- sysf_messageBox("배양균코드가 중복됩니다.","I","");
- ds_grid_grd_cddetl.selectRow(retVal);
- return;
- }
- lf_ckeckNull();
- }
- //조회
- function btn_ref_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_GetBaccd("1");
- }
- //검색
- function group1_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_GetBaccd("2");
- }
- //초기화
- function btn_reset_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_grid_grd_cddetl.clearData();
- }
- // 검색어 입력 후 엔터키
- function group1_ipt_searchtext_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode=="13") lf_GetBaccd("2");
- }
- //행추가
- function btn_addrow_onclick(obj:Button, e:ClickEventInfo)
- {
- var nRow = ds_grid_grd_cddetl.addRow();
- ds_grid_grd_cddetl.setColumn(nRow,"baccdfromdd",utlf_getCurrentDate());
- ds_grid_grd_cddetl.setColumn(nRow,"baccdtodd","99991231");
- }
- // 시작일자 종료일자 체크
- function ds_grid_grd_cddetl_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- var fromdd = ds_grid_grd_cddetl.getColumn(e.row,"baccdfromdd");
- var todd = ds_grid_grd_cddetl.getColumn(e.row,"baccdtodd");
-
- // 종료일자체크
- if((e.columnid == "baccdtodd") || (e.columnid == "baccdfromdd")){
- if(fromdd != "" && todd != "") {
- if(fromdd > todd){
- sysf_messageBox("종료일자가 시작일자보다 이전 날짜입니다.", "I","");
- ds_grid_grd_cddetl.setColumn(e.row,"baccdtodd",ds_grid_grd_cddetl.getOrgColumn(e.row,"baccdtodd"));
- }
- }
- }
- }
- 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>
|