123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <?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>
- <dextrosegrid>
- <concen/>
- <volume/>
- <time/>
- <rowtotal/>
- </dextrosegrid>
- <dextrosegrid>
- <concen/>
- <volume/>
- <time/>
- <rowtotal/>
- </dextrosegrid>
- <dextrosegrid>
- <concen/>
- <volume/>
- <time/>
- <rowtotal/>
- </dextrosegrid>
- <dextrosegrid>
- <concen/>
- <volume/>
- <time/>
- <rowtotal/>
- </dextrosegrid>
- <dextrosegrid>
- <concen>Total</concen>
- <volume>Total</volume>
- <time>Total</time>
- <rowtotal/>
- </dextrosegrid>
- <maindata>
- <kcal/>
- </maindata>
- </main>
- <send/>
- <init/>
- <hidden/>
- </root>
- </instance>
- <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/stringHelper.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- grd_dextrose.mergerow(1)=false;
- grd_dextrose.mergerow(2)=false;
- grd_dextrose.mergerow(3)=false;
- grd_dextrose.mergerow(4)=false;
- ]]>
- </script>
- </model>
- </xhtml:head>
- <xhtml:body pagewidth="619" pageheight="343" guideline="2,13;1,1194;2,784;2,757;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="grp_biz" scroll="auto" style="left:0px; top:0px; width:501px; height:306px; ">
- <caption id="caption1" class="tit_2" style="left:5px; top:11px; width:135px; height:13px; ">복막투석액 계산</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:26px; x2:500px; y2:26px; "/>
- <datagrid id="grd_dextrose" nodeset="/root/main/dextrosegrid" caption="Dextrose농도(g/dl)^용량(L)^횟수(회)^농도*용량*횟수" colsep="^" colwidth="136, 105, 105, 127" dataheight="25" extendlastcol="scroll" mergecells="byrow" rowheight="25" rowsep="|" style="left:0px; top:31px; width:500px; height:275px; text-align:center; ">
- <col autonext="false" ref="concen" type="input" format="99" maxlength="2"/>
- <col autonext="false" ref="volume" type="input" format="#.9" maxlength="2"/>
- <col autonext="false" ref="time" type="input" format="9" maxlength="1"/>
- <col autonext="false" ref="rowtotal" type="output" format="###.9" maxlength="4"/>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- var total = 0;
- var kcal = 0;
-
- for ( i = 1; i <= 4; i++ ) {
- var concen = model.getValue("/root/main/dextrosegrid["+i+"]/concen"); // 농도
- var volume = model.getValue("/root/main/dextrosegrid["+i+"]/volume"); // 용량
- var times = model.getValue("/root/main/dextrosegrid["+i+"]/time"); // 횟수
- var rowtotal = concen * volume * times; // row별 total
- //rowtotal = rowtotal.toString().getRound(-2, "DOWN");
- model.setValue("/root/main/dextrosegrid["+i+"]/rowtotal", rowtotal);
- var total = total + rowtotal; // 총 total
- //total = total.toString().getRound(-2, "DOWN");
- model.setValue("/root/main/dextrosegrid[5]/rowtotal", total);
- var kcal = total * 0.7 * 3.4; // 복막투석액(kcal)
- kcal = kcal.toString().getRound(-1, "HALF_UP");
- model.setValue("/root/main/maindata/kcal", kcal);
- model.refresh();
- }
- ]]>
- </script>
- </datagrid>
- <caption id="caption2" style="left:135px; top:195px; width:135px; height:13px; ">Total * 0.7 * 3.4 =</caption>
- <output id="output1" ref="/root/main/maindata/kcal" class="output_fix" format="9999" style="left:240px; top:190px; width:60px; height:19px; text-align:center; "/>
- <caption id="caption3" style="left:305px; top:195px; width:55px; height:13px; ">kcal</caption>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:306px; width:501px; height:27px; ">
- <button id="btn_cfm" class="btn4_letter2" style="left:385px; top:5px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- model.setAttribute("iParam_kcal", model.getvalue("/root/main/maindata/kcal"));
- window.close();
- ]]>
- </script>
- </button>
- <button id="btn_can" class="btn4_letter2" style="left:444px; top:5px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="xforms-activate">
- <![CDATA[
- model.setAttribute("iParam_kcal", "");
- window.close();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|