SPADB60100_약품검색.xrw 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  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. <druglist>
  11. <item>
  12. <drugcd/>
  13. <ordnm/>
  14. <hngnm/>
  15. <druginfo/>
  16. </item>
  17. </druglist>
  18. <comlist>
  19. <item>
  20. <comcd/>
  21. <comnm/>
  22. <comlevel/>
  23. </item>
  24. </comlist>
  25. <efcylist>
  26. <item>
  27. <efcycd/>
  28. <efcynm/>
  29. <efcylevel/>
  30. </item>
  31. </efcylist>
  32. </main>
  33. <send>
  34. <srchcls>1</srchcls>
  35. <cnfmyn>Y N</cnfmyn>
  36. <seqflag>1</seqflag>
  37. <drugkind>N M Y</drugkind>
  38. <drugkindall>Y</drugkindall>
  39. <spcldrug/>
  40. <efcycd>-</efcycd>
  41. <efcycls/>
  42. <srchflag>1</srchflag>
  43. <srchcnts/>
  44. <srchdrugcd>%</srchdrugcd>
  45. <srchcomcd/>
  46. <srchcomnm/>
  47. <srchefcy/>
  48. <srchetcflag>A</srchetcflag>
  49. <ctdrugyn>N</ctdrugyn>
  50. <absnyn/>
  51. </send>
  52. <init>
  53. <cmbinfo>
  54. <efcycls>
  55. <P0096>
  56. <cdid/>
  57. <cdnm/>
  58. </P0096>
  59. </efcycls>
  60. <spcldrug>
  61. <A0006>
  62. <cdid/>
  63. <cdnm/>
  64. </A0006>
  65. </spcldrug>
  66. </cmbinfo>
  67. </init>
  68. <hidden>
  69. </hidden>
  70. <temp>
  71. <receivedata>
  72. <receiveref/>
  73. <srchflag/>
  74. <srchcnts/>
  75. <drugkind/>
  76. </receivedata>
  77. </temp>
  78. </root>
  79. </instance>
  80. <submission id="TRZBC00101"/>
  81. <submission id="TRADB60101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/druglist"/>
  82. <submission id="TRADB60102" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/main/comlist"/>
  83. <submission id="TRADB60103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchefcy" replace="instance" resultref="/root/main/efcylist"/>
  84. </model>
  85. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  86. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  87. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  88. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  89. <script type="javascript" ev:event="xforms-ready">
  90. <![CDATA[
  91. zbcfGetCodeList( new Array("A0006", "P0096"), new Array("/root/init/cmbinfo/spcldrug", "/root/init/cmbinfo/efcycls") );
  92. if ( model.getValue("/root/temp/receivedata/drugkind") != ""){
  93. model.setValue ( "/root/send/drugkind", model.getValue("/root/temp/receivedata/drugkind"));
  94. }
  95. if ( model.getValue("/root/temp/receivedata/srchcnts") != ""){
  96. model.setValue ( "/root/send/srchcnts", model.getValue("/root/temp/receivedata/srchcnts"));
  97. model.setValue ( "/root/send/srchflag", model.getValue("/root/temp/receivedata/srchflag"));
  98. model.setValue("/root/send/srchdrugcd","D%");
  99. submit("TRADB60101");
  100. }
  101. if (model.getValue("/root/temp/receivedata/srchdrugcd") != "") {
  102. var cond = model.getValue("/root/temp/receivedata/srchdrugcd").toUpperCase()+"%"
  103. model.setValue("/root/send/srchflag","1");
  104. model.setValue("/root/send/srchdrugcd", cond);
  105. submit("TRADB60101");
  106. }
  107. model.refresh();
  108. ]]>
  109. </script>
  110. </xhtml:head>
  111. <xhtml:body pagewidth="827" pageheight="657" guideline="1,1194;2,657;2,628;2,655;1,811;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  112. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:5px; width:810px; height:75px; background-color:#fffbf2; border-color:#ffd799; "/>
  113. <caption id="caption3" class="search_name" style="left:10px; top:10px; width:86px; height:17px; ">구 분 :</caption>
  114. <caption id="caption1" class="search_name" style="left:10px; top:35px; width:86px; height:17px; ">약품종류 :</caption>
  115. <caption id="caption2" class="search_name" style="left:10px; top:60px; width:86px; height:17px; ">복 지 부 :</caption>
  116. <caption id="caption4" class="search_name" style="left:520px; top:10px; width:60px; height:17px; ">순서 :</caption>
  117. <caption id="caption5" class="search_name" style="left:420px; top:35px; width:86px; height:17px; ">특별약품 :</caption>
  118. <caption id="caption6" class="search_name" style="left:420px; top:60px; width:86px; height:17px; ">조 회 :</caption>
  119. <line id="line13" class="line_4" style="x1:744px; y1:15px; x2:744px; y2:69px; border-color:#ffe4bb; border-left-style:solid; "/>
  120. <button id="button64" class="btn_sw" group="tab" selected="true" style="left:0px; top:110px; width:30px; height:22px; ">
  121. <caption>All</caption>
  122. <script type="javascript" ev:event="DOMActivate">
  123. <![CDATA[
  124. model.setValue("/root/send/srchdrugcd","");
  125. submit("TRADB60101");
  126. ]]>
  127. </script>
  128. </button>
  129. <button id="button2" class="btn_sw" group="tab" selected="false" style="left:30px; top:110px; width:30px; height:22px; ">
  130. <caption>A</caption>
  131. <script type="javascript" ev:event="DOMActivate">
  132. <![CDATA[
  133. model.setValue("/root/send/srchdrugcd","A%");
  134. submit("TRADB60101");
  135. ]]>
  136. </script>
  137. </button>
  138. <button id="button3" class="btn_sw" group="tab" selected="false" style="left:60px; top:110px; width:30px; height:22px; ">
  139. <caption>B</caption>
  140. <script type="javascript" ev:event="DOMActivate">
  141. <![CDATA[
  142. model.setValue("/root/send/srchdrugcd","B%");
  143. submit("TRADB60101");
  144. ]]>
  145. </script>
  146. </button>
  147. <button id="button4" class="btn_sw" group="tab" selected="false" style="left:90px; top:110px; width:30px; height:22px; ">
  148. <caption>C</caption>
  149. <script type="javascript" ev:event="DOMActivate">
  150. <![CDATA[
  151. model.setValue("/root/send/srchdrugcd","C%");
  152. submit("TRADB60101");
  153. ]]>
  154. </script>
  155. </button>
  156. <button id="button5" class="btn_sw" group="tab" selected="false" style="left:120px; top:110px; width:30px; height:22px; ">
  157. <caption>D</caption>
  158. <script type="javascript" ev:event="DOMActivate">
  159. <![CDATA[
  160. model.setValue("/root/send/srchdrugcd","D%");
  161. submit("TRADB60101");
  162. ]]>
  163. </script>
  164. </button>
  165. <button id="button6" class="btn_sw" group="tab" selected="false" style="left:150px; top:110px; width:30px; height:22px; ">
  166. <caption>E</caption>
  167. <script type="javascript" ev:event="DOMActivate">
  168. <![CDATA[
  169. model.setValue("/root/send/srchdrugcd","E%");
  170. submit("TRADB60101");
  171. ]]>
  172. </script>
  173. </button>
  174. <button id="button7" class="btn_sw" group="tab" selected="false" style="left:180px; top:110px; width:30px; height:22px; ">
  175. <caption>F</caption>
  176. <script type="javascript" ev:event="DOMActivate">
  177. <![CDATA[
  178. model.setValue("/root/send/srchdrugcd","F%");
  179. submit("TRADB60101");
  180. ]]>
  181. </script>
  182. </button>
  183. <button id="button8" class="btn_sw" group="tab" selected="false" style="left:210px; top:110px; width:30px; height:22px; ">
  184. <caption>G</caption>
  185. <script type="javascript" ev:event="DOMActivate">
  186. <![CDATA[
  187. model.setValue("/root/send/srchdrugcd","G%");
  188. submit("TRADB60101");
  189. ]]>
  190. </script>
  191. </button>
  192. <button id="button9" class="btn_sw" group="tab" selected="false" style="left:240px; top:110px; width:30px; height:22px; ">
  193. <caption>H</caption>
  194. <script type="javascript" ev:event="DOMActivate">
  195. <![CDATA[
  196. model.setValue("/root/send/srchdrugcd","H%");
  197. submit("TRADB60101");
  198. ]]>
  199. </script>
  200. </button>
  201. <button id="button10" class="btn_sw" group="tab" style="left:270px; top:110px; width:30px; height:22px; ">
  202. <caption>I</caption>
  203. <script type="javascript" ev:event="DOMActivate">
  204. <![CDATA[
  205. model.setValue("/root/send/srchdrugcd","I%");
  206. submit("TRADB60101");
  207. ]]>
  208. </script>
  209. </button>
  210. <button id="button11" class="btn_sw" group="tab" style="left:300px; top:110px; width:30px; height:22px; ">
  211. <caption>J</caption>
  212. <script type="javascript" ev:event="DOMActivate">
  213. <![CDATA[
  214. model.setValue("/root/send/srchdrugcd","J%");
  215. submit("TRADB60101");
  216. ]]>
  217. </script>
  218. </button>
  219. <button id="button12" class="btn_sw" group="tab" style="left:330px; top:110px; width:30px; height:22px; ">
  220. <caption>K</caption>
  221. <script type="javascript" ev:event="DOMActivate">
  222. <![CDATA[
  223. model.setValue("/root/send/srchdrugcd","K%");
  224. submit("TRADB60101");
  225. ]]>
  226. </script>
  227. </button>
  228. <button id="button13" class="btn_sw" group="tab" style="left:360px; top:110px; width:30px; height:22px; ">
  229. <caption>L</caption>
  230. <script type="javascript" ev:event="DOMActivate">
  231. <![CDATA[
  232. model.setValue("/root/send/srchdrugcd","L%");
  233. submit("TRADB60101");
  234. ]]>
  235. </script>
  236. </button>
  237. <button id="button14" class="btn_sw" group="tab" style="left:390px; top:110px; width:30px; height:22px; ">
  238. <caption>M</caption>
  239. <script type="javascript" ev:event="DOMActivate">
  240. <![CDATA[
  241. model.setValue("/root/send/srchdrugcd","M%");
  242. submit("TRADB60101");
  243. ]]>
  244. </script>
  245. </button>
  246. <button id="button15" class="btn_sw" group="tab" selected="false" style="left:420px; top:110px; width:30px; height:22px; ">
  247. <caption>N</caption>
  248. <script type="javascript" ev:event="DOMActivate">
  249. <![CDATA[
  250. model.setValue("/root/send/srchdrugcd","N%");
  251. submit("TRADB60101");
  252. ]]>
  253. </script>
  254. </button>
  255. <button id="button16" class="btn_sw" group="tab" selected="false" style="left:450px; top:110px; width:30px; height:22px; ">
  256. <caption>O</caption>
  257. <script type="javascript" ev:event="DOMActivate">
  258. <![CDATA[
  259. model.setValue("/root/send/srchdrugcd","O%");
  260. submit("TRADB60101");
  261. ]]>
  262. </script>
  263. </button>
  264. <button id="button17" class="btn_sw" group="tab" selected="false" style="left:480px; top:110px; width:30px; height:22px; ">
  265. <caption>P</caption>
  266. <script type="javascript" ev:event="DOMActivate">
  267. <![CDATA[
  268. model.setValue("/root/send/srchdrugcd","P%");
  269. submit("TRADB60101");
  270. ]]>
  271. </script>
  272. </button>
  273. <button id="button18" class="btn_sw" group="tab" selected="false" style="left:510px; top:110px; width:30px; height:22px; ">
  274. <caption>Q</caption>
  275. <script type="javascript" ev:event="DOMActivate">
  276. <![CDATA[
  277. model.setValue("/root/send/srchdrugcd","Q%");
  278. submit("TRADB60101");
  279. ]]>
  280. </script>
  281. </button>
  282. <button id="button19" class="btn_sw" group="tab" selected="false" style="left:540px; top:110px; width:30px; height:22px; ">
  283. <caption>R</caption>
  284. <script type="javascript" ev:event="DOMActivate">
  285. <![CDATA[
  286. model.setValue("/root/send/srchdrugcd","R%");
  287. submit("TRADB60101");
  288. ]]>
  289. </script>
  290. </button>
  291. <button id="button20" class="btn_sw" group="tab" selected="false" style="left:570px; top:110px; width:30px; height:22px; ">
  292. <caption>S</caption>
  293. <script type="javascript" ev:event="DOMActivate">
  294. <![CDATA[
  295. model.setValue("/root/send/srchdrugcd","S%");
  296. submit("TRADB60101");
  297. ]]>
  298. </script>
  299. </button>
  300. <button id="button21" class="btn_sw" group="tab" selected="false" style="left:600px; top:110px; width:30px; height:22px; ">
  301. <caption>T</caption>
  302. <script type="javascript" ev:event="DOMActivate">
  303. <![CDATA[
  304. model.setValue("/root/send/srchdrugcd","T%");
  305. submit("TRADB60101");
  306. ]]>
  307. </script>
  308. </button>
  309. <button id="button22" class="btn_sw" group="tab" selected="false" style="left:630px; top:110px; width:30px; height:22px; ">
  310. <caption>U</caption>
  311. <script type="javascript" ev:event="DOMActivate">
  312. <![CDATA[
  313. model.setValue("/root/send/srchdrugcd","U%");
  314. submit("TRADB60101");
  315. ]]>
  316. </script>
  317. </button>
  318. <button id="button23" class="btn_sw" group="tab" selected="false" style="left:660px; top:110px; width:30px; height:22px; ">
  319. <caption>V</caption>
  320. <script type="javascript" ev:event="DOMActivate">
  321. <![CDATA[
  322. model.setValue("/root/send/srchdrugcd","V%");
  323. submit("TRADB60101");
  324. ]]>
  325. </script>
  326. </button>
  327. <button id="button24" class="btn_sw" group="tab" selected="false" style="left:690px; top:110px; width:30px; height:22px; ">
  328. <caption>W</caption>
  329. <script type="javascript" ev:event="DOMActivate">
  330. <![CDATA[
  331. model.setValue("/root/send/srchdrugcd","W%");
  332. submit("TRADB60101");
  333. ]]>
  334. </script>
  335. </button>
  336. <button id="button25" class="btn_sw" group="tab" selected="false" style="left:720px; top:110px; width:30px; height:22px; ">
  337. <caption>X</caption>
  338. <script type="javascript" ev:event="DOMActivate">
  339. <![CDATA[
  340. model.setValue("/root/send/srchdrugcd","X%");
  341. submit("TRADB60101");
  342. ]]>
  343. </script>
  344. </button>
  345. <button id="button26" class="btn_sw" group="tab" style="left:750px; top:110px; width:30px; height:22px; ">
  346. <caption>Y</caption>
  347. <script type="javascript" ev:event="DOMActivate">
  348. <![CDATA[
  349. model.setValue("/root/send/srchdrugcd","Y%");
  350. submit("TRADB60101");
  351. ]]>
  352. </script>
  353. </button>
  354. <button id="button27" class="btn_sw" group="tab" selected="false" style="left:780px; top:110px; width:30px; height:22px; ">
  355. <caption>Z</caption>
  356. <script type="javascript" ev:event="DOMActivate">
  357. <![CDATA[
  358. model.setValue("/root/send/srchdrugcd","Z%");
  359. submit("TRADB60101");
  360. ]]>
  361. </script>
  362. </button>
  363. <caption id="caption7" class="tit_2" style="left:6px; top:89px; width:95px; height:13px; ">약품조회</caption>
  364. <line id="line1" class="line_1" style="x1:1px; y1:103px; x2:811px; y2:103px; "/>
  365. <switch id="switch1" style="left:0px; top:130px; width:810px; height:500px; border-color:#c7a3cf; border-style:solid; ">
  366. <case id="case1" selected="true">
  367. <datagrid id="grd_druglist1" nodeset="/root/main/druglist/item" autoresize="true" caption="약품코드^처방명칭^한글명칭^약정보" colsep="^" colwidth="100, 303, 317, 62" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="select" rowsep="|" style="left:0px; top:5px; width:805px; height:485px; ">
  368. <col ref="drugcd"/>
  369. <col ref="ordnm"/>
  370. <col ref="hngnm"/>
  371. <col ref="druginfo"/>
  372. <script type="javascript" ev:event="ondblclick">
  373. <![CDATA[
  374. var srchtype = model.getValue("/root/temp/receivedata/srchtype"); // 부모창이 어떤 화면인지 구분할 값 세팅
  375. var receiveref = model.getValue("/root/temp/receivedata/receiveref");
  376. if ( checkOpener() ) {
  377. if (srchtype == "O") {
  378. var hngnm = opener.model.getValue(receiveref); // 약품 코드
  379. if(isNull(hngnm)) {
  380. hngnm = "'" + model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/hngnm") + "'";
  381. } else {
  382. // 성분조회 화면에서 '조회' 버튼을 누르지 않고 비어있는 데이터 선택했을 경우
  383. if(isNull(model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/hngnm"))) {
  384. hngnm = "";
  385. } else {
  386. hngnm += "," + "'" + model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/hngnm") + "'";
  387. }
  388. }
  389. opener.model.setValue(receiveref, hngnm);
  390. } else if (srchtype == "B") {//both 약품코드와 약품명 둘다 설정함
  391. var node = opener.instance1.selectSingleNode(receiveref);
  392. if (node.hasChildNodes() ==1) {//결과 반환 경로가 노드인 경우
  393. var nodelist = node.childNodes; //노드의 하위노드를 얻고
  394. var childnode;
  395. while (childnode = nodelist.nextNode()) { //하위노드를 루프
  396. if (childnode.nodeName == "srchdrugcd") { //노드명이 srchdrugcd이면
  397. childnode.value = model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/drugcd");
  398. }
  399. if (childnode.nodeName == "hngnm") {//노드명이 hngnm이면
  400. childnode.value = model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/hngnm");
  401. }
  402. if (childnode.nodeName == "engnm") {
  403. childnode.value = model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/endnm");
  404. }
  405. }
  406. } else { //
  407. opener.model.setValue(receiveref, model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/drugcd"));
  408. }
  409. } else if (srchtype == "G") {//Grid 약품코드와 약품명 둘다 설정함
  410. var node = opener.instance1.selectSingleNode(receiveref);
  411. if (node.hasChildNodes() ==1) {//결과 반환 경로가 노드인 경우
  412. var nodelist = node.childNodes; //노드의 하위노드를 얻고
  413. var childnode;
  414. while (childnode = nodelist.nextNode()) { //하위노드를 루프
  415. if (childnode.nodeName == "prcpcd") { //노드명이 prcpcd
  416. childnode.value = model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/drugcd");
  417. }
  418. if (childnode.nodeName == "prcpnm") {//노드명이 prcpnm
  419. childnode.value = model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/hngnm");
  420. }
  421. }
  422. var f = eval("opener.javascript."+model.getValue("/root/temp/receivedata/callbackFunc"));//콜백함수
  423. if (typeof(f) == "function") {//콜백함수가 유효하다면
  424. f.call(null, model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/drugcd")); //콜백함수 호출
  425. }
  426. } else { //
  427. opener.model.setValue(receiveref, model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/drugcd"));
  428. }
  429. } else {
  430. opener.model.setValue(receiveref, model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/drugcd"));
  431. //opener.model.makeNode (receiveref +"/ordnm");
  432. //opener.model.setValue(receiveref +"/ordnm", model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/ordnm"));
  433. }
  434. opener.model.refresh();
  435. window.close();
  436. } else {
  437. alert("상위화면이 변경되어 데이터를 전달할 수 없습니다.");
  438. }
  439. ]]>
  440. </script>
  441. <script type="javascript" ev:event="onaftersort">
  442. <![CDATA[
  443. grd_druglist1.gridToInstance();
  444. ]]>
  445. </script>
  446. </datagrid>
  447. </case>
  448. <case id="case2">
  449. <datagrid id="grd_comlist" nodeset="/root/main/comlist/item" autoresize="true" caption="코드^명 칭^레벨" colsep="^" colwidth="0, 216, 0" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="select" rowsep="|" style="left:5px; top:5px; width:240px; height:490px; ">
  450. <col ref="comcd"/>
  451. <col ref="comnm"/>
  452. <col ref="comlevel"/>
  453. <script type="javascript" ev:event="ondblclick">
  454. <![CDATA[
  455. model.setValue("/root/send/srchetcflag","C");
  456. model.setValue("/root/send/srchcomcd",model.getValue("/root/main/comlist/item[" + grd_comlist.row +"]/comcd"));
  457. submit("TRADB60101");
  458. ]]>
  459. </script>
  460. <script type="javascript" ev:event="onaftersort">
  461. <![CDATA[
  462. grd_comlist.gridToInstance();
  463. ]]>
  464. </script>
  465. </datagrid>
  466. <datagrid id="grd_druglist2" nodeset="/root/main/druglist/item" autoresize="true" caption="약품코드^처방명칭^^" colsep="^" colwidth="100, 421, 14, 9" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="select" rowsep="|" style="left:250px; top:5px; width:550px; height:490px; ">
  467. <col ref="drugcd"/>
  468. <col ref="ordnm"/>
  469. <col ref="hngnm"/>
  470. <col ref="druginfo"/>
  471. <script type="javascript" ev:event="ondblclick">
  472. <![CDATA[
  473. var receiveref = model.getValue("/root/temp/receivedata/receiveref");
  474. if ( checkOpener() ) {
  475. opener.model.setValue(receiveref, model.getValue("/root/main/druglist/item["+grd_druglist2.row+"]/drugcd"));
  476. //opener.model.makeNode (receiveref +"/ordnm");
  477. //opener.model.setValue(receiveref +"/ordnm", model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/ordnm"));
  478. opener.model.refresh();
  479. window.close();
  480. } else {
  481. alert("상위화면이 변경되어 데이터를 전달할 수 없습니다.");
  482. }
  483. ]]>
  484. </script>
  485. <script type="javascript" ev:event="onaftersort">
  486. <![CDATA[
  487. grd_druglist2.gridToInstance();
  488. ]]>
  489. </script>
  490. </datagrid>
  491. </case>
  492. <case id="case3">
  493. <datagrid id="grd_druglist3" nodeset="/root/main/druglist/item" autoresize="true" caption="약품코드^처방명칭^^" colsep="^" colwidth="100, 421, 14, 9" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="select" rowsep="|" style="left:250px; top:5px; width:550px; height:490px; ">
  494. <col ref="drugcd"/>
  495. <col ref="ordnm"/>
  496. <col ref="hngnm"/>
  497. <col ref="druginfo"/>
  498. <script type="javascript" ev:event="ondblclick">
  499. <![CDATA[
  500. var receiveref = model.getValue("/root/temp/receivedata/receiveref");
  501. if ( checkOpener() ) {
  502. opener.model.setValue(receiveref, model.getValue("/root/main/druglist/item["+grd_druglist3.row+"]/drugcd"));
  503. //opener.model.makeNode (receiveref +"/ordnm");
  504. //opener.model.setValue(receiveref +"/ordnm", model.getValue("/root/main/druglist/item["+grd_druglist1.row+"]/ordnm"));
  505. opener.model.refresh();
  506. window.close();
  507. } else {
  508. alert("상위화면이 변경되어 데이터를 전달할 수 없습니다.");
  509. }
  510. ]]>
  511. </script>
  512. <script type="javascript" ev:event="onaftersort">
  513. <![CDATA[
  514. grd_druglist3.gridToInstance();
  515. ]]>
  516. </script>
  517. </datagrid>
  518. <datagrid id="grd_efcylist" nodeset="/root/main/efcylist/item" caption="코드^효능명칭^레벨" colsep="^" colwidth="0, 212, 0" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:5px; width:240px; height:490px; ">
  519. <col ref="efcycd"/>
  520. <col ref="efcynm"/>
  521. <col ref="efcylevel" visibility="hidden"/>
  522. <script type="javascript" ev:event="ondblclick">
  523. <![CDATA[
  524. model.setValue("/root/send/srchetcflag","E");
  525. model.setValue("/root/send/srchefcy",model.getValue("/root/main/efcylist/item[" + grd_efcylist.row +"]/efcycd"));
  526. submit("TRADB60101");
  527. ]]>
  528. </script>
  529. <script type="javascript" ev:event="onaftersort">
  530. <![CDATA[
  531. grd_efcylist.gridToInstance();
  532. ]]>
  533. </script>
  534. </datagrid>
  535. </case>
  536. </switch>
  537. <line id="line3" class="line_2" style="x1:5px; y1:30px; x2:725px; y2:30px; "/>
  538. <line id="line2" class="line_2" style="x1:5px; y1:55px; x2:725px; y2:55px; "/>
  539. <caption id="caption8" class="search_name" style="left:340px; top:10px; width:86px; height:17px; ">저장구분 :</caption>
  540. <button id="btn_sea" class="btn1_letter2" style="left:750px; top:30px; width:56px; height:22px; ">
  541. <caption>조회</caption>
  542. <script type="javascript" ev:event="DOMActivate">
  543. <![CDATA[
  544. model.setValue("/root/send/srchdrugcd","");
  545. // 임상약은 임상약만 조회되게 2013/11/25 김치국
  546. var vspccldrug = model.getValue("/root/send/spcldrug") ;
  547. if ( vspccldrug == "2" || vspccldrug == "3" || vspccldrug == "4") {
  548. model.setValue("/root/send/ctdrugyn","Y");
  549. }
  550. submit("TRADB60101");
  551. ]]>
  552. </script>
  553. </button>
  554. <button id="btn_cls" class="btn4_letter2" style="left:755px; top:635px; width:56px; height:22px; ">
  555. <caption>닫기</caption>
  556. <close ev:event="DOMActivate"/>
  557. </button>
  558. <select1 id="rdo_srchcls" ref="/root/send/srchcls" class="radio_search" appearance="full" cols="5" rows="1" overflow="visible" style="left:100px; top:10px; width:240px; height:20px; border-style:none; ">
  559. <choices>
  560. <item>
  561. <label>코드별</label>
  562. <value>1</value>
  563. </item>
  564. <item>
  565. <label>성분별</label>
  566. <value>2</value>
  567. </item>
  568. <item>
  569. <label>효능별</label>
  570. <value>3</value>
  571. </item>
  572. <item>
  573. <label>상품명별</label>
  574. <value>4</value>
  575. </item>
  576. </choices>
  577. <script type="javascript" ev:event="xforms-value-changed">
  578. <![CDATA[
  579. if ( model.getValue("/root/send/srchcls") == "2") {
  580. model.toggle("case2");
  581. if ( grd_comlist.rows < 3 ) {
  582. submit("TRADB60102");
  583. setTree(grd_comlist, grd_comlist.colRef("comlevel"),grd_comlist.colRef("comnm"), true );
  584. }
  585. } else if ( model.getValue("/root/send/srchcls") == "3") {
  586. model.toggle("case3");
  587. if ( grd_efcylist.rows<3 ) {
  588. submit("TRADB60103");
  589. setTree(grd_efcylist, grd_efcylist.colRef("efcylevel"),grd_efcylist.colRef("efcynm"), true );
  590. }
  591. }else {
  592. model.setValue("/root/send/srchetcflag","A");
  593. model.toggle("case1");
  594. }
  595. ]]>
  596. </script>
  597. </select1>
  598. <select id="chk_saveflag" ref="/root/send/cnfmyn" class="checkbox_search" overflow="visible" appearance="full" cols="4" rows="1" style="left:425px; top:10px; width:85px; height:20px; border-style:none; ">
  599. <choices>
  600. <item>
  601. <label>확정</label>
  602. <value>Y</value>
  603. </item>
  604. <item>
  605. <label>임시</label>
  606. <value>N</value>
  607. </item>
  608. </choices>
  609. </select>
  610. <select1 id="rdo_seqflag" ref="/root/send/seqflag" class="radio_search" appearance="full" cols="3" rows="1" overflow="visible" style="left:580px; top:10px; width:160px; height:20px; border-style:none; ">
  611. <choices>
  612. <item>
  613. <label>약품코드순</label>
  614. <value>1</value>
  615. </item>
  616. <item>
  617. <label>처방명칭순</label>
  618. <value>2</value>
  619. </item>
  620. </choices>
  621. </select1>
  622. <select1 id="cmb_srchflag" ref="/root/send/srchflag" class="combo_search" appearance="minimal" style="left:510px; top:58px; width:75px; height:19px; ">
  623. <choices>
  624. <item>
  625. <label>처방명칭</label>
  626. <value>2</value>
  627. </item>
  628. <item>
  629. <label>약품코드</label>
  630. <value>1</value>
  631. </item>
  632. <item>
  633. <label>한글(약품/제조회사)</label>
  634. <value>3</value>
  635. </item>
  636. <item>
  637. <label>EDI코드</label>
  638. <value>4</value>
  639. </item>
  640. <item>
  641. <label>성분명</label>
  642. <value>5</value>
  643. </item>
  644. </choices>
  645. </select1>
  646. <input id="ipt_srchcnts" ref="/root/send/srchcnts" class="input_search" style="left:590px; top:58px; width:135px; height:19px; "/>
  647. <script type="javascript" ev:event="onkeyup">
  648. <![CDATA[
  649. inputEnterKey("btn_sea", "DOMActivate");
  650. ]]>
  651. </script>
  652. <select1 id="cmb_efcycls" ref="/root/send/efcycls" class="combo_search" appearance="minimal" style="left:175px; top:58px; width:240px; height:19px; ">
  653. <choices>
  654. <itemset nodeset="/root/init/cmbinfo/efcycls/P0096">
  655. <label ref="cdnm"/>
  656. <value ref="cdid"/>
  657. </itemset>
  658. </choices>
  659. <script type="javascript" ev:event="xforms-select">
  660. <![CDATA[
  661. model.setValue("/root/send/efcycd", model.getValue("/root/send/efcycls"));
  662. model.refresh();
  663. ]]>
  664. </script>
  665. </select1>
  666. <output id="opt_efcycd" ref="/root/send/efcycd" class="output_search" style="left:100px; top:58px; width:70px; height:19px; "/>
  667. <select1 id="cmb_spcldrug" ref="/root/send/spcldrug" class="combo_search" appearance="minimal" style="left:510px; top:35px; width:215px; height:19px; ">
  668. <choices>
  669. <itemset nodeset="/root/init/cmbinfo/spcldrug/A0006">
  670. <label ref="cdnm"/>
  671. <value ref="cdid"/>
  672. </itemset>
  673. </choices>
  674. </select1>
  675. <select id="chk_drugkind" ref="/root/send/drugkind" class="checkbox_search" overflow="visible" appearance="full" cols="4" rows="1" style="left:100px; top:35px; width:135px; height:20px; border-style:none; ">
  676. <choices>
  677. <item>
  678. <label>내복</label>
  679. <value>N</value>
  680. </item>
  681. <item>
  682. <label>주사</label>
  683. <value>M</value>
  684. </item>
  685. <item>
  686. <label>외용</label>
  687. <value>Y</value>
  688. </item>
  689. </choices>
  690. </select>
  691. <select id="chk_drugkindall" ref="/root/send/drugkindall" class="checkbox_search" overflow="visible" appearance="full" cols="4" rows="1" style="left:240px; top:35px; width:55px; height:20px; border-style:none; ">
  692. <choices>
  693. <item>
  694. <label>전체</label>
  695. <value>4</value>
  696. </item>
  697. </choices>
  698. <script type="javascript" ev:event="xforms-value-changed">
  699. <![CDATA[
  700. if ((model.getValue("/root/send/drugkindall")).indexOf("4")>-1) { //전체가 선택됐을때 다른 체크도 모두 전체체크의 상태대로 셋팅
  701. model.setValue("/root/send/drugkind","N M Y");
  702. } else {
  703. model.setValue("/root/send/drugkind"," ");
  704. }
  705. model.refresh();
  706. ]]>
  707. </script>
  708. </select>
  709. <select id="checkbox1" ref="/root/send/absnyn" class="checkbox_search" overflow="visible" appearance="full" cols="4" rows="1" style="left:310px; top:35px; width:90px; height:20px; border-style:none; ">
  710. <choices>
  711. <item>
  712. <label>불용약제외</label>
  713. <value>Y</value>
  714. </item>
  715. </choices>
  716. </select>
  717. </xhtml:body>
  718. </xhtml:html>