SMTSS00701_처방식단크로스탭.xrw 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>크로스탭샘플</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <rows/>
  12. </list>
  13. </main>
  14. <send>
  15. <appdd/>
  16. <dietmdlcd/>
  17. </send>
  18. <init/>
  19. <hidden/>
  20. <temp/>
  21. </root>
  22. </instance>
  23. <script type="javascript" ev:event="xforms-model-construct">
  24. <![CDATA[
  25. //model.removeNodeset("/root/req/grid");
  26. ]]>
  27. </script>
  28. <script type="javascript" ev:event="xforms-ready">
  29. <![CDATA[
  30. fInitialize();
  31. ]]>
  32. </script>
  33. <submission id="TRTSS00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/list"/>
  34. </model>
  35. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  36. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  37. <script type="javascript">
  38. <![CDATA[
  39. var gvGridCaption = grd_diet.caption;
  40. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  41. function fInitialize() {
  42. model.removeNodeset("/root/main/list/rows");
  43. model.resetInstanceNode("/root/send");
  44. grd_diet.refresh();
  45. grd_diet.mergeByFree(0,0,1,0);
  46. grd_diet.mergeByFree(0,1,1,1);
  47. grd_diet.mergeByFree(0,2,1,2);
  48. model.refresh();
  49. }
  50. function fAddGridColumns() {
  51. var nodelist = instance1.selectNodes("/root/temp/list/header");
  52. var colcnt = nodelist.length;
  53. //alert(nodelist.length);
  54. var grdCaption = grd_diet.caption.split("|"); // 헤더 caption을 2줄로 분리
  55. for(var i=0;i<colcnt;i++) {
  56. var columnid = model.getValue("/root/temp/list/header["+(i+1)+"]/columnid");
  57. var dietnm = model.getValue("/root/temp/list/header["+(i+1)+"]/dietnm");
  58. var mealcalrcnts = model.getValue("/root/temp/list/header["+(i+1)+"]/mealcalrcnts");
  59. //alert(columnid);
  60. //grd_diet.addColumn("ref:"+columnid+"/@cnt"+"; type:input;",false);
  61. grd_diet.addColumn("ref:"+columnid+"; type:input;",false);
  62. grdCaption[0] = grdCaption[0] + "^" + dietnm;
  63. grdCaption[1] = grdCaption[1] + "^" + mealcalrcnts;
  64. //grd_diet.caption = grd_diet.caption+ "^"+columnid;
  65. }
  66. grd_diet.caption= grdCaption[0] + "|" + grdCaption[1];
  67. var grdnode = instance1.selectSingleNode("/root/main");
  68. if (instance1.selectSingleNode("/root/main/list") != null) {
  69. grdnode.replaceChild(instance1.root.temp.list,instance1.root.main.list);
  70. }
  71. grd_diet.refresh();
  72. grd_diet.mergeByFree(0,0,1,0);
  73. grd_diet.mergeByFree(0,1,1,1);
  74. grd_diet.mergeByFree(0,2,1,2);
  75. model.refresh();
  76. //alert(grd_diet.caption);
  77. }
  78. function fInitGridColumns() {
  79. var cols = grd_diet.cols-grd_diet.fixedCols;
  80. for(var i=3;i<cols;i++) {
  81. grd_diet.removeColumn(false);
  82. }
  83. model.removeNodeset("/root/main/list");
  84. grd_diet.caption = gvGridCaption;
  85. }
  86. ]]>
  87. </script>
  88. </xhtml:head>
  89. <xhtml:body>
  90. <caption id="caption2" class="tit_1" style="left:65px; top:20px; width:217px; height:13px; vertical-align:middle; ">upload Control 사용예제</caption>
  91. <line id="line8" class="line_1" style="x1:0px; y1:112px; x2:665px; y2:112px; "/>
  92. <caption id="caption20" class="tit_2" style="left:6px; top:97px; width:118px; height:14px; ">보고서 목록</caption>
  93. <group id="group4" scroll="auto" style="left:0px; top:13px; width:665px; height:27px; ">
  94. <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:665px; y2:25px; "/>
  95. <button id="btn_init" class="btn4_letter3" style="left:595px; top:3px; width:68px; height:22px; ">
  96. <caption>초기화</caption>
  97. <script type="javascript" ev:event="DOMActivate">
  98. <![CDATA[
  99. fInitialize();
  100. ]]>
  101. </script>
  102. </button>
  103. <button id="btn_delete" class="btn4_letter2" style="left:535px; top:3px; width:56px; height:22px; ">
  104. <caption>삭제</caption>
  105. </button>
  106. </group>
  107. <group id="group2" style="left:0px; top:54px; width:665px; height:35px; vertical-align:top; ">
  108. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:665px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  109. <line id="line13" style="x1:579px; y1:7px; x2:579px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  110. <button id="btn_search" class="btn1_letter2" style="left:595px; top:7px; width:56px; height:22px; ">
  111. <caption>조회</caption>
  112. <script type="javascript" ev:event="DOMActivate">
  113. <![CDATA[
  114. //model.send("TRZSS00101");
  115. fInitGridColumns();
  116. submit("TRTSS00701",false);
  117. fAddGridColumns();
  118. model.refresh();
  119. ]]>
  120. </script>
  121. </button>
  122. <input id="ipt_appdd" ref="/root/send/appdd" style="left:65px; top:10px; width:100px; height:19px; "/>
  123. <select1 id="cmb_dietmdlcd" ref="/root/send/dietmdlcd" class="combo_s_essential" appearance="minimal" style="left:235px; top:10px; width:100px; height:19px; ">
  124. <choices>
  125. <item>
  126. <label>당뇨식</label>
  127. <value>04</value>
  128. </item>
  129. <item>
  130. <label>신장질환식</label>
  131. <value>05</value>
  132. </item>
  133. <item>
  134. <label>간장질환식</label>
  135. <value>06</value>
  136. </item>
  137. <item>
  138. <label>위장질환식</label>
  139. <value>07</value>
  140. </item>
  141. <item>
  142. <label>심혈관질환식</label>
  143. <value>08</value>
  144. </item>
  145. <item>
  146. <label>경장영양식</label>
  147. <value>09</value>
  148. </item>
  149. <item>
  150. <label>기타치료식</label>
  151. <value>10</value>
  152. </item>
  153. <item>
  154. <label>검사식</label>
  155. <value>11</value>
  156. </item>
  157. <item>
  158. <label>멸균식</label>
  159. <value>12</value>
  160. </item>
  161. <item>
  162. <label>비급여식</label>
  163. <value>13</value>
  164. </item>
  165. </choices>
  166. </select1>
  167. </group>
  168. <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; ">
  169. <col ref="mealflag"/>
  170. <col ref="dishtablenm"/>
  171. <col ref="dishnm"/>
  172. </datagrid>
  173. </xhtml:body>
  174. </xhtml:html>