123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- <?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>
- <list>
- <rows/>
- </list>
- </main>
- <send>
- <appdd/>
- <dietmdlcd/>
- </send>
- <init/>
- <hidden/>
- <temp/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-model-construct">
- <![CDATA[
- //model.removeNodeset("/root/req/grid");
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <submission id="TRTSS00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/list"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript">
- <![CDATA[
-
- var gvGridCaption = grd_diet.caption;
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- function fInitialize() {
- model.removeNodeset("/root/main/list/rows");
- model.resetInstanceNode("/root/send");
-
- grd_diet.refresh();
- grd_diet.mergeByFree(0,0,1,0);
- grd_diet.mergeByFree(0,1,1,1);
- grd_diet.mergeByFree(0,2,1,2);
-
- model.refresh();
- }
-
- function fAddGridColumns() {
- var nodelist = instance1.selectNodes("/root/temp/list/header");
- var colcnt = nodelist.length;
- //alert(nodelist.length);
- var grdCaption = grd_diet.caption.split("|"); // 헤더 caption을 2줄로 분리
- for(var i=0;i<colcnt;i++) {
- var columnid = model.getValue("/root/temp/list/header["+(i+1)+"]/columnid");
- var dietnm = model.getValue("/root/temp/list/header["+(i+1)+"]/dietnm");
- var mealcalrcnts = model.getValue("/root/temp/list/header["+(i+1)+"]/mealcalrcnts");
- //alert(columnid);
- //grd_diet.addColumn("ref:"+columnid+"/@cnt"+"; type:input;",false);
- grd_diet.addColumn("ref:"+columnid+"; type:input;",false);
- grdCaption[0] = grdCaption[0] + "^" + dietnm;
- grdCaption[1] = grdCaption[1] + "^" + mealcalrcnts;
- //grd_diet.caption = grd_diet.caption+ "^"+columnid;
- }
- grd_diet.caption= grdCaption[0] + "|" + grdCaption[1];
-
-
- var grdnode = instance1.selectSingleNode("/root/main");
-
- if (instance1.selectSingleNode("/root/main/list") != null) {
- grdnode.replaceChild(instance1.root.temp.list,instance1.root.main.list);
- }
-
- grd_diet.refresh();
-
- grd_diet.mergeByFree(0,0,1,0);
- grd_diet.mergeByFree(0,1,1,1);
- grd_diet.mergeByFree(0,2,1,2);
-
- model.refresh();
- //alert(grd_diet.caption);
- }
- function fInitGridColumns() {
- var cols = grd_diet.cols-grd_diet.fixedCols;
- for(var i=3;i<cols;i++) {
- grd_diet.removeColumn(false);
- }
-
- model.removeNodeset("/root/main/list");
-
- grd_diet.caption = gvGridCaption;
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body>
- <caption id="caption2" class="tit_1" style="left:65px; top:20px; width:217px; height:13px; vertical-align:middle; ">upload Control 사용예제</caption>
- <line id="line8" class="line_1" style="x1:0px; y1:112px; x2:665px; y2:112px; "/>
- <caption id="caption20" class="tit_2" style="left:6px; top:97px; width:118px; height:14px; ">보고서 목록</caption>
- <group id="group4" scroll="auto" style="left:0px; top:13px; width:665px; height:27px; ">
- <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:665px; y2:25px; "/>
- <button id="btn_init" class="btn4_letter3" style="left:595px; top:3px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- </button>
- <button id="btn_delete" class="btn4_letter2" style="left:535px; top:3px; width:56px; height:22px; ">
- <caption>삭제</caption>
- </button>
- </group>
- <group id="group2" style="left:0px; top:54px; width:665px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:665px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <line id="line13" style="x1:579px; y1:7px; x2:579px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_search" class="btn1_letter2" style="left:595px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //model.send("TRZSS00101");
- fInitGridColumns();
- submit("TRTSS00701",false);
- fAddGridColumns();
- model.refresh();
- ]]>
- </script>
- </button>
- <input id="ipt_appdd" ref="/root/send/appdd" style="left:65px; top:10px; width:100px; height:19px; "/>
- <select1 id="cmb_dietmdlcd" ref="/root/send/dietmdlcd" class="combo_s_essential" appearance="minimal" style="left:235px; top:10px; width:100px; height:19px; ">
- <choices>
- <item>
- <label>당뇨식</label>
- <value>04</value>
- </item>
- <item>
- <label>신장질환식</label>
- <value>05</value>
- </item>
- <item>
- <label>간장질환식</label>
- <value>06</value>
- </item>
- <item>
- <label>위장질환식</label>
- <value>07</value>
- </item>
- <item>
- <label>심혈관질환식</label>
- <value>08</value>
- </item>
- <item>
- <label>경장영양식</label>
- <value>09</value>
- </item>
- <item>
- <label>기타치료식</label>
- <value>10</value>
- </item>
- <item>
- <label>검사식</label>
- <value>11</value>
- </item>
- <item>
- <label>멸균식</label>
- <value>12</value>
- </item>
- <item>
- <label>비급여식</label>
- <value>13</value>
- </item>
- </choices>
- </select1>
- </group>
- <datagrid id="grd_diet" nodeset="/root/main/list/rows" caption="끼니^구분^식단|끼니^구분^식단" colwidth="50, 47, 88" extendlastcol="scroll" mergecells="byrestriccol" mergecellsfixedrows="byrestricrow" style="left:0px; top:117px; width:665px; height:538px; ">
- <col ref="mealflag"/>
- <col ref="dishtablenm"/>
- <col ref="dishnm"/>
- </datagrid>
- </xhtml:body>
- </xhtml:html>
|