SPRSC09000_상비약품관리약품.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>약품선택</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <druglist>
  11. <item>
  12. <lrgcd/>
  13. <lrgnm/>
  14. <mdlcd/>
  15. <mdlnm/>
  16. <smlcd/>
  17. <smlnm/>
  18. <goodcd/>
  19. <goodnm/>
  20. </item>
  21. </druglist>
  22. </main>
  23. <target/>
  24. <init>
  25. </init>
  26. <send>
  27. <search>
  28. <lrgcd/>
  29. <mdlcd/>
  30. <smlcd/>
  31. <liketype>name</liketype>
  32. <searchcont/>
  33. <goodflag/>
  34. <mngtcls/>
  35. </search>
  36. </send>
  37. <temp>
  38. <category/>
  39. <dummyDruglist/>
  40. </temp>
  41. </root>
  42. </instance>
  43. <script type="javascript" ev:event="xforms-ready">
  44. <![CDATA[
  45. misfComboComCdList("030M0003",cmb_mngtcls,"Y");
  46. model.setValue("/root/send/search/goodflag", "PH");
  47. /*rszfLMSComboList(model.getValue("/root/send/search/goodflag"), "", "", "cmb_lrg", "", "L", "Y", "Y");
  48. model.removenode("/root/init/mdlCategory/item");
  49. model.removenode("/root/init/smlCategory/item");*/
  50. model.removeNodeset("/root/main/druglist/item");
  51. model.refresh();
  52. ]]>
  53. </script>
  54. <submission id="TRRSC09001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" replace="instance" resultref="/root/temp/category"/>
  55. <submission id="TRRSC09002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" replace="instance" resultref="/root/main/deptdata"/>
  56. <submission id="TRRSC09010" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" replace="instance" resultref="/root/main/druglist"/>
  57. </model>
  58. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  60. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  61. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  62. <script type="javascript">
  63. <![CDATA[
  64. function fGetMdlCategory() {
  65. var selLrgCde = model.getValue("/root/send/search/lrgcd");
  66. var existCnt = model.getXPathValue("count(/root/init/mdlCategory/item[lrgcde='"+selLrgCde+"'])");
  67. if (existCnt == 0) {
  68. var nodeCnt = model.getXPathValue("count(/root/init/mdlCategory/item)");
  69. submit("TRRSC09001");
  70. if (nodeCnt == 0) {
  71. model.copyNode("/root/init/mdlCategory", "/root/temp/category");
  72. } else {
  73. var getCnt = model.getXPathValue("count(/root/temp/category/item)");
  74. for (var i = 1; i <= getCnt; i++) {
  75. model.duplicate("/root/init/mdlCategory", "/root/temp/category/item["+i+"]", "*[1]");
  76. }
  77. }
  78. model.removenode("/root/temp/category");
  79. model.makeNode("/root/temp/category");
  80. }
  81. cmb_mdl.choices.itemset.attribute("nodeset") = "/root/init/mdlCategory/item[lrgcde='"+selLrgCde+"']";
  82. cmb_sml.choices.itemset.attribute("nodeset") = "/root/init/smlCategory/item[lrgcde=-1]";
  83. model.setValue("/root/send/search/mdlcd", "");
  84. model.setValue("/root/send/search/smlcd", "");
  85. cmb_mdl.refresh();
  86. cmb_sml.refresh();
  87. }
  88. function fGetSmlCategory() {
  89. var selMdlCde = model.getValue("/root/send/search/mdlcd");
  90. var existCnt = model.getXPathValue("count(/root/init/smlCategory/item[mdlcde='"+selMdlCde+"'])");
  91. if (existCnt == 0) {
  92. var nodeCnt = model.getXPathValue("count(/root/init/smlCategory/item[mdlcde='"+selMdlCde+"'])");
  93. submit("TRRSC09001");
  94. if (nodeCnt == 0) {
  95. model.copyNode("/root/init/smlCategory", "/root/temp/category");
  96. } else {
  97. var getCnt = model.getXPathValue("count(/root/temp/category/item)");
  98. for (var i = 1; i <= getCnt; i++) {
  99. model.duplicate("/root/init/smlCategory", "/root/tempcategory/item["+i+"]", "*[1]");
  100. }
  101. }
  102. model.removenode("/root/temp/category");
  103. model.makeNode("/root/temp/category");
  104. }
  105. cmb_sml.choices.itemset.attribute("nodeset") = "/root/init/smlCategory/item[mdlcde='"+selMdlCde+"']";
  106. model.setValue("/root/send/search/smlcd", "");
  107. cmb_sml.refresh();
  108. }
  109. function fSetOpenerVal() {
  110. var refPath = model.getValue("/root/target/receiveref");
  111. var selPk = grd_druglist.valueMatrix(grd_druglist.row, 1);
  112. var sNode = instance1.selectNodes("/root/temp/dummyDruglist/item[usrpk='"+selPk+"']/*");
  113. var tmp1 = "";
  114. var tmp2 = "";
  115. for (var i = 0; i < sNode.length; i++) {
  116. tmp1 += sNode.item(i).nodeName+"▦"
  117. tmp2 += sNode.item(i).nodeValue+"▦";
  118. }
  119. if (tmp1 == "") {
  120. messageBox("약품을 ", "C002");
  121. } else {
  122. window.opener.model.setValue(refPath, tmp1+"▩"+tmp2);
  123. window.close();
  124. }
  125. }
  126. function fSearch() {
  127. submit("TRRSC09010");
  128. model.copyNode("/root/temp/dummyDruglist", "/root/main/druglist");
  129. }
  130. ]]>
  131. </script>
  132. </xhtml:head>
  133. <xhtml:body pagewidth="800" pageheight="550" guideline="1,823;2,343;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  134. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:7px; top:9px; width:765px; height:55px; "/>
  135. <caption id="caption1" class="tit_2" style="left:10px; top:70px; width:95px; height:13px; ">약품 리스트</caption>
  136. <line id="line13" class="line_4" style="x1:705px; y1:18px; x2:705px; y2:57px; border-color:#ffe4bb; border-left-style:solid; "/>
  137. <caption id="caption2" class="search_name" visibility="hidden" style="left:35px; top:60px; width:75px; height:17px; ">대분류 :</caption>
  138. <caption id="caption3" class="search_name" visibility="hidden" style="left:265px; top:60px; width:75px; height:17px; ">중분류 :</caption>
  139. <select1 id="cmb_sml" ref="/root/send/search/smlcd" visibility="hidden" appearance="minimal" style="left:570px; top:60px; width:150px; height:19px; ">
  140. <choices>
  141. <itemset nodeset="/root/init/smlCategory/item">
  142. <label ref="iname"/>
  143. <value ref="icode"/>
  144. </itemset>
  145. </choices>
  146. </select1>
  147. <caption id="caption4" class="search_name" visibility="hidden" style="left:495px; top:60px; width:75px; height:17px; ">소분류 :</caption>
  148. <select1 id="cmb_lrg" ref="/root/send/search/lrgcd" visibility="hidden" appearance="minimal" style="left:110px; top:60px; width:150px; height:19px; ">
  149. <choices>
  150. <itemset nodeset="/root/init/lrgCategory/item">
  151. <label ref="iname"/>
  152. <value ref="icode"/>
  153. </itemset>
  154. </choices>
  155. <script type="javascript" ev:event="xforms-value-changed">
  156. <![CDATA[
  157. rszfLMSComboList(model.getValue("/root/send/search/goodflag"), cmb_lrg.value, "", "cmb_mdl", "", "M", "Y", "Y");
  158. cmb_mdl.value="";
  159. cmb_sml.value="";
  160. ]]>
  161. </script>
  162. </select1>
  163. <datagrid id="grd_druglist" nodeset="/root/main/druglist/item" class="datagrid2" caption="usrpk^대분류^중분류^소분류^선택^약품코드^약품명(영문)^함량^단위^단가" colsep="^" colwidth="6, 27, 24, 22, 34, 100, 284, 100, 100, 100" dataheight="23" defaultrows="0" mergecellsfixedrows="never" rowheader="seq" rowheight="23" rowsep="|" style="left:10px; top:89px; width:760px; height:375px; ">
  164. <col ref="usrpk" visibility="hidden"/>
  165. <col ref="lrgnm" visibility="hidden"/>
  166. <col ref="mdlnm" visibility="hidden"/>
  167. <col ref="smlnm" visibility="hidden"/>
  168. <col ref="chk" checkvalue="Y,N" type="checkbox"/>
  169. <col ref="goodcd" style="text-align:left; "/>
  170. <col ref="goodnm" style="text-align:left; "/>
  171. <col ref="setunit" style="text-align:center; "/>
  172. <col ref="cntsqtyunit" style="text-align:center; "/>
  173. <col ref="goodunitcost" style="text-align:right; "/>
  174. <script type="javascript" ev:event="ondblclick">
  175. <![CDATA[
  176. if( grd_druglist.isCell(event.target) && grd_druglist.row >= grd_druglist.fixedRows )
  177. {
  178. btn_confirm.dispatch("DOMActivate");
  179. }
  180. ]]>
  181. </script>
  182. <script type="javascript" ev:event="onaftersort">
  183. <![CDATA[
  184. grd_druglist.gridToInstance();
  185. ]]>
  186. </script>
  187. </datagrid>
  188. <line id="line1" class="line_1" style="x1:10px; y1:85px; x2:770px; y2:85px; "/>
  189. <select1 id="radio1" ref="/root/send/search/liketype" appearance="full" cols="2" overflow="visible" style="left:15px; top:26px; width:135px; height:20px; border-style:none; ">
  190. <choices>
  191. <item>
  192. <label>약품코드</label>
  193. <value>code</value>
  194. </item>
  195. <item>
  196. <label>약품이름</label>
  197. <value>name</value>
  198. </item>
  199. </choices>
  200. </select1>
  201. <select1 id="cmb_mdl" ref="/root/send/search/mdlcd" visibility="hidden" appearance="minimal" style="left:340px; top:59px; width:150px; height:19px; ">
  202. <choices>
  203. <itemset nodeset="/root/init/mdlCategory/item">
  204. <label ref="iname"/>
  205. <value ref="icode"/>
  206. </itemset>
  207. </choices>
  208. <script type="javascript" ev:event="xforms-value-changed">
  209. <![CDATA[
  210. rszfLMSComboList(model.getValue("/root/send/search/goodflag"), cmb_lrg.value, cmb_mdl.value, "cmb_sml", "", "S", "Y", "Y");
  211. cmb_sml.value="";
  212. ]]>
  213. </script>
  214. </select1>
  215. <button id="btn_search" class="btn1_letter2" style="left:709px; top:25px; width:56px; height:22px; ">
  216. <caption>조회</caption>
  217. <script type="javascript" ev:event="DOMActivate">
  218. <![CDATA[
  219. fSearch();
  220. ]]>
  221. </script>
  222. </button>
  223. <input id="ipt_refcond" ref="/root/send/search/searchcont" class="input_s_essential" style="left:155px; top:26px; width:205px; height:19px; ">
  224. <script type="javascript" ev:event="onkeyup">
  225. <![CDATA[
  226. inputEnterKey("btn_search", "DOMActivate");
  227. ]]>
  228. </script>
  229. </input>
  230. <button id="btn_cancel" class="btn4_letter2" style="left:714px; top:470px; width:56px; height:22px; ">
  231. <caption>취소</caption>
  232. <script type="javascript" ev:event="DOMActivate">
  233. <![CDATA[
  234. window.close();
  235. ]]>
  236. </script>
  237. </button>
  238. <button id="btn_confirm" class="btn4_letter2" style="left:655px; top:470px; width:56px; height:22px; ">
  239. <caption>확인</caption>
  240. <script type="javascript" ev:event="DOMActivate">
  241. <![CDATA[
  242. if(grd_druglist.rows - grd_druglist.fixedRows == 0)
  243. {
  244. messageBox("적용할 내역이","I004");
  245. //window.close();
  246. return;
  247. }
  248. var nodelist = instance1.selectNodes(grd_druglist.nodeset+ "[chk ='Y']");
  249. var rCVS = getNodeListCSV(nodelist);
  250. if ( checkOpener() ) {
  251. opener.javascript.fGetGrugGoodInfo(rCVS);
  252. } else {
  253. var rtn = messageBox("상위화면을 찾을 수", "E001");
  254. }
  255. window.close();
  256. ]]>
  257. </script>
  258. </button>
  259. <select1 id="cmb_mngtcls" ref="/root/send/search/mngtcls" class="combo_s_essential" appearance="minimal" style="left:473px; top:26px; width:150px; height:19px; ">
  260. <choices>
  261. <itemset>
  262. <label/>
  263. <value/>
  264. </itemset>
  265. </choices>
  266. </select1>
  267. <caption id="caption5" class="search_name" style="left:385px; top:27px; width:88px; height:17px; ">관리분류 :</caption>
  268. </xhtml:body>
  269. </xhtml:html>