1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>환자식급식실천표</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <gnrldish>
- <appdd/>
- <mealflag/>
- <menuflag/>
- <dishtableflag/>
- <dishtablenm/>
- <dishcd/>
- <dishnm/>
- <foodcd/>
- <foodnm/>
- <plceordexchbase/>
- <foodqty/>
- <h_foodqty/>
- <psnno1/>
- <h_psnno1/>
- <totalqty/>
- <foodunit/>
- <dishrem/>
- <psnnor1/>
- </gnrldish>
- <gnrlfood>
- <appdd/>
- <mealflag/>
- <menuflag/>
- <foodcd/>
- <foodnm/>
- <plceordexchbase/>
- <dishcd/>
- <dishnm/>
- <foodqty/>
- <h_foodqty/>
- <psnno1/>
- <h_psnno1/>
- <totalqty/>
- <foodunit/>
- <dishrem/>
- <psnnor1/>
- </gnrlfood>
- <curedish>
- <appdd/>
- <mealflag/>
- <menuflag/>
- <dishtableflag/>
- <dishtablenm/>
- <dishcd/>
- <dishnm/>
- <foodcd/>
- <foodnm/>
- <plceordexchbase/>
- <foodqty/>
- <h_foodqty/>
- <psnno1/>
- <h_psnno1/>
- <psnno2/>
- <h_psnno2/>
- <psnno3/>
- <h_psnno3/>
- <totalqty/>
- <foodunit/>
- <dishrem/>
- <psnnor1/>
- <psnnor2/>
- <psnnor3/>
- </curedish>
- <curefood>
- <appdd/>
- <mealflag/>
- <menuflag/>
- <foodcd/>
- <foodnm/>
- <plceordexchbase/>
- <dishcd/>
- <dishnm/>
- <foodqty/>
- <h_foodqty/>
- <psnno1/>
- <h_psnno1/>
- <psnno2/>
- <h_psnno2/>
- <psnno3/>
- <h_psnno3/>
- <totalqty/>
- <foodunit/>
- <dishrem/>
- <psnnor1/>
- <psnnor2/>
- <psnnor3/>
- </curefood>
- </main>
- <send>
- <searchitem>
- <appdd/>
- <menuflag/>
- <mealflag/>
- <psnnodd/>
- <pastyn/>
- </searchitem>
- <req>
- <dish/>
- </req>
- </send>
- <temp>
- <ret>
- <count/>
- </ret>
- </temp>
- <init>
- <basecode>
- <meal>
- <A0055>
- <cdid/>
- <cdnm/>
- </A0055>
- </meal>
- <diettable>
- <A0417>
- <cdid/>
- <cdnm/>
- </A0417>
- </diettable>
- </basecode>
- <miscode>
- <plceordunit>
- <cdid/>
- <cdnm/>
- </plceordunit>
- </miscode>
- <baseinfo>
- <inithalf/>
- </baseinfo>
- </init>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- finit();
- submit("TRANT02503"); //식재료 발주단위 조회
- astGetComboList( new Array("A170"), new Array("/root/init/baseinfo/inithalf") );
- submit("TRAAA00001", false);
- model.removeNode("/root/init/baseinfo/inithalf/A170[" + 1 + "]");
- btn_search.disabled = !checkAuth("R");
- btn_save.disabled = !checkAuth("X");
- //btn_excel.disabled = !checkAuth("P");
-
- // 2010.12.29 c y w 과거데이터조회여부에 따라 예정식수일자 조회조건 visible 셋팅.
- if( model.getValue("/root/send/searchitem/pastyn" ) == "Y"){
- caption1.visible = false;
- ipt_psnnodd.visible = false;
- btn_beforedd2.visible = false;
- btn_nextdd2.visible = false;
- }else{
- caption1.visible = true;
- ipt_psnnodd.visible = true;
- btn_beforedd2.visible = true;
- btn_nextdd2.visible = true;
- }
-
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- function finit() {
- // 화면open시 공통코드 setting
- zbcfGetCodeList( new Array( "A0055", "A0417" ), new Array("/root/init/basecode/meal", "/root/init/basecode/diettable") );
- //끼니에 '전체' 추가
- addComboItem("cmb_mealflag","전체","0","init");
- model.resetInstanceNode("/root/main");
- model.resetInstanceNode("/root/send");
- model.removeNodeset("/root/main");
- //model.setFocus("ipt_pid");
- model.setValue("/root/send/searchitem/appdd", getCurrentDate());
- model.setValue("/root/send/searchitem/psnnodd", getCurrentDate());
- model.setValue("/root/send/searchitem/menuflag", "Q1");
- model.setValue("/root/send/searchitem/mealflag", "0");
- btn_dish.dispatch("DOMActivate");
- model.refresh();
- }
-
- //일반식 - 식단명별로 식수인원,비고 컬럼 셀병합
- function fmerge1() {
- if ( grd_gnrldish.rows <= grd_gnrldish.fixedRows + 1)
- return;
-
- var dishnmColNum = grd_gnrldish.colRef("dishnm");
- var psnnoColNum = grd_gnrldish.colRef("psnno1");
- var psnnorColNum = grd_gnrldish.colRef("psnnor1");
- var dishremColNum = grd_gnrldish.colRef("dishrem");
- var sflag = grd_gnrldish.colRef("dishtableflag");
-
- var tmpStr1 = grd_gnrldish.valueMatrix(grd_gnrldish.fixedRows, dishnmColNum);
- var tmpStr2 = "";
- var tmpStr11 = grd_gnrldish.valueMatrix(grd_gnrldish.fixedRows, sflag);
- var tmpStr21 = "";
-
- var tmpNum = grd_gnrldish.fixedRows;
-
- for ( i = grd_gnrldish.fixedRows; i < grd_gnrldish.rows; i++ ) {
-
- if ( i + 1 <= grd_gnrldish.rows ) {
- tmpStr2 = grd_gnrldish.valueMatrix(i + 1, dishnmColNum);
- tmpStr21 = grd_gnrldish.valueMatrix(i + 1, sflag);
- } else if ( i + 1 == grd_gnrldish.rows ) {
- tmpStr2 = "";
- tmpStr21 = "";
- }
-
- if ( (tmpStr11 != tmpStr21) || (tmpStr1 != tmpStr2 && tmpStr11 == tmpStr21) ) {
- grd_gnrldish.mergeByFree(tmpNum, psnnoColNum, i, psnnoColNum);
- grd_gnrldish.mergeByFree(tmpNum, psnnorColNum, i, psnnorColNum);
- grd_gnrldish.mergeByFree(tmpNum, dishremColNum, i, dishremColNum);
- tmpStr1 = tmpStr2;
- tmpStr11 = tmpStr21;
- tmpNum = i + 1;
- }
- }
- }
-
- //치료식 - 식단명별로 식수인원,비고 컬럼 셀병합
- function fmerge2() {
- if ( grd_curedish.rows <= grd_curedish.fixedRows + 1)
- return;
-
- var dishnmColNum = grd_curedish.colRef("dishnm");
- var psnno1ColNum = grd_curedish.colRef("psnno1");
- var psnno2ColNum = grd_curedish.colRef("psnno2");
- var psnno3ColNum = grd_curedish.colRef("psnno3");
- var psnnor1ColNum = grd_curedish.colRef("psnnor1");
- var psnnor2ColNum = grd_curedish.colRef("psnnor2");
- var psnnor3ColNum = grd_curedish.colRef("psnnor3");
- var dishremColNum = grd_curedish.colRef("dishrem");
- var sflag = grd_curedish.colRef("dishtableflag");
-
- var tmpStr1 = grd_curedish.valueMatrix(grd_curedish.fixedRows, dishnmColNum);
- var tmpStr2 = "";
- var tmpStr11 = grd_curedish.valueMatrix(grd_curedish.fixedRows, sflag);
- var tmpStr21 = "";
-
- var tmpNum = grd_curedish.fixedRows;
-
- for ( i = grd_curedish.fixedRows; i < grd_curedish.rows; i++ ) {
-
- if ( i + 1 <= grd_curedish.rows ) {
- tmpStr2 = grd_curedish.valueMatrix(i + 1, dishnmColNum);
- tmpStr21 = grd_curedish.valueMatrix(i + 1, sflag);
- } else if ( i + 1 == grd_curedish.rows ) {
- tmpStr2 = "";
- tmpStr21 = "";
- }
-
- if ( (tmpStr11 != tmpStr21) || (tmpStr1 != tmpStr2 && tmpStr11 == tmpStr21) ) {
- grd_curedish.mergeByFree(tmpNum, psnno1ColNum, i, psnno1ColNum);
- grd_curedish.mergeByFree(tmpNum, psnno2ColNum, i, psnno2ColNum);
- grd_curedish.mergeByFree(tmpNum, psnno3ColNum, i, psnno3ColNum);
- grd_curedish.mergeByFree(tmpNum, psnnor1ColNum, i, psnnor1ColNum);
- grd_curedish.mergeByFree(tmpNum, psnnor2ColNum, i, psnnor2ColNum);
- grd_curedish.mergeByFree(tmpNum, psnnor3ColNum, i, psnnor3ColNum);
- grd_curedish.mergeByFree(tmpNum, dishremColNum, i, dishremColNum);
- tmpStr1 = tmpStr2;
- tmpStr11 = tmpStr21;
- tmpNum = i + 1;
- }
- }
- }
- ]]>
- </script>
- <submission id="TRZBC00101"/>
- <submission id="TRANT01601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main"/>
- <submission id="TRANT01602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/temp"/>
- <submission id="TXANT01601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req"/>
- <submission id="TRANT02503" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/miscode"/>
- <submission id="TRAAA00001"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../ast/examcureweb/js/combolist.js"/>
- </xhtml:head>
- <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:150px; height:14px; ">환자식급식실천표</caption>
- </group>
- <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; "/>
- <caption id="caption2" class="search_name" style="left:555px; top:9px; width:130px; height:17px; ">급식실천표일자 :</caption>
- <caption id="caption3" class="search_name" style="left:16px; top:9px; width:89px; height:17px; ">식단구분 :</caption>
- <line id="line13" class="line_4" style="x1:1100px; y1:6px; x2:1100px; y2:28px; "/>
- <button id="btn_beforedd1" class="icon_pre" style="left:778px; top:10px; width:13px; height:15px; ">
- <caption/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var dd = model.getValue("/root/send/searchitem/appdd");
- dd = dd.toDate().getAddDate(-1, "D");
- dd = dd.getDateFormat();
- model.setValue("/root/send/searchitem/appdd", dd);
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_nextdd1" class="icon_next" style="left:791px; top:10px; width:13px; height:15px; ">
- <caption/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var dd = model.getValue("/root/send/searchitem/appdd");
- dd = dd.toDate().getAddDate(1, "D");
- dd = dd.getDateFormat();
- model.setValue("/root/send/searchitem/appdd", dd);
- model.refresh();
- ]]>
- </script>
- </button>
- <input id="ipt_appdd" ref="/root/send/searchitem/appdd" class="input_search" inputtype="date" style="left:682px; top:8px; width:90px; height:19px; "/>
- <select1 id="rdo_menuflag" ref="/root/send/searchitem/menuflag" class="radio_search" appearance="full" cellspacing="3" cols="2" rows="1" overflow="visible" style="left:105px; top:10px; width:120px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>일반식</label>
- <value>Q1</value>
- </item>
- <item>
- <label>치료식</label>
- <value>Q2</value>
- </item>
- </choices>
- </select1>
- <button id="btn_search" class="btn1_letter2" style="left:1118px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- submit("TRANT01601");
- model.removeNodeset("/root/send/req/savemealflag");
-
- //식단명별로 식수인원,비고 컬럼 셀병합
- if ( model.getValue("/root/send/searchitem/menuflag") == "Q1" ) { //일반식일 경우
- fmerge1();
- btn_dish.selected = true;
- model.toggle("case1");
- } else { //치료식일 경우
- fmerge2();
- btn_dish.selected = true;
- model.toggle("case3");
- }
-
- //과거데이터조회가 아닐경우 row status가 null이기 때문에 무조건 'insert'로 초기화한다.
- //if ( model.getValue("/root/send/searchitem/pastyn") == "" ) {
- for ( i=1; i<grd_gnrldish.rows; i++) {
- grd_gnrldish.addStatus(i, "insert");
- }
-
- for ( i=2; i<grd_curedish.rows; i++) {
- grd_curedish.addStatus(i, "insert");
- }
- //}
- ]]>
- </script>
- </button>
- <caption id="caption4" class="search_name" style="left:236px; top:9px; width:60px; height:17px; ">끼니 :</caption>
- <select1 id="cmb_mealflag" ref="/root/send/searchitem/mealflag" class="combo_s_essential" appearance="minimal" style="left:298px; top:8px; width:57px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/basecode/meal/A0055">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <button id="btn_beforedd2" class="icon_pre" style="left:1053px; top:10px; width:13px; height:15px; ">
- <caption/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var dd = model.getValue("/root/send/searchitem/psnnodd");
- dd = dd.toDate().getAddDate(-1, "D");
- dd = dd.getDateFormat();
- model.setValue("/root/send/searchitem/psnnodd", dd);
- model.refresh();
- ]]>
- </script>
- </button>
- <caption id="caption1" class="search_name" style="left:841px; top:9px; width:114px; height:17px; ">예정식수일자 :</caption>
- <button id="btn_nextdd2" class="icon_next" style="left:1066px; top:10px; width:13px; height:15px; ">
- <caption/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var dd = model.getValue("/root/send/searchitem/psnnodd");
- dd = dd.toDate().getAddDate(1, "D");
- dd = dd.getDateFormat();
- model.setValue("/root/send/searchitem/psnnodd", dd);
- model.refresh();
- ]]>
- </script>
- </button>
- <input id="ipt_psnnodd" ref="/root/send/searchitem/psnnodd" class="input_search" inputtype="date" style="left:957px; top:8px; width:90px; height:19px; "/>
- <select id="chk_pastyn" ref="/root/send/searchitem/pastyn" class="checkbox_search" overflow="visible" appearance="full" style="left:395px; top:9px; width:135px; height:20px; ">
- <choices>
- <item>
- <label>과거데이터조회여부</label>
- <value>Y</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- // 2010.12.29 c y w 과거데이터조회여부에 따라 예정식수일자 조회조건 visible 셋팅.
- if( model.getValue("/root/send/searchitem/pastyn" ) == "Y"){
- caption1.visible = false;
- ipt_psnnodd.visible = false;
- btn_beforedd2.visible = false;
- btn_nextdd2.visible = false;
- }else{
- caption1.visible = true;
- ipt_psnnodd.visible = true;
- btn_beforedd2.visible = true;
- btn_nextdd2.visible = true;
- }
- ]]>
- </script>
- </select>
- </group>
- <button id="btn_dish" class="btn_sw" group="tab" selected="true" style="left:0px; top:49px; width:80px; height:22px; ">
- <caption>식단별</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( model.getValue("/root/send/searchitem/menuflag")=='Q1' ) {
- model.toggle("case1");
- } else {
- model.toggle("case3");
- }
- ]]>
- </script>
- </button>
- <button id="btn_food" class="btn_sw" group="tab" style="left:80px; top:49px; width:95px; height:22px; ">
- <caption>식품(재료)별</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( model.getValue("/root/send/searchitem/menuflag")=='Q1' ) {
- model.toggle("case2");
- } else {
- model.toggle("case4");
- }
- ]]>
- </script>
- </button>
- <switch id="switch2" style="left:0px; top:70px; width:1194px; height:670px; ">
- <case id="case1">
- <datagrid id="grd_gnrldish" nodeset="/root/main/gnrldish" caption="적용일자^끼니^식단구분^분류^분류명^식단코드^식단명^재료코드^재료명(식품명)^1인량^h_1인량^식수(명) 계산량^식수(명) 조절량^h_식수(명)^발주량^단위^비고" colsep="^" colwidth="10, 10, 10, 100, 10, 10, 100, 10, 110, 70, 10, 100, 100, 10, 70, 60, 150" dataheight="25" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:0px; width:1192px; height:668px; ">
- <col ref="appdd" visibility="hidden"/>
- <col ref="mealflag" visibility="hidden"/>
- <col ref="menuflag" visibility="hidden"/>
- <col disabled="true" ref="dishtableflag" type="combo">
- <choices>
- <itemset nodeset="/root/init/basecode/diettable/A0417">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="dishtablenm" visibility="hidden"/>
- <col ref="dishcd" visibility="hidden"/>
- <col ref="dishnm"/>
- <col ref="foodcd" visibility="hidden"/>
- <col ref="foodnm"/>
- <col ref="foodqty" type="input" style="text-align:right; "/>
- <col ref="h_foodqty" visibility="hidden"/>
- <col ref="psnnor1" format="#,###" style="text-align:right; "/>
- <col ref="psnno1" type="input" format="#,###" style="text-align:right; "/>
- <col ref="h_psnno1" visibility="hidden"/>
- <col ref="totalqty" type="input" style="text-align:right; "/>
- <col disabled="true" ref="foodunit" type="combo" style="text-align:center; ">
- <choices>
- <itemset nodeset="/root/init/miscode/plceordunit">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="dishrem" type="input">
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- var dishrem = model.getValue("/root/main/gnrldish[" + grd_gnrldish.row + "]/dishrem");
-
- for ( k=grd_gnrldish.row; k<grd_gnrldish.rows; k++) {
- var dishtableflag = model.getValue("/root/main/gnrldish[" + k + "]/dishtableflag");
- var dishcd = model.getValue("/root/main/gnrldish[" + k + "]/dishcd");
- var dishtableflag2 = model.getValue("/root/main/gnrldish[" + (k+1) + "]/dishtableflag");
- var dishcd2 = model.getValue("/root/main/gnrldish[" + (k+1) + "]/dishcd");
- if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
- break;
- } else {
- model.setValue("/root/main/gnrldish[" + (k+1) + "]/dishrem", dishrem);
- }
- }
- ]]>
- </script>
- </col>
- <script type="javascript" ev:event="onfixedbuttonclick">
- <![CDATA[
- /**
- * ast_31
- *개발일시: 2010.05.17
- *개발내용: 그리드(id:grd_gnrldish)의 버튼을 클릭하면 식수를 모두 마지막에 선택된 값으로 변경된다.
- */
- for(var i = 1; i <= grd_gnrldish.rows;i++)
- {
- grd_gnrldish.valueMatrix(i, 12) = grd_gnrldish.valueMatrix(grd_gnrldish_row, grd_gnrldish_col);
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- /**
- * ast_31
- *개발일시: 2010.05.17
- *개발내용: 그리드(id:grd_gnrldish)를 클릭하면, 해당 그리드의 row와 col을 저장할 변수
- */
- if(grd_gnrldish.row == 0)
- {
- return;
- }
- grd_gnrldish_row = grd_gnrldish.row;
- //grd_gnrldish_col = grd_gnrldish.col;
- ]]>
- </script>
- </datagrid>
- <button id="btn_recalc1" class="btn2_letter3" style="left:1080px; top:4px; width:53px; height:19px; ">
- <caption>재계산</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var shalf = model.getValue("/root/init/baseinfo/inithalf/A170[" + 1 + "]/cdid");
- shalf = (parseInt(shalf) * -1) - 1;
- //alert(shalf);
- for ( i=1; i<grd_gnrldish.rows; i++) {
- var i_foodqty = model.getValue("/root/main/gnrldish[" + i + "]/foodqty");
- var i_hfoodqty = model.getValue("/root/main/gnrldish[" + i + "]/h_foodqty");
- var i_psnno = model.getValue("/root/main/gnrldish[" + i + "]/psnno1");
- var i_hpsnno = model.getValue("/root/main/gnrldish[" + i + "]/h_psnno1");
- var totalqty;
- //1인량만 수정된 경우
- if ( (i_foodqty != i_hfoodqty) && (i_psnno == i_hpsnno) ) {
- var i_plceordexchbase = model.getValue("/root/main/gnrldish[" + i + "]/plceordexchbase");
- totalqty = parseFloat(i_foodqty) * parseInt(i_psnno) / parseFloat(i_plceordexchbase);
- //totalqty = totalqty.toString().getRound(-2, "HALF_UP");
- totalqty = totalqty.toString().getRound(shalf, "HALF_UP");
- model.setValue("/root/main/gnrldish[" + i + "]/totalqty", parseFloat(totalqty));
- model.setValue("/root/main/gnrldish[" + i + "]/h_foodqty", parseFloat(i_foodqty));
- }
- //식수가 수정된 경우
- else if ( i_psnno != i_hpsnno ) {
- for ( k=i; k<grd_gnrldish.rows; k++) {
-
- var k_foodqty = model.getValue("/root/main/gnrldish[" + k + "]/foodqty");
- var k_plceordexchbase = model.getValue("/root/main/gnrldish[" + k + "]/plceordexchbase");
-
- totalqty = parseFloat(k_foodqty) * parseInt(i_psnno) / parseFloat(k_plceordexchbase);
- //totalqty = totalqty.toString().getRound(-2, "HALF_UP");
- totalqty = totalqty.toString().getRound(shalf, "HALF_UP");
-
- model.setValue("/root/main/gnrldish[" + k + "]/totalqty", parseFloat(totalqty));
-
- model.setValue("/root/main/gnrldish[" + k + "]/h_foodqty", parseFloat(k_foodqty));
- model.setValue("/root/main/gnrldish[" + k + "]/psnno1", parseInt(i_psnno));
- model.setValue("/root/main/gnrldish[" + k + "]/h_psnno1", parseInt(i_psnno));
-
- var dishtableflag = model.getValue("/root/main/gnrldish[" + k + "]/dishtableflag");
- var dishcd = model.getValue("/root/main/gnrldish[" + k + "]/dishcd");
- var dishtableflag2 = model.getValue("/root/main/gnrldish[" + (k+1) + "]/dishtableflag");
- var dishcd2 = model.getValue("/root/main/gnrldish[" + (k+1) + "]/dishcd");
-
- if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
- break;
- }
- }
- }
- }
- model.refresh();
- ]]>
- </script>
- </button>
- </case>
- <case id="case2">
- <datagrid id="grd_gnrlfood" nodeset="/root/main/gnrlfood" caption="적용일자^끼니^식단구분^재료코드^재료명(식품명)^식단코드^식단명^1인량^h_1인량^식수(명) 계산량^식수(명) 조절량^h_식수(명)^발주량^단위^비고" colsep="^" colwidth="10, 10, 10, 10, 100, 10, 110, 70, 10, 100,100, 10, 70, 60, 150" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:0px; width:1192px; height:668px; ">
- <col ref="appdd" visibility="hidden"/>
- <col ref="mealflag" visibility="hidden"/>
- <col ref="menuflag" visibility="hidden"/>
- <col ref="foodcd" visibility="hidden"/>
- <col ref="foodnm"/>
- <col ref="dishcd" visibility="hidden"/>
- <col ref="dishnm"/>
- <col ref="foodqty" type="input" style="text-align:right; "/>
- <col ref="h_foodqty" visibility="hidden"/>
- <col ref="psnnor1" format="#,###" style="text-align:right; "/>
- <col ref="psnno1" type="input" format="#,###" style="text-align:right; "/>
- <col ref="h_psnno1" visibility="hidden"/>
- <col ref="totalqty" type="input" style="text-align:right; "/>
- <col disabled="true" ref="foodunit" type="combo" style="text-align:center; ">
- <choices>
- <itemset nodeset="/root/init/miscode/plceordunit">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="dishrem"/>
- </datagrid>
- <button id="btn_recalc2" class="btn2_letter3" style="left:1080px; top:4px; width:53px; height:19px; ">
- <caption>재계산</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var shalf = model.getValue("/root/init/baseinfo/inithalf/A170[" + 1 + "]/cdid");
- shalf = (parseInt(shalf) * -1) - 1;
- for ( i=1; i<grd_gnrlfood.rows; i++) {
- var foodqty = model.getValue("/root/main/gnrlfood[" + i + "]/foodqty");
- var hfoodqty = model.getValue("/root/main/gnrlfood[" + i + "]/h_foodqty");
- var psnno1 = model.getValue("/root/main/gnrlfood[" + i + "]/psnno1");
- var hpsnno1 = model.getValue("/root/main/gnrlfood[" + i + "]/h_psnno1");
- var plceordexchbase = model.getValue("/root/main/gnrlfood[" + i + "]/plceordexchbase");
- if ( (foodqty != hfoodqty) || (psnno1 != hpsnno1) ) {
- var totalqty = parseFloat(foodqty) * parseInt(psnno1) / parseFloat(plceordexchbase);
- //totalqty = totalqty.toString().getRound(-2, "HALF_UP");
- totalqty = totalqty.toString().getRound(shalf, "HALF_UP");
- model.setValue("/root/main/gnrlfood[" + i + "]/totalqty", parseFloat(totalqty));
- model.setValue("/root/main/gnrlfood[" + i + "]/h_foodqty", parseFloat(foodqty));
- model.setValue("/root/main/gnrlfood[" + i + "]/h_psnno1", parseInt(psnno1));
- }
- }
- model.refresh();
- ]]>
- </script>
- </button>
- </case>
- <case id="case3" selected="true">
- <datagrid id="grd_curedish" nodeset="/root/main/curedish" caption="적용일자^끼니^식단구분^1분류^분류명^식단코드^식단명^재료코드^재료명(식품명)^1인량^h_1인량^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^발주량^단위^비고|적용일자^끼니^식단구분^분류^분류명^식단코드^식단명^재료코드^재료명(식품명)^1인량^h_1인량^당뇨 계산^당뇨 조절^h_당뇨^경저염 계산^경저염 조절^h_경저염^저염 계산^저염 조절^h_저염^발주량^단위^비고" colsep="^" colwidth="10, 10, 10, 100, 10, 10, 48, 10, 110, 70, 10, 70, 70, 10, 70, 70, 10, 70, 70, 10, 70, 60, 150" dataheight="25" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:0px; width:1192px; height:668px; ">
- <col ref="appdd" visibility="hidden"/>
- <col ref="mealflag" visibility="hidden"/>
- <col ref="menuflag" visibility="hidden"/>
- <col disabled="true" ref="dishtableflag" type="combo">
- <choices>
- <itemset nodeset="/root/init/basecode/diettable/A0417">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="dishtablenm" visibility="hidden"/>
- <col ref="dishcd" visibility="hidden"/>
- <col ref="dishnm"/>
- <col ref="foodcd" visibility="hidden"/>
- <col ref="foodnm"/>
- <col ref="foodqty" type="input" style="text-align:right; "/>
- <col ref="h_foodqty" visibility="hidden"/>
- <col ref="psnnor1" format="#,###" style="text-align:right; "/>
- <col ref="psnno1" type="input" format="#,###" style="text-align:right; "/>
- <col ref="h_psnno1" visibility="hidden"/>
- <col ref="psnnor2" format="#,###" style="text-align:right; "/>
- <col ref="psnno2" type="input" format="#,###" style="text-align:right; "/>
- <col ref="h_psnno2" visibility="hidden"/>
- <col ref="psnnor3" format="#,###" style="text-align:right; "/>
- <col ref="psnno3" type="input" format="#,###" style="text-align:right; "/>
- <col ref="h_psnno3" visibility="hidden"/>
- <col ref="totalqty" type="input" style="text-align:right; "/>
- <col disabled="true" ref="foodunit" type="combo" style="text-align:center; ">
- <choices>
- <itemset nodeset="/root/init/miscode/plceordunit">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="dishrem" type="input">
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- var dishrem = model.getValue("/root/main/curedish[" + (grd_curedish.row-1) + "]/dishrem");
-
- for ( k=grd_curedish.row; k<grd_curedish.rows-1; k++) {
- var dishtableflag = model.getValue("/root/main/curedish[" + (k-1) + "]/dishtableflag");
- var dishcd = model.getValue("/root/main/curedish[" + (k-1) + "]/dishcd");
- var dishtableflag2 = model.getValue("/root/main/curedish[" + k + "]/dishtableflag");
- var dishcd2 = model.getValue("/root/main/curedish[" + k + "]/dishcd");
- if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
- break;
- } else {
- model.setValue("/root/main/curedish[" + k + "]/dishrem", dishrem);
- }
- }
- ]]>
- </script>
- </col>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- // 현재 선택된 그리드의 행을 지정
- var s = grd_curedish.row;
- // alert("선택된 그리드 행 인덱스 : "+ s);
-
- // 비교조건에 사용하기 위한 그룹핑용 기준코드 값 가져오기
- var dishtableflag = model.getValue("/root/main/curedish[" + (s-1) + "]/dishtableflag");
- var dishcd = model.getValue("/root/main/curedish[" + (s-1) + "]/dishcd");
-
- // var dishnm = model.getValue("/root/main/curedish[" + (s-1) + "]/dishnm");
- // var foodnm = model.getValue("/root/main/curedish[" + (s-1) + "]/foodnm");
- // alert("dishtableflag : " + dishtableflag);
- // alert("dishcd : " + dishcd);
- // alert("dishnm : " + dishnm);
- // alert("foodnm : " + foodnm);
- var t_psnno1 = model.getValue("/root/main/curedish[" + (s-1) + "]/psnno1");
- // alert("psnno1 : " + h_psnno1);
- var t_psnno2 = model.getValue("/root/main/curedish[" + (s-1) + "]/psnno2");
- var t_psnno3 = model.getValue("/root/main/curedish[" + (s-1) + "]/psnno3");
- for ( k=grd_curedish.row; k<grd_curedish.rows-1; k++) {
- var dishtableflag2 = model.getValue("/root/main/curedish[" + (k -1)+ "]/dishtableflag");
- var dishcd2 = model.getValue("/root/main/curedish[" + (k-1) + "]/dishcd");
-
- if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
- break;
- } else {
- // 실제 인스턴스 값
- model.setValue("/root/main/curedish[" + (k-1) + "]/psnno1", t_psnno1);
- model.setValue("/root/main/curedish[" + (k-1) + "]/psnno2", t_psnno2);
- model.setValue("/root/main/curedish[" + (k-1) + "]/psnno3", t_psnno3);
- // 히든으로
- model.setValue("/root/main/curedish[" + (k-1) + "]/h_psnno1", t_psnno1);
- model.setValue("/root/main/curedish[" + (k-1) + "]/h_psnno2", t_psnno2);
- model.setValue("/root/main/curedish[" + (k-1) + "]/h_psnno3", t_psnno3);
- }
- }
- ]]>
- </script>
- </datagrid>
- <button id="btn_recalc3" class="btn2_letter3" style="left:1080px; top:4px; width:53px; height:19px; ">
- <caption>재계산</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var shalf = model.getValue("/root/init/baseinfo/inithalf/A170[" + 1 + "]/cdid");
- shalf = (parseInt(shalf) * -1) - 1;
-
- for ( i=1; i<grd_curedish.rows-1; i++) {
- var i_foodqty = model.getValue("/root/main/curedish[" + i + "]/foodqty");
- var i_hfoodqty = model.getValue("/root/main/curedish[" + i + "]/h_foodqty");
- var i_psnno1 = model.getValue("/root/main/curedish[" + i + "]/psnno1");
- var i_hpsnno1 = model.getValue("/root/main/curedish[" + i + "]/h_psnno1");
- var i_psnno2 = model.getValue("/root/main/curedish[" + i + "]/psnno2");
- var i_hpsnno2 = model.getValue("/root/main/curedish[" + i + "]/h_psnno2");
- var i_psnno3 = model.getValue("/root/main/curedish[" + i + "]/psnno3");
- var i_hpsnno3 = model.getValue("/root/main/curedish[" + i + "]/h_psnno3");
- var totalqty;
- //1인량만 수정된 경우
- if ( (i_foodqty != i_hfoodqty) && (i_psnno1 == i_hpsnno1) && (i_psnno2 == i_hpsnno2) && (i_psnno3 == i_hpsnno3) ) {
- if ( i_psnno1 == "" ) { i_psnno1 = 0; }
- if ( i_psnno2 == "" ) { i_psnno2 = 0; }
- if ( i_psnno3 == "" ) { i_psnno3 = 0; }
- var i_plceordexchbase = model.getValue("/root/main/curedish[" + i + "]/plceordexchbase");
- totalqty = parseFloat(i_foodqty) * (parseInt(i_psnno1)+parseInt(i_psnno2)+parseInt(i_psnno3)) / parseFloat(i_plceordexchbase);
- //totalqty = totalqty.toString().getRound(-2, "HALF_UP");
- totalqty = totalqty.toString().getRound(shalf, "HALF_UP");
- model.setValue("/root/main/curedish[" + i + "]/totalqty", parseFloat(totalqty));
- model.setValue("/root/main/curedish[" + i + "]/h_foodqty", parseFloat(i_foodqty));
- }
- //식수가 수정된 경우
- else if ( (i_psnno1 != i_hpsnno1) || (i_psnno2 != i_hpsnno2) || (i_psnno3 != i_hpsnno3) ) {
- for ( k=i; k<grd_curedish.rows-1; k++) {
- if ( i_psnno1 == "" ) { i_psnno1 = 0; }
- if ( i_psnno2 == "" ) { i_psnno2 = 0; }
- if ( i_psnno3 == "" ) { i_psnno3 = 0; }
- var k_foodqty = model.getValue("/root/main/curedish[" + k + "]/foodqty");
- var k_plceordexchbase = model.getValue("/root/main/curedish[" + k + "]/plceordexchbase");
-
- totalqty = parseFloat(k_foodqty) * (parseInt(i_psnno1)+parseInt(i_psnno2)+parseInt(i_psnno3)) / parseFloat(k_plceordexchbase);
- //totalqty = totalqty.toString().getRound(-2, "HALF_UP");
- totalqty = totalqty.toString().getRound(shalf, "HALF_UP");
- model.setValue("/root/main/curedish[" + k + "]/totalqty", parseFloat(totalqty));
-
- // if ( i_psnno1 == "" || i_psnno1 == 0 ) { i_psnno1 = ""; }
- // if ( i_psnno2 == "" || i_psnno2 == 0 ) { i_psnno2 = ""; }
- // if ( i_psnno3 == "" || i_psnno3 == 0 ) { i_psnno3 = ""; }
- model.setValue("/root/main/curedish[" + k + "]/h_foodqty", parseFloat(k_foodqty));
- model.setValue("/root/main/curedish[" + k + "]/psnno1", parseInt(i_psnno1));
- model.setValue("/root/main/curedish[" + k + "]/h_psnno1", parseInt(i_psnno1));
- model.setValue("/root/main/curedish[" + k + "]/psnno2", parseInt(i_psnno2));
- model.setValue("/root/main/curedish[" + k + "]/h_psnno2", parseInt(i_psnno2));
- model.setValue("/root/main/curedish[" + k + "]/psnno3", parseInt(i_psnno3));
- model.setValue("/root/main/curedish[" + k + "]/h_psnno3", parseInt(i_psnno3));
-
- var dishtableflag = model.getValue("/root/main/curedish[" + k + "]/dishtableflag");
- var dishcd = model.getValue("/root/main/curedish[" + k + "]/dishcd");
- var dishtableflag2 = model.getValue("/root/main/curedish[" + (k+1) + "]/dishtableflag");
- var dishcd2 = model.getValue("/root/main/curedish[" + (k+1) + "]/dishcd");
-
- if ( (dishtableflag != dishtableflag2) || (dishcd != dishcd2) ) {
- break;
- }
- }
- }
- }
- // for ( i=1; i<grd_curedish.rows-1; i++) {
- // var foodqty = model.getValue("/root/main/curedish[" + i + "]/foodqty");
- // var hfoodqty = model.getValue("/root/main/curedish[" + i + "]/h_foodqty");
- // var psnno1 = model.getValue("/root/main/curedish[" + i + "]/psnno1");
- // var hpsnno1 = model.getValue("/root/main/curedish[" + i + "]/h_psnno1");
- // var psnno2 = model.getValue("/root/main/curedish[" + i + "]/psnno2");
- // var hpsnno2 = model.getValue("/root/main/curedish[" + i + "]/h_psnno2");
- // var psnno3 = model.getValue("/root/main/curedish[" + i + "]/psnno3");
- // var hpsnno3 = model.getValue("/root/main/curedish[" + i + "]/h_psnno3");
- // var plceordexchbase = model.getValue("/root/main/curedish[" + i + "]/plceordexchbase");
- // if ( (foodqty != hfoodqty) || (psnno1 != hpsnno1) || (psnno2 != hpsnno2) || (psnno3 != hpsnno3) ) {
- // var totalqty = parseFloat(foodqty) * (parseInt(psnno1) + parseInt(psnno2) + parseInt(psnno3)) / parseFloat(plceordexchbase);
- // totalqty = totalqty.toString().getRound(-2, "HALF_UP");
- // model.setValue("/root/main/curedish[" + i + "]/totalqty", parseFloat(totalqty));
- // model.setValue("/root/main/curedish[" + i + "]/h_foodqty", parseFloat(foodqty));
- // model.setValue("/root/main/curedish[" + i + "]/h_psnno1", parseInt(psnno1));
- // model.setValue("/root/main/curedish[" + i + "]/h_psnno2", parseInt(psnno2));
- // model.setValue("/root/main/curedish[" + i + "]/h_psnno3", parseInt(psnno3));
- // }
- // }
- model.refresh();
- ]]>
- </script>
- </button>
- </case>
- <case id="case4">
- <datagrid id="grd_curefood" nodeset="/root/main/curefood" caption="적용일자^끼니^식단구분^재료코드^재료명(식품명)^식단코드^식단명^1인량^h_1인량^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^염분기준식수(명)^발주량^단위^비고|적용일자^끼니^식단구분^재료코드^재료명(식품명)^식단코드^식단명^1인량^h_1인량^당뇨 계산^당뇨 조절^h_당뇨^경저염 계산^경저염 조절^h_경저염^저염 계산^저염 조절^h_저염^발주량^단위^비고" colsep="^" colwidth="10, 10, 10, 10, 100, 10, 110, 70, 10, 70, 70, 10, 70, 70, 10, 70, 70, 10, 70, 60, 150" dataheight="25" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:0px; width:1192px; height:668px; ">
- <col ref="appdd" visibility="hidden"/>
- <col ref="mealflag" visibility="hidden"/>
- <col ref="menuflag" visibility="hidden"/>
- <col ref="foodcd" visibility="hidden"/>
- <col ref="foodnm"/>
- <col ref="dishcd" visibility="hidden"/>
- <col ref="dishnm"/>
- <col ref="foodqty" type="input" style="text-align:right; "/>
- <col ref="h_foodqty" visibility="hidden"/>
- <col ref="psnnor1" format="#,###" style="text-align:right; "/>
- <col ref="psnno1" type="input" format="#,###" style="text-align:right; "/>
- <col ref="h_psnno1" visibility="hidden"/>
- <col ref="psnnor2" format="#,###" style="text-align:right; "/>
- <col ref="psnno2" type="input" format="#,###" style="text-align:right; "/>
- <col ref="h_psnno2" visibility="hidden"/>
- <col ref="psnnor3" format="#,###" style="text-align:right; "/>
- <col ref="psnno3" type="input" format="#,###" style="text-align:right; "/>
- <col ref="h_psnno3" visibility="hidden"/>
- <col ref="totalqty" type="input" style="text-align:right; "/>
- <col disabled="true" ref="foodunit" type="combo" style="text-align:center; ">
- <choices>
- <itemset nodeset="/root/init/miscode/plceordunit">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="dishrem"/>
- </datagrid>
- <button id="btn_recalc4" class="btn2_letter3" style="left:1080px; top:4px; width:53px; height:19px; ">
- <caption>재계산</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- for ( i=1; i<grd_curefood.rows-1; i++) {
- var foodqty = model.getValue("/root/main/curefood[" + i + "]/foodqty");
- var hfoodqty = model.getValue("/root/main/curefood[" + i + "]/h_foodqty");
- var psnno1 = model.getValue("/root/main/curefood[" + i + "]/psnno1");
- var hpsnno1 = model.getValue("/root/main/curefood[" + i + "]/h_psnno1");
- var psnno2 = model.getValue("/root/main/curefood[" + i + "]/psnno2");
- var hpsnno2 = model.getValue("/root/main/curefood[" + i + "]/h_psnno2");
- var psnno3 = model.getValue("/root/main/curefood[" + i + "]/psnno3");
- var hpsnno3 = model.getValue("/root/main/curefood[" + i + "]/h_psnno3");
- var plceordexchbase = model.getValue("/root/main/curefood[" + i + "]/plceordexchbase");
- if ( (foodqty != hfoodqty) || (psnno1 != hpsnno1) || (psnno2 != hpsnno2) || (psnno3 != hpsnno3) ) {
- if ( psnno1 == "" ) { psnno1 = 0; }
- if ( psnno2 == "" ) { psnno2 = 0; }
- if ( psnno3 == "" ) { psnno3 = 0; }
- var totalqty = parseFloat(foodqty) * (parseInt(psnno1) + parseInt(psnno2) + parseInt(psnno3)) / parseFloat(plceordexchbase);
- totalqty = totalqty.toString().getRound(-2, "HALF_UP");
- model.setValue("/root/main/curefood[" + i + "]/totalqty", parseFloat(totalqty));
- model.setValue("/root/main/curefood[" + i + "]/h_foodqty", parseFloat(foodqty));
- model.setValue("/root/main/curefood[" + i + "]/h_psnno1", parseInt(psnno1));
- model.setValue("/root/main/curefood[" + i + "]/h_psnno2", parseInt(psnno2));
- model.setValue("/root/main/curefood[" + i + "]/h_psnno3", parseInt(psnno3));
- }
- }
- model.refresh();
- ]]>
- </script>
- </button>
- </case>
- </switch>
- </group>
- <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
- <button id="btn_print" class="btn6_letter2" style="left:5px; top:5px; width:56px; height:22px; ">
- <caption>출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var appdd = model.getValue("/root/send/searchitem/appdd");
- //var menu = model.getValue("/root/send/searchitem/menuflag");
- var menu = rdo_menuflag.label;
- var meal = cmb_mealflag.label;
- var yy = appdd.substr(0,4);
- var mm = appdd.substr(4,2);
- var dd = appdd.substr(6,2);
- var dw = getDateTime(appdd.toDate(), 'W');
-
- // if (menu=='Q1') {
- // menu = '일반식';
- // } else if (menu=='Q2') {
- // menu = '치료식';
- // }
- //식단별 탭화면일때
- if ( btn_dish.selected ) {
- if ( grd_gnrldish.rows-1 > 0 || grd_curedish.rows-2 > 0 ) {
- if ( messageBox(menu+" "+dd+"일 "+meal+" 입니다.", "Q003") == 6 ) {
- if ( grd_gnrldish.rows-1 > 0 ) { //일반식일 경우
- //분류항목 코드를 코드명으로 전환
- for ( i = 1; i < grd_gnrldish.rows; i++ ) {
- var dishtableflag = model.getValue("/root/main/gnrldish["+ i +"]/dishtableflag");
- var dishtablenm = model.getValue("/root/init/basecode/diettable/A0417[cdid='"+ dishtableflag +"']/cdnm");
- model.setValue("/root/main/gnrldish["+ i +"]/dishtablenm", dishtablenm);
- }
-
- model.makeNode("/root/main/gnrldish[1]/menu");
- model.setValue("/root/main/gnrldish[1]/menu", menu);
- //model.makeNode("/root/main/dish[1]/mealflag");
- model.setValue("/root/main/gnrldish[1]/mealflag", meal);
- //model.makeNode("/root/main/dish[1]/appdd");
- model.setValue("/root/main/gnrldish[1]/appdd", yy+"년 "+mm+"월 "+dd+"일 "+dw+"요일");
-
- exeReportPreview("RPANT01601", "XMLSTR", "/root/main/gnrldish");
- }
- else if ( grd_curedish.rows-2 > 0 ) { //치료식일 경우
- //분류항목 코드를 코드명으로 전환
- for ( i = 1; i < grd_curedish.rows-1; i++ ) {
- var dishtableflag = model.getValue("/root/main/curedish["+ i +"]/dishtableflag");
- var dishtablenm = model.getValue("/root/init/basecode/diettable/A0417[cdid='"+ dishtableflag +"']/cdnm");
- model.setValue("/root/main/curedish["+ i +"]/dishtablenm", dishtablenm);
- }
-
- model.makeNode("/root/main/curedish[1]/menu");
- model.setValue("/root/main/curedish[1]/menu", menu);
- model.setValue("/root/main/curedish[1]/mealflag", meal);
- model.setValue("/root/main/curedish[1]/appdd", yy+"년 "+mm+"월 "+dd+"일 "+dw+"요일");
-
- exeReportPreview("RPANT01603", "XMLSTR", "/root/main/curedish");
- }
- } else { return; }
- } else {
- messageBox("출력할 데이터가", "I004")
- return;
- }
- }
-
- //식품(재료)별 탭화면일때
- else if ( btn_food.selected ) {
- if ( grd_gnrlfood.rows-1 > 0 || grd_curefood.rows-2 > 0 ) {
- if ( messageBox(menu+" "+dd+"일 "+meal+" 입니다.", "Q003") == 6 ) {
- if ( grd_gnrlfood.rows-1 > 0 ) { //일반식일 경우
- model.makeNode("/root/main/gnrlfood[1]/menu");
- model.setValue("/root/main/gnrlfood[1]/menu", menu);
- //model.makeNode("/root/main/food[1]/mealflag");
- model.setValue("/root/main/gnrlfood[1]/mealflag", meal);
- //model.makeNode("/root/main/food[1]/appdd");
- model.setValue("/root/main/gnrlfood[1]/appdd", yy+"년 "+mm+"월 "+dd+"일 "+dw+"요일");
-
- exeReportPreview("RPANT01602", "XMLSTR", "/root/main/gnrlfood");
- }
- else if ( grd_curefood.rows-2 > 0 ) { //치료식일 경우
- model.makeNode("/root/main/curefood[1]/menu");
- model.setValue("/root/main/curefood[1]/menu", menu);
- model.setValue("/root/main/curefood[1]/mealflag", meal);
- model.setValue("/root/main/curefood[1]/appdd", yy+"년 "+mm+"월 "+dd+"일 "+dw+"요일");
-
- exeReportPreview("RPANT01604", "XMLSTR", "/root/main/curefood");
- }
- } else { return; }
- } else {
- messageBox("출력할 데이터가", "I004")
- return;
- }
- }
- ]]>
- </script>
- </button>
- <button id="btn_reset" class="btn4_letter3" style="left:1060px; top:5px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- finit();
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:1133px; top:5px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var appdd = model.getValue("/root/send/searchitem/appdd");
- var menu = rdo_menuflag.label;
- var meal = cmb_mealflag.label;
- var yy = appdd.substr(0,4);
- var mm = appdd.substr(4,2);
- var dd = appdd.substr(6,2);
-
- if ( grd_gnrldish.rows-1 > 0 || grd_curedish.rows-2 > 0 ) {
- //if ( messageBox("", "Q002") == 6 ) {
- if ( messageBox(menu+" "+mm+"월 "+dd+"일 "+meal+" 급식실천표를", "Q002") == 6 ) {
-
- var appdd = model.getValue("/root/send/searchitem/appdd");
-
- //일반식일 경우
- if ( model.getValue("/root/send/searchitem/menuflag")=='Q1' ) {
- //필수입력항목 체크
- for ( i=1; i<grd_gnrldish.rows; i++) {
- if ( (model.getValue("/root/main/gnrldish[" + i + "]/foodqty") == "") ||
- (model.getValue("/root/main/gnrldish[" + i + "]/psnno1") == "") ||
- (model.getValue("/root/main/gnrldish[" + i + "]/psnnor1") == "") ||
- (model.getValue("/root/main/gnrldish[" + i + "]/totalqty") == "") ) {
- messageBox("1인량,식수,발주량 항목은", "I003");
- return;
- }
- //저장할 날짜를 급식실천표일자로 setting
- model.setValue("/root/main/gnrldish[" + i + "]/appdd", appdd);
- }
- model.setValue("/root/send/req/dish", grd_gnrldish.getUpdateData());
- }
- //치료식일 경우
- else if ( model.getValue("/root/send/searchitem/menuflag")=='Q2' ) {
- //필수입력항목 체크
- for ( i=1; i<grd_curedish.rows-1; i++) {
- if ( (model.getValue("/root/main/curedish[" + i + "]/foodqty") == "") ||
- ( (model.getValue("/root/main/curedish[" + i + "]/psnno1") == "") &&
- (model.getValue("/root/main/curedish[" + i + "]/psnno2") == "") &&
- (model.getValue("/root/main/curedish[" + i + "]/psnno3") == "") ) ||
- ( (model.getValue("/root/main/curedish[" + i + "]/psnnor1") == "") &&
- (model.getValue("/root/main/curedish[" + i + "]/psnnor2") == "") &&
- (model.getValue("/root/main/curedish[" + i + "]/psnnor3") == "") ) ||
- (model.getValue("/root/main/curedish[" + i + "]/totalqty") == "") ) {
- messageBox("1인량,염분기준식수,발주량 항목은", "I003");
- return;
- }
- //저장할 날짜를 급식실천표일자로 setting
- model.setValue("/root/main/curedish[" + i + "]/appdd", appdd);
- }
- model.setValue("/root/send/req/dish", grd_curedish.getUpdateData());
- }
-
- // 데이터 존재여부 체크
- submit("TRANT01602");
- model.makeValue("/root/send/req/savemealflag", cmb_mealflag.value);
-
- if ( model.getValue("/root/temp/ret/count") > 0 ) {
- // messageBox(menu+" "+mm+"월 "+dd+"일 "+meal+" 급식실천표가 이미 존재하여 재저장", "E001");
- // return;
- if ( messageBox("데이터가 이미 존재합니다. 다시", "Q002") == 6 ) {
- submit("TXANT01601");
- btn_search.dispatch("DOMActivate"); //저장후 재조회
- } else { return; }
- } else {
- submit("TXANT01601");
- btn_search.dispatch("DOMActivate"); //저장후 재조회
- }
- } else { return; }
- } else {
- messageBox("저장할 데이터가", "I004");
- return;
- }
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|