SMADB00600_교환약관리.xrw 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930
  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. <sumdruglist>
  11. </sumdruglist>
  12. <delivedruglist>
  13. </delivedruglist>
  14. <ordexchdruglist>
  15. <prcpinfo/>
  16. </ordexchdruglist>
  17. </main>
  18. <send>
  19. <srchdata>
  20. <deptflag/>
  21. <srchdeptcd/>
  22. <srcdrugcd/>
  23. <srchfromdd/>
  24. <srchtodd/>
  25. <srchprcpcd/>
  26. <srchorddeptcd/>
  27. <srchorddeptflag/>
  28. <drugcd/>
  29. <srchfromtm>0000</srchfromtm>
  30. <srchtotm>2400</srchtotm>
  31. <sumdt/>
  32. <userid/>
  33. <instcd/>
  34. <stocdeptcd/>
  35. <deliveddrugcd/>
  36. </srchdata>
  37. <req>
  38. <reqsumdrug/>
  39. <reqdelivedrug/>
  40. <drugcd/>
  41. <reqexchdrug/>
  42. </req>
  43. <delivedata>
  44. <drugcd/>
  45. <drugnm/>
  46. <orddeptnm/>
  47. </delivedata>
  48. <deptdata/>
  49. </send>
  50. <init>
  51. <orddept>
  52. <dept>
  53. <chk/>
  54. <depthngnm/>
  55. <deptcd/>
  56. <orddeptflag/>
  57. </dept>
  58. </orddept>
  59. <baseinfo>
  60. <unit>
  61. <A0599>
  62. <cdid/>
  63. <cdnm/>
  64. </A0599>
  65. </unit>
  66. </baseinfo>
  67. <misdeptlist>
  68. <deptlist>
  69. <deptnm/>
  70. <deptcd/>
  71. </deptlist>
  72. </misdeptlist>
  73. <exchdruglist>
  74. <druglist>
  75. <drugnm/>
  76. <drugcd/>
  77. </druglist>
  78. </exchdruglist>
  79. </init>
  80. <hidden>
  81. <receivedrugcd>/root/hidden/drugcd</receivedrugcd>
  82. <drugcd/>
  83. <count/>
  84. <sumdrugcd/>
  85. <prntdruglist/>
  86. </hidden>
  87. <temp>
  88. <receivedata>
  89. <receiveref/>
  90. <srchflag/>
  91. <srchcnts/>
  92. <drugkind/>
  93. </receivedata>
  94. <selrow/>
  95. <druginfo/>
  96. </temp>
  97. </root>
  98. </instance>
  99. <script type="javascript" ev:event="xforms-ready">
  100. <![CDATA[
  101. zbcfGetCodeList( new Array("A0599") ,new Array("/root/init/baseinfo/unit"));
  102. // 교환약 조회
  103. submit("TRADB00601");
  104. submit("TRADB00604");
  105. submit("TRADB00605");
  106. // 출고부서 조회
  107. submit("TRADT01106");
  108. var dutplceinstcd = getUserInfo("dutplceinstcd");
  109. if(dutplceinstcd == "012") {
  110. combo1.select(1);
  111. } else {
  112. combo1.select(0);
  113. }
  114. model.setValue("/root/send/srchdata/srchfromdd", new Date().getAddDate(-3, "M").getDateFormat());
  115. model.setValue("/root/send/srchdata/srchtodd", getCurrentDate());
  116. model.refresh();
  117. ]]>
  118. </script>
  119. <script type="javascript">
  120. <![CDATA[
  121. var chk_cnt = 0;
  122. function fSelDeptchk(){
  123. if(model.getValue("/root/send/srchdata/srchdeptcd") != "" && model.getValue("/root/send/srchdata/deptflag") != "" ) {
  124. return true;
  125. } else {
  126. return false;
  127. }
  128. }
  129. function fMakeDeliveData(lastrow){
  130. if(!isNull(lastrow)) {
  131. model.makeNode("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]");
  132. //grd_ordexchdrug.addStatus(grd_ordexchdrug.lastrow, "insert");
  133. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/delivedt", getCurrentDate()+ getCurrentTime());
  134. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/delivedeptcd", model.getValue("/root/send/srchdata/srchdeptcd"));
  135. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/wardnm", rdo_deptcd.label);
  136. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/pid", "-");
  137. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/ioflag", "-");
  138. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/prcpdd", getCurrentDate());
  139. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/execprcpuniqno", "0");
  140. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/prcpcd", model.getValue("/root/send/srchdata/deliveddrugcd"));
  141. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/prcpkindcd", "-");
  142. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/prcpno", "0");
  143. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/prcphistno", "0");
  144. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/execprcpno", "0");
  145. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/delivestat", "D");
  146. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/prcpvol", "0");
  147. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/prcpvolunit", "-");
  148. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/prcpqty", "0");
  149. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/prcpqtyunit", "-");
  150. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/prcptims", "0");
  151. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/prcpdayno", "0");
  152. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/deliveqty", ""); // 불출수량 입력해야 함
  153. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/acmlqty", "0");
  154. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/spreqty", "0");
  155. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/stocdeptcd", model.getValue("/root/send/srchdata/stocdeptcd"));
  156. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]/sumprcpcd", combo2.value);
  157. grd_ordexchdrug.refresh();
  158. }
  159. }
  160. ]]>
  161. </script>
  162. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  163. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  164. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  165. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  166. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  167. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  168. <submission id="TRZBC00101"/>
  169. <submission id="TRADT10321" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/init/orddept"/>
  170. <submission id="TRADB00601" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/main"/>
  171. <submission id="TRADB00602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/ordexchdruglist"/>
  172. <submission id="TXADB00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/main"/>
  173. <submission id="TRADB00603" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" resultref="/root/temp/druginfo"/>
  174. <submission id="TXADB00602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/ordexchdruglist"/>
  175. <submission id="TRADT01106" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/misdeptlist"/>
  176. <submission id="TRADB00604" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/main/delivedruglist"/>
  177. <submission id="TRADB00605" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/exchdruglist"/>
  178. <submission id="TRADT10206" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/sumlistinfo" replace="instance" resultref="/root/init/sumtmflaglist"/>
  179. <submission id="TRADB00606" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" resultref="/root/hidden/prntdruglist"/>
  180. </model>
  181. </xhtml:head>
  182. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  183. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  184. <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:140px; height:13px; ">모아서 주는 약 관리</caption>
  185. </group>
  186. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1194px; height:771px; ">
  187. <button id="button1" class="btn_sw" group="tab" selected="true" style="left:60px; top:50px; width:60px; height:22px; ">
  188. <caption>집계내역</caption>
  189. <toggle case="case2" ev:event="onclick"/>
  190. </button>
  191. <switch id="switch1" style="left:0px; top:71px; width:1190px; height:697px; border-color:#c7a3cf; border-style:solid; ">
  192. <case id="case1">
  193. <button id="button50" class="btn2_letter3" visibility="hidden" style="left:1029px; top:5px; width:53px; height:19px; ">
  194. <caption>행복사</caption>
  195. <script type="javascript" ev:event="DOMActivate">
  196. <![CDATA[
  197. var chkrow = 0;
  198. copyNodesetType("/root/main/delivedruglist/delivedruglist[" + grd_delivedrug.row + "]", "/root/main/delivedruglist/delivedruglist[" + grd_delivedrug.row + "]", "after");
  199. model.refresh();
  200. chkrow = grd_delivedrug.rows-1;
  201. grd_delivedrug.addStatus(chkrow, "insert");
  202. ]]>
  203. </script>
  204. </button>
  205. <button id="btn_grdadd" class="btn2_letter3" visibility="hidden" style="left:974px; top:5px; width:53px; height:19px; ">
  206. <caption>행추가</caption>
  207. <script type="javascript" ev:event="DOMActivate">
  208. <![CDATA[
  209. grd_delivedrug.addItem();
  210. model.setValue("/root/main/delivedruglist/delivedruglist["+ grd_delivedrug.row +"]/usefromdd", getCurrentDate());
  211. if(model.getValue("/root/hidden/sumdrugcd") != "" ) {
  212. model.setValue("/root/main/delivedruglist/delivedruglist["+ grd_delivedrug.row +"]/sumdrugcd", model.getValue("/root/hidden/sumdrugcd"));
  213. }
  214. ]]>
  215. </script>
  216. </button>
  217. <button id="btn_grddel" class="btn2_letter3" style="left:1084px; top:5px; width:53px; height:19px; ">
  218. <caption>행삭제</caption>
  219. <script type="javascript" ev:event="DOMActivate">
  220. <![CDATA[
  221. //grd_delivedrug.addStatus(grd_delivedrug.row,"delete");
  222. grd_sumdrug.addStatus(grd_sumdrug.row,"delete");
  223. ]]>
  224. </script>
  225. </button>
  226. <button id="button90" class="btn5_letter2" style="left:1141px; top:5px; width:42px; height:19px; ">
  227. <caption>저장</caption>
  228. <script type="javascript" ev:event="DOMActivate">
  229. <![CDATA[
  230. /*for(var i = grd_delivedrug.fixedRows; i < grd_delivedrug.rows; i++) {
  231. if(model.getValue("/root/main/delivedruglist/delivedruglist["+ i +"]/sumdrugcd") == "") {
  232. if(model.getValue("/root/hidden/sumdrugcd") == "") {
  233. messageBox("불출할 약품정보를", "C002");
  234. return;
  235. } else {
  236. model.setValue("/root/main/delivedruglist/delivedruglist["+ i +"]/sumdrugcd", model.getValue("/root/hidden/sumdrugcd"));
  237. }
  238. }
  239. }
  240. model.refresh();
  241. //model.setValue("/root/send/req/reqsumdrug", grd_sumdrug.getUpdateData());
  242. model.setValue("/root/send/req/reqdelivedrug", grd_delivedrug.getUpdateData());
  243. submit("TXADB00601");*/
  244. /*for(var i = grd_sumdrug.fixedRows; i < grd_sumdrug.rows; i++) {
  245. if(model.getValue("/root/main/sumdruglist/sumdruglist["+ i +"]/sumtodeliveqty") == "") {
  246. messageBox("수량환산을", "C001");
  247. return;
  248. }
  249. }*/
  250. model.setValue("/root/send/req/reqsumdrug", grd_sumdrug.getUpdateData());
  251. submit("TXADB00601");
  252. ]]>
  253. </script>
  254. </button>
  255. <caption id="caption6" class="tit_2" style="left:6px; top:8px; width:188px; height:13px; ">집계할 약품정보</caption>
  256. <caption id="caption7" class="tit_2" style="left:600px; top:8px; width:188px; height:13px; ">불출할 약품정보</caption>
  257. <datagrid id="grd_sumdrug" nodeset="/root/main/sumdruglist/sumdruglist" backcoloralternate="#f0f0f0" caption="집계할 약품코드^한글상품명^용량^단위^수량^단위^수량환산^usefromdd^cdflag^불출할 약품코드^한글상품명^용량^단위^수량^단위" colsep="^" colwidth="105, 220, 59, 40, 59, 40, 55, 5, 5, 105, 220, 70, 55, 70, 55" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:1px; top:30px; width:1185px; height:662px; ">
  258. <col disabled="true" ref="drugcd"/>
  259. <col ref="drugnm"/>
  260. <col ref="exchvol"/>
  261. <col disabled="true" ref="exchvolunit" type="combo">
  262. <choices>
  263. <itemset nodeset="/root/init/baseinfo/unit/A0599">
  264. <label ref="cdnm"/>
  265. <value ref="cdid"/>
  266. </itemset>
  267. </choices>
  268. </col>
  269. <col ref="exchqty"/>
  270. <col disabled="true" ref="exchqtyunit" type="combo">
  271. <choices>
  272. <itemset nodeset="/root/init/baseinfo/unit/A0599">
  273. <label ref="cdnm"/>
  274. <value ref="cdid"/>
  275. </itemset>
  276. </choices>
  277. </col>
  278. <col ref="sumtodeliveqty" type="input"/>
  279. <col ref="usefromdd"/>
  280. <col ref="cdflag"/>
  281. <col ref="deliveddrugcd" type="inputbutton"/>
  282. <col ref="deliveddrugnm"/>
  283. <col ref="delivedexchvol"/>
  284. <col disabled="true" ref="delivedexchvolunit" type="combo">
  285. <choices>
  286. <itemset nodeset="/root/init/baseinfo/unit/A0599">
  287. <label ref="cdnm"/>
  288. <value ref="cdid"/>
  289. </itemset>
  290. </choices>
  291. </col>
  292. <col ref="delivedexchqty"/>
  293. <col disabled="true" ref="delivedexchqtyunit" type="combo">
  294. <choices>
  295. <itemset nodeset="/root/init/baseinfo/unit/A0599">
  296. <label ref="cdnm"/>
  297. <value ref="cdid"/>
  298. </itemset>
  299. </choices>
  300. </col>
  301. <script type="javascript" ev:event="onbuttonclick">
  302. <![CDATA[
  303. if ( grd_sumdrug.col == grd_sumdrug.colRef("deliveddrugcd") ){
  304. model.setValue("/root/temp/receivedata/receiveref", model.getValue("/root/hidden/receivedrugcd"));
  305. model.setValue("/root/temp/receivedata/srchflag", "");
  306. model.setValue("/root/temp/receivedata/srchcnts", "");
  307. model.setValue("/root/temp/receivedata/drugkind","");
  308. modal("SPADB60100",0,100,150,"SPADB60100","/root/temp/receivedata","/root/temp/receivedata");
  309. if ( model.getValue("/root/hidden/drugcd") ==""){
  310. return;
  311. } else {
  312. model.setValue("/root/main/sumdruglist/sumdruglist["+ grd_sumdrug.row +"]/deliveddrugcd", model.getValue("/root/hidden/drugcd") );
  313. model.setValue("/root/send/srchdata/srcdrugcd", model.getValue("/root/hidden/drugcd") );
  314. if(submit("TRADB00603")) {
  315. model.setValue("/root/main/sumdruglist/sumdruglist["+ grd_sumdrug.row +"]/deliveddrugnm", model.getValue("/root/temp/druginfo/druginfo/drugnm"));
  316. model.setValue("/root/main/sumdruglist/sumdruglist["+ grd_sumdrug.row +"]/delivedexchvol", model.getValue("/root/temp/druginfo/druginfo/exchvol"));
  317. model.setValue("/root/main/sumdruglist/sumdruglist["+ grd_sumdrug.row +"]/delivedexchvolunit", model.getValue("/root/temp/druginfo/druginfo/exchvolunit"));
  318. model.setValue("/root/main/sumdruglist/sumdruglist["+ grd_sumdrug.row +"]/delivedexchqty", model.getValue("/root/temp/druginfo/druginfo/exchqty"));
  319. model.setValue("/root/main/sumdruglist/sumdruglist["+ grd_sumdrug.row +"]/delivedexchqtyunit", model.getValue("/root/temp/druginfo/druginfo/exchqtyunit"));
  320. model.setValue("/root/main/sumdruglist/sumdruglist["+ grd_sumdrug.row +"]/usefromdd", model.getValue("/root/temp/druginfo/druginfo/usefromdd"));
  321. grd_sumdrug.addStatus(grd_sumdrug.row, "insert");
  322. model.refresh();
  323. }
  324. }
  325. }
  326. ]]>
  327. </script>
  328. <script type="javascript" ev:event="onclick">
  329. <![CDATA[
  330. model.setValue("/root/hidden/sumdrugcd", (model.getValue("/root/main/sumdruglist/sumdruglist["+grd_sumdrug.row+"]/drugcd")).toUpperCase());
  331. if ( model.getValue("/root/hidden/sumdrugcd") == ""){
  332. return;
  333. }
  334. ]]>
  335. </script>
  336. <script type="javascript" ev:event="ondblclick">
  337. <![CDATA[
  338. model.setValue("/root/send/srchdata/srcdrugcd", model.getValue("/root/main/sumdruglist/sumdruglist["+ grd_sumdrug.row +"]/drugcd"));
  339. model.setValue("/root/send/srchdata/deliveddrugcd", model.getValue("/root/main/sumdruglist/sumdruglist["+ grd_sumdrug.row +"]/deliveddrugcd"));
  340. combo2.refresh();
  341. combo2.dispatch("xforms-select");
  342. ]]>
  343. </script>
  344. </datagrid>
  345. <line id="line3" class="line_1" style="x1:1px; y1:25px; x2:1186px; y2:25px; "/>
  346. </case>
  347. <case id="case2" selected="true" style="border-color:#ccff66; ">
  348. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:15px; top:5px; width:1155px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  349. <caption id="caption2" class="search_name" style="left:25px; top:15px; width:86px; height:17px; ">약품코드 :</caption>
  350. <caption id="caption4" class="search_name" style="left:245px; top:15px; width:90px; height:17px; ">처방명칭 :</caption>
  351. <caption id="caption5" class="search_name" style="left:790px; top:15px; width:65px; height:17px; ">부서 :</caption>
  352. <output id="output1" ref="/root/send/delivedata/drugnm" class="output_search" style="left:335px; top:15px; width:425px; height:19px; "/>
  353. <output id="output2" ref="/root/send/delivedata/drugcd" class="output_search" style="left:115px; top:15px; width:100px; height:19px; "/>
  354. <output id="output3" ref="/root/send/delivedata/orddeptnm" class="output_search" style="left:845px; top:15px; width:285px; height:19px; "/>
  355. <datagrid id="grd_ordexchdrug" nodeset="/root/main/ordexchdruglist/prcpinfo" class="datagrid2" caption="불출일시^처방일자^ 투약 번호^병실^등록번호^환자명^진료과^부서^1일수량^횟수^일수^총수량^ 누적 수량^ 수량 단위^불출약품명^ 불출 수량^불출단위^잔여수량^수량단위^구분^구분^구분^실시일시^반환일시^마감일시^출력일시^sumdeptcd^ioflag^execprcpuniqno^prcpkindcd^prcpno^prcphistno^execprcpno^sumstat^prcpvol^prcpvolunit^orddeptcd^wardcd^stocdeptcd^sumprcpcd" colsep="^" colwidth="115, 75, 40, 60, 70, 70, 70, 70, 54, 40, 40, 40, 40, 40, 70, 40, 39, 40, 40, 45, 50, 45, 115, 115,115, 115,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" gnodeset="/root/main/ordexchdruglist/prcpinfo" style="left:2px; top:75px; width:1184px; height:616px; ">
  356. <col ref="delivedt" format="yyyy-mm-dd hh:nn:ss"/>
  357. <col ref="prcpdd" format="yyyy-mm-dd"/>
  358. <col ref="drugno"/>
  359. <col ref="roomcd"/>
  360. <col ref="pid"/>
  361. <col ref="hngnm"/>
  362. <col ref="orddeptnm"/>
  363. <col ref="wardnm"/>
  364. <col ref="prcpqty"/>
  365. <col ref="prcptims"/>
  366. <col ref="prcpdayno"/>
  367. <col ref="totqty"/>
  368. <col ref="acmlqty"/>
  369. <col ref="prcpqtyunit"/>
  370. <col ref="prcpcd"/>
  371. <col ref="deliveqty" type="input" format="####.99"/>
  372. <col ref="deliveunit"/>
  373. <col ref="spreqty"/>
  374. <col ref="spreunit"/>
  375. <col ref="flag1"/>
  376. <col ref="flag2"/>
  377. <col ref="flag3"/>
  378. <col ref="execdt" format="yyyy-mm-dd hh:nn:ss"/>
  379. <col ref="rtndd" format="yyyy-mm-dd hh:nn:ss"/>
  380. <col ref="sumdt" format="yyyy-mm-dd hh:nn:ss"/>
  381. <col ref="prntdt" format="yyyy-mm-dd hh:nn:ss"/>
  382. <col ref="delivedeptcd" visibility="hidden"/>
  383. <col ref="ioflag" visibility="hidden"/>
  384. <col ref="execprcpuniqno" visibility="hidden"/>
  385. <col ref="prcpkindcd" visibility="hidden"/>
  386. <col ref="prcpno" visibility="hidden"/>
  387. <col ref="prcphistno" visibility="hidden"/>
  388. <col ref="execprcpno" visibility="hidden"/>
  389. <col ref="delivestat" visibility="hidden"/>
  390. <col ref="prcpvol" visibility="hidden"/>
  391. <col ref="prcpvolunit" visibility="hidden"/>
  392. <col ref="orddeptcd" visibility="hidden"/>
  393. <col ref="wardcd" visibility="hidden"/>
  394. <col ref="stocdeptcd" visibility="hidden"/>
  395. <col ref="sumprcpcd" visibility="hidden"/>
  396. <script type="javascript" ev:event="onendedit">
  397. <![CDATA[
  398. //grd_ordexchdrug.clearStatus();
  399. var deliqty = grd_ordexchdrug.labelmatrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("deliveqty"));
  400. if(grd_ordexchdrug.col == grd_ordexchdrug.colRef("deliveqty")) {
  401. if(model.getValue("/root/main/ordexchdruglist/prcpinfo["+ grd_ordexchdrug.row +"]/delivestat") != "S" &&
  402. model.getValue("/root/main/ordexchdruglist/prcpinfo["+ grd_ordexchdrug.row +"]/deliveqty") != "") {
  403. var std =model.getValue("/root/temp/druginfo/druginfo/sumtodeliveqty");
  404. var spreqty = parseFloat(grd_ordexchdrug.labelmatrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("acmlqty"))) -
  405. parseFloat(grd_ordexchdrug.labelmatrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("deliveqty")) * std );
  406. if(spreqty < 0) {
  407. grd_ordexchdrug.valuematrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("spreqty")) = 0;
  408. } else {
  409. grd_ordexchdrug.valuematrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("spreqty")) = spreqty;
  410. }
  411. grd_ordexchdrug.addStatus(grd_ordexchdrug.row, "insert");
  412. } else if(model.getValue("/root/main/ordexchdruglist/prcpinfo["+ grd_ordexchdrug.row +"]/delivestat") != "S" &&
  413. grd_ordexchdrug.rowStatus(grd_ordexchdrug.row) == "3"){
  414. var std =model.getValue("/root/temp/druginfo/druginfo/sumtodeliveqty");
  415. //var spreqty = parseFloat(grd_ordexchdrug.labelmatrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("acmlqty"))) -
  416. // parseFloat(grd_ordexchdrug.labelmatrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("deliveqty")) * std );
  417. var spreqty = parseFloat(grd_ordexchdrug.labelmatrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("acmlqty"))) -
  418. parseFloat(deliqty * std );
  419. if(spreqty < 0) {
  420. grd_ordexchdrug.valuematrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("spreqty")) = 0;
  421. } else {
  422. grd_ordexchdrug.valuematrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("spreqty")) = spreqty;
  423. }
  424. grd_ordexchdrug.addStatus(grd_ordexchdrug.row, "insert");
  425. }else {
  426. grd_ordexchdrug.removeStatus(grd_ordexchdrug.row, "insert");
  427. }
  428. for(var i = grd_ordexchdrug.row - 1; i >= grd_ordexchdrug.fixedRows; i--) {
  429. if(model.getValue("/root/main/ordexchdruglist/prcpinfo["+ i +"]/delivestat") != "S") {
  430. var prcpqty = parseFloat(grd_ordexchdrug.labelmatrix(i, grd_ordexchdrug.colRef("prcpqty")));
  431. //grd_ordexchdrug.valuematrix(i, grd_ordexchdrug.colRef("deliveqty")) = prcpqty;
  432. grd_ordexchdrug.valuematrix(i, grd_ordexchdrug.colRef("deliveqty")) = parseFloat(0);
  433. grd_ordexchdrug.valuematrix(i, grd_ordexchdrug.colRef("spreqty")) = parseFloat(0);
  434. grd_ordexchdrug.addStatus(i, "insert");
  435. } else {
  436. grd_ordexchdrug.removeStatus(i, "insert");
  437. }
  438. }
  439. }
  440. //grd_ordexchdrug.refresh();
  441. ]]>
  442. </script>
  443. <script type="javascript" ev:event="xforms-value-changed">
  444. <![CDATA[
  445. /* grd_ordexchdrug.clearStatus();
  446. var deliqty = grd_ordexchdrug.labelmatrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("deliveqty"));
  447. alert(deliqty);
  448. alert(grd_ordexchdrug.rowStatus(grd_ordexchdrug.row));
  449. if(grd_ordexchdrug.col == grd_ordexchdrug.colRef("deliveqty")) {
  450. if(model.getValue("/root/main/ordexchdruglist/prcpinfo["+ grd_ordexchdrug.row +"]/delivestat") != "S" &&
  451. model.getValue("/root/main/ordexchdruglist/prcpinfo["+ grd_ordexchdrug.row +"]/deliveqty") != "") {
  452. var std =model.getValue("/root/temp/druginfo/druginfo/sumtodeliveqty");
  453. var spreqty = parseFloat(grd_ordexchdrug.labelmatrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("acmlqty"))) -
  454. parseFloat(grd_ordexchdrug.labelmatrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("deliveqty")) * std );
  455. if(spreqty < 0) {
  456. grd_ordexchdrug.valuematrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("spreqty")) = 0;
  457. } else {
  458. grd_ordexchdrug.valuematrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("spreqty")) = spreqty;
  459. }
  460. grd_ordexchdrug.addStatus(grd_ordexchdrug.row, "insert");
  461. } else if(model.getValue("/root/main/ordexchdruglist/prcpinfo["+ grd_ordexchdrug.row +"]/delivestat") != "S" &&
  462. grd_ordexchdrug.rowStatus(grd_ordexchdrug.row) == "3"){
  463. var std =model.getValue("/root/temp/druginfo/druginfo/sumtodeliveqty");
  464. //var spreqty = parseFloat(grd_ordexchdrug.labelmatrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("acmlqty"))) -
  465. // parseFloat(grd_ordexchdrug.labelmatrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("deliveqty")) * std );
  466. var spreqty = parseFloat(grd_ordexchdrug.labelmatrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("acmlqty"))) -
  467. parseFloat(deliqty * std );
  468. if(spreqty < 0) {
  469. grd_ordexchdrug.valuematrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("spreqty")) = 0;
  470. } else {
  471. grd_ordexchdrug.valuematrix(grd_ordexchdrug.row, grd_ordexchdrug.colRef("spreqty")) = spreqty;
  472. }
  473. grd_ordexchdrug.addStatus(grd_ordexchdrug.row, "insert");
  474. }else {
  475. grd_ordexchdrug.removeStatus(grd_ordexchdrug.row, "insert");
  476. }
  477. for(var i = grd_ordexchdrug.row - 1; i >= grd_ordexchdrug.fixedRows; i--) {
  478. if(model.getValue("/root/main/ordexchdruglist/prcpinfo["+ i +"]/delivestat") != "S") {
  479. var prcpqty = parseFloat(grd_ordexchdrug.labelmatrix(i, grd_ordexchdrug.colRef("prcpqty")));
  480. //grd_ordexchdrug.valuematrix(i, grd_ordexchdrug.colRef("deliveqty")) = prcpqty;
  481. grd_ordexchdrug.valuematrix(i, grd_ordexchdrug.colRef("deliveqty")) = parseFloat(0);
  482. grd_ordexchdrug.valuematrix(i, grd_ordexchdrug.colRef("spreqty")) = parseFloat(0);
  483. grd_ordexchdrug.addStatus(i, "insert");
  484. } else {
  485. grd_ordexchdrug.removeStatus(i, "insert");
  486. }
  487. }
  488. }
  489. grd_ordexchdrug.refresh();*/
  490. ]]>
  491. </script>
  492. </datagrid>
  493. <input id="input7" ref="/root/send/srchdata/srchtodd" class="input_default" inputtype="date" style="left:581px; top:52px; width:90px; height:19px; ">
  494. <script type="javascript" ev:event="xforms-value-changed">
  495. <![CDATA[
  496. //submit("TRADT10324");
  497. ]]>
  498. </script>
  499. </input>
  500. <caption id="caption10" style="left:568px; top:53px; width:15px; height:20px; vertical-align:middle; ">~</caption>
  501. <input id="input6" ref="/root/send/srchdata/srchfromdd" class="input_default" inputtype="date" style="left:478px; top:52px; width:90px; height:19px; ">
  502. <script type="javascript" ev:event="xforms-value-changed">
  503. <![CDATA[
  504. //submit("TRADT10324");
  505. ]]>
  506. </script>
  507. </input>
  508. <button id="button5" class="btn1_letter2" style="left:680px; top:50px; width:56px; height:22px; ">
  509. <caption>조회</caption>
  510. <script type="javascript" ev:event="DOMActivate">
  511. <![CDATA[
  512. if(fSelDeptchk()){
  513. model.setValue("/root/send/srchdata/srchprcpcd", model.getValue("/root/send/srchdata/srcdrugcd"));
  514. model.setValue("/root/send/srchdata/srchorddeptcd", model.getValue("/root/send/srchdata/srchdeptcd"));
  515. model.setValue("/root/send/srchdata/srchorddeptflag", model.getValue("/root/send/srchdata/deptflag"));
  516. if(submit("TRADB00602")) {
  517. for (var i=1; i<grd_ordexchdrug.rows; i++) {
  518. grd_ordexchdrug.cellStyle("background-color", i, grd_ordexchdrug.colRef("deliveqty")) = "#ccff66";
  519. }
  520. }
  521. model.refresh();
  522. }else{
  523. messageBox("부서를","C002");
  524. }
  525. ]]>
  526. </script>
  527. </button>
  528. <button id="btn_sum" class="btn4_letter2" _auth="X" style="left:995px; top:50px; width:56px; height:22px; ">
  529. <caption>저장</caption>
  530. <script type="javascript" ev:event="DOMActivate">
  531. <![CDATA[
  532. btn_sum.disabled =true;
  533. var lastrow = "";
  534. for(var i = grd_ordexchdrug.fixedRows ; i < grd_ordexchdrug.rows; i++ ) {
  535. if(grd_ordexchdrug.rowStatus(i) == "3" ||grd_ordexchdrug.rowStatus(i) == "1" ) {
  536. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ i +"]/delivedt", getCurrentDate()+ getCurrentTime());
  537. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ i +"]/delivedeptcd",model.getValue("/root/send/srchdata/srchdeptcd"));
  538. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ i +"]/delivestat","S"); // 집계
  539. model.setValue("/root/main/ordexchdruglist/prcpinfo["+ i +"]/stocdeptcd", model.getValue("/root/send/srchdata/stocdeptcd"));
  540. lastrow = i;
  541. }
  542. }
  543. //model.makeNode("/root/main/ordexchdruglist/prcpinfo["+ lastrow +"]");
  544. //fMakeDeliveData(lastrow); // 불출데이터 만듬
  545. model.refresh();
  546. if ( messageBox("약품 불출을 ","Q004")==6 ) {
  547. if(fSelDeptchk()){
  548. //model.removeNodeset("/root/send/deptdata/deptinfo");
  549. model.setValue("/root/send/req/reqexchdrug", grd_ordexchdrug.getUpdateData());
  550. submit("TXADB00602");
  551. }else{
  552. messageBox("불출할 부서를","C002");
  553. }
  554. }
  555. model.refresh();
  556. btn_sum.disabled =false;
  557. ]]>
  558. </script>
  559. </button>
  560. <button id="button6" class="btn2_letter3" style="left:1130px; top:55px; width:53px; height:19px; ">
  561. <caption>행삭제</caption>
  562. <script type="javascript" ev:event="DOMActivate">
  563. <![CDATA[
  564. if(model.getValue("/root/main/ordexchdruglist/prcpinfo["+ grd_ordexchdrug.row +"]/delivestat") == "S") {
  565. messageBox("출고시킨 약품을 행삭제", "E001");
  566. return;
  567. } else {
  568. //grd_ordexchdrug.addStatus(grd_ordexchdrug.row,"delete");
  569. grd_ordexchdrug.deleteRow(grd_ordexchdrug.row, true);
  570. }
  571. ]]>
  572. </script>
  573. </button>
  574. <button id="button7" class="btn2_letter3" style="left:1075px; top:55px; width:53px; height:19px; ">
  575. <caption>행추가</caption>
  576. <script type="javascript" ev:event="DOMActivate">
  577. <![CDATA[
  578. grd_ordexchdrug.addItem();
  579. var lastRow = grd_ordexchdrug.rows - grd_ordexchdrug.fixedRows;
  580. fMakeDeliveData(lastRow);
  581. ]]>
  582. </script>
  583. </button>
  584. <button id="btn_excel" class="btn6_letter2" style="left:17px; top:50px; width:92px; height:22px; ">
  585. <caption>엑셀</caption>
  586. <script type="javascript" ev:event="DOMActivate">
  587. <![CDATA[
  588. var fileName = window.fileDialog("save", ",", false, "교환약집계내역", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  589. if (fileName != ""){
  590. grd_ordexchdrug.saveExcel(fileName, "SheetName", false, false, "", "", false);
  591. }
  592. ]]>
  593. </script>
  594. </button>
  595. <button id="btn_prnt" class="btn6_letter2" style="left:75px; top:50px; width:56px; height:22px; ">
  596. <caption>출력</caption>
  597. <script type="javascript" ev:event="DOMActivate">
  598. <![CDATA[
  599. if(submit("TRADB00606")) {
  600. if(getNodesetCount("/root/hidden/prntdruglist/prntdruglist") > 0){
  601. exeReportPreview("RPADB00600", "XMLSTR", "", "", "true","","","","","true");
  602. }
  603. }
  604. ]]>
  605. </script>
  606. </button>
  607. <caption id="caption8" class="search_name" style="left:325px; top:52px; width:150px; height:17px; ">적용일자(실시일자) :</caption>
  608. <select1 id="combo1" ref="/root/send/srchdata/stocdeptcd" appearance="minimal" style="left:865px; top:52px; width:121px; height:19px; ">
  609. <choices>
  610. <itemset nodeset="/root/init/misdeptlist/deptlist">
  611. <label ref="deptnm"/>
  612. <value ref="deptcd"/>
  613. </itemset>
  614. </choices>
  615. <script type="javascript" ev:event="xforms-value-changed">
  616. <![CDATA[
  617. if(chk_cnt != 0) {
  618. var ret = messageBox("약품출고부서를 " + combo1.label +"으로 ", "S001");
  619. if(ret == "6") {
  620. model.setValue("/root/temp/stocdeptcd", combo1.value);
  621. } else {
  622. model.setValue("/root/hidden/prcpsrch/stocdeptcd", model.getValue("/root/temp/stocdeptcd"));
  623. }
  624. chk_cnt ++;
  625. combo1.refresh();
  626. }
  627. ]]>
  628. </script>
  629. </select1>
  630. <caption id="caption9" style="left:797px; top:52px; width:69px; height:20px; font-weight:bold; color:#ff0000; ">실출고부서</caption>
  631. <button id="button11" class="btn3_letter6" navindex="18" visibility="visible" style="left:140px; top:50px; width:104px; height:22px; ">
  632. <caption>마감시간관리</caption>
  633. <script type="javascript" ev:event="DOMActivate">
  634. <![CDATA[
  635. modal("SPADT64100");
  636. ]]>
  637. </script>
  638. </button>
  639. </case>
  640. </switch>
  641. <group id="group2" style="left:0px; top:8px; width:845px; height:35px; ">
  642. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:845px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  643. <caption id="caption1" class="search_name" style="left:255px; top:8px; width:86px; height:17px; ">부 서 :</caption>
  644. <caption id="caption3" class="search_name" style="left:12px; top:8px; width:86px; height:17px; ">약품코드 :</caption>
  645. <input id="ipt_drugcd" ref="/root/send/srchdata/srcdrugcd" class="input_search" visibility="hidden" style="left:35px; top:5px; width:10px; height:19px; ">
  646. <script type="javascript" ev:event="onkeypress">
  647. <![CDATA[
  648. if(event.keyCode == 13) {
  649. model.setValue("/root/send/srchdata/srcdrugcd", ipt_drugcd.currentText);
  650. ipt_drugcd.refresh();
  651. button9.dispatch("DOMActivate");
  652. }
  653. ]]>
  654. </script>
  655. </input>
  656. <button id="btn_drug" class="icon_search" visibility="hidden" style="left:205px; top:10px; width:16px; height:16px; ">
  657. <script type="javascript" ev:event="DOMActivate">
  658. <![CDATA[
  659. model.setValue("/root/temp/receivedata/receiveref", model.getValue("/root/hidden/receivedrugcd"));
  660. model.setValue("/root/temp/receivedata/srchflag", "");
  661. model.setValue("/root/temp/receivedata/srchcnts", "");
  662. model.setValue("/root/temp/receivedata/drugkind","");
  663. modal("SPADB60100",0,100,150,"SPADB60100","/root/temp/receivedata","/root/temp/receivedata");
  664. if ( model.getValue("/root/hidden/drugcd") ==""){
  665. return;
  666. }
  667. model.setValue("/root/send/srchdata/srcdrugcd", model.getValue("/root/hidden/drugcd") );
  668. model.setValue("/root/send/delivedata/drugcd", model.getValue("/root/hidden/drugcd") );
  669. ipt_drugcd.refresh();
  670. ]]>
  671. </script>
  672. <caption/>
  673. </button>
  674. <select id="chk_deptflag" ref="/root/send/srchdata/deptflag" class="checkbox_search" visibility="hidden" overflow="visible" appearance="full" cols="8" style="left:225px; top:10px; width:30px; height:20px; border-style:none; ">
  675. <choices>
  676. <item>
  677. <label>병동</label>
  678. <value>W</value>
  679. </item>
  680. <item>
  681. <label>응급실</label>
  682. <value>E</value>
  683. </item>
  684. <item>
  685. <label>수술실</label>
  686. <value>O</value>
  687. </item>
  688. <item>
  689. <label>주사실</label>
  690. <value>J</value>
  691. </item>
  692. <item>
  693. <label>집계부서</label>
  694. <value>X</value>
  695. </item>
  696. <item>
  697. <label>진료부서</label>
  698. <value>D</value>
  699. </item>
  700. <item>
  701. <label>복막투석실</label>
  702. <value>A</value>
  703. </item>
  704. <item>
  705. <label>건진</label>
  706. <value>S</value>
  707. </item>
  708. </choices>
  709. <script type="javascript" ev:event="xforms-select">
  710. <![CDATA[
  711. //fSelDeptflag();
  712. // 진료과
  713. rdo_deptcd.visible=true;
  714. var deptflag = model.getValue("/root/send/srchdata/deptflag");
  715. if(deptflag != ""){
  716. submit("TRADT10321");
  717. var srchdeptcd = model.getValue("/root/send/srchdata/srchdeptcd");
  718. var tmp_deptflag = deptflag.split(" ");
  719. model.refresh();
  720. }
  721. ]]>
  722. </script>
  723. <script type="javascript" ev:event="xforms-deselect">
  724. <![CDATA[
  725. // 진료과
  726. rdo_deptcd.visible=true;
  727. var deptflag = model.getValue("/root/send/srchdata/deptflag");
  728. if(deptflag != ""){
  729. if (deptflag.indexOf("W") >-1 ){
  730. rdo_deptcd.visible=true;
  731. } else {
  732. rdo_deptcd.visible=false;
  733. }
  734. submit("TRADT10321");
  735. // 체크박스 해제한 항목을 조회조건에서 제외 - 그외 기존 체크항목 유지
  736. var srchdeptcd = "";
  737. var tmp_srchdeptcd = model.getValue("/root/send/srchdata/srchdeptcd").split("|"); //기존 선택한 [상세부서]목록 설정
  738. for(var i = 1; i <= getNodesetCount("/root/init/orddept/dept"); i++){ // 새로조회된 [상세부서]목록만큼.. * 인스턴스배열은 1부터..
  739. if(isSearchString(deptflag, model.getValue("/root/init/orddept/dept["+i+"]/orddeptflag"))){ // 새로 조회된 부서 중 이전 선택한 항목에 대해서만.. [부서구분]으로 비교
  740. for(j = 0; j < tmp_srchdeptcd.length; j++){
  741. if(model.getValue("/root/init/orddept/dept["+i+"]/deptcd") == tmp_srchdeptcd[j]){ // 신/구 [상세부서] 비교
  742. srchdeptcd += tmp_srchdeptcd[j]+"|";
  743. //if(i != (getNodesetCount("/root/init/orddept/dept")+1)) srchdeptcd += "|"; // 가장 마지막은 구분자 삽입하지 않음.
  744. }
  745. model.setValue("/root/init/orddept/dept["+i+"]/chk", "Y");
  746. }
  747. }
  748. }
  749. srchdeptcd = srchdeptcd.substr(0,parseInt(srchdeptcd.length)-1); // 마지막 구분자는 삭제
  750. model.setValue("/root/send/srchdata/srchdeptcd", srchdeptcd);
  751. gv_deptflag = deptflag; // 이전 선택된 부서구분을 위한 비교변수 설정
  752. }else{
  753. // 선택한 대상부서가 없을시 부서 조회조건 초기화
  754. model.resetInstanceNode("/root/init/orddept/dept");
  755. model.setValue("/root/send/srchdata/srchdeptcd", "");
  756. gv_deptflag = "";
  757. }
  758. model.refresh();
  759. ]]>
  760. </script>
  761. <script type="javascript" ev:event="onmouseover">
  762. <![CDATA[
  763. rdo_deptcd.visible=true;
  764. ]]>
  765. </script>
  766. </select>
  767. <select1 id="radio1" ref="/root/send/srchdata/deptflag" class="checkbox_search" appearance="full" cols="8" overflow="visible" style="left:335px; top:7px; width:500px; height:20px; border-style:none; ">
  768. <choices>
  769. <item>
  770. <label>병동</label>
  771. <value>W</value>
  772. </item>
  773. <item>
  774. <label>응급실</label>
  775. <value>E</value>
  776. </item>
  777. <item>
  778. <label>수술실</label>
  779. <value>O</value>
  780. </item>
  781. <item>
  782. <label>주사실</label>
  783. <value>J</value>
  784. </item>
  785. <item>
  786. <label>집계부서</label>
  787. <value>X</value>
  788. </item>
  789. <item>
  790. <label>진료부서</label>
  791. <value>D</value>
  792. </item>
  793. <item>
  794. <label>복막투석실</label>
  795. <value>A</value>
  796. </item>
  797. <item>
  798. <label>건진</label>
  799. <value>S</value>
  800. </item>
  801. </choices>
  802. <script type="javascript" ev:event="xforms-select">
  803. <![CDATA[
  804. // 진료과
  805. rdo_deptcd.visible=true;
  806. var deptflag = model.getValue("/root/send/srchdata/deptflag");
  807. if(deptflag != ""){
  808. submit("TRADT10321");
  809. model.setValue("/root/send/delivedata/orddeptnm", radio1.label);
  810. model.refresh();
  811. }
  812. ]]>
  813. </script>
  814. <script type="javascript" ev:event="onmouseover">
  815. <![CDATA[
  816. rdo_deptcd.visible = true;
  817. ]]>
  818. </script>
  819. <script type="javascript" ev:event="xforms-value-changed">
  820. <![CDATA[
  821. model.setValue("/root/send/delivedata/orddeptnm", radio1.label);
  822. output3.refresh();
  823. ]]>
  824. </script>
  825. </select1>
  826. <button id="button9" visibility="hidden" style="left:5px; top:5px; width:25px; height:20px; ">
  827. <caption>button9</caption>
  828. <script type="javascript" ev:event="DOMActivate">
  829. <![CDATA[
  830. if(submit("TRADB00603")) {
  831. if(model.getValue("/root/temp/druginfo/druginfo/drugcd") != "") {
  832. model.setValue("/root/send/delivedata/drugcd", model.getValue("/root/temp/druginfo/druginfo/drugcd"));
  833. model.setValue("/root/send/delivedata/drugnm", model.getValue("/root/temp/druginfo/druginfo/drugnm"));
  834. model.setValue("/root/send/srchdata/deliveddrugcd", model.getValue("/root/temp/druginfo/druginfo/delivedrugcd"));
  835. output1.refresh();
  836. output2.refresh();
  837. } else {
  838. model.setValue("/root/send/srchdata/srcdrugcd", "");
  839. }
  840. }
  841. ]]>
  842. </script>
  843. </button>
  844. <select1 id="combo2" ref="/root/send/srchdata/srcdrugcd" appearance="minimal" style="left:100px; top:7px; width:125px; height:19px; ">
  845. <choices>
  846. <itemset nodeset="/root/init/exchdruglist/druglist">
  847. <label ref="drugcd"/>
  848. <value ref="drugcd"/>
  849. </itemset>
  850. </choices>
  851. <script type="javascript" ev:event="xforms-select">
  852. <![CDATA[
  853. model.setValue("/root/send/srchdata/srcdrugcd", combo2.value);
  854. combo2.refresh();
  855. button9.dispatch("DOMActivate");
  856. button5.dispatch("DOMActivate");
  857. ]]>
  858. </script>
  859. </select1>
  860. <input id="input1" ref="/root/send/srchdata/deliveddrugcd" visibility="hidden" style="left:230px; top:5px; width:40px; height:19px; "/>
  861. </group>
  862. <button id="button66" class="btn_sw" group="tab" selected="false" style="left:0px; top:50px; width:60px; height:22px; ">
  863. <caption>기본정보</caption>
  864. <toggle case="case1" ev:event="onclick"/>
  865. </button>
  866. <select1 id="rdo_deptcd" ref="/root/send/srchdata/srchdeptcd" visibility="visible" appearance="full" cols="4" overflow="visible" sep="|" style="left:335px; top:34px; width:100px; height:20px; background-color:#f8f8f8; border-style:none; ">
  867. <choices>
  868. <itemset nodeset="/root/init/orddept/dept">
  869. <label ref="depthngnm"/>
  870. <value ref="deptcd"/>
  871. </itemset>
  872. </choices>
  873. <script type="javascript" ev:event="onmouseover">
  874. <![CDATA[
  875. rdo_deptcd.visible = true;
  876. ]]>
  877. </script>
  878. <script type="javascript" ev:event="onmouseout">
  879. <![CDATA[
  880. rdo_deptcd.visible = false;
  881. ]]>
  882. </script>
  883. <script type="javascript" ev:event="xforms-value-changed">
  884. <![CDATA[
  885. if(rdo_deptcd.value != "") {
  886. button5.dispatch("DOMActivate");
  887. var ordIdx = model.getValue("/root/send/delivedata/orddeptnm").indexOf("|");
  888. if(ordIdx > -1) {
  889. var ordStr =model.getValue("/root/send/delivedata/orddeptnm").substr(0, ordIdx) + "| " + rdo_deptcd.label;
  890. model.setValue("/root/send/delivedata/orddeptnm", ordStr);
  891. output3.refresh();
  892. } else {
  893. model.setValue("/root/send/delivedata/orddeptnm", model.getValue("/root/send/delivedata/orddeptnm") + " | " + rdo_deptcd.label);
  894. output3.refresh();
  895. }
  896. }
  897. ]]>
  898. </script>
  899. </select1>
  900. </group>
  901. </xhtml:body>
  902. </xhtml:html>