123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>
- <iteminfo>
- <itemlist>
- <itemnm/>
- <desccnts/>
- <itemcd/>
- <calform/>
- <supcd/>
- </itemlist>
- </iteminfo>
- <elmtinfo>
- <elmtlist>
- <itemnm/>
- <desccnts/>
- <itemval/>
- <itemcd/>
- <supcd/>
- </elmtlist>
- </elmtinfo>
- <srchinfo>
- <itemcalform/>
- <rsltval/>
- </srchinfo>
- </main>
- <send/>
- </root>
- </instance>
- <submission id="TRMNR02301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/iteminfo"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- model.makeValue("/root/send/supcd", "*");
- submit("TRMNR02301");
- ]]>
- </script>
- <submission id="TRMNR02302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/elmtinfo"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- </xhtml:head>
- <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:160px; height:14px; ">약물계산기</caption>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; "/>
- <group id="group5" scroll="auto" style="left:0px; top:13px; width:1195px; height:742px; ">
- <caption id="caption42" class="tit_2" style="left:5px; top:10px; width:170px; height:14px; ">계산항목 리스트</caption>
- <line id="line18" class="line_1" style="x1:0px; y1:25px; x2:616px; y2:25px; "/>
- <caption id="caption1" class="tit_2" style="left:625px; top:10px; width:157px; height:14px; ">항목별 계산요소 리스트</caption>
- <line id="line1" class="line_1" style="x1:620px; y1:25px; x2:1195px; y2:25px; "/>
- <caption id="caption2" class="tit_2" style="left:5px; top:380px; width:129px; height:13px; ">항목별 계산식</caption>
- <line id="line2" class="line_1" style="x1:0px; y1:395px; x2:616px; y2:395px; "/>
- <caption id="caption3" class="tit_2" style="left:625px; top:700px; width:157px; height:13px; ">실행결과</caption>
- <line id="line3" class="line_1" style="x1:620px; y1:715px; x2:1195px; y2:715px; "/>
- <line id="line4" class="line_3" style="x1:620px; y1:740px; x2:1195px; y2:740px; "/>
- <datagrid id="grd_itemlist" nodeset="/root/main/iteminfo/itemlist" caption="항목명^항목설명^itemcd^calform^supcd" colsep="^" colwidth="239, 358, 0, 0, 0" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:30px; width:616px; height:340px; ">
- <col ref="itemnm"/>
- <col ref="desccnts"/>
- <col ref="itemcd"/>
- <col ref="calform"/>
- <col ref="supcd"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var xItemtListPath = "/root/main/iteminfo/itemlist";
- var sItemRow = grd_itemlist.row;
- if(sItemRow < 1) return;
- model.removenode("/root/send");
- model.makeValue("/root/send/supcd", model.getValue(xItemtListPath+"["+sItemRow+"]/itemcd"));
- if(submit("TRMNR02302")){
- model.setValue("/root/main/srchinfo/itemcalform", model.getValue(xItemtListPath+"["+sItemRow+"]/calform"));
- model.setValue("/root/main/srchinfo/rsltval","");
- tar_calform.refresh();
- opt_itemval.refresh();
- }
- ]]>
- </script>
- </datagrid>
- <datagrid id="grd_elmtlist" nodeset="/root/main/elmtinfo/elmtlist" caption="요소명칭^요소설명^입력값^itemcd^supcd" colsep="^" colwidth="224, 239, 88, 0, 0" mergecellsfixedrows="bycolrec" rowsep="|" style="left:620px; top:30px; width:575px; height:660px; ">
- <col ref="itemnm"/>
- <col ref="desccnts"/>
- <col ref="itemval" type="input" format="####.##"/>
- <col ref="itemcd"/>
- <col ref="supcd"/>
- </datagrid>
- <textarea id="tar_calform" ref="/root/main/srchinfo/itemcalform" disabled="true" style="left:0px; top:400px; width:616px; height:339px; font-size:18pt; "/>
- <output id="opt_itemval" ref="/root/main/srchinfo/rsltval" class="output_fix" style="left:620px; top:720px; width:575px; height:19px; font-weight:bold; "/>
- <button id="btn_exec" class="btn2_letter2" style="left:1153px; top:3px; width:42px; height:19px; ">
- <caption>실행</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var xElmtListPath = "/root/main/elmtinfo/elmtlist";
- var sItemVal = 0;
- var sItemNM = "";
- var sCalForm = model.getValue("/root/main/srchinfo/itemcalform");
- if(sCalForm == ""){
- messageBox("계산항목을 먼저","C002");
- return;
- }
- // 입력 여부 체크 및 값 설정
- for(var iRow =1; iRow<= grd_elmtlist.rows-grd_elmtlist.fixedRows; iRow++){
- if(model.getValue(xElmtListPath+"["+iRow+"]/itemval") == ""){
- messageBox("입력값은","I003");
- return;
- }
- sItemNM = model.getValue(xElmtListPath+"["+iRow+"]/itemnm");
- sItemVal = model.getValue(xElmtListPath+"["+iRow+"]/itemval");
- while(sCalForm.indexOf(sItemNM) >= 0){
- sCalForm = sCalForm.replace(sItemNM, sItemVal);
- }
- }
-
- var sRsltVal = eval(sCalForm);
- model.setValue("/root/main/srchinfo/rsltval",sRsltVal);
- opt_itemval.refresh();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|