123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPANT00400" position="absolute 0 0 360 300" titletext="식품검색" oninit="SPANT00400_oninit" onload="SPANT00400_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 10 0 360 295" id="grp_biz" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Div position="absolute 0 0 300 35" id="group2" class="div_SA">
- <Layouts>
- <Layout>
- <Static text="식품명 :" position="absolute 15 9 81 26" id="caption2" class="search_name"/>
- <Button position="absolute 235 7 291 29" id="btn_search" class="btn1" taborder="6" text="조회" onclick="grp_biz_group2_btn_search_onclick"/>
- <Shape position="absolute 217 7 223 29" linetype="vertical" id="line13" class="line_4"/>
- <Edit position="absolute 80 8 180 27" id="ipt_dishnm" class="input_search" autoselect="true" onkeydown="grp_biz_group2_ipt_dishnm_onkeydown"/>
- </Layout>
- </Layouts>
- </Div>
- <Static text="식품검색" position="absolute 0 44 135 60" id="caption1" class="tit_2"/>
- <Shape position="absolute 0 60 300 66" linetype="horizontal" id="line1" class="line_10"/>
- <Grid position="absolute 0 65 300 245" align="align:center middle;" id="grd_data" binddataset="ds_main_data" oncelldblclick="grp_biz_grd_data_oncelldblclick" onkeydown="grp_biz_grd_data_onkeydown" autofittype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="20" band="left"/>
- <Column size="0"/>
- <Column size="70"/>
- <Column size="110"/>
- <Column size="55"/>
- </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="단위"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" expr="expr:currow + 1"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:check"/>
- <Cell col="2" text="bind:foodcd"/>
- <Cell col="3" text="bind:foodnm"/>
- <Cell col="4" displaytype="combo" style="align:center;" text="bind:foodunit" combodataset="ds_init_miscode_plceordunit" combocodecol="cdid" combodatacol="cdnm"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- </Layout>
- </Layouts>
- </Div>
- <Div position="absolute 0 251 310 278" id="grp_btn" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Button position="absolute 254 5 310 27" id="btn_can" class="btn4" text="취소" onclick="grp_btn_btn_can_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_init_miscode_plceordunit" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdid" type="STRING" size="256"/>
- <Column id="cdnm" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_searchitem" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="foodnm" type="STRING" size="256" sumtext="식품명"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_data" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="foodcd" type="STRING" size="256" sumtext="식품코드"/>
- <Column id="foodnm" type="STRING" size="256" sumtext="식품명"/>
- <Column id="foodunit" type="STRING" size="256" sumtext="식품단위"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_temp_receivedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="foodnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_biz.group2.ipt_dishnm" propid="value" datasetid="ds_send_searchitem" columnid="foodnm"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name : 경대 의료정보시스템
- * Job Name : ast_dietxp -> SPANT00400
- * Creator : yjh
- * Make Date : 2017-10-12
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2017-10-12 yjh TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Components ID : SPANT00400
- * Event : oninit
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 처음 초기화시
- ****************************************************************************************/
- function SPANT00400_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj); //폼 초기화
- }
- /****************************************************************************************
- * Components : Form
- * Components ID : SPANT00400
- * Event : onload
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 로딩 완료시
- ****************************************************************************************/
- function SPANT00400_onload(obj:Form, e:LoadEventInfo)
- {
- // 화면open시 공통코드 setting
- //zbcfGetCodeList( new Array( "R0039" ), new Array("/root/init/basecode/foodunit") );
- var oParam = {};
- oParam.id = "TRANT02503";
- oParam.service = "dietsumapp.DietSum";
- oParam.method = "reqGetPlceOrdUnit";
- oParam.inds = "";
- oParam.outds = "ds_init_miscode_plceordunit=ret";
- oParam.async = false;
- //oParam.callback = "cf_TRANT02503";
- tranf_submit(oParam); //식재료 발주단위 조회
-
- try{
- ds_temp_receivedata.copyData(arg_ds_temp_receivedata);
- }catch(e){
- }
-
- ds_send_searchitem.setColumn(0, "foodnm", ds_temp_receivedata.getColumn(0, "foodnm"));
- grp_biz.group2.btn_search.click();
- if ( ds_main_data.rowcount > 0 ) {
- ds_main_data.rowposition = 0;
-
- grp_biz.grd_data.setFocus();
- }
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_search
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 조회버튼 클릭시
- ****************************************************************************************/
- function grp_biz_group2_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- var oParam = {};
- oParam.id = "TRANT00401";
- oParam.service = "dietbaseapp.DietMenu";
- oParam.method = "reqGetFoodSrch";
- oParam.inds = "req=ds_send_searchitem";
- oParam.outds = "ds_main_data=ret";
- oParam.async = false;
- //oParam.callback = "cf_TRANT00401";
- tranf_submit(oParam);
- }
- /****************************************************************************************
- * Components : Edit
- * Components ID : ipt_dishnm
- * Event : onkeydown
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 에디터 키 입력시
- ****************************************************************************************/
- function grp_biz_group2_ipt_dishnm_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if( e.keycode == 13 ){
- obj.updateToDataset();
-
- grp_biz.group2.btn_search.click();
- }
- }
- /****************************************************************************************
- * Components : Grid
- * Components ID : grd_data
- * Event : oncelldblclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 그리드 셀 더블클릭시
- ****************************************************************************************/
- function grp_biz_grd_data_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- var trgtgrid = ds_temp_receivedata.getColumn(0, "trgtgrid");
- var foodcd = ds_main_data.getColumn(ds_main_data.rowposition, "foodcd");
- var foodnm = ds_main_data.getColumn(ds_main_data.rowposition, "foodnm");
- var foodunit = ds_main_data.getColumn(ds_main_data.rowposition, "foodunit");
-
- if ( trgtgrid == "schefood" ) {
- opener.ds_main_schematrmngt_data.setColumn(opener.ds_main_schematrmngt_data.rowposition, "foodcd", foodcd);
- opener.ds_main_schematrmngt_data.setColumn(opener.ds_main_schematrmngt_data.rowposition, "foodnm", foodnm);
- opener.ds_main_schematrmngt_data.setColumn(opener.ds_main_schematrmngt_data.rowposition, "foodunit", foodunit);
- }
- // else if ( trgtgrid == "pridmenuwrite" ) {
- // opener.model.setValue("/root/main/tab/pridmenuwrite/list["+opener.grd_pridmenuwrite.row+"]/"+ opener.grd_pridmenuwrite.colAttribute(opener.grd_pridmenuwrite.col, "ref"), dishnm);
- // opener.model.setValue("/root/main/tab/pridmenuwrite/list["+opener.grd_pridmenuwrite.row+"]/"+ opener.grd_pridmenuwrite.colAttribute(opener.grd_pridmenuwrite.col+1, "ref"), dishcd);
- // }
-
- this.close();
- }
- /****************************************************************************************
- * Components : Grid
- * Components ID : grd_data
- * Event : onkeydown
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 그리드 키 입력시
- ****************************************************************************************/
- function grp_biz_grd_data_onkeydown(obj:Grid, e:KeyEventInfo)
- {
- if(e.keycode == 13) {
- var trgtgrid = ds_temp_receivedata.getColumn(0, "trgtgrid");
- var foodcd = ds_main_data.getColumn(ds_main_data.rowposition, "foodcd");
- var foodnm = ds_main_data.getColumn(ds_main_data.rowposition, "foodnm");
- var foodunit = ds_main_data.getColumn(ds_main_data.rowposition, "foodunit");
-
- if ( trgtgrid == "schefood" ) {
- opener.ds_main_schematrmngt_data.setColumn(opener.ds_main_schematrmngt_data.rowposition, "foodcd", foodcd);
- opener.ds_main_schematrmngt_data.setColumn(opener.ds_main_schematrmngt_data.rowposition, "foodnm", foodnm);
- opener.ds_main_schematrmngt_data.setColumn(opener.ds_main_schematrmngt_data.rowposition, "foodunit", foodunit);
- }
- // else if ( trgtgrid == "pridmenuwrite" ) {
- // opener.model.setValue("/root/main/tab/pridmenuwrite/list["+opener.grd_pridmenuwrite.row+"]/"+ opener.grd_pridmenuwrite.colAttribute(opener.grd_pridmenuwrite.col, "ref"), dishnm);
- // opener.model.setValue("/root/main/tab/pridmenuwrite/list["+opener.grd_pridmenuwrite.row+"]/"+ opener.grd_pridmenuwrite.colAttribute(opener.grd_pridmenuwrite.col+1, "ref"), dishcd);
- // }
-
- this.close();
- }
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_can
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 취소버튼 클릭시
- ****************************************************************************************/
- function grp_btn_btn_can_onclick(obj:Button, e:ClickEventInfo)
- {
- this.close();
- }
- ]]></Script>
- </Form>
- </FDL>
|