123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPANT00500" position="absolute 0 0 560 420" titletext="식품검색" oninit="SPANT00500_oninit" onload="SPANT00500_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 10 0 560 420" id="grp_biz" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Div position="absolute 0 0 548 35" id="group2" class="div_SA">
- <Layouts>
- <Layout>
- <Static text="식품명 :" position="absolute 15 9 81 26" id="caption2" class="search_name"/>
- <Button position="absolute 475 7 531 29" id="btn_search" class="btn1" taborder="6" text="조회" onclick="grp_biz_group2_btn_search_onclick"/>
- <Shape position="absolute 457 7 463 29" linetype="vertical" id="line13" class="line_4"/>
- <Edit position="absolute 80 8 295 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 548 66" linetype="horizontal" id="line1" class="line_10"/>
- <Grid position="absolute 0 65 548 385" align="align:center middle;" id="grd_data" binddataset="ds_main_data">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="20" band="left"/>
- <Column size="40"/>
- <Column size="80"/>
- <Column size="186"/>
- <Column size="93"/>
- <Column size="106"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="80"/>
- <Column size="60"/>
- <Column size="60"/>
- </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="caption1"/>
- <Cell col="7" text="caption2"/>
- <Cell col="8" text="원산지"/>
- <Cell col="9" text="발주단위"/>
- <Cell col="10" text="환산수량"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" expr="expr:currow + 1"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:chk" expr="expr:chk == '1' || chk == 'Y' ? '1' : '0'"/>
- <Cell col="2" text="bind:foodcd"/>
- <Cell col="3" style="align:left;" text="bind:foodnm"/>
- <Cell col="4" displaytype="combo" style="align:left top;padding:4 2 2 2;" text="bind:foodlrgcd" wordwrap="word" combodataset="ds_init_basecode_food_A0051" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
- <Cell col="5" displaytype="combo" text="bind:foodmdlcd" combodataset="ds_init_basecode_foodmdl_A0357" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
- <Cell col="6" text="bind:fromdd"/>
- <Cell col="7" text="bind:todd"/>
- <Cell col="8" style="align:left middle;" text="bind:orgloc"/>
- <Cell col="9" text="bind:purcunit"/>
- <Cell col="10" text="bind:exchqty"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- </Layout>
- </Layouts>
- </Div>
- <Div position="absolute 10 386 560 413" id="grp_btn" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Button position="absolute 489 5 545 27" id="btn_can" class="btn4" text="취소" onclick="grp_btn_btn_can_onclick"/>
- <Button position="absolute 429 5 485 27" id="button1" class="btn4" text="저장" onclick="grp_btn_button1_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <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" oncolumnchanged="ds_main_data_oncolumnchanged">
- <ColumnInfo>
- <Column id="chk" type="STRING" size="256" sumtext="선택"/>
- <Column id="foodcd" type="STRING" size="256" sumtext="식품코드"/>
- <Column id="foodnm" type="STRING" size="256" sumtext="식품명"/>
- <Column id="foodlrgcd" type="STRING" size="256" sumtext="식품대분류"/>
- <Column id="foodmdlcd" type="STRING" size="256" sumtext="식품중분류"/>
- <Column id="fromdd" type="STRING" size="256" sumtext="fromdd"/>
- <Column id="todd" type="STRING" size="256" sumtext="todd"/>
- <Column id="orgloc" type="STRING" size="256" sumtext="todd"/>
- <Column id="purcunit" type="STRING" size="256" sumtext="todd"/>
- <Column id="exchqty" type="STRING" size="256" sumtext="todd"/>
- </ColumnInfo>
- </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="m" type="STRING" size="256" sumtext="실행구분"/>
- <Column id="chk" type="STRING" size="256" sumtext="선택"/>
- <Column id="foodcd" type="STRING" size="256" sumtext="식품코드"/>
- <Column id="foodnm" type="STRING" size="256" sumtext="식품명"/>
- <Column id="foodlrgcd" type="STRING" size="256" sumtext="식품대분류"/>
- <Column id="foodmdlcd" type="STRING" size="256" sumtext="식품중분류"/>
- <Column id="fromdd" type="STRING" size="256" sumtext="fromdd"/>
- <Column id="todd" type="STRING" size="256" sumtext="todd"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_hidden_ret" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="count" type="STRING" size="256" sumtext="실행건수"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_basecode_food_A0051" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdnm" type="STRING" size="256"/>
- <Column id="cdid" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_basecode_foodmdl_A0357" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdnm" type="STRING" size="256"/>
- <Column id="cdid" type="STRING" size="256"/>
- </ColumnInfo>
- </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 -> SPANT00500
- * 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 : SPANT00500
- * Event : oninit
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 처음 초기화시
- ****************************************************************************************/
- function SPANT00500_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj); //폼 초기화
- }
- /****************************************************************************************
- * Components : Form
- * Components ID : SPANT00500
- * Event : onload
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 로딩 완료시
- ****************************************************************************************/
- function SPANT00500_onload(obj:Form, e:LoadEventInfo)
- {
- var arrParam = [{dsNm: "ds_init_basecode_food_A0051", cdGrpId: "A0051"},
- {dsNm: "ds_init_basecode_foodmdl_A0357", cdGrpId: "A0357"}]
- appf_getCodeList(arrParam);
-
- grp_biz.group2.btn_search.click();
- }
- /****************************************************************************************
- * 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 = "TRANT00501";
- oParam.service = "dietbaseapp.DietMenu";
- oParam.method = "reqGetFoodInfo";
- oParam.inds = "req=ds_send_searchitem";
- oParam.outds = "ds_main_data=ret";
- oParam.async = false;
- //oParam.callback = "cf_TRANT00501";
- tranf_submit(oParam);
-
- ds_main_data.addColumn("chk", "string");
- dsf_setDefaultVal(ds_main_data, "chk:N");
- }
- /****************************************************************************************
- * 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 : 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();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : button1
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 저장버튼 클릭시
- ****************************************************************************************/
- function grp_btn_button1_onclick(obj:Button, e:ClickEventInfo)
- {
- var icnt = 0;
- for (var i = 0; i < ds_main_data.rowcount; i++){
- if (ds_main_data.getColumn(i, "chk") == "Y"){
- icnt = parseInt(icnt) + 1;
- }
- }
- if (icnt == 0){
- sysf_messageBox("처리할 자료를 선택하시기 바랍니다.", "E999", "");
- return;
- }
-
- ds_main_data.enableevent = false;
- ds_main_data.updatecontrol = false;
-
- grdf_setStatusColumn(ds_main_data, "m");
-
- ds_main_data.updatecontrol = true;
- ds_main_data.enableevent = true;
-
- ds_send_data.assign(grdf_getGridUpdateData(grp_biz.grd_data, "all"));
-
- var oParam = {};
- oParam.id = "TXANT00501";
- oParam.service = "dietbaseapp.DietMenu";
- oParam.method = "reqExeFoodInfo";
- oParam.inds = "req=ds_send_data";
- oParam.outds = "ds_hidden_ret=ret";
- oParam.async = false;
- //oParam.callback = "cf_TXANT00501";
- tranf_submit(oParam);
-
- grp_biz.group2.btn_search.click();
- }
- function ds_main_data_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- switch( e.columnid ){
- case "chk" :
- if( e.newvalue == "1" || e.newvalue == "Y" ){
- obj.setColumn(e.row, e.columnid, "Y");
- }else{
- obj.setColumn(e.row, e.columnid, "N");
- }
- break;
-
- default :
- break;
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|