SPADB60150_약품검색.xrw 27 KB

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