123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMLLF00400" position="absolute 0 0 1253 808" titletext="용기코드관리" oninit="model1_oninit" onload="SMLLF00400_onload">
- <Layouts>
- <Layout>
- <Static id="caption2" text="용기코드상세내역" class="tit_2" position="absolute 1 78 125 98" positiontype="position" anchor="default"/>
- <Button id="btn_grdadd" taborder="3" text="행추가" class="btn2" position="absolute 925 75 981 95" anchor="top right" positiontype="position" onclick="btn_grdadd_onclick"/>
- <Static id="caption5" text="용기 실제 이미지" class="tit_2" position="absolute 990 78 1114 96" anchor="top right" positiontype="position"/>
- <Button id="saveExcel" taborder="11" text="엑셀" class="btn7" position="absolute 870 75 922 95" anchor="top right" positiontype="position" onclick="saveExcel_onclick"/>
- <Static id="caption6" text="용기코드관리" class="tit_1" position="absolute 1 1 107 26" positiontype="position" anchor="default"/>
- <ImageViewer id="img3" taborder="22" position="absolute 1065 101 1085 121" anchor="top right" positiontype="position" stretch="fit"/>
- <Static id="caption3" text="아이콘" class="cell_1" position="absolute 990 99 1062 123" style="align:left middle;" anchor="top right" positiontype="position"/>
- <Button id="btn_imgsave" taborder="24" text="이미지등록" class="btn2" position="absolute 1165 151 1245 171" anchor="top right" positiontype="position" onclick="btn_imgsave_onclick"/>
- <Static id="caption8" text="실제이미지" class="cell_1" position="absolute 990 124 1062 148" style="align:left middle;" anchor="top right" positiontype="position"/>
- <Edit id="opt_icon" taborder="26" position="absolute 1088 101 1228 121" anchor="top right" imemode="hangul" positiontype="position" autoselect="true"/>
- <Edit id="opt_org" taborder="27" position="absolute 1065 126 1228 146" anchor="top right" imemode="hangul" positiontype="position" autoselect="true"/>
- <Button id="icon_search1" taborder="28" class="icon_search" position="absolute 1225 101 1245 121" anchor="top right" text="" positiontype="position" onclick="icon_search1_onclick"/>
- <Button id="icon_search2" taborder="29" class="icon_search" position="absolute 1226 126 1246 146" anchor="top right" text="" positiontype="position" onclick="icon_search2_onclick"/>
- <Button id="btn_save" taborder="31" text="저장" class="btn4" position="absolute 1192 1 1248 21" anchor="top right" positiontype="position" onclick="btn_save_onclick"/>
- <ImageViewer id="img1" taborder="32" position="absolute 988 174 1246 501" onclick="img1_onclick" anchor="top right" visible="true" positiontype="position" stretch="fit"/>
- <Static id="caption00" text="용기 상세 설명" class="tit_2" position="absolute 988 506 1101 523" anchor="top right"/>
- <TextArea id="tube_detail" taborder="33" position="absolute 988 524 1247 801" anchor="top right" autoselect="true"/>
- <Div id="group2" anchor="left top right" taborder="34" position="absolute 1 26 1249 68" class="div_SA">
- <Layouts>
- <Layout>
- <Static id="caption1" text="조회구분" class="search_name" position="absolute 8 10 82 30" anchor="default"/>
- <Combo id="cmb_refgbn" taborder="61" value="1" text="사용코드" codecolumn="codecolumn" datacolumn="datacolumn" index="0" onitemchanged="group2_cmb_refgbn_onitemchanged" class="combo_search" position="absolute 82 10 232 30" anchor="default">
- <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_search" taborder="62" text="조회" onclick="btn_search_onclick" class="btn1" position="absolute 256 10 312 30" anchor="default"/>
- <Button id="btn_ref" taborder="63" text="검색" onclick="btn_ref_onclick" class="btn1" position="absolute 1108 10 1164 30" anchor="top right"/>
- <Edit id="ipt_text" taborder="64" imemode="hangul" class="input_search" position="absolute 982 10 1092 30" anchor="top right" autoselect="true"/>
- <Combo id="cmb_searchgbn" taborder="65" value="1" text="용기코드" codecolumn="codecolumn" datacolumn="datacolumn" index="0" class="combo_search" position="absolute 829 10 979 30" 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>
- <Static id="caption4" text="검색구분" class="search_name" position="absolute 755 10 829 30" anchor="top right"/>
- <Button id="btn_reset" taborder="66" text="초기화" onclick="btn_reset_onclick" class="btn1" position="absolute 1167 10 1236 30" anchor="top right"/>
- </Layout>
- </Layouts>
- </Div>
- <Grid id="grd_tube" taborder="35" binddataset="ds_grid_grd_tube" autoenter="select" useinputpanel="false" autofittype="col" oncellclick="grd_tube_oncellclick" onheadclick="grdf_setEventGrid" position="absolute 1 98 981 806" onclick="grd_tube_onclick" anchor="all">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="30"/>
- <Column size="90"/>
- <Column size="90"/>
- <Column size="60"/>
- <Column size="120"/>
- <Column size="80"/>
- <Column size="80"/>
- <Column size="80"/>
- <Column size="80"/>
- <Column size="50"/>
- <Column size="50"/>
- <Column size="60"/>
- <Column size="140"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="20"/>
- </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="단위"/>
- <Cell col="11" text="표시순서"/>
- <Cell col="12" text="용기아이콘"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" displaytype="image"/>
- <Cell col="1" displaytype="date" edittype="date" text="bind:tubefromdd"/>
- <Cell col="2" displaytype="date" edittype="date" text="bind:tubetodd"/>
- <Cell col="3" displaytype="expr:ds_grid_grd_tube.getRowType(currow) == '2' ? 'text' : 'normal'" text="bind:tubecd"/>
- <Cell col="4" displaytype="text" text="bind:tubenm" editlimit="30" editlengthunit="utf8"/>
- <Cell col="5" displaytype="text" edittype="text" text="bind:tubescrnnm" editlimit="30" editlengthunit="utf8"/>
- <Cell col="6" displaytype="text" edittype="text" text="bind:tubeabbrnm" editlimit="20" editlengthunit="utf8"/>
- <Cell col="7" displaytype="text" edittype="text" text="bind:tubeprntnm" editlimit="20" editlengthunit="utf8"/>
- <Cell col="8" displaytype="text" edittype="text" text="bind:tubelblnm" editlimit="30" editlengthunit="utf8"/>
- <Cell col="9" displaytype="text" edittype="text" style="align:right middle;" text="bind:tubevol" editlimit="10" editlengthunit="utf8"/>
- <Cell col="10" displaytype="combo" edittype="combo" style="align:left middle;" text="bind:tubeunit" editlimit="10" editlengthunit="utf8" combodataset="ds_init_lb1140" combocodecol="cd" combodatacol="nm"/>
- <Cell col="11" displaytype="text" edittype="text" text="bind:tubedispseq" editlimit="10" editlengthunit="utf8"/>
- <Cell col="12" displaytype="image" edittype="none" style="align:center middle;" text="bind:tubeiconimg"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="cap_tube" position="absolute 992 174 1240 501" anchor="top right"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_grid_grd_tube" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false" onvaluechanged="ds_grid_grd_tube_onvaluechanged">
- <ColumnInfo>
- <Column id="tubefromdd" type="STRING"/>
- <Column id="tubetodd" type="STRING"/>
- <Column id="tubecd" type="STRING"/>
- <Column id="tubenm" type="STRING"/>
- <Column id="tubescrnnm" type="STRING"/>
- <Column id="tubeabbrnm" type="STRING"/>
- <Column id="tubeprntnm" type="STRING"/>
- <Column id="tubelblnm" type="STRING"/>
- <Column id="tubevol" type="STRING"/>
- <Column id="tubeunit" type="STRING"/>
- <Column id="tubedispseq" type="STRING"/>
- <Column id="tubeiconimg" type="BLOB"/>
- <Column id="tubeiconimgnm" type="STRING"/>
- <Column id="tubeorgimgnm" type="STRING"/>
- <Column id="tubeorgimg" type="BLOB"/>
- <Column id="tubedetail" type="STRING" size="0"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="searchgbn" type="STRING" size="256"/>
- <Column id="text" type="STRING" size="256"/>
- <Column id="deptflag" type="STRING" size="256"/>
- <Column id="codeflag" type="STRING" size="256"/>
- <Column id="refgbn" type="STRING" size="256"/>
- <Column id="grdtube" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="deptflag">L</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_lb0000" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cd" type="STRING" size="256"/>
- <Column id="nm" type="STRING" size="256"/>
- <Column id="chk" type="STRING" size="256"/>
- <Column id="etc01" type="STRING" size="256"/>
- <Column id="etc02" type="STRING" size="256"/>
- <Column id="etc03" type="STRING" size="256"/>
- <Column id="etc04" type="STRING" size="256"/>
- <Column id="etc05" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_tubeunit" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cd" type="STRING" size="256"/>
- <Column id="nm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="cd">1</Col>
- <Col id="nm">ml</Col>
- </Row>
- <Row>
- <Col id="cd">2</Col>
- <Col id="nm">EA</Col>
- </Row>
- <Row>
- <Col id="cd">3</Col>
- <Col id="nm">mg</Col>
- </Row>
- <Row>
- <Col id="cd">4</Col>
- <Col id="nm">cc</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_grid_grd_select" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_imginfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <column id="imgrslt" type="byte"/>
- <column id="imgwidt" type="int"/>
- <column id="imght" type="int"/>
- <column id="orgimg" type="byte"/>
- <column id="orgwidt" type="int"/>
- <column id="orght" type="int"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grd_imageLoad" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column type="String" id="image1" size="255"/>
- <Column type="String" id="image2" size="255"/>
- <Column id="imgdata1" type="BLOB" size="256"/>
- <Column id="imgdata2" type="BLOB" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_lb1140" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cd" type="STRING" size="256"/>
- <Column id="nm" type="STRING" size="256"/>
- <Column id="etc01" 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"/>
- <Dataset id="ds_print" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="able" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_execute" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="able" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="saveExcel" propid="enable" datasetid="ds_print" columnid="able"/>
- <BindItem id="item1" compid="btn_grdadd" propid="enable" datasetid="ds_execute" columnid="able"/>
- <BindItem id="item2" compid="btn_save" propid="enable" datasetid="ds_execute" columnid="able"/>
- <BindItem id="item3" compid="btn_imgsave" propid="enable" datasetid="ds_execute" columnid="able"/>
- <BindItem id="item4" compid="tube_detail" propid="value" datasetid="ds_grid_grd_tube" columnid="tubedetail"/>
- </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";
- function SMLLF00400_onload(obj:Form, e:LoadEventInfo)
- {
- //lgv_sTargetDb = "hisdb"; //테스트 환경설정
- frmf_initForm(obj); // 화면공통
- grdf_setRowTypeIcon(grd_tube, 0);
- lf_exeInitialize();
- lf_commoduleDataSetShow(); //DataSet 조회;
-
- //lf_getTubeList();
- lf_setTubeTodd();
- lf_settodd();
- lf_menumaster();//메뉴권한
-
- }
- //조회구분에따라 사용종료일자 숨기기
- function lf_settodd(){
- if(group2.cmb_refgbn.value == "1"){
- grd_tube.setFormatColProperty(2,"size",0);
- } else {
- grd_tube.setFormatColProperty(2,"size",90);
- }
-
- }
- function lf_exeInitialize(){
- lf_getDbDeptcd("0000|");
- }
- function lf_getTubeList()
- {
- //리스트 조회(조회버튼 클릭시)
- var sInDsName = dsf_createDsRow("ds_temp_search"
- , [{col: "refgbn", val:group2.cmb_refgbn.value }
- , {col: "deptflag", val:lgv_sUserdeptflagcd}]);
- var oParam = {};
- oParam.id = "TRLLF00401";
- oParam.service = "diagtestbaseinfomngtapp.GeneralTestBaseInfoMngt";
- oParam.method = "reqGetTubeList";
- oParam.inds = "cond="+sInDsName;
- oParam.outds = "ds_grid_grd_tube=gettube";
- oParam.async = false;
- tranf_submit(oParam);
-
- }
- //화면 초기화
- function lf_initForm(){
- ds_grid_grd_tube.clearData();
- grd_tube.setFormatColProperty(3,"size",0);
- group2.cmb_refgbn.value="1";
- group2.cmb_searchgbn.value="1";
- }
- //널값 체크 (그리드 필수값 체크)
- function lf_ckeckNull(){
- var bChkValue= frmf_chkMdtGrid(grd_tube,[2,3,4,5,6,12],["용기사용시작일","용기사용종료일","용기코드","용기명","용기화면명","표시순서"]);
-
- var sTubeCd = "";
-
- trace("bChkValue = " + bChkValue );
- if(bChkValue==true) {
- if(lgv_sUserdeptflagcd=="N"){
-
- for(var i=0; i<ds_grid_grd_tube.rowcount; i++){
-
- if(ds_grid_grd_tube.getRowType(i) == "2" || ds_grid_grd_tube.getRowType(i) == "4"){
- sTubeCd = ds_grid_grd_tube.getColumn(i,"tubecd"); ;
- sTubeCd = sTubeCd.substr(0, 1);
- if(sTubeCd != "N"){
- sysf_messageBox("방사면역 용기코드는 첫 문자가 N으로 시작해야지만 등록 가능합니다.", "I");
- return;
- }
- }
- }
- }else{
- for(var i=0; i<ds_grid_grd_tube.rowcount; i++){
- if(ds_grid_grd_tube.getRowType(i) == "2" || ds_grid_grd_tube.getRowType(i) == "4"){
- sTubeCd= ds_grid_grd_tube.getColumn(i,"tubecd"); ;
- sTubeCd=sTubeCd.substr(0, 1);
- if(sTubeCd=="N"){
- sysf_messageBox("첫 문자가 N인 용기코드는 방사면역에서만 사용 가능합니다.","I");
- return;
- }
- }
- }
- }
-
- lf_saveTubeInfo();
- }
-
- }
- //데이터 저장
- function lf_saveTubeInfo(){
- // 서브밋호출
- var sInDsName = dsf_createDsRow("ds_temp_search"
- , [{col: "deptflag", val: lgv_sUserdeptflagcd }]);
- var oParam = {};
- oParam.id = "TXLLF00401";
- oParam.service = "diagtestbaseinfomngtapp.GeneralTestBaseInfoMngt";
- oParam.method = "reqExeSaveTubeInfo";
- oParam.inds = "tubedt=ds_grid_grd_tube:U flist="+sInDsName;
- oParam.async = false;
- oParam.callback = "CBF_SMLLF00400";
- tranf_submit(oParam);
- }
- //콜백함수
- function CBF_SMLLF00400(strSvcID, nErrorCode, strErrorMag)
- {
- if(strSvcID == "TXLLF00401" && nErrorCode==0){
- lf_getTubeList();
- sysf_messageBox("","I001","");
- }
- }
-
- function lf_getTubeSrch(){
- //용기코드 및 용기명 별 검색 (검색버튼 클릭시)
- var sInDsName = dsf_createDsRow("ds_temp_search"
- , [{col: "searchgbn", val:group2.cmb_searchgbn.value }
- , {col: "text", val:group2.ipt_text.value}
- , {col: "deptflag", val:lgv_sUserdeptflagcd}]);
-
- var oParam = {};
- oParam.id = "TRLLF00402";
- oParam.service = "diagtestbaseinfomngtapp.GeneralTestBaseInfoMngt";
- oParam.method = "reqGetTubeListRef";
- oParam.inds = "cond="+sInDsName;
- oParam.outds = "ds_grid_grd_tube=gettuberef";
- oParam.async = false;
- tranf_submit(oParam);
- }
-
- //엑셀저장
- function lf_savegrdexcel(){
- grdf_exportExcel(grd_tube,lf_lisGetTitle(this) + "_" + "용기코드상세내역", "sheet1", false);
- }
- function lf_getTubeOrgImg(){
-
- var aRow = ds_grid_grd_tube.rowposition;
-
- if(ds_grid_grd_tube.getColumn(aRow,"tubeorgimg")==""){
- img1.visible="false";
- cap_tube.visible="true";
- } else {
- img1.visible = "true";
- cap_tube.visible = "false";
- img1.image = ds_grid_grd_tube.getColumn(aRow,"tubeorgimg");
- img3.image = ds_grid_grd_tube.getColumn(aRow,"tubeiconimg");
- }
-
- }
- function fn_imageChange(sImage, sImageDb){
-
- var fd = new FileDialog;
- //fd.filter = "비트맵(*.bmp)|*.bmp|PNG(*.png)|*.png|";
- fd.filter = "이미지 파일 (*.jpg;*.png;*.gif;*.bmp)|*.jpg;*.png;*.gif;*.bmp|";
- var vFile = utlf_transNull(fd.open("FileOpen", FileDialog.LOAD),"");
- var cRow = ds_grid_grd_tube.rowposition;
- if(sImage == "image1"){
-
- //방법1.
- //이미지 BLOB 형식으로 write 한다
- //trace("==== : "+ vFile +" / "+ vFile.length);
- var rtn = vFile.open(VirtualFile.openRead | VirtualFile.openBinary);
- vFile.seek(0,VirtualFile.seekBegin);
- var bData = new Buffer(vFile.read(vFile.getFileSize()));
-
- if( ds_grd_imageLoad.getRowCount() <= 0 ) {
- ds_grd_imageLoad.addRow();
- }
-
- ds_grd_imageLoad.setColumn(0, sImage, bData.data); //Display 칼럼 : image1 / image2
- ds_grd_imageLoad.setColumn(0, sImageDb, bData.data); //DB저장 칼럼 : imgdata / imgdata2
- ds_grid_grd_tube.setColumn(cRow,"tubeiconimg",bData.data); //그리드 데이터셋에 이미지정보 저장
-
- img3.image = ds_grd_imageLoad.getColumn(0,"imgdata1");
-
- //이미지 경로 받아오기
- var addr = vFile.fullpath;
- opt_icon.value=addr;
-
- if(img3.imageheight>20 || img3.imagewidth>20){
- sysf_messageBox("아이콘 이미지는 가로 세로 (20 X 20) 를 넘을수 없습니다.", "E");
- //초기화
- opt_icon.value = "";
- ds_grd_imageLoad.clearData();
- img3.image = ds_grd_imageLoad.getColumn(0,"imgdata1");
- return false;
- }
-
- } else if(sImage == "image2"){
-
- //방법1.
- //이미지 BLOB 형식으로 write 한다
- //trace("==== : "+ vFile +" / "+ vFile.length);
- var rtn = vFile.open(VirtualFile.openRead | VirtualFile.openBinary);
- vFile.seek(0,VirtualFile.seekBegin);
- var bData = new Buffer(vFile.read(vFile.getFileSize()));
-
- if( ds_grd_imageLoad.getRowCount() <= 0 ) {
- ds_grd_imageLoad.addRow();
- }
- ds_grd_imageLoad.setColumn(0, sImage, bData.data); //Display 칼럼 : image1 / image2
- ds_grd_imageLoad.setColumn(0, sImageDb, bData.data); //DB저장 칼럼 : imgdata / imgdata2
- ds_grid_grd_tube.setColumn(cRow,"tubeorgimg",bData.data); //그리드 데이터셋에 이미지정보 저장
-
- img1.image = ds_grd_imageLoad.getColumn(0,"imgdata2");
-
- //이미지 경로 받아오기
- var addr = vFile.fullpath;
- opt_org.value=addr;
-
- if(img1.imageheight>500 || img1.imagewidth>500){
- sysf_messageBox("실제 이미지는 가로 세로 (500 X 500) 을 넘을수 없습니다. ", "E");
-
- //초기화
- opt_org.value="";
- ds_grd_imageLoad.clearData();
- img1.image = ds_grd_imageLoad.getColumn(0,"imgdata2");
- return false;
- }
- }
- }
- //용기아이콘 이미지 저장
- function lf_exeTubeImg(){
- var iRow = ds_grid_grd_tube.rowposition;
- var tubecd = ds_grid_grd_tube.getColumn(iRow,"tubecd");
-
- if(tubecd==""){
- sysf_messageBox("용기를 선택하십시오.", "E");
- return;
- }
-
- if(utlf_transNullToEmpty(ds_grd_imageLoad.getColumn(0,"imgdata1")) == "" ||
- utlf_transNullToEmpty(ds_grd_imageLoad.getColumn(0,"imgdata2")) == ""){
- sysf_messageBox("등록 할 이미지를 선택하십시오.", "E");
- return;
- }
-
- // 서브밋호출
- var sInDsName = dsf_createDsRow("ds_temp_tubecd"
- , [{col: "tubecd", val: tubecd }
- ]);
-
- var ds_imginfo = dsf_createDsRow("ds_temp_imginfo"
- , [{col: "imgrslt", type:"BLOB",val: ds_grd_imageLoad.getColumn(0,"imgdata1") }
- , {col: "imgwidt", val: img3.imagewidth }
- , {col: "imght", val: img3.imageheight }
- , {col: "orgimg", type:"BLOB",val: ds_grd_imageLoad.getColumn(0,"imgdata2") }
- , {col: "orgwidt", val: img1.imagewidth }
- , {col: "orght", val: img1.imageheight }]);
-
- var oParam = {};
- oParam.id = "TXLLF00402";
- oParam.service = "diagtestbaseinfomngtapp.GeneralTestBaseInfoMngt";
- oParam.method = "reqExeTubeImg";
- oParam.inds = "tubedata="+sInDsName +" imgdata="+ds_imginfo;
- oParam.async = false;
- oParam.callback = "cbf_TXLLF00402";
- tranf_submit(oParam);
-
- //다시 조회
- lf_getTubeSrch();
- }
-
- //콜백함수
- function cbf_TXLLF00402(strSvcID, nErrorCode, strErrorMag){
- if(strSvcID == "TXLLF00402" && nErrorCode==0){
- sysf_messageBox("저장이","I002","");
- }
- }
- // 종료된 용기 정보 다른색으로 보여주기
- function lf_setTubeTodd(){
- var tDay = utlf_getCurrentDate();
- grdf_setRowStyle(grd_tube,"0",tDay,"tubetodd","small");
-
- }
-
- //진검 사용자별 메뉴권한
- function lf_menumaster(){
- var edit = frmf_checkAuth("X");
- var print = frmf_checkAuth("P");
-
-
- var eRow = ds_execute.addRow();
- var pRow = ds_print.addRow();
-
- if(edit == true){
- ds_execute.setColumn(eRow,"able",true);
- }
- if(print == true){
- ds_print.setColumn(pRow,"able",true);
- }
- }
- function group2_cmb_refgbn_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- lf_settodd();
- lf_getTubeList(); //조회
- }
- function btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_getTubeList();
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- trace("저장");
- //lf_ckeckNull();
- trace("fNullCheck() = " + fNullCheck());
- if(fNullCheck()=="true")
- {
- lf_saveTubeInfo();
- }
- //lf_setTubeTodd();
- }
- // Null 체크
- function fNullCheck()
- {
- trace("???");
- var msg = "";
- var nullyn = "true";
-
- for(i = 0; i < ds_grid_grd_tube.rowcount; i++)
- {
- if(ds_grid_grd_tube.getColumn(i, "tubecd") == "")
- {
- msg = "[용기코드] 는 " ;
- sysf_messageBox(msg, "I003", "");
- return "false";
- }
-
- if(ds_grid_grd_tube.getColumn(i, "tubefromdd") == "")
- {
- msg = "[용기시용시작일] 은 " ;
- sysf_messageBox(msg, "I003", "");
- return "false";
- }
-
- if(ds_grid_grd_tube.getColumn(i, "tubetodd") == "")
- {
- msg = "[용기시용종료일] 은 " ;
- sysf_messageBox(msg, "I003", "");
- return "false";
- }
-
- if(ds_grid_grd_tube.getColumn(i, "tubenm") == "")
- {
- msg = "[용기명] 은 " ;
- sysf_messageBox(msg, "I003", "");
- return "false";
- }
-
- if(ds_grid_grd_tube.getColumn(i, "tubescrnnm") == "")
- {
- msg = "[용기화면명] 은 " ;
- sysf_messageBox(msg, "I003", "");
- return "false";
- }
- if(ds_grid_grd_tube.getColumn(i, "tubedispseq") == "")
- {
- msg = "[표시순서] 는 " ;
- sysf_messageBox(msg, "I003", "");
- return "false";
- }
- return nullyn;
- }
- trace("nullyn = " + nullyn);
- }
- function btn_reset_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_initForm();
- }
- function saveExcel_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_savegrdexcel();
- }
- function btn_ref_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_getTubeSrch();
- }
- //행추가
- function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
- {
- if(group2.cmb_refgbn.value == "2"){ //전체코드 상태에서 행추가 안됨.
- sysf_messageBox("사용코드 조회상태일 때 행을 추가할 수 있습니다.", "I");
- return;
- }
-
- var nRow =0;
- var nSeq =0;
- var objArg = new Object();
- ds_grid_grd_select.clearData();
-
- var s = frmf_modal("SPLLF10600", "SPLLF10600", 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_tube.addRow();
-
- ds_grid_grd_tube.setColumn(nRow,"tubefromdd",utlf_getCurrentDate());
- ds_grid_grd_tube.setColumn(nRow,"tubetodd","99991231");
- ds_grid_grd_tube.setColumn(nRow,"tubecd",ds_grid_grd_select.getColumn(i,"tubecd"));
- ds_grid_grd_tube.setColumn(nRow,"tubenm",ds_grid_grd_select.getColumn(i,"tubenm"));
- ds_grid_grd_tube.setColumn(nRow,"tubescrnnm",ds_grid_grd_select.getColumn(i,"tubescrnnm"));
- ds_grid_grd_tube.setColumn(nRow,"tubeabbrnm",ds_grid_grd_select.getColumn(i,"tubeabbrnm"));
- ds_grid_grd_tube.setColumn(nRow,"tubeprntnm",ds_grid_grd_select.getColumn(i,"tubeprntnm"));
- ds_grid_grd_tube.setColumn(nRow,"tubelblnm",ds_grid_grd_select.getColumn(i,"tubelblnm"));
- ds_grid_grd_tube.setColumn(nRow,"tubevol",ds_grid_grd_select.getColumn(i,"tubevol"));
- ds_grid_grd_tube.setColumn(nRow,"tubeunit",ds_grid_grd_select.getColumn(i,"tubeunit"));
-
- ds_grid_grd_tube.setColumn(nRow,"tubeiconimgnm","-");
- ds_grid_grd_tube.setColumn(nRow,"tubeorgimgnm","-");
- ds_grid_grd_tube.setColumn(nRow,"tubeiconimg","");
- ds_grid_grd_tube.setColumn(nRow,"tubeorgimg","");
-
- var Lseq="";
- if(ds_grid_grd_tube.rowcount<2){
- Lseq="1";
- }else{
- Lseq= parseInt(ds_grid_grd_tube.getColumn(ds_grid_grd_tube.rowcount-2,"tubedispseq"))+1;
- }
- ds_grid_grd_tube.setColumn(nRow,"tubedispseq",Lseq);
- }
- }
- ds_grid_grd_select.clearData();
- }
- function icon_search1_onclick(obj:Button, e:ClickEventInfo)
- {
- if( !(fn_imageChange("image1", "imgdata1")) ) return false;
-
- img3.image = ds_grd_imageLoad.getColumn(0,"imgdata1");
-
- }
- function icon_search2_onclick(obj:Button, e:ClickEventInfo)
- {
- if( !(fn_imageChange("image2", "imgdata2")) ) return false;
- img1.image = ds_grd_imageLoad.getColumn(0,"imgdata2");
-
- }
- function grd_tube_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- lf_getTubeOrgImg();
- }
- //용기 아이콘 이미지 저장
- function btn_imgsave_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_exeTubeImg();
-
- //아이콘 초기화
- opt_icon.value = "";
- ds_grd_imageLoad.clearData();
- img3.image = ds_grd_imageLoad.getColumn(0,"imgdata1");
-
- //실제이미지 초기화
- opt_org.value="";
- ds_grd_imageLoad.clearData();
- img1.image = ds_grd_imageLoad.getColumn(0,"imgdata2");
-
-
- }
- ]]></Script>
- </Form>
- </FDL>
|