SMADT50200_약품재고관리.xrw 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  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. <prcplist>
  11. <prcpinfo>
  12. <genrdd/>
  13. <genrtm/>
  14. <prcpdd/>
  15. <spcldrug/>
  16. <ioflag/>
  17. <wardcd/>
  18. <pid/>
  19. <calcscorcd/>
  20. <engnm/>
  21. <execprcptotqty/>
  22. <execdd/>
  23. <issdeptcd/>
  24. <prcpgenrflag/>
  25. <execprcpuniqno/>
  26. <sumflag/>
  27. </prcpinfo>
  28. </prcplist>
  29. <patlist>
  30. <patinfo/>
  31. </patlist>
  32. <astlist>
  33. <astinfo/>
  34. </astlist>
  35. <prnlist>
  36. <prninfo/>
  37. </prnlist>
  38. <endlist>
  39. <endinfo>
  40. <genrdd/>
  41. <genrtm/>
  42. <sumfromdd/>
  43. <sumfromtm/>
  44. <sumtodd/>
  45. <sumtotm/>
  46. <sumdeptcd/>
  47. <sumnm/>
  48. <endflag/>
  49. <cnt/>
  50. </endinfo>
  51. </endlist>
  52. </main>
  53. <send>
  54. <srchfromdd/>
  55. <calcscorcd/>
  56. <execdeptcd/>
  57. <sumlistinfo>
  58. <prcpflag>O</prcpflag>
  59. </sumlistinfo>
  60. <endtime/>
  61. <fromddflag/>
  62. <fromtm>150001</fromtm>
  63. <toddflag/>
  64. <totm>150000</totm>
  65. <fromdd/>
  66. <todd/>
  67. <srchorddeptcd/>
  68. <issdeptcd/>
  69. <spcldrug/>
  70. <maendflag/>
  71. <ddflag/>
  72. <srchdeptcd>전체</srchdeptcd>
  73. <offset>0</offset>
  74. <pagesize>1000</pagesize>
  75. <sumlistinfo/>
  76. <srchadminflag/>
  77. <srchadmincd/>
  78. <srchendfromdd/>
  79. <srchendtodd/>
  80. </send>
  81. <init>
  82. <sumtmflaglist>
  83. <flaglist>
  84. <flagcd/>
  85. <flagnm/>
  86. <fromddflag/>
  87. <fromtm/>
  88. <toddflag/>
  89. <totm/>
  90. </flaglist>
  91. </sumtmflaglist>
  92. <updmflaglist>
  93. <flaglist>
  94. <fromddflag/>
  95. <fromtm/>
  96. <nextfromtm/>
  97. </flaglist>
  98. </updmflaglist>
  99. <chksum>
  100. <item>
  101. <chkast/>
  102. </item>
  103. </chksum>
  104. <chkyn/>
  105. <chktm/>
  106. <chkinstcd>
  107. <hosp>
  108. <hospnm/>
  109. <hospnm1/>
  110. </hosp>
  111. </chkinstcd>
  112. <sumdtinfo/>
  113. <cmb_mngtcls>
  114. </cmb_mngtcls>
  115. </init>
  116. <hidden>
  117. <chkpid>
  118. <pharm>
  119. <pharmflag/>
  120. </pharm>
  121. </chkpid>
  122. </hidden>
  123. <temp>
  124. <drugcd/>
  125. <fromddflag/>
  126. <toddflag/>
  127. <fromtm/>
  128. <totm/>
  129. <issdeptcd/>
  130. </temp>
  131. <result>
  132. <hidden/>
  133. </result>
  134. </root>
  135. </instance>
  136. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  137. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  138. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  139. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  140. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  141. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  142. <script type="javascript" ev:event="xforms-ready">
  143. <![CDATA[
  144. //model.setValue("/root/send/fromddflag", getCurrentDate()-1);
  145. //model.setValue("/root/send/toddflag", getCurrentDate());
  146. //cmb_fromddflag.value = getCurrentDate().toDate().getAddDate(-1,"D").getDateFormat("YYYYMMDD") ;
  147. model.setValue("/root/send/srchfromdd", getCurrentDate());
  148. model.setValue("/root/send/srchendfromdd", getCurrentDate());
  149. model.setValue("/root/send/srchendtodd", getCurrentDate());
  150. model.removeNodeset("/root/main/prcplist/prcpinfo");
  151. //zbcfGetCodeList( new Array("030M0003"), new Array("/root/init/cmb_mngtcls") );
  152. misfComboComCdList("030M0003",cmb_srchadminflag);
  153. submit("TRADT50202");
  154. submit("TRADT50204");
  155. combo_deptcd.select(0);
  156. // 마감시간 구분
  157. model.setValue("/root/send/sumlistinfo/prcpflag","S");
  158. submit("TRADT10206");
  159. if(model.getValue("/root/init/sumtmflaglist/flaglist/fromtm") == "0000") {
  160. model.setValue("/root/send/fromtm",model.getValue("/root/init/sumtmflaglist/flaglist/fromtm") + "00");
  161. } else {
  162. model.setValue("/root/send/fromtm",model.getValue("/root/init/sumtmflaglist/flaglist/fromtm") + "01");
  163. }
  164. if(model.getValue("/root/init/sumtmflaglist/flaglist/totm") == "2359") {
  165. model.setValue("/root/send/totm",model.getValue("/root/init/sumtmflaglist/flaglist/totm") + "59" );
  166. } else {
  167. model.setValue("/root/send/totm",model.getValue("/root/init/sumtmflaglist/flaglist/totm") + "00" );
  168. }
  169. if(model.getValue("/root/init/sumtmflaglist/flaglist/fromddflag") == "0") { // 전일
  170. model.setValue("/root/send/fromddflag", getCurrentDate().toDate().getAddDate(-1,"D").getDateFormat("YYYYMMDD") );
  171. } else if(model.getValue("/root/init/sumtmflaglist/flaglist/fromddflag") == "1") { // 당일
  172. model.setValue("/root/send/fromddflag", getCurrentDate());
  173. }
  174. if(model.getValue("/root/init/sumtmflaglist/flaglist/toddflag") == "0") { // 전일
  175. model.setValue("/root/send/toddflag", getCurrentDate().toDate().getAddDate(-1,"D").getDateFormat("YYYYMMDD") );
  176. } else if(model.getValue("/root/init/sumtmflaglist/flaglist/toddflag") == "1") { // 당일
  177. model.setValue("/root/send/toddflag", getCurrentDate());
  178. }
  179. model.refresh();
  180. ]]>
  181. </script>
  182. <script type="javascript" ev:event="xforms-model-construct-done">
  183. <![CDATA[
  184. ]]>
  185. </script>
  186. <script type="javascript">
  187. <![CDATA[
  188. ]]>
  189. </script>
  190. <submission id="TRADT50200" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" add="bottom" resultref="/root/main/prcplist/prcpinfo"/>
  191. <submission id="TRADT50201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
  192. <submission id="TRADT50202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/sumdtinfo"/>
  193. <submission id="TXADT50202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/cond/reqdata" resultref="/root/result"/>
  194. <submission id="TRADT10206" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/sumlistinfo" resultref="/root/init/sumtmflaglist"/>
  195. <submission id="TRADT50204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/endlist/endinfo"/>
  196. </model>
  197. </xhtml:head>
  198. <xhtml:body guideline="1,1225;1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  199. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  200. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">약품 재고 마감 관리(Ver 0426)</caption>
  201. </group>
  202. <group id="group3" scroll="auto" style="left:0px; top:15px; width:1195px; height:769px; ">
  203. <group id="group2" style="left:0px; top:5px; width:1195px; height:80px; ">
  204. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:3px; width:1194px; height:72px; background-color:#fffbf2; border-color:#ffd799; "/>
  205. <line id="line13" style="x1:1009px; y1:7px; x2:1009px; y2:70px; border-color:#ffe4bb; border-left-style:solid; "/>
  206. <caption id="caption4" class="search_name" visibility="visible" style="left:707px; top:45px; width:112px; height:17px; ">재고반영일자 :</caption>
  207. <input id="srchdd" ref="/root/send/srchfromdd" class="input_search" visibility="visible" inputtype="date" style="left:832px; top:45px; width:90px; height:19px; ">
  208. <script type="javascript" ev:event="xforms-value-changed">
  209. <![CDATA[
  210. model.setValue("/root/send/endtime", "");
  211. submit("TRADT50202");
  212. model.refresh();
  213. ]]>
  214. </script>
  215. <script type="javascript" ev:event="onclick">
  216. <![CDATA[
  217. model.setValue("/root/send/endtime", "");
  218. submit("TRADT50202");
  219. model.refresh();
  220. ]]>
  221. </script>
  222. </input>
  223. <input id="ipt_totm" ref="/root/send/totm" class="input_search" autonext="false" maxlength="5" format="hh:nn:ss" style="left:945px; top:10px; width:52px; height:19px; ">
  224. <script type="javascript" ev:event="xforms-value-changed">
  225. <![CDATA[
  226. /* var totm = model.getValue("/root/send/totm");
  227. if(totm == "235959") {
  228. model.setValue("/root/send/fromtm", "000000");
  229. } else {
  230. model.setValue("/root/send/fromtm", parseInt(totm) + 1);
  231. }
  232. model.refresh();*/
  233. ]]>
  234. </script>
  235. </input>
  236. <input id="cmb_fromddflag" ref="/root/send/fromddflag" class="input_search" disabled="false" editable="true" inputtype="date" appearance="minimal" style="left:660px; top:10px; width:90px; height:19px; "/>
  237. <input id="ipt_fromtm" ref="/root/send/fromtm" class="input_search" disabled="false" autonext="false" editable="true" maxlength="5" format="hh:nn:ss" style="left:755px; top:10px; width:52px; height:19px; "/>
  238. <input id="cmb_toddflag" ref="/root/send/toddflag" class="input_search" inputtype="date" appearance="minimal" style="left:850px; top:10px; width:90px; height:19px; ">
  239. <script type="javascript" ev:event="xforms-value-changed">
  240. <![CDATA[
  241. //var toddflag = model.getValue("/root/send/toddflag");
  242. //cmb_fromddflag.value = toddflag.toDate().getAddDate(-1,"D").getDateFormat("YYYYMMDD") ;
  243. //model.setValue("/root/send/fromddflag" , parseInt(toddflag) - 1);
  244. //model.refresh();
  245. ]]>
  246. </script>
  247. </input>
  248. <caption id="caption17" class="search_name" style="left:570px; top:10px; width:85px; height:17px; vertical-align:middle; ">마감 구간</caption>
  249. <caption id="caption18" style="left:822px; top:9px; width:30px; height:25px; font-weight:bold; vertical-align:middle; ">~</caption>
  250. <button id="btn_endref" class="btn4_letter4" style="left:1100px; top:45px; width:80px; height:22px; ">
  251. <caption>재고반영</caption>
  252. <script type="javascript" ev:event="DOMActivate">
  253. <![CDATA[
  254. var endtime = model.getValue("/root/send/endtime");
  255. if(endtime!=""){
  256. model.makeValue("/root/cond/reqdata/srchfromdd",model.getValue("/root/send/srchfromdd"));
  257. model.makeValue("/root/cond/reqdata/endtime",model.getValue("/root/send/endtime"));
  258. model.makeValue("/root/cond/reqdata/srchdeptcd",model.getValue("/root/send/srchdeptcd"));
  259. if(submit("TXADT50202")==true){
  260. model.setValue("/root/send/endtime","");
  261. messageBox("재고반영이","I001");
  262. //btn_sea.dispatch("DOMActivate");
  263. }else{
  264. model.setValue("/root/send/endtime","");
  265. messageBox("재고반영이","E009");
  266. return;
  267. }
  268. model.removeNodeset("/root/cond/reqdata");
  269. }else{
  270. messageBox("재고반영시간을","C002");
  271. model.setFocus("cbo_srchsumtm");
  272. return;
  273. }
  274. submit("TRADT50204");
  275. ]]>
  276. </script>
  277. </button>
  278. <button id="btn_end" class="btn6_letter2" style="left:1020px; top:10px; width:56px; height:22px; ">
  279. <caption>마감</caption>
  280. <script type="javascript" ev:event="DOMActivate">
  281. <![CDATA[
  282. model.setValue("/root/send/maendflag", "Y"); // 20110428_laboru_화면에서 수동 마감할 경우 Y 값
  283. var fromddflag = model.getValue("/root/send/fromddflag");
  284. var toddflag = model.getValue("/root/send/toddflag");
  285. if(fromddflag == toddflag) { // 20110428_laboru_날짜 체크
  286. model.setValue("/root/send/ddflag", "N");
  287. } else {
  288. model.setValue("/root/send/ddflag", "Y");
  289. }
  290. if(submit("TRADT50201")==true){
  291. messageBox("마감이","I001");
  292. }else{
  293. messageBox("마감이","E009");
  294. return;
  295. }
  296. model.refresh();
  297. ]]>
  298. </script>
  299. </button>
  300. <button id="btn_sea" class="btn1_letter2" navindex="1" style="left:1020px; top:45px; width:56px; height:22px; ">
  301. <caption>조회</caption>
  302. <script type="javascript" ev:event="DOMActivate">
  303. <![CDATA[
  304. model.removeNodeset("/root/main/prcplist/prcpinfo");
  305. model.setValue("/root/send/offset", "0");
  306. submit("TRADT50200");
  307. model.refresh();
  308. ]]>
  309. </script>
  310. </button>
  311. <line id="line2" style="x1:1087px; y1:42px; x2:1087px; y2:69px; border-color:#ffe4bb; border-left-style:solid; "/>
  312. <select1 id="cbo_srchsumtm" ref="/root/send/endtime" class="combo_s_essential" visibility="visible" appearance="minimal" style="left:927px; top:45px; width:70px; height:19px; ">
  313. <choices>
  314. <itemset nodeset="/root/init/sumdtinfo/item">
  315. <label ref="genrtmnm"/>
  316. <value ref="genrtm"/>
  317. </itemset>
  318. </choices>
  319. </select1>
  320. <caption id="caption1" class="search_name" style="left:185px; top:10px; width:185px; height:17px; vertical-align:middle; ">조회/마감/재고반영 부서</caption>
  321. <select1 id="combo_deptcd" ref="/root/send/srchdeptcd" appearance="minimal" style="left:370px; top:10px; width:90px; height:19px; ">
  322. <choices>
  323. <item>
  324. <label>전체</label>
  325. <value>all</value>
  326. </item>
  327. <item>
  328. <label>병동약국</label>
  329. <value>3240300000</value>
  330. </item>
  331. <item>
  332. <label>외래약국</label>
  333. <value>3240400000</value>
  334. </item>
  335. <item>
  336. <label>특수조제실</label>
  337. <value>3240807000</value>
  338. </item>
  339. </choices>
  340. </select1>
  341. <button id="button3" class="btn3_letter6" navindex="18" visibility="visible" style="left:10px; top:10px; width:104px; height:22px; ">
  342. <caption>마감시간관리</caption>
  343. <script type="javascript" ev:event="DOMActivate">
  344. <![CDATA[
  345. //fSetEndTime();
  346. modal("SPADT64100");
  347. if(getParameter("SPADT64100_param") == "Y") {
  348. //model.makeValue("/root/send/sumlistinfo/prcpflag", "A");
  349. if(submit("TRADT10206")) {
  350. if(model.getValue("/root/init/sumtmflaglist/flaglist/fromtm") == "0000") {
  351. model.setValue("/root/send/fromtm",model.getValue("/root/init/sumtmflaglist/flaglist/fromtm") + "00");
  352. } else {
  353. model.setValue("/root/send/fromtm",model.getValue("/root/init/sumtmflaglist/flaglist/fromtm") + "01");
  354. }
  355. if(model.getValue("/root/init/sumtmflaglist/flaglist/totm") == "2359") {
  356. model.setValue("/root/send/totm",model.getValue("/root/init/sumtmflaglist/flaglist/totm") + "59" );
  357. } else {
  358. model.setValue("/root/send/totm",model.getValue("/root/init/sumtmflaglist/flaglist/totm") + "00" );
  359. }
  360. if(model.getValue("/root/init/sumtmflaglist/flaglist/fromddflag") == "0") { // 전일
  361. model.setValue("/root/send/fromddflag", getCurrentDate().toDate().getAddDate(-1,"D").getDateFormat("YYYYMMDD") );
  362. } else if(model.getValue("/root/init/sumtmflaglist/flaglist/fromddflag") == "1") { // 당일
  363. model.setValue("/root/send/fromddflag", getCurrentDate());
  364. }
  365. if(model.getValue("/root/init/sumtmflaglist/flaglist/toddflag") == "0") { // 전일
  366. model.setValue("/root/send/toddflag", getCurrentDate().toDate().getAddDate(-1,"D").getDateFormat("YYYYMMDD") );
  367. } else if(model.getValue("/root/init/sumtmflaglist/flaglist/toddflag") == "1") { // 당일
  368. model.setValue("/root/send/toddflag", getCurrentDate());
  369. }
  370. model.refresh();
  371. }
  372. }
  373. ]]>
  374. </script>
  375. </button>
  376. <caption id="caption2" class="search_name" style="left:505px; top:45px; width:86px; height:17px; ">약품코드 :</caption>
  377. <select1 id="cmb_srchadminflag" ref="/root/send/srchadminflag" class="combo_search" appearance="minimal" style="left:360px; top:45px; width:135px; height:19px; ">
  378. <choices>
  379. <itemset nodeset="/root/init/cmb_mngtcls">
  380. <label ref="cdnm"/>
  381. <value ref="cdid"/>
  382. </itemset>
  383. </choices>
  384. <script type="javascript" ev:event="xforms-value-changed">
  385. <![CDATA[
  386. //submit("TRADB00401");
  387. //model.setValue("/root/send/srchmthdcd","");
  388. ]]>
  389. </script>
  390. </select1>
  391. <caption id="caption3" class="search_name" style="left:270px; top:45px; width:86px; height:17px; ">관리분류 :</caption>
  392. <input id="ipt_srchadmincd" ref="/root/send/srchadmincd" class="input_search" style="left:595px; top:45px; width:100px; height:19px; ">
  393. <script type="javascript" ev:event="onkeyup">
  394. <![CDATA[
  395. if(event.keyCode == "13") {
  396. setInputNodeCurText();
  397. btn_sea.dispatch("DOMActivate")
  398. }
  399. ]]>
  400. </script>
  401. </input>
  402. </group>
  403. <caption id="caption10" class="tit_2" style="left:575px; top:90px; width:183px; height:13px; ">마감 리스트</caption>
  404. <datagrid id="datagrid1" nodeset="/root/main/prcplist/prcpinfo" caption="마감일자^마감시간^처방일자^약품구분^I/O^병동^등록번호^약품코드^약품명^불출수량^실시일자^마감부서^발행구분^UNIQNO^재고반영여부" colsep="^" colwidth="60, 60, 60, 60, 32, 45, 75, 100, 180, 60, 57, 100, 50, 80, 82" explorerbar="sortshow" rowheader="seq" rowsep="|" style="left:575px; top:110px; width:619px; height:600px; ">
  405. <col ref="genrdd" style="text-align:center; "/>
  406. <col ref="genrtm" style="text-align:center; "/>
  407. <col ref="prcpdd" visibility="hidden" style="text-align:center; "/>
  408. <col ref="spcldrug" visibility="hidden" style="text-align:center; "/>
  409. <col ref="ioflag" visibility="hidden" style="text-align:center; "/>
  410. <col ref="wardcd" visibility="hidden"/>
  411. <col ref="pid" visibility="hidden" style="text-align:center; "/>
  412. <col ref="calcscorcd"/>
  413. <col ref="engnm" style="text-align:left; "/>
  414. <col ref="execprcptotqty" style="text-align:center; "/>
  415. <col ref="execdd" visibility="hidden" style="text-align:center; "/>
  416. <col ref="issdeptcd" style="text-align:center; "/>
  417. <col ref="prcpgenrflag" visibility="hidden" style="text-align:center; "/>
  418. <col ref="execprcpuniqno" visibility="hidden" style="text-align:center; "/>
  419. <col ref="sumflag" visibility="hidden" style="text-align:center; "/>
  420. <script type="javascript" ev:event="onscroll">
  421. <![CDATA[
  422. if(datagrid1.vscroll.attribute("max") == datagrid1.vscroll.attribute("pos")) {
  423. // end of scroll
  424. model.setValue("/root/send/offset", datagrid1.rows-datagrid1.fixedRows); // grid의 header row는 제외
  425. submit("TRADT50200");
  426. datagrid1.dispatch("onmouseup"); // 스크롤바 처리를 위한 이벤트 발생
  427. }
  428. ]]>
  429. </script>
  430. <script type="javascript" ev:event="onaftersort">
  431. <![CDATA[
  432. datagrid1.gridToInstance();
  433. ]]>
  434. </script>
  435. <script type="javascript" ev:event="ondblclick">
  436. <![CDATA[
  437. var grdinx = datagrid1.row;
  438. model.setValue("/root/temp/drugcd",model.getValue("/root/main/prcplist/prcpinfo[" + grdinx+ "]/calcscorcd"));
  439. //model.setValue("/root/temp/fromddflag",model.getValue("/root/send/fromddflag"));
  440. model.setValue("/root/temp/toddflag",model.getValue("/root/send/srchfromdd"));
  441. //model.setValue("/root/temp/fromtm",model.getValue("/root/send/fromtm"));
  442. model.setValue("/root/temp/totm",model.getValue("/root/send/endtime"));
  443. model.setValue("/root/temp/issdeptcd",model.getValue("/root/main/prcplist/prcpinfo[" + grdinx+ "]/issdeptcd"));
  444. //,"left:100; top:100; width:400; height:400; sysmenu:visible; min:visible; max:true; resize:true; caption:visible;",false
  445. var wndobj = getOpenWindow("SMADT50201");
  446. if(wndobj == null){
  447. open("SMADT50201","0","100","160","SMADT50201","/root/temp","/root/temp");
  448. } else {
  449. wndobj.model.removeNodeset(datagrid1.nodeset);
  450. wndobj.model.setValue("/root/temp/drugcd", model.getValue("/root/temp/drugcd"));
  451. wndobj.model.setValue("/root/send/fromddflag", model.getValue("/root/send/fromddflag"));
  452. wndobj.model.setValue("/root/send/toddflag", model.getValue("/root/send/toddflag"));
  453. wndobj.model.setValue("/root/temp/fromtm", model.getValue("/root/temp/fromtm"));
  454. wndobj.model.setValue("/root/temp/issdeptcd", model.getValue("/root/temp/issdeptcd"));
  455. wndobj.javascript.btn_srch.dispatch("DOMActivate");
  456. wndobj.model.refresh();
  457. }
  458. //modal("SMADT50201",0,100,160,"SMADT50201","/root/temp","/root/temp");
  459. // open("SMADT50201");
  460. ]]>
  461. </script>
  462. </datagrid>
  463. <line id="line4" class="line_1" style="x1:0px; y1:103px; x2:550px; y2:103px; "/>
  464. <line id="line1" class="line_1" style="x1:575px; y1:103px; x2:1195px; y2:103px; "/>
  465. <button id="btn_excsave" class="btn2_letter4" visibility="hidden" style="left:115px; top:15px; width:64px; height:19px; ">
  466. <caption>엑셀저장</caption>
  467. <script type="javascript" ev:event="DOMActivate">
  468. <![CDATA[
  469. // 조회일자로 ast에 집계 출력된 내역이 있는지 확인.
  470. submit("TRADT11026");
  471. var chkast = model.getValue("/root/init/chksum/item/chkast");
  472. // ast에 집계된 내역이 없으면 중지
  473. if( chkast != "Y") {
  474. alert("조회된 일자로 발주된 데이터가 없습니다. ");
  475. model.refresh();
  476. return;
  477. }
  478. // 조회일자로 집계된 내역을 출력한다.
  479. var prcplist = model.getValue("/root/main/prcplist/prcpinfo/inorddeptnm");
  480. model.setValue("/root/send/prnflag", "E");
  481. if (prcplist == "") {
  482. model.removeNodeset("/root/main/prcplist/prcpinfo/");
  483. submit("TRADT11024");
  484. }
  485. var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
  486. if (file != ""){
  487. grd.prcp.saveExcel(file);
  488. }
  489. model.removeNodeset("/root/send/prcplist/prcpinfo")
  490. ]]>
  491. </script>
  492. </button>
  493. <caption id="caption5" class="tit_2" style="left:0px; top:90px; width:183px; height:14px; ">마감 이력</caption>
  494. <datagrid id="grd_drugsum" nodeset="/root/main/endlist/endinfo" autoresize="true" caption="마감일자^마감시간^마감구간^마감구간^마감구간^마감구간^마감부서^마감자^재고반영여부^마감된 처방수" colsep="^" colwidth="100, 80, 68, 54, 68, 54, 100, 60, 100, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:145px; width:550px; height:565px; ">
  495. <col ref="genrdd" format="yyyy-mm-dd" style="text-align:center; "/>
  496. <col ref="genrtm" format="hh:nn:ss" style="text-align:center; "/>
  497. <col ref="sumfromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  498. <col ref="sumfromtm" format="hh:nn:ss" style="text-align:center; "/>
  499. <col ref="sumtodd" format="yyyy-mm-dd" style="left:339px; top:23px; width:68px; height:23px; text-align:center; "/>
  500. <col ref="sumtotm" format="hh:nn:ss" style="text-align:center; "/>
  501. <col ref="sumdeptnm" style="text-align:center; "/>
  502. <col ref="sumnm" style="text-align:center; "/>
  503. <col ref="endflag" style="text-align:center; "/>
  504. <col ref="cnt" style="text-align:center; "/>
  505. <script type="javascript" ev:event="onclick">
  506. <![CDATA[
  507. if ( ! isDataCell() ) return;
  508. model.setValue("/root/send/srchfromdd",model.getValue("/root/main/endlist/endinfo["+grd_drugsum.row+"]/genrdd"));
  509. submit("TRADT50202");
  510. model.setValue("/root/send/endtime",model.getValue("/root/main/endlist/endinfo["+grd_drugsum.row+"]/genrtm"));
  511. btn_sea.dispatch("DOMActivate");
  512. model.refresh();
  513. //fSelSum();
  514. ]]>
  515. </script>
  516. <script type="javascript" ev:event="onaftersort">
  517. <![CDATA[
  518. grd_drugsum.gridToInstance();
  519. ]]>
  520. </script>
  521. </datagrid>
  522. <input id="input7" ref="/root/send/srchendtodd" class="input_default" inputtype="date" style="left:458px; top:115px; width:90px; height:19px; ">
  523. <script type="javascript" ev:event="xforms-value-changed">
  524. <![CDATA[
  525. submit("TRADT50204");
  526. ]]>
  527. </script>
  528. </input>
  529. <caption id="caption11" class="search_name" style="left:262px; top:115px; width:101px; height:17px; ">마감일자 :</caption>
  530. <caption id="caption7" style="left:445px; top:116px; width:15px; height:20px; vertical-align:middle; ">~</caption>
  531. <input id="input6" ref="/root/send/srchendfromdd" class="input_default" inputtype="date" style="left:355px; top:115px; width:90px; height:19px; ">
  532. <script type="javascript" ev:event="xforms-value-changed">
  533. <![CDATA[
  534. submit("TRADT50204");
  535. ]]>
  536. </script>
  537. </input>
  538. </group>
  539. </xhtml:body>
  540. </xhtml:html>