SMADT30700_마약향정재고관리.xrw 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  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. <srchcond>
  11. <narclist>
  12. <narccd/>
  13. <narcnm/>
  14. <goodspec/>
  15. <specunit/>
  16. <suplplce/>
  17. <brngfwrdqty/>
  18. <winqty/>
  19. <custnm/>
  20. </narclist>
  21. </srchcond>
  22. <prcplist>
  23. <item>
  24. <sel/>
  25. <prcpdd/>
  26. <pid/>
  27. <hngnm/>
  28. <sex/>
  29. <age/>
  30. <addr/>
  31. <diagcd/>
  32. <sympnm/>
  33. <ordqty/>
  34. <deliveqty/>
  35. <etccau/>
  36. <stocqty/>
  37. <seqno/>
  38. <narccd/>
  39. <narcnm/>
  40. <goodspec/>
  41. <specunit/>
  42. <custnm/>
  43. <brngfwrdqty/>
  44. <winqty/>
  45. </item>
  46. </prcplist>
  47. <printlist>
  48. <item>
  49. <narccd/>
  50. <narcnm/>
  51. <deliveqty/>
  52. <returnqty/>
  53. <bfstocqty/>
  54. <winqty/>
  55. </item>
  56. </printlist>
  57. <patinfo>
  58. <patinfolist/>
  59. </patinfo>
  60. <datacheck>
  61. <datachk>
  62. <yn/>
  63. </datachk>
  64. </datacheck>
  65. </main>
  66. <send>
  67. <srchdata>
  68. <narcflag>M H</narcflag>
  69. <enddd/>
  70. <m_drugkind>N','Y M</m_drugkind>
  71. <h_drugkind>N','Y M</h_drugkind>
  72. <viewopt/>
  73. <narcflagall>A</narcflagall>
  74. <stocdeptcd/>
  75. <stocdeptcdnm/>
  76. <ioflag/>
  77. <drugcd/>
  78. <preview/>
  79. <endflag/>
  80. </srchdata>
  81. <data>
  82. <narcstocdata/>
  83. <print1>
  84. <item>
  85. <sel/>
  86. <prcpdd/>
  87. <pid/>
  88. <hngnm/>
  89. <sex/>
  90. <age/>
  91. <addr/>
  92. <diagcd/>
  93. <sympnm/>
  94. <ordqty/>
  95. <deliveqty/>
  96. <etccau/>
  97. <stocqty/>
  98. <seqno/>
  99. <narccd/>
  100. <narcnm/>
  101. <goodspec/>
  102. <specunit/>
  103. <suplplce/>
  104. <brngfwrdqty/>
  105. <winqty/>
  106. </item>
  107. </print1>
  108. </data>
  109. </send>
  110. <init>
  111. <deptlist>
  112. <ward>
  113. <wardcd/>
  114. <wardnm/>
  115. </ward>
  116. </deptlist>
  117. </init>
  118. <hidden>
  119. <ret/>
  120. <chk_ok/>
  121. </hidden>
  122. </root>
  123. </instance>
  124. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  125. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  126. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  127. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  128. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  129. <script type="javascript" ev:event="xforms-ready">
  130. <![CDATA[
  131. model.setValue("/root/send/srchdata/enddd", getCurrentDate());
  132. model.refresh();
  133. //submit("TRADT30701");
  134. // 출고부서 조회, 설정
  135. submit("TRADT01106");
  136. if(combo2.length == 1) {
  137. combo2.select(0);
  138. }else if(combo2.length > 1) {
  139. astfAddCombo("/root/init/misdeptlist", "deptlist","deptcd,deptnm", "T,전체(조회용)");
  140. combo2.value = "T";
  141. }
  142. combo2.dispatch("xforms-value-changed");
  143. ]]>
  144. </script>
  145. <submission id="TRADT30701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/srchcond"/>
  146. <submission id="TXADT30701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/hidden/ret"/>
  147. <!-- 출고부서조회-->
  148. <submission id="TRADT01106" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init/misdeptlist"/>
  149. <!-- 마약이면서 향정수불을 체크-->
  150. <submission id="TRADT30310" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/datacheck"/>
  151. <submission id="TRADT30302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" replace="instance" resultref="/root/main/prcplist"/>
  152. </model>
  153. <script type="javascript">
  154. <![CDATA[
  155. function stocdeptcdchg() {
  156. var dept = model.getValue("/root/send/srchdata/stocdeptcd");
  157. if (dept == "T") {
  158. grd_druglist.colhidden(grd_druglist.colRef("brngfwrdqty")) = true;
  159. grd_druglist.colhidden(grd_druglist.colRef("winqty")) = true;
  160. grd_druglist.colhidden(grd_druglist.colRef("deliveqty")) = true;
  161. grd_druglist.colhidden(grd_druglist.colRef("stocqty")) = true;
  162. grd_druglist.colhidden(grd_druglist.colRef("totbrngfwrdqty")) = false;
  163. grd_druglist.colhidden(grd_druglist.colRef("totwinqty")) = false;
  164. grd_druglist.colhidden(grd_druglist.colRef("totdeliveqty")) = false;
  165. grd_druglist.colhidden(grd_druglist.colRef("totstocqty")) = false;
  166. grd_druglist.colhidden(grd_druglist.colRef("inbrngfwrdqty")) = false;
  167. grd_druglist.colhidden(grd_druglist.colRef("inwinqty")) = false;
  168. grd_druglist.colhidden(grd_druglist.colRef("indeliveqty")) = false;
  169. grd_druglist.colhidden(grd_druglist.colRef("instocqty")) = false;
  170. grd_druglist.colhidden(grd_druglist.colRef("outbrngfwrdqty")) = false;
  171. grd_druglist.colhidden(grd_druglist.colRef("outwinqty")) = false;
  172. grd_druglist.colhidden(grd_druglist.colRef("outdeliveqty")) = false;
  173. grd_druglist.colhidden(grd_druglist.colRef("outstocqty")) = false;
  174. } else {
  175. grd_druglist.colhidden(grd_druglist.colRef("brngfwrdqty")) = false;
  176. grd_druglist.colhidden(grd_druglist.colRef("winqty")) = false;
  177. grd_druglist.colhidden(grd_druglist.colRef("deliveqty")) = false;
  178. grd_druglist.colhidden(grd_druglist.colRef("stocqty")) = false;
  179. grd_druglist.colhidden(grd_druglist.colRef("totbrngfwrdqty")) = true;
  180. grd_druglist.colhidden(grd_druglist.colRef("totwinqty")) = true;
  181. grd_druglist.colhidden(grd_druglist.colRef("totdeliveqty")) = true;
  182. grd_druglist.colhidden(grd_druglist.colRef("totstocqty")) =true;
  183. grd_druglist.colhidden(grd_druglist.colRef("inbrngfwrdqty")) = true;
  184. grd_druglist.colhidden(grd_druglist.colRef("inwinqty")) = true;
  185. grd_druglist.colhidden(grd_druglist.colRef("indeliveqty")) = true;
  186. grd_druglist.colhidden(grd_druglist.colRef("instocqty")) = true;
  187. grd_druglist.colhidden(grd_druglist.colRef("outbrngfwrdqty")) = true;
  188. grd_druglist.colhidden(grd_druglist.colRef("outwinqty")) = true;
  189. grd_druglist.colhidden(grd_druglist.colRef("outdeliveqty")) = true;
  190. grd_druglist.colhidden(grd_druglist.colRef("outstocqty")) = true;
  191. }
  192. }
  193. //수불대장 출력시 전체 약품에 대한 내역을 출력하기위해 약품별 출고내역 조회
  194. function fPrint1() {
  195. var cnt = 1;
  196. var numflag = 'N';
  197. model.setValue("/root/send/srchdata/ioflag", "");
  198. model.removeNodeset("/root/send/data/print1/item");
  199. model.removeNodeset("/root/main/prcplist/item");
  200. if (model.getValue("/root/hidden/chk_ok") == "Y") { // 전체 출력 유무
  201. numflag = "Y";
  202. }
  203. for (var i = 1; i <= grd_druglist.rows-1; i++) {
  204. //마약이면서 향정수불을 체크한다.
  205. model.setValue("/root/send/srchdata/drugcd", model.getValue("/root/main/srchcond/narclist["+i+"]/drugcd"));
  206. submit("TRADT30310", false);
  207. var dataChk = model.getValue("/root/main/datacheck/datachk/yn");
  208. if (dataChk != "Y") {
  209. continue;
  210. }
  211. // 입출 내역 조회
  212. model.setValue("/root/send/srchdata/drugcd", model.getValue("/root/main/srchcond/narclist["+i+"]/narccd"));
  213. submit("TRADT30302", false);
  214. if(getNodesetCount("/root/main/prcplist/item") < 2 && model.getValue("/root/main/prcplist/item[1]/pid") == "" && numflag == "N"){
  215. continue;
  216. }
  217. for ( var j = 1; j <= getNodesetCount("/root/main/prcplist/item") ; j++){
  218. model.makeNode("/root/send/data/print1/item["+cnt+"]");
  219. model.setValue("/root/main/prcplist/item["+j+"]/narccd", model.getValue("/root/main/srchcond/narclist["+i+"]/narccd"));
  220. model.setValue("/root/main/prcplist/item["+j+"]/narcnm", model.getValue("/root/main/srchcond/narclist["+i+"]/narcnm"));
  221. model.setValue("/root/main/prcplist/item["+j+"]/goodspec", model.getValue("/root/main/srchcond/narclist["+i+"]/goodspec"));
  222. model.setValue("/root/main/prcplist/item["+j+"]/specunit", model.getValue("/root/main/srchcond/narclist["+i+"]/specunit"));
  223. model.setValue("/root/main/prcplist/item["+j+"]/custnm", model.getValue("/root/main/srchcond/narclist["+i+"]/custnm"));
  224. model.makeValue("/root/main/prcplist/item["+j+"]/hospnm", model.getValue("/root/main/srchcond/narclist["+i+"]/hospnm"));
  225. model.makeValue("/root/main/prcplist/item["+j+"]/lncsno", model.getValue("/root/main/srchcond/narclist["+i+"]/lncsno"));
  226. model.makeValue("/root/main/prcplist/item["+j+"]/mngtrid", model.getValue("/root/main/srchcond/narclist["+i+"]/mngtrid"));
  227. //model.setValue("/root/main/prcplist/item["+j+"]/brngfwrdqty", model.getValue("/root/main/srchcond/narclist["+i+"]/brngfwrdqty"));
  228. //model.setValue("/root/main/prcplist/item["+j+"]/winqty", model.getValue("/root/main/srchcond/narclist["+i+"]/winqty"));
  229. model.copyNode("/root/send/data/print1/item["+cnt+"]", "/root/main/prcplist/item["+j+"]");
  230. cnt = cnt + 1;
  231. }
  232. model.removeNodeset("/root/send/data/print1/item["+cnt+"]");
  233. model.refresh();
  234. } // for
  235. } // function fPrint1
  236. ]]>
  237. </script>
  238. </xhtml:head>
  239. <xhtml:body pagewidth="1200" guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  240. <group id="group1" style="left:0px; top:0px; width:545px; height:13px; ">
  241. <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:185px; height:14px; ">마약향정재고관리</caption>
  242. </group>
  243. <group id="group3" scroll="auto" style="left:0px; top:20px; width:1183px; height:744px; ">
  244. <group id="group2" style="left:0px; top:0px; width:1180px; height:40px; ">
  245. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:3px; width:1175px; height:32px; background-color:#fffbf2; border-color:#ffd799; "/>
  246. <caption id="caption2" class="search_name" style="left:5px; top:10px; width:96px; height:17px; ">재고일자 :</caption>
  247. <button id="btn_sea" class="btn1_letter2" style="left:1110px; top:10px; width:56px; height:22px; ">
  248. <caption>조회</caption>
  249. <script type="javascript" ev:event="DOMActivate">
  250. <![CDATA[
  251. submit("TRADT30701");
  252. //submit("TRADT30302");
  253. stocdeptcdchg();
  254. ]]>
  255. </script>
  256. </button>
  257. <input id="input3" ref="/root/send/srchdata/enddd" class="input_search" inputtype="date" style="left:100px; top:10px; width:100px; height:19px; ">
  258. <script type="javascript" ev:event="xforms-value-changed">
  259. <![CDATA[
  260. submit("TRADT30701");
  261. stocdeptcdchg();
  262. ]]>
  263. </script>
  264. </input>
  265. <caption id="caption3" class="search_name" style="left:210px; top:11px; width:86px; height:17px; ">구분 :</caption>
  266. <select id="checkbox2" ref="/root/send/srchdata/narcflag" overflow="visible" appearance="full" cols="2" style="left:485px; top:10px; width:45px; height:20px; border-style:none; ">
  267. <choices>
  268. <item>
  269. <label>향정</label>
  270. <value>H</value>
  271. </item>
  272. </choices>
  273. <script type="javascript" ev:event="xforms-value-changed">
  274. <![CDATA[
  275. var h_drug = model.getValue("/root/send/srchdata/narcflag");
  276. if(isSearchString(h_drug, "H")) {
  277. model.setValue("/root/send/srchdata/h_drugkind", "N','Y M");
  278. } else {
  279. model.setValue("/root/send/srchdata/h_drugkind", "");
  280. }
  281. if(h_drug != "M H"){
  282. model.setValue("/root/send/srchdata/narcflagall", "");
  283. }
  284. model.refresh();
  285. ]]>
  286. </script>
  287. </select>
  288. <caption id="caption4" style="left:530px; top:10px; width:100px; height:20px; ">( )</caption>
  289. <select id="checkbox1" ref="/root/send/srchdata/narcflag" overflow="visible" appearance="full" cols="2" style="left:325px; top:10px; width:50px; height:20px; border-style:none; ">
  290. <choices>
  291. <item>
  292. <label>마약</label>
  293. <value>M</value>
  294. </item>
  295. </choices>
  296. <script type="javascript" ev:event="xforms-value-changed">
  297. <![CDATA[
  298. var m_drug = model.getValue("/root/send/srchdata/narcflag");
  299. if(isSearchString(m_drug, "M")) {
  300. model.setValue("/root/send/srchdata/m_drugkind", "N','Y M");
  301. } else {
  302. model.setValue("/root/send/srchdata/m_drugkind", "");
  303. }
  304. if(m_drug != "M H"){
  305. model.setValue("/root/send/srchdata/narcflagall", "");
  306. }
  307. model.refresh();
  308. ]]>
  309. </script>
  310. </select>
  311. <caption id="caption1" style="left:375px; top:10px; width:100px; height:20px; ">( )</caption>
  312. <select id="checkbox3" ref="/root/send/srchdata/m_drugkind" overflow="visible" appearance="full" cols="2" rows="1" style="left:385px; top:10px; width:100px; height:20px; border-style:none; ">
  313. <choices>
  314. <item>
  315. <label>약</label>
  316. <value>N','Y</value>
  317. </item>
  318. <item>
  319. <label>주사</label>
  320. <value>M</value>
  321. </item>
  322. </choices>
  323. <script type="javascript" ev:event="xforms-value-changed">
  324. <![CDATA[
  325. var m_drug = model.getValue("/root/send/srchdata/m_drugkind");
  326. if(m_drug == "" ) {
  327. var spcldrug = model.getValue("/root/send/srchdata/narcflag");
  328. model.setValue("/root/send/srchdata/narcflag", spcldrug.setReplaceWord("M", ""));
  329. } else {
  330. if(checkbox1.value == "" ) {
  331. var narcflag = model.getValue("/root/send/srchdata/narcflag");
  332. model.setValue("/root/send/srchdata/narcflag", narcflag + " M");
  333. }
  334. }
  335. model.refresh();
  336. ]]>
  337. </script>
  338. </select>
  339. <select id="checkbox5" ref="/root/send/srchdata/narcflagall" overflow="visible" appearance="full" cols="2" style="left:270px; top:10px; width:50px; height:20px; border-style:none; ">
  340. <choices>
  341. <item>
  342. <label>전체</label>
  343. <value>A</value>
  344. </item>
  345. </choices>
  346. <script type="javascript" ev:event="xforms-value-changed">
  347. <![CDATA[
  348. var allyn = model.getValue("/root/send/srchdata/narcflagall");
  349. if(allyn == "A") {
  350. model.setValue("/root/send/srchdata/narcflag", "M H");
  351. model.setValue("/root/send/srchdata/m_drugkind", "N','Y M");
  352. model.setValue("/root/send/srchdata/h_drugkind", "N','Y M");
  353. } else {
  354. model.setValue("/root/send/srchdata/narcflag", "");
  355. model.setValue("/root/send/srchdata/m_drugkind", "");
  356. model.setValue("/root/send/srchdata/h_drugkind", "");
  357. }
  358. model.refresh();
  359. ]]>
  360. </script>
  361. </select>
  362. <select id="checkbox4" ref="/root/send/srchdata/h_drugkind" overflow="visible" appearance="full" cols="2" rows="1" style="left:540px; top:10px; width:100px; height:20px; border-style:none; ">
  363. <choices>
  364. <item>
  365. <label>약</label>
  366. <value>N','Y</value>
  367. </item>
  368. <item>
  369. <label>주사</label>
  370. <value>M</value>
  371. </item>
  372. </choices>
  373. <script type="javascript" ev:event="xforms-value-changed">
  374. <![CDATA[
  375. var h_drug = model.getValue("/root/send/srchdata/h_drugkind");
  376. if(h_drug == "" ) {
  377. var spcldrug = model.getValue("/root/send/srchdata/narcflag");
  378. model.setValue("/root/send/srchdata/narcflag", spcldrug.setReplaceWord("H", ""));
  379. } else {
  380. if(checkbox2.value == "") {
  381. var narcflag = model.getValue("/root/send/srchdata/narcflag");
  382. model.setValue("/root/send/srchdata/narcflag", narcflag + " H");
  383. }
  384. }
  385. model.refresh();
  386. ]]>
  387. </script>
  388. </select>
  389. </group>
  390. <datagrid id="grd_druglist" nodeset="/root/main/srchcond/narclist" autoresize="false" backcoloralternate="#f0f0f0" caption="약품코드^약품명^단위^전일재고^전일재고^전일재고^전일재고^입고량^입고량^입고량^입고량^출고량^출고량^출고량^출고량^현재고^현재고^현재고^현재고^당월출고량합^caption1^caption2^caption3|약품코드^약품명^단위^전일재고^총재고^병동^외래^입고량^총입고^병동^외래^출고량^총출고^병동^외래^현재고^총재고^병동^외래^당월출고량합^caption1^caption2^caption3" colsep="^" colwidth="92, 182, 43, 100, 70, 70, 70, 100, 70, 70, 70, 100, 70, 70, 70, 100, 70, 70, 70, 70, 100, 100, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:65px; width:1175px; height:675px; ">
  391. <col ref="narccd"/>
  392. <col ref="narcnm"/>
  393. <col ref="packunit"/>
  394. <col ref="brngfwrdqty" type="input" format="####.99" maxlength="11" style="text-align:right; "/>
  395. <col ref="totbrngfwrdqty" type="input" visibility="hidden" format="####.99" maxlength="11" style="text-align:right; "/>
  396. <col ref="inbrngfwrdqty" type="input" visibility="hidden" format="####.99" maxlength="11" style="text-align:right; "/>
  397. <col ref="outbrngfwrdqty" type="input" visibility="hidden" format="####.99" maxlength="11" style="text-align:right; "/>
  398. <col ref="winqty" format="####.99" maxlength="11" style="text-align:right; "/>
  399. <col ref="totwinqty" visibility="hidden" format="####.99" maxlength="11" style="text-align:right; "/>
  400. <col ref="inwinqty" visibility="hidden" format="####.99" maxlength="11" style="text-align:right; "/>
  401. <col ref="outwinqty" visibility="hidden" format="####.99" maxlength="11" style="text-align:right; "/>
  402. <col ref="deliveqty" format="####.99" maxlength="11" style="text-align:right; "/>
  403. <col ref="totdeliveqty" visibility="hidden" format="####.99" maxlength="11" style="text-align:right; "/>
  404. <col ref="indeliveqty" visibility="hidden" format="####.99" maxlength="11" style="text-align:right; "/>
  405. <col ref="outdeliveqty" visibility="hidden" format="####.99" maxlength="11" style="text-align:right; "/>
  406. <col ref="stocqty" format="####.99" maxlength="11" style="text-align:right; "/>
  407. <col ref="totstocqty" visibility="hidden" format="####.99" maxlength="11" style="text-align:right; "/>
  408. <col ref="instocqty" visibility="hidden" format="####.99" maxlength="11" style="text-align:right; "/>
  409. <col ref="outstocqty" visibility="hidden" format="####.99" maxlength="11" style="text-align:right; "/>
  410. <col ref="mnthsum" format="####.99" maxlength="11" style="text-align:right; "/>
  411. <col ref="alldeptcd" visibility="hidden"/>
  412. <col ref="indeptcd" visibility="hidden"/>
  413. <col ref="outdeptcd" visibility="hidden"/>
  414. <script type="javascript" ev:event="onendedit">
  415. <![CDATA[
  416. var ivalue = parseFloat(grd_druglist.labelMatrix(grd_druglist.row, grd_druglist.colRef("inbrngfwrdqty")));
  417. var ovalue = parseFloat(grd_druglist.labelMatrix(grd_druglist.row, grd_druglist.colRef("outbrngfwrdqty")));
  418. var total = ivalue + ovalue;
  419. if(total > 0) {
  420. grd_druglist.valueMatrix(grd_druglist.row, grd_druglist.colRef("brngfwrdqty")) = total;
  421. }
  422. ]]>
  423. </script>
  424. </datagrid>
  425. <button id="btn_save" class="btn4_letter2" style="left:1110px; top:40px; width:56px; height:22px; ">
  426. <caption>저장</caption>
  427. <script type="javascript" ev:event="DOMActivate">
  428. <![CDATA[
  429. model.setValue("/root/send/data/narcstocdata", grd_druglist.getUpdateData());
  430. if(submit("TXADT30701")) {
  431. submit("TRADT30701");
  432. stocdeptcdchg();
  433. }
  434. ]]>
  435. </script>
  436. </button>
  437. <button id="btn_excel" class="btn2_letter4" style="left:66px; top:42px; width:64px; height:19px; ">
  438. <caption>엑셀저장</caption>
  439. <script type="javascript" ev:event="DOMActivate">
  440. <![CDATA[
  441. if (grd_druglist.rows>2) {
  442. var fileName = window.fileDialog("save", ",", false, "마약향정재고관리"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  443. if (fileName != "")
  444. {
  445. grd_druglist.saveExcel(fileName);
  446. }
  447. }
  448. ]]>
  449. </script>
  450. </button>
  451. <button id="btn_print" class="btn6_letter2" style="left:5px; top:40px; width:80px; height:22px; ">
  452. <caption>출력</caption>
  453. <script type="javascript" ev:event="DOMActivate">
  454. <![CDATA[
  455. model.setValue("/root/send/srchdata/stocdeptcdnm", combo2.label);
  456. if( grd_druglist.rows != 0){
  457. exeReportPreview("RPADT30700", "XMLSTR", "", "", "false","","","","","false");
  458. }
  459. ]]>
  460. </script>
  461. </button>
  462. <caption id="caption10" class="search_name" style="left:646px; top:10px; width:104px; height:17px; font-weight:bold; color:#ff0000; ">실출고부서 :</caption>
  463. <select1 id="combo2" ref="/root/send/srchdata/stocdeptcd" appearance="minimal" style="left:750px; top:10px; width:131px; height:19px; ">
  464. <choices>
  465. <itemset nodeset="/root/init/misdeptlist/deptlist">
  466. <label ref="deptnm"/>
  467. <value ref="deptcd"/>
  468. </itemset>
  469. </choices>
  470. <script type="javascript" ev:event="xforms-value-changed">
  471. <![CDATA[
  472. ]]>
  473. </script>
  474. </select1>
  475. <button id="button17" class="btn6_letter8" style="left:135px; top:40px; width:120px; height:22px; ">
  476. <caption>마약수불대장출력</caption>
  477. <script type="javascript" ev:event="DOMActivate">
  478. <![CDATA[
  479. var ioflag = model.getValue("/root/send/srchdata/ioflag");
  480. model.makeValue("/root/send/srchdata/stocyn", "");
  481. model.setValue("/root/send/srchdata/endflag", "A");
  482. model.makeValue("/root/send/srchdata/stocprntyn", "Y");
  483. model.makeValue("/root/send/srchdata/usernm", getUserName());
  484. fPrint1(); //수불대장 조회
  485. if (checkbox6.value == 1) { //미리보기가 체크된 경우
  486. exeReportPreview("RPADT30302", "XMLSTR", "RPADT30302", "", "false","","","","","false", "", "");
  487. } else {
  488. exeReportPreview("RPADT30302", "XMLSTR", "RPADT30302", "", "true","","","","","true", "", "");
  489. }
  490. model.setValue("/root/send/srchdata/ioflag", ioflag);
  491. model.removeNodeset("/root/send/data/print1/item");
  492. model.removeNodeset("/root/main/prcplist/item");
  493. model.setValue("/root/send/srchdata/endflag", "");
  494. ]]>
  495. </script>
  496. </button>
  497. <select id="checkbox6" ref="/root/send/srchdata/preview" class="checkbox_search" overflow="visible" appearance="full" cols="2" rows="1" style="left:265px; top:45px; width:68px; height:14px; border-style:none; ">
  498. <choices>
  499. <item>
  500. <label>미리보기</label>
  501. <value>1</value>
  502. </item>
  503. </choices>
  504. </select>
  505. <select id="chk_ok" ref="/root/hidden/chk_ok" overflow="visible" appearance="full" style="left:345px; top:45px; width:70px; height:15px; border-style:none; ">
  506. <choices>
  507. <item>
  508. <label>전체</label>
  509. <value>Y</value>
  510. </item>
  511. </choices>
  512. </select>
  513. </group>
  514. </xhtml:body>
  515. </xhtml:html>