123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMANT02200" position="absolute 0 0 1200 788" titletext="직원식급식실천표" oninit="SMANT02200_oninit" onload="SMANT02200_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 0 25 1194 60" align="align:center top;" id="grp_sea" class="div_SA">
- <Layouts>
- <Layout>
- <Static text="급식실천표일자 :" position="absolute 471 9 596 26" id="caption2" class="search_name"/>
- <Shape position="absolute 1097 6 1103 28" linetype="vertical" id="line13" class="line_4"/>
- <Button position="absolute 693 10 706 25" id="btn_beforedd1" class="icon_pre" text="" onclick="grp_sea_btn_beforedd1_onclick"/>
- <Button position="absolute 706 10 719 25" id="btn_nextdd1" class="icon_next" text="" onclick="grp_sea_btn_nextdd1_onclick"/>
- <Calendar position="absolute 597 8 687 27" id="ipt_appdd" class="input_search" autoselect="true"/>
- <Button position="absolute 1118 7 1174 29" id="btn_search" class="btn1" text="조회" onclick="grp_sea_btn_search_onclick"/>
- <Static text="끼니 :" position="absolute 46 9 106 26" id="caption4" class="search_name"/>
- <Combo position="absolute 108 8 175 27" id="cmb_mealflag" class="combo_s_essential" codecolumn="codecolumn" datacolumn="datacolumn">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">0</Col>
- <Col id="datacolumn">전체</Col>
- </Row>
- <Row>
- <Col id="codecolumn">1</Col>
- <Col id="datacolumn">조식</Col>
- </Row>
- <Row>
- <Col id="codecolumn">2</Col>
- <Col id="datacolumn">중식</Col>
- </Row>
- <Row>
- <Col id="codecolumn">3</Col>
- <Col id="datacolumn">석식</Col>
- </Row>
- <Row>
- <Col id="codecolumn">4</Col>
- <Col id="datacolumn">야식</Col>
- </Row>
- </Rows>
- </Dataset>
- </Combo>
- <Button position="absolute 1023 10 1036 25" id="btn_beforedd2" class="icon_pre" text="" onclick="grp_sea_btn_beforedd2_onclick"/>
- <Static text="예정식수일자 :" position="absolute 811 9 925 26" id="caption1" class="search_name"/>
- <Button position="absolute 1036 10 1049 25" id="btn_nextdd2" class="icon_next" text="" onclick="grp_sea_btn_nextdd2_onclick"/>
- <Calendar position="absolute 927 8 1017 27" id="ipt_psnnodd" class="input_search" autoselect="true"/>
- <CheckBox position="absolute 250 9 400 29" id="chk_pastyn" class="checkbox_search" text="과거데이터조회여부" truevalue="Y" onclick="grp_sea_chk_pastyn_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Tab position="absolute 0 62 1194 757" id="switch2">
- <Tabpages>
- <Tabpage text="식단별" id="case1">
- <Layouts>
- <Layout>
- <Grid position="absolute 0 0 1192 668" id="grd_empdish" binddataset="ds_main_gnrldish" onkeydown="switch2_case1_grd_empdish_onkeydown">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="24"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="100"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="100"/>
- <Column size="0"/>
- <Column size="110"/>
- <Column size="70"/>
- <Column size="0"/>
- <Column size="90"/>
- <Column size="90"/>
- <Column size="0"/>
- <Column size="70"/>
- <Column size="60"/>
- <Column size="150"/>
- </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="재료코드"/>
- <Cell col="9" text="재료명(식품명)"/>
- <Cell col="10" text="1인량"/>
- <Cell col="11" text="h_1인량"/>
- <Cell col="12" text="식수(과거)"/>
- <Cell col="13" text="식수(조절)"/>
- <Cell col="14" text="h_식수(명)"/>
- <Cell col="15" text="발주량"/>
- <Cell col="16" text="단위"/>
- <Cell col="17" text="비고"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" expr="currow + 1"/>
- <Cell col="1" text="bind:appdd"/>
- <Cell col="2" text="bind:mealflag"/>
- <Cell col="3" text="bind:menuflag"/>
- <Cell col="4" displaytype="combo" edittype="combo" style="padding:1 2 1 2;linetype:EXPR(dishtableflaglinetype);" text="bind:dishtableflag" suppress="1" suppressalign="middle,over" combodataset="ds_init_basecode_diettable_A0417" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
- <Cell col="5" text="bind:dishtablenm"/>
- <Cell col="6" text="bind:dishcd"/>
- <Cell col="7" style="align:left middle;padding:1 2 1 2;linetype:EXPR(dishnmlinetype);" text="bind:dishnm" suppress="2" suppressalign="middle,over"/>
- <Cell col="8" text="bind:foodcd"/>
- <Cell col="9" style="align:left top;padding:5 2 1 2;" text="bind:foodnm" wordwrap="word"/>
- <Cell col="10" displaytype="number" edittype="text" style="align:right middle;" text="bind:foodqty"/>
- <Cell col="11" text="bind:h_foodqty"/>
- <Cell col="12" displaytype="number" edittype="masknumber" style="align:right middle;linetype:EXPR(psnnor1linetype);" text="bind:psnnor1" mask="#,##0" maskchar=" " suppress="3" suppressalign="middle,over"/>
- <Cell col="13" displaytype="number" edittype="masknumber" style="align:right middle;linetype:EXPR(psnno1linetype);" text="bind:psnno1" mask="#,##0" maskchar=" " suppress="4" suppressalign="middle,over"/>
- <Cell col="14" text="bind:h_psnno1"/>
- <Cell col="15" displaytype="number" edittype="text" style="align:right middle;" text="bind:totalqty"/>
- <Cell col="16" displaytype="combo" edittype="combo" style="align:center;" text="bind:foodunit" combodataset="ds_init_miscode_plceordunit" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
- <Cell col="17" displaytype="text" edittype="text" style="align:top;padding:5 2 1 2;linetype:EXPR(dishremlinetype);" text="bind:dishrem" wordwrap="word" suppress="5" suppressalign="middle,over"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 950 4 1003 23" id="btn_recalc1" class="btn2" text="재계산" onclick="switch2_case1_btn_recalc1_onclick"/>
- </Layout>
- </Layouts>
- </Tabpage>
- <Tabpage text="식품(재료)별" id="case2">
- <Layouts>
- <Layout>
- <Grid position="absolute 2 0 1194 668" id="grd_empfood" binddataset="ds_main_gnrlfood" autoenter="select">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="24"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="100"/>
- <Column size="0"/>
- <Column size="110"/>
- <Column size="70"/>
- <Column size="0"/>
- <Column size="100"/>
- <Column size="100"/>
- <Column size="0"/>
- <Column size="70"/>
- <Column size="60"/>
- <Column size="150"/>
- </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="1인량"/>
- <Cell col="9" text="h_1인량"/>
- <Cell col="10" text="식수(명) 계산량"/>
- <Cell col="11" text="식수(명) 조절량"/>
- <Cell col="12" text="h_식수(명)"/>
- <Cell col="13" text="발주량"/>
- <Cell col="14" text="단위"/>
- <Cell col="15" text="비고"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" expr="currow + 1"/>
- <Cell col="1" text="bind:appdd"/>
- <Cell col="2" text="bind:mealflag"/>
- <Cell col="3" text="bind:menuflag"/>
- <Cell col="4" text="bind:foodcd"/>
- <Cell col="5" style="align:left top;padding:5 2 1 2;" text="bind:foodnm" wordwrap="word" suppress="0"/>
- <Cell col="6" text="bind:dishcd"/>
- <Cell col="7" style="align:left top;padding:5 2 1 2;" text="bind:dishnm" wordwrap="word" suppress="0"/>
- <Cell col="8" displaytype="number" edittype="masknumber" style="align:right middle;" text="bind:foodqty" mask="#,##0" maskchar=" "/>
- <Cell col="9" text="bind:h_foodqty"/>
- <Cell col="10" displaytype="number" edittype="masknumber" style="align:right middle;" text="bind:psnnor1" mask="#,##0"/>
- <Cell col="11" displaytype="number" edittype="masknumber" style="align:right middle;" text="bind:psnno1" mask="#,##0"/>
- <Cell col="12" text="bind:h_psnno1"/>
- <Cell col="13" displaytype="number" edittype="masknumber" style="align:right middle;" text="bind:totalqty" mask="#,##0" maskchar=" "/>
- <Cell col="14" displaytype="combo" edittype="combo" style="align:center middle;padding:1 2 1 2;" text="bind:foodunit" combodataset="ds_init_miscode_plceordunit" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
- <Cell col="15" style="align:left top;padding:5 2 1 2;" text="bind:dishrem" wordwrap="word"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 950 4 1003 23" id="btn_recalc2" class="btn2" text="재계산" onclick="switch2_case2_btn_recalc2_onclick"/>
- </Layout>
- </Layouts>
- </Tabpage>
- </Tabpages>
- </Tab>
- <Static id="caption6" text="직원식급식실천표" class="tit_1" position="absolute 0 0 150 25"/>
- <Button id="btn_print" taborder="1" text="출력" class="btn6" position="absolute 5 759 61 781"/>
- <Button id="btn_reset" taborder="2" text="초기화" class="btn4" position="absolute 1060 759 1128 781" onclick="btn_reset_onclick"/>
- <Button id="btn_save" taborder="3" text="저장" class="btn4" position="absolute 1133 759 1189 781" onclick="btn_save_onclick"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_gnrldish" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_gnrldish_oncolumnchanged">
- <ColumnInfo>
- <Column id="appdd" type="STRING" size="256"/>
- <Column id="mealflag" type="STRING" size="256"/>
- <Column id="menuflag" type="STRING" size="256"/>
- <Column id="dishtableflag" type="STRING" size="256"/>
- <Column id="dishtablenm" type="STRING" size="256"/>
- <Column id="dishcd" type="STRING" size="256"/>
- <Column id="dishnm" type="STRING" size="256"/>
- <Column id="foodcd" type="STRING" size="256"/>
- <Column id="foodnm" type="STRING" size="256"/>
- <Column id="plceordexchbase" type="STRING" size="256"/>
- <Column id="foodqty" type="STRING" size="256"/>
- <Column id="h_foodqty" type="STRING" size="256"/>
- <Column id="psnno1" type="STRING" size="256"/>
- <Column id="h_psnno1" type="STRING" size="256"/>
- <Column id="totalqty" type="STRING" size="256"/>
- <Column id="foodunit" type="STRING" size="256"/>
- <Column id="dishrem" type="STRING" size="256"/>
- <Column id="psnnor1" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="appdd"/>
- <Col id="mealflag"/>
- <Col id="menuflag"/>
- <Col id="dishtableflag"/>
- <Col id="dishtablenm"/>
- <Col id="dishcd"/>
- <Col id="dishnm"/>
- <Col id="foodcd"/>
- <Col id="foodnm"/>
- <Col id="plceordexchbase"/>
- <Col id="foodqty"/>
- <Col id="h_foodqty"/>
- <Col id="psnno1"/>
- <Col id="h_psnno1"/>
- <Col id="totalqty"/>
- <Col id="foodunit"/>
- <Col id="dishrem"/>
- <Col id="psnnor1"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_gnrlfood" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="appdd" type="STRING" size="256"/>
- <Column id="mealflag" type="STRING" size="256"/>
- <Column id="menuflag" type="STRING" size="256"/>
- <Column id="foodcd" type="STRING" size="256"/>
- <Column id="foodnm" type="STRING" size="256"/>
- <Column id="plceordexchbase" type="STRING" size="256"/>
- <Column id="dishcd" type="STRING" size="256"/>
- <Column id="dishnm" type="STRING" size="256"/>
- <Column id="foodqty" type="STRING" size="256"/>
- <Column id="h_foodqty" type="STRING" size="256"/>
- <Column id="psnno1" type="STRING" size="256"/>
- <Column id="h_psnno1" type="STRING" size="256"/>
- <Column id="totalqty" type="STRING" size="256"/>
- <Column id="foodunit" type="STRING" size="256"/>
- <Column id="dishrem" type="STRING" size="256"/>
- <Column id="psnnor1" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="appdd"/>
- <Col id="mealflag"/>
- <Col id="menuflag"/>
- <Col id="foodcd"/>
- <Col id="foodnm"/>
- <Col id="plceordexchbase"/>
- <Col id="dishcd"/>
- <Col id="dishnm"/>
- <Col id="foodqty"/>
- <Col id="h_foodqty"/>
- <Col id="psnno1"/>
- <Col id="h_psnno1"/>
- <Col id="totalqty"/>
- <Col id="foodunit"/>
- <Col id="dishrem"/>
- <Col id="psnnor1"/>
- </Row>
- </Rows>
- </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="appdd" type="STRING" size="256"/>
- <Column id="menuflag" type="STRING" size="256"/>
- <Column id="mealflag" type="STRING" size="256"/>
- <Column id="psnnodd" type="STRING" size="256"/>
- <Column id="pastyn" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="appdd"/>
- <Col id="menuflag"/>
- <Col id="mealflag"/>
- <Col id="psnnodd"/>
- <Col id="pastyn"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="dish" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="dish"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_temp_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"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="count"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_basecode_meal_A0055" 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>
- <Rows>
- <Row>
- <Col id="cdid"/>
- <Col id="cdnm"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_basecode_diettable_A0417" 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>
- <Rows>
- <Row>
- <Col id="cdid"/>
- <Col id="cdnm"/>
- </Row>
- </Rows>
- </Dataset>
- <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>
- <Rows>
- <Row>
- <Col id="cdid"/>
- <Col id="cdnm"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_main_curedish" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_main_curefood" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_req_dish" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_sea.cmb_mealflag" propid="value" datasetid="ds_send_searchitem" columnid="mealflag"/>
- <BindItem id="item1" compid="grp_sea.chk_pastyn" propid="value" datasetid="ds_send_searchitem" columnid="pastyn"/>
- <BindItem id="item2" compid="grp_sea.ipt_appdd" propid="value" datasetid="ds_send_searchitem" columnid="appdd"/>
- <BindItem id="item3" compid="grp_sea.ipt_psnnodd" propid="value" datasetid="ds_send_searchitem" columnid="psnnodd"/>
- </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";
- var arErrorCode = new HashArray();
- function SMANT02200_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj); //폼 초기화
- }
- function SMANT02200_onload(obj:Form, e:LoadEventInfo)
- {
- finit();
-
- //식재료 발주단위 조회
- var oParam = {};
- oParam.id = "TRANT02503";
- oParam.service = "dietsumapp.DietSum";
- oParam.method = "reqGetPlceOrdUnit";
- oParam.inds = "req=ds_temp";
- oParam.outds = "ds_init_miscode_plceordunit=ret";
- oParam.async = false;
- tranf_submit(oParam);
-
- grp_sea.btn_search.enable = frmf_checkAuth("R");
- btn_save.enable = frmf_checkAuth("X");
-
- // 2010.12.29 c y w 과거데이터조회여부에 따라 예정식수일자 조회조건 visible 셋팅.
- if( ds_send_searchitem.getColumn(0, "pastyn") == "Y"){
- grp_sea.caption1.visible = false;
- grp_sea.ipt_psnnodd.visible = false;
- grp_sea.btn_beforedd2.visible = false;
- grp_sea.btn_nextdd2.visible = false;
- }else{
- grp_sea.caption1.visible = true;
- grp_sea.ipt_psnnodd.visible = true;
- grp_sea.btn_beforedd2.visible = true;
- grp_sea.btn_nextdd2.visible = true;
- }
- }
- function finit() {
- // 화면open시 공통코드 setting
- var arrParam = [{dsNm: "ds_init_basecode_meal_A0055", cdGrpId: "A0055"},
- {dsNm: "ds_init_basecode_diettable_A0417", cdGrpId: "A0417"}
- ];
- appf_getCodeList(arrParam);
-
- ds_main_gnrldish.clearData();
- ds_main_gnrlfood.clearData();
-
- ds_send_searchitem.clearData();
- ds_send_searchitem.addRow();
-
- ds_send_searchitem.setColumn(0, "appdd", utlf_getCurrentDate());
- ds_send_searchitem.setColumn(0, "psnnodd", utlf_getCurrentDate());
- ds_send_searchitem.setColumn(0, "menuflag", "Q3"); //직원식
- ds_send_searchitem.setColumn(0, "mealflag", "0");
- switch2.tabindex = 0;
- }
- function grp_sea_chk_pastyn_onclick(obj:CheckBox, e:ClickEventInfo)
- {
- if( ds_send_searchitem.getColumn(0, "pastyn" ) == "Y"){
- grp_sea.caption1.visible = false;
- grp_sea.ipt_psnnodd.visible = false;
- grp_sea.btn_beforedd2.visible = false;
- grp_sea.btn_nextdd2.visible = false;
- }else{
- grp_sea.caption1.visible = true;
- grp_sea.ipt_psnnodd.visible = true;
- grp_sea.btn_beforedd2.visible = true;
- grp_sea.btn_nextdd2.visible = true;
- }
- }
- function grp_sea_btn_beforedd1_onclick(obj:Button, e:ClickEventInfo)
- {
- var dd = ds_send_searchitem.getColumn(0, "appdd");
- dd = dd.toDate().getAddDate(-1, "D");
- dd = dd.getDateFormat();
- ds_send_searchitem.setColumn(0, "appdd", dd);
- }
- function grp_sea_btn_nextdd1_onclick(obj:Button, e:ClickEventInfo)
- {
- var dd = ds_send_searchitem.getColumn(0, "appdd");
- dd = dd.toDate().getAddDate(1, "D");
- dd = dd.getDateFormat();
- ds_send_searchitem.setColumn(0, "appdd", dd);
- }
- function grp_sea_btn_beforedd2_onclick(obj:Button, e:ClickEventInfo)
- {
- var dd = ds_send_searchitem.getColumn(0, "psnnodd");
- dd = dd.toDate().getAddDate(-1, "D");
- dd = dd.getDateFormat();
- ds_send_searchitem.setColumn(0, "psnnodd", dd);
- }
- function grp_sea_btn_nextdd2_onclick(obj:Button, e:ClickEventInfo)
- {
- var dd = ds_send_searchitem.getColumn(0, "psnnodd");
- dd = dd.toDate().getAddDate(1, "D");
- dd = dd.getDateFormat();
- ds_send_searchitem.setColumn(0, "psnnodd", dd);
- }
- function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- var oParam = {};
- oParam.id = "TRANT01601";
- oParam.service = "dietsumapp.DietSum";
- oParam.method = "reqGetDietTable";
- oParam.inds = "req=ds_send_searchitem";
- oParam.outds = "ds_main_gnrldish=gnrldish ds_main_gnrlfood=gnrlfood ds_main_curedish=curedish ds_main_curefood=curefood";
- oParam.async = false;
- tranf_submit(oParam);
-
- dsf_makeValue(ds_send_req, "savemealflag", "string", "");
- ds_main_gnrlfood.addColumn("h_foodqty", "string");
- ds_main_gnrlfood.addColumn("h_psnno1", "string");
-
-
- //식단명별로 식수인원,비고 컬럼 셀병합
- fmerge();
- //과거데이터조회가 아닐경우 row status가 null이기 때문에 무조건 'insert'로 초기화한다.
- ds_main_gnrldish.enableevent = false;
- ds_main_gnrldish.updatecontrol = false;
- for (var i = 0; i < ds_main_gnrldish.rowcount; i++) {
- ds_main_gnrldish.setRowType(i, 2);
- }
- ds_main_gnrldish.updatecontrol = true;
- ds_main_gnrldish.enableevent = true;
- }
- function fmerge() {
- // if ( ds_main_gnrldish.rowcount == 0 ){
- // return;
- // }
- //
- // if(utlf_isNull(ds_main_gnrldish.getColumnInfo("dishnmlinetype"))){
- // ds_main_gnrldish.addColumn("dishnmlinetype", "string");
- // }
- // if(utlf_isNull(ds_main_gnrldish.getColumnInfo("psnno1linetype"))){
- // ds_main_gnrldish.addColumn("psnno1linetype", "string");
- // }
- // if(utlf_isNull(ds_main_gnrldish.getColumnInfo("psnnor1linetype"))){
- // ds_main_gnrldish.addColumn("psnnor1linetype", "string");
- // }
- // if(utlf_isNull(ds_main_gnrldish.getColumnInfo("dishremlinetype"))){
- // ds_main_gnrldish.addColumn("dishremlinetype", "string");
- // }
- // if(utlf_isNull(ds_main_gnrldish.getColumnInfo("dishtableflaglinetype"))){
- // ds_main_gnrldish.addColumn("dishtableflaglinetype", "string");
- // }
- //
- // // var dishnmColNum = ds_main_gnrldish.getColumn(0, "dishnm");
- // // var psnnoColNum = ds_main_gnrldish.getColumn(0, "psnno1");
- // // var psnnorColNum = ds_main_gnrldish.getColumn(0, "psnnor1");
- // // var dishremColNum = ds_main_gnrldish.getColumn(0, "dishrem");
- // // var sflag = ds_main_gnrldish.getColumn(0, "dishtableflag");
- //
- // var tmpStr1 = ds_main_gnrldish.getColumn(0, "dishnm");
- // var tmpStr2 = "";
- // var tmpStr11 = ds_main_gnrldish.getColumn(0, "dishtableflag");
- // var tmpStr21 = "";
- //
- // var tmpNum = 0;
- //
- // for (var i = 0; i < ds_main_gnrldish.rowcount; i++ ) {
- // tmpStr2 = ds_main_gnrldish.getColumn(i + 1, "dishnm");
- // tmpStr21 = ds_main_gnrldish.getColumn(i + 1, "dishtableflag");
- //
- // if((tmpStr11 == tmpStr21) || (tmpStr11 != tmpStr21 && tmpStr1 == tmpStr2)){
- // ds_main_gnrldish.setColumn(i, "dishtableflaglinetype", "onlyvert");
- // ds_main_gnrldish.setColumn(i, "dishnmlinetype", "onlyvert");
- // ds_main_gnrldish.setColumn(i, "psnnor1linetype", "onlyvert");
- // ds_main_gnrldish.setColumn(i, "psnno1linetype", "onlyvert");
- // ds_main_gnrldish.setColumn(i, "dishremlinetype", "onlyvert");
- // }else{
- // ds_main_gnrldish.setColumn(i, "dishtableflaglinetype", "");
- // ds_main_gnrldish.setColumn(i, "dishnmlinetype", "");
- // ds_main_gnrldish.setColumn(i, "psnnor1linetype", "");
- // ds_main_gnrldish.setColumn(i, "psnno1linetype", "");
- // ds_main_gnrldish.setColumn(i, "dishremlinetype", "");
- // }
- // tmpStr1 = tmpStr2;
- // tmpStr11 = tmpStr21;
- // }
- }
- function ds_main_gnrldish_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- var dishrem = ds_main_gnrldish.getColumn(ds_main_gnrldish.rowposition, "dishrem");
- for (var k = ds_main_gnrldish.rowposition; k < ds_main_gnrldish.rowcount - 1; k++) {
- var dishtableflag = ds_main_gnrldish.getColumn(k, "dishtableflag");
- var dishcd = ds_main_gnrldish.getColumn(k, "dishcd");
- var dishtableflag2 = ds_main_gnrldish.getColumn(eval(k) + 1, "dishtableflag");
- var dishcd2 = ds_main_gnrldish.getColumn(eval(k) + 1, "dishcd");
- if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
- break;
- } else {
- ds_main_gnrldish.setColumn(eval(k) + 1, "dishrem", dishrem);
- }
- }
- }
- function switch2_case1_grd_empdish_onkeydown(obj:Grid, e:KeyEventInfo)
- {
- if(e.keycode == 13){
- obj.showEditor(false);
- }
- }
- function switch2_case1_btn_recalc1_onclick(obj:Button, e:ClickEventInfo)
- {
- for (var i = 0; i < ds_main_gnrldish.rowcount; i++) {
- var i_foodqty = ds_main_gnrldish.getColumn(i, "foodqty");
- var i_hfoodqty = ds_main_gnrldish.getColumn(i, "h_foodqty");
- var i_psnno = ds_main_gnrldish.getColumn(i, "psnno1");
- var i_hpsnno = ds_main_gnrldish.getColumn(i, "h_psnno1");
- var totalqty;
- //1인량만 수정된 경우
- if ( (i_foodqty != i_hfoodqty) && (i_psnno == i_hpsnno) ) {
- if ( utlf_isNull(i_psnno) ) { i_psnno = 0; }
- var i_plceordexchbase = ds_main_gnrldish.getColumn(i, "plceordexchbase");
- totalqty = parseFloat(i_foodqty) * parseInt(i_psnno) / parseFloat(i_plceordexchbase);
- totalqty = totalqty.toString().getRound(-2, "HALF_UP");
- ds_main_gnrldish.setColumn(i, "totalqty", parseFloat(totalqty));
- ds_main_gnrldish.setColumn(i, "h_foodqty", parseFloat(i_foodqty));
- }
- //식수가 수정된 경우
- else if ( i_psnno != i_hpsnno ) {
- for (var k = i; k < ds_main_gnrldish.rowcount; k++) {
- if ( utlf_isNull(i_psnno) ) {
- i_psnno = 0;
- ds_main_gnrldish.setColumn(i, "totalqty", "0");
- }
- var k_foodqty = ds_main_gnrldish.getColumn(k, "foodqty");
- var k_plceordexchbase = ds_main_gnrldish.getColumn(k, "plceordexchbase");
- totalqty = parseFloat(k_foodqty) * parseInt(i_psnno) / parseFloat(k_plceordexchbase);
- totalqty = totalqty.toString().getRound(-2, "HALF_UP");
- ds_main_gnrldish.setColumn(k, "totalqty", parseFloat(totalqty));
- ds_main_gnrldish.setColumn(k, "h_foodqty", parseFloat(k_foodqty));
- ds_main_gnrldish.setColumn(k, "psnno1", parseInt(i_psnno));
- ds_main_gnrldish.setColumn(k, "h_psnno1", parseInt(i_psnno));
-
- var dishtableflag = ds_main_gnrldish.getColumn(k, "dishtableflag");
- var dishcd = ds_main_gnrldish.getColumn(k, "dishcd");
- var dishtableflag2 = ds_main_gnrldish.getColumn(eval(k) + 1, "dishtableflag");
- var dishcd2 = ds_main_gnrldish.getColumn(eval(k) + 1, "dishcd");
-
- if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
- break;
- }
- }
- }
- }
- }
- function btn_reset_onclick(obj:Button, e:ClickEventInfo)
- {
- finit();
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- var appdd = ds_send_searchitem.getColumn(0, "appdd");
- var menu = '직원식';
- var meal = grp_sea.cmb_mealflag.text;
- var yy = utlf_transNullToEmpty(appdd).substr(0,4);
- var mm = utlf_transNullToEmpty(appdd).substr(4,2);
- var dd = utlf_transNullToEmpty(appdd).substr(6,2);
-
- if ( ds_main_gnrldish.rowcount > 0 ) {
- if ( sysf_messageBox(menu+" "+mm+ "월 "+dd+"일 "+meal+" 급식실천표를", "Q002") == 6 ) {
-
- var appdd = ds_send_searchitem.getColumn(0, "appdd");
- //필수입력항목 체크
- for (var i = 0; i < ds_main_gnrldish.rowcount; i++) {
- if ( (utlf_isNull(ds_main_gnrldish.getColumn(i, "foodqty"))) ||
- (utlf_isNull(ds_main_gnrldish.getColumn(i, "psnno1"))) ||
- (utlf_isNull(ds_main_gnrldish.getColumn(i, "totalqty"))) ) {
- sysf_messageBox("1인량,식수,발주량 항목은", "I003");
- return;
- }
- //저장할 날짜를 급식실천표일자로 setting
- ds_main_gnrldish.setColumn(i, "appdd", appdd);
- }
- var updateData = grdf_getGridUpdateData(switch2.case1.grd_empdish);
- ds_send_req_dish.copyData(updateData, true);
-
- // 데이터 존재여부 체크
- var oParam = {};
- oParam.id = "TRANT01602";
- oParam.service = "dietsumapp.DietSum";
- oParam.method = "reqGetDietTableCnt";
- oParam.inds = "req=ds_send_req_dish";
- oParam.outds = "ds_temp_ret=ret";
- oParam.async = false;
- tranf_submit(oParam);
-
- dsf_makeValue(ds_send_req, "savemealflag", "string", grp_sea.cmb_mealflag.value);
-
- if ( ds_temp_ret.getColumn(0, "count") > 0 ) {
- if ( sysf_messageBox("데이터가 이미 존재합니다. 다시", "Q002") == 6 ) {
- var oParam = {};
- oParam.id = "TXANT01601";
- oParam.service = "dietsumapp.DietSum";
- oParam.method = "reqExeDietTable";
- oParam.inds = "req=ds_send_req_dish savemeal=ds_send_req";
- oParam.outds = "";
- oParam.async = false;
- tranf_submit(oParam);
-
- grp_sea_btn_search_onclick();//저장후 재조회
- } else { return; }
- } else {
- var oParam = {};
- oParam.id = "TXANT01601";
- oParam.service = "dietsumapp.DietSum";
- oParam.method = "reqExeDietTable";
- oParam.inds = "req=ds_send_req_dish savemeal=ds_send_req";
- oParam.outds = "";
- oParam.async = false;
- tranf_submit(oParam);
- grp_sea_btn_search_onclick();//저장후 재조회
- }
- } else { return; }
- } else {
- sysf_messageBox("저장할 데이터가", "I004");
- return;
- }
- }
- function switch2_case2_btn_recalc2_onclick(obj:Button, e:ClickEventInfo)
- {
- for (var i = 0; i < ds_main_gnrlfood.rowcount; i++) {
- var foodqty = ds_main_gnrlfood.getColumn(i, "foodqty");
- var hfoodqty = ds_main_gnrlfood.getColumn(i, "h_foodqty");
- var psnno1 = ds_main_gnrlfood.getColumn(i, "psnno1");
- var hpsnno1 = ds_main_gnrlfood.getColumn(i, "h_psnno1");
- var plceordexchbase = ds_main_gnrlfood.getColumn(i, "plceordexchbase");
- if ( (foodqty != hfoodqty) || (psnno1 != hpsnno1) ) {
- if ( utlf_isNull(psnno1) ) { psnno1 = 0; }
- var totalqty = parseFloat(foodqty) * parseInt(psnno1) / parseFloat(plceordexchbase);
- totalqty = totalqty.toString().getRound(-2, "HALF_UP");
- ds_main_gnrlfood.setColumn(i, "totalqty", parseFloat(totalqty));
- ds_main_gnrlfood.setColumn(i, "h_foodqty", parseFloat(foodqty));
- ds_main_gnrlfood.setColumn(i, "h_psnno1", parseInt(psnno1));
- }
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|