123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPADB61350" position="absolute 0 0 642 591" titletext="성분조회" oninit="SPADB61350_oninit" onload="SPADB61350_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 8 8 633 558" id="group3" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Div position="absolute 0 0 625 35" align="align:center top;" id="group2" class="div_SA" anchor="default">
- <Layouts>
- <Layout>
- <Shape position="absolute 552 7 558 29" linetype="vertical" id="line13" class="line_4" anchor="default"/>
- <Button position="absolute 560 7 616 29" id="btn_sea" class="btn1" text="조회" anchor="default" onclick="group3_group2_btn_sea_onclick"/>
- <Static text="명칭" position="absolute 225 8 285 25" id="caption3" class="search_name" anchor="default"/>
- <Static text="코드" position="absolute 5 8 65 25" id="caption4" class="search_name" anchor="default"/>
- <Edit position="absolute 295 8 505 27" id="input1" class="input_search" anchor="default" onkeydown="group3_group2_input1_onkeydown"/>
- <Edit position="absolute 80 8 210 27" id="input2" class="input_search" anchor="default" onkeydown="group3_group2_input2_onkeydown"/>
- </Layout>
- </Layouts>
- </Div>
- <Static text="성분조회" position="absolute -1 45 94 61" id="caption1" class="tit_2" anchor="default"/>
- <Shape position="absolute 0 61 625 67" linetype="horizontal" id="line1" class="line_1" style="strokepen:3 solid #33bbbbff;" anchor="default"/>
- <Grid position="absolute 0 66 625 350" id="grd_com" binddataset="ds_main_grid" anchor="default" autosizingtype="none" cellsizingtype="col" autofittype="col" treeusecheckbox="false" treeinitstatus="expand,null" treeuseimage="false" oncelldblclick="group3_grd_com_oncelldblclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="153"/>
- <Column size="48"/>
- <Column size="373"/>
- <Column size="47"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="코드"/>
- <Cell col="1" text="확장"/>
- <Cell col="2" text="명칭"/>
- <Cell col="3" text="레벨"/>
- </Band>
- <Band id="body">
- <Cell displaytype="tree" style="align:left middle;padding:0 0 0 -10;" text="bind:comcd" treelevel="bind:comlevel"/>
- <Cell col="1" text="bind:comexcd"/>
- <Cell col="2" text="bind:comnm"/>
- <Cell col="3" text="bind:comlevel"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static text="추가 항목 선택" position="absolute 0 354 115 370" id="caption2" class="tit_2" anchor="default"/>
- <Grid position="absolute 0 375 625 545" id="grd_temp" binddataset="ds_main_selectgrid" autofittype="col" anchor="default" oncelldblclick="group3_grd_temp_oncelldblclick" onheadclick="group3_grd_temp_onheadclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="58"/>
- <Column size="153"/>
- <Column size="321"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell displaytype="checkbox" edittype="none"/>
- <Cell col="1" text="코드"/>
- <Cell col="2" text="명칭"/>
- </Band>
- <Band id="body">
- <Cell displaytype="checkbox" edittype="checkbox" text="bind:chk" expr="expr:chk == "true" || chk == "1" ? "1" : """/>
- <Cell col="1" style="align:left middle;" text="bind:comcd"/>
- <Cell col="2" style="align:left middle;" text="bind:comnm"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Shape position="absolute 0 370 625 376" linetype="horizontal" id="line2" class="line_1" style="strokepen:3 solid #33bbbbff;" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- <Div position="absolute 8 558 638 585" id="group1" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Button position="absolute 511 2 567 24" id="btn_cfm" class="btn4" text="확인" onclick="group1_btn_cfm_onclick"/>
- <Button position="absolute 570 2 626 24" id="btn_cls" class="btn4" text="닫기" onclick="group1_btn_cls_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_grid" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="comcd" type="STRING"/>
- <Column id="comexcd" type="STRING"/>
- <Column id="comnm" type="STRING"/>
- <Column id="comlevel" type="STRING"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_selectgrid" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="chk" type="STRING"/>
- <Column id="comcd" type="STRING"/>
- <Column id="comnm" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_mode" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="srchcomcd" type="STRING" size="256"/>
- <Column id="srchcomnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_data" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="comcd" type="STRING" size="256"/>
- <Column id="comexcd" type="STRING" size="256"/>
- <Column id="comnm" type="STRING" size="256"/>
- <Column id="dddunit" type="STRING" size="256"/>
- <Column id="ddd" type="STRING" size="256"/>
- <Column id="dddkg" type="STRING" size="256"/>
- <Column id="dddchild" type="STRING" size="256"/>
- <Column id="childdayno" type="STRING" size="256"/>
- <Column id="childage" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="comcd"/>
- <Col id="comexcd"/>
- <Col id="comnm"/>
- <Col id="dddunit"/>
- <Col id="ddd"/>
- <Col id="dddkg"/>
- <Col id="dddchild"/>
- <Col id="childdayno"/>
- <Col id="childage"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_hidden_receiveref" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="srchtype" type="STRING" size="256"/>
- <Column id="comnm" type="STRING" size="256"/>
- <Column id="comcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="group3.group2.input2" propid="value" datasetid="ds_send" columnid="srchcomcd"/>
- <BindItem id="item1" compid="group3.group2.input1" propid="value" datasetid="ds_send" columnid="srchcomnm"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2015-11-13
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2015-11-13 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- include "ast_commonxp::AST.xjs";
- var arErrorCode = new HashArray();
- /******************************************************************
- * Argument :
- * Description : 초기화
- ******************************************************************/
- function SPADB61350_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SPADB61350_onload(obj:Form, e:LoadEventInfo)
- {
- //grd_temp.fixedcellcheckbox(0,0)=true; // 타이틀에 전체선택 체크박스 추가
- ds_main_selectgrid.clearData(); // 그리드 내용 초기화
-
- try{
- dsf_copyDs(ds_hidden_receiveref, arg_ds_hidden_receiveref, "replace");
- }catch(e){}
-
- /*
- * 부모창에서 넘겨받은 데이터 체크박스에 세팅
- */
- var comcd = ds_hidden_receiveref.getColumn(0, "comcd"); // 성분코드
- var comnm = ds_hidden_receiveref.getColumn(0, "comnm"); // 성분명칭
-
- if( !utlf_isNull(comcd) ){
- comcd = comcd.replace("'", "");
- comcd = comcd.split(",");
-
- comnm = comnm.replace("'", "");
- comnm = comnm.split(",");
- }
-
- // 데이터 유무 체크( 구분할 값이 없어도 length는 1이 리턴됨. )
- if( !utlf_isNull(comnm[0]) ) {
- for(var i = 0; i < comcd.length; ++i) {
- var iRow = ds_main_selectgrid.addRow();
-
- ds_main_selectgrid.setColumn(iRow, "chk", "true");
- ds_main_selectgrid.setColumn(iRow, "comcd", comcd[i]);
- ds_main_selectgrid.setColumn(iRow, "comnm", comnm[i]);
- }
- }
- }
- /******************************************************************
- * Argument :
- * Description : 코드
- ******************************************************************/
- function group3_group2_input2_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if( e.keycode == 13 ){
- group3.group2.input2.updateToDataset();
- //setInputNodeCurText();
- frmf_inputEnterKey("group3.group2.btn_sea", "onclick", new ClickEventInfo);
- }
- }
- /******************************************************************
- * Argument :
- * Description : 명칭
- ******************************************************************/
- function group3_group2_input1_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if( e.keycode == 13 ){
- group3.group2.input1.updateToDataset();
- //setInputNodeCurText();
- frmf_inputEnterKey("group3.group2.btn_sea", "onclick", new ClickEventInfo);
- }
- }
- /******************************************************************
- * Argument :
- * Description : 조회 button event
- ******************************************************************/
- function group3_group2_btn_sea_onclick(obj:Button, e:ClickEventInfo)
- {
- var oParam = {};
- oParam.id = "TRADB00201";
- oParam.service = "pharmacybaseapp.ComCode";
- oParam.method = "reqGetComList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_grid=item";
- oParam.async = false;
- //oParam.callback = "cf_TRADB00201";
- tranf_submit(oParam);
- }
- /******************************************************************
- * Argument :
- * Description : 성분조회
- ******************************************************************/
- function group3_grd_com_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- var cRow = ds_main_grid.rowposition;
- var comcd = ds_main_grid.getColumn(cRow, "comcd"); // 성분코드
- var comnm = ds_main_grid.getColumn(cRow, "comnm"); // 성분명칭
-
- // 1. 로우 추가
- var iRow = ds_main_selectgrid.addRow();
-
- // 2. 코드, 명칭 세팅
- ds_main_selectgrid.setColumn(iRow, "chk", "true");
- ds_main_selectgrid.setColumn(iRow, "comcd", comcd);
- ds_main_selectgrid.setColumn(iRow, "comnm", comnm);
- }
- /******************************************************************
- * Argument :
- * Description : 추가항목선택
- ******************************************************************/
- function group3_grd_temp_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- var cRow = ds_main_selectgrid.rowposition;
- ds_main_selectgrid.deleteRow(cRow);
- }
- /******************************************************************
- * Argument :
- * Description : 확인 button evnet
- ******************************************************************/
- function group1_btn_cfm_onclick(obj:Button, e:ClickEventInfo)
- {
- var comcd = opener.frmf_getParameter("comcd"); // 성분코드
- var comexcd = opener.frmf_getParameter("comexcd"); //
- var comnm = opener.frmf_getParameter("comnm"); // 성분명칭
-
- /*
- * 체크박스에 선택된 값만 부모창으로 세팅
- */
- var gridRow = ds_main_selectgrid.rowcount; // 데이터 로우 종 갯수
- var isFirst = true;
-
- for(var i = 0; i < gridRow; ++i) {
- if( ds_main_selectgrid.getColumn(i, "chk") == "true") {
- // 체크박스에 첫번째 선택된 값
- if(isFirst) {
- // 체크박스에 선택된 값의 명칭이 없을 경우
- comcd = "'" + ds_main_selectgrid.getColumn(i, "comcd") + "'";
- comnm = "'" + ds_main_selectgrid.getColumn(i, "comnm") + "'";
-
- isFirst = false;
- }
- // 체크박스에 두번째 이상 선택된 값
- else {
- comcd += "," + "'" + ds_main_selectgrid.getColumn(i, "comcd") + "'";
- comnm += "," + "'" + ds_main_selectgrid.getColumn(i, "comnm") + "'";
- }
- }
- }
-
- // 체크박스에 선택된 값이 없을 경우
- if(isFirst) {
- comcd = "";
- comnm = "";
- }
-
- opener.frmf_setParameter("comcd", comcd);
- opener.frmf_setParameter("comexcd", comexcd);
- opener.frmf_setParameter("comnm", comnm);
-
- this.close();
- }
- /******************************************************************
- * Argument :
- * Description : 닫기 button evnet
- ******************************************************************/
- function group1_btn_cls_onclick(obj:Button, e:ClickEventInfo)
- {
- this.close();
- }
- /******************************************************************
- * Argument :
- * Description : head checkbox click event
- ******************************************************************/
- function group3_grd_temp_onheadclick(obj:Grid, e:GridClickEventInfo)
- {
- fn_chkAll(obj);
- }
- function fn_chkAll(obj){
- if( obj.getCellProperty("Head", 0, "displaytype") == "checkbox"){
- if( utlf_isNull(obj.getCellProperty("Head", 0, "text")) ){
- obj.setCellProperty("Head", 0, "text","expr:1");
- for( var i = 0; i < ds_main_selectgrid.rowcount; i++ ){
- var getChk = ds_main_selectgrid.getColumn(i, "chk");
- if( getChk == "1"){
- ds_main_selectgrid.setColumn(i, "chk", "");
- } else {
- ds_main_selectgrid.setColumn(i, "chk", "true");
- }
- }
- } else {
- obj.setCellProperty("Head", 0, "text","");
- for( var i = 0; i < ds_main_selectgrid.rowcount; i++ ){
- ds_main_selectgrid.setColumn(i, "chk", "");
- }
- }
- }
- }]]></Script>
- </Form>
- </FDL>
|