SMADB00200_성분코드관리.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <grid>
  11. <item>
  12. <comcd/>
  13. <comexcd/>
  14. <comnm/>
  15. <dddunit/>
  16. <ddd/>
  17. <dddkg/>
  18. <dddchild/>
  19. <childdayno/>
  20. <childage/>
  21. <comlevel/>
  22. <drugcdcnt/>
  23. </item>
  24. </grid>
  25. <grid1>
  26. <druglist>
  27. <drugcd/>
  28. <drugnm/>
  29. </druglist>
  30. </grid1>
  31. </main>
  32. <send>
  33. <srchcomcd/>
  34. <srchcomnm/>
  35. <req>
  36. <data1/>
  37. </req>
  38. <code/>
  39. <name/>
  40. <druglistreq>
  41. <srchcomcd/>
  42. <srchcomexcd/>
  43. <srchcomnm/>
  44. </druglistreq>
  45. </send>
  46. <init/>
  47. <hidden>
  48. <count/>
  49. <item/>
  50. </hidden>
  51. <temp>
  52. <item/>
  53. </temp>
  54. </root>
  55. </instance>
  56. <submission id="TRADB00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/grid"/>
  57. <submission id="TXADB00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/temp"/>
  58. <submission id="TRADB00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/druglistreq" replace="instance" resultref="/root/main/grid1"/>
  59. </model>
  60. <script type="javascript" src="../../../com/hismainweb/js/DocTitle.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  62. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  63. <script type="javascript" ev:event="xforms-ready">
  64. <![CDATA[
  65. // 권한 관리
  66. btn_save.disabled =! checkAuth("X"); // 저장
  67. ]]>
  68. </script>
  69. </xhtml:head>
  70. <xhtml:body guideline="1,1194;1,1288;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  71. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  72. <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:106px; height:15px; ">성분코드관리</caption>
  73. </group>
  74. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  75. <group id="group2" style="left:0px; top:5px; width:1194px; height:30px; ">
  76. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:30px; background-color:#fffbf2; border-color:#ffd799; "/>
  77. <button id="button3" class="btn1_letter4" navindex="3" style="left:1105px; top:5px; width:80px; height:22px; ">
  78. <caption>성분조회</caption>
  79. <script type="javascript" ev:event="DOMActivate">
  80. <![CDATA[
  81. submit("TRADB00201");
  82. setTree(grd_comlist, grd_comlist.colRef("comlevel"),grd_comlist.colRef("comcd"), false );
  83. ]]>
  84. </script>
  85. </button>
  86. <caption id="caption1" class="search_name" style="left:275px; top:5px; width:60px; height:17px; ">명칭</caption>
  87. <line id="line13" class="line_4" style="x1:1100px; y1:5px; x2:1100px; y2:27px; border-color:#ffe4bb; border-left-style:solid; "/>
  88. <caption id="caption2" class="search_name" style="left:20px; top:5px; width:60px; height:17px; ">코드</caption>
  89. <input id="input1" ref="/root/send/srchcomnm" class="input_search" navindex="2" maxlength="100" style="left:335px; top:5px; width:580px; height:19px; ">
  90. <script type="javascript" ev:event="onkeyup">
  91. <![CDATA[
  92. // 명칭입력후 Enter시 성분조회 가능하도록 처리 2008-08-18
  93. if (event.keyCode == "13") {
  94. setInputNodeCurText();
  95. model.setValue( "/root/send/srchcomnm", model.getValue("/root/send/srchcomnm") );
  96. model.refresh();
  97. submit("TRADB00201");
  98. setTree(grd_comlist, grd_comlist.colRef("comlevel"),grd_comlist.colRef("comcd"), false );
  99. }
  100. ]]>
  101. </script>
  102. </input>
  103. <input id="input2" ref="/root/send/srchcomcd" class="input_search" navindex="1" maxlength="7" style="left:80px; top:5px; width:155px; height:19px; ">
  104. <script type="javascript" ev:event="onkeyup">
  105. <![CDATA[
  106. // 코드입력후 Enter시 성분조회 가능하도록 처리 2008-08-18
  107. if (event.keyCode == "13") {
  108. setInputNodeCurText();
  109. model.setValue( "/root/send/srchcomcd", model.getValue("/root/send/srchcomcd").toUpperCase() );
  110. model.refresh();
  111. submit("TRADB00201");
  112. setTree(grd_comlist, grd_comlist.colRef("comlevel"),grd_comlist.colRef("comcd"), false );
  113. }
  114. ]]>
  115. </script>
  116. </input>
  117. </group>
  118. <button id="button1" class="btn2_letter2" navindex="4" style="left:986px; top:40px; width:42px; height:19px; ">
  119. <caption>엑셀</caption>
  120. <script type="javascript" ev:event="onclick">
  121. <![CDATA[
  122. // grd_comlist.insertItem(datagrid1.row);
  123. var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
  124. grd_comlist.saveExcel(file);
  125. ]]>
  126. </script>
  127. </button>
  128. <button id="button50" class="btn2_letter3" navindex="6" style="left:1085px; top:40px; width:53px; height:19px; ">
  129. <caption>행복사</caption>
  130. <script type="javascript" ev:event="onclick">
  131. <![CDATA[
  132. var grdrow = grd_comlist.row;
  133. model.copyNode("/root/hidden/item","/root/main/grid/item["+ grdrow +"]");
  134. grd_comlist.insertItem(grdrow);
  135. model.copyNode("/root/main/grid/item["+ grdrow +"]","/root/hidden/item");
  136. model.refresh();
  137. ]]>
  138. </script>
  139. </button>
  140. <button id="btn_grdadd" class="btn2_letter3" navindex="5" style="left:1030px; top:40px; width:53px; height:19px; ">
  141. <caption>행추가</caption>
  142. <script type="javascript" ev:event="DOMActivate">
  143. <![CDATA[
  144. grd_comlist.addRow();
  145. grd_comlist.refresh();
  146. ]]>
  147. </script>
  148. </button>
  149. <button id="btn_grddel" class="btn2_letter3" navindex="7" style="left:1140px; top:40px; width:53px; height:19px; ">
  150. <caption>행삭제</caption>
  151. <script type="javascript" ev:event="DOMActivate">
  152. <![CDATA[
  153. grd_comlist.addStatus(grd_comlist.row,"delete");
  154. ]]>
  155. </script>
  156. </button>
  157. <caption id="caption10" class="tit_2" style="left:6px; top:45px; width:95px; height:13px; ">성분코드정보</caption>
  158. <line id="line2" class="line_1" style="x1:0px; y1:60px; x2:1194px; y2:60px; "/>
  159. <datagrid id="grd_comlist" nodeset="/root/main/grid/item" allowselection="true" backcoloralternate="#f0f0f0" caption="성분코드^확장코드^명칭^DDD단위^성인최대량^소아kg당^소아최대량^소아금기(일수)^소아연령금기^레벨^약품갯수" colsep="^" colwidth="143, 78, 371, 56, 83, 61, 74, 90, 80, 51, 66" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" selectionmode="free" navindex="8" style="left:0px; top:65px; width:1194px; height:676px; ">
  160. <col autonext="false" ref="comcd" type="input" maxlength="7" _chartype="upper" _key="true"/>
  161. <col autonext="false" ref="comexcd" type="input" maxlength="4" _key="true"/>
  162. <col autonext="false" ref="comnm" type="input" maxlength="33"/>
  163. <col autonext="false" ref="dddunit" type="input" maxlength="4"/>
  164. <col autonext="false" ref="ddd" type="input" format="######,####" maxlength="10"/>
  165. <col autonext="false" ref="dddkg" type="input" format="######,####" maxlength="10"/>
  166. <col autonext="false" ref="dddchild" type="input" format="######,####" maxlength="10"/>
  167. <col autonext="false" ref="childdayno" type="input" format="9999999999" maxlength="10"/>
  168. <col autonext="false" ref="childage" type="input" format="9999" maxlength="4"/>
  169. <col autonext="false" ref="comlevel" type="input" format="9999" maxlength="5"/>
  170. <col autonext="false" ref="drugcdcnt" format="9999" maxlength="5"/>
  171. <script type="javascript" ev:event="DOMActivate">
  172. <![CDATA[
  173. model.copyNode("/root/main/data","/root/main/grid/item["+grd_comlist.row+"]");
  174. model.refresh();
  175. ]]>
  176. </script>
  177. <script type="javascript" ev:event="onclick">
  178. <![CDATA[
  179. if (grd_comlist.colref ("drugcdcnt") == grd_comlist.col ) {
  180. var row = grd_comlist.row;
  181. var comcd = model.getValue("/root/main/grid/item["+grd_comlist.row+"]/comcd");
  182. var comnm = model.getValue("/root/main/grid/item["+grd_comlist.row+"]/comnm");
  183. var comexcd = model.getValue("/root/main/grid/item["+grd_comlist.row+"]/comexcd");
  184. var drugcdcnt = model.getValue("/root/main/grid/item["+grd_comlist.row+"]/drugcdcnt");
  185. if (comcd == null || drugcdcnt == "" || drugcdcnt <= 0 ) return;
  186. model.setValue( "/root/send/druglistreq/srchcomcd", comcd ); //성분코드
  187. model.setValue( "/root/send/druglistreq/srchcomexcd", comexcd ); //확장코드
  188. model.setValue( "/root/send/druglistreq/srchcomnm", comnm ); //성분명칭
  189. //alert(model.getValue("/root/send/druglistreq/srchcomcd"));
  190. model.refresh();
  191. submit("TRADB00202"); // 성분코드에 등록된 약품코드조회
  192. switch1.visible = true ;
  193. }
  194. ]]>
  195. </script>
  196. </datagrid>
  197. <switch id="switch1" visibility="hidden" style="left:550px; top:165px; width:485px; height:240px; ">
  198. <case id="case1">
  199. <datagrid id="grd_druglist" nodeset="/root/main/grid1/druglist" visibility="visible" caption="약품코드^약품명" colsep="^" colwidth="117, 324" mergecellsfixedrows="bycolrec" rowsep="|" selectionmode="byrow" style="left:10px; top:40px; width:465px; height:165px; ">
  200. <col ref="drugcd"/>
  201. <col ref="drugnm"/>
  202. </datagrid>
  203. <button id="button" class="btn4_letter2" style="left:415px; top:210px; width:56px; height:22px; ">
  204. <caption>닫기</caption>
  205. <script type="javascript" ev:event="DOMActivate">
  206. <![CDATA[
  207. switch1.visible = false;
  208. ]]>
  209. </script>
  210. </button>
  211. <caption id="caption4" ref="/root/send/druglistreq/srchcomcd" style="left:75px; top:5px; width:60px; height:30px; "/>
  212. <caption id="caption6" ref="/root/send/druglistreq/srchcomnm" style="left:195px; top:5px; width:275px; height:30px; "/>
  213. <caption id="caption9" class="cell_1" style="left:10px; top:10px; width:60px; height:23px; vertical-align:middle; ">성분코드</caption>
  214. <caption id="caption3" class="cell_1" style="left:145px; top:10px; width:45px; height:23px; vertical-align:middle; ">명 칭</caption>
  215. </case>
  216. </switch>
  217. </group>
  218. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  219. <button id="btn_save" class="btn4_letter2" navindex="9" style="left:1128px; top:3px; width:56px; height:22px; ">
  220. <caption>저장</caption>
  221. <script type="javascript" ev:event="DOMActivate">
  222. <![CDATA[
  223. var update = getGridUpdateData(grd_comlist);
  224. // var update = model.getValue("/root/send/req/data");
  225. if(update == ""){
  226. messageBox("업데이트 정보가 없습니다.", "I");
  227. return 0;
  228. } else {
  229. model.setValue( "/root/send/req/data1", grd_comlist.getUpdateData());
  230. submit("TXADB00201");
  231. submit("TRADB00201");
  232. setTree(grd_comlist, grd_comlist.colRef("comlevel"),grd_comlist.colRef("comcd"), false );
  233. }
  234. ]]>
  235. </script>
  236. <script type="javascript" ev:event="DOMFocusIn">
  237. <![CDATA[
  238. checkKeyColumn("grd_comlist");
  239. ]]>
  240. </script>
  241. </button>
  242. </group>
  243. </xhtml:body>
  244. </xhtml:html>