SMAEB05101_조영제재고관리(방사선종양센터).xrw 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819
  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. <mainlist>
  11. <uselist>
  12. <goodcd/>
  13. <goodnm/>
  14. <iodd/>
  15. <qty/>
  16. <usernm/>
  17. <ioflag/>
  18. <sectcd/>
  19. <suppdeptcd/>
  20. </uselist>
  21. <wlnlist>
  22. <goodcd/>
  23. <goodnm/>
  24. <iodd/>
  25. <qty/>
  26. <usernm/>
  27. <ioflag/>
  28. <sectcd/>
  29. <suppdeptcd/>
  30. </wlnlist>
  31. </mainlist>
  32. <goodlist>
  33. <item>
  34. <goodcd/>
  35. <goodnm/>
  36. <speccd/>
  37. <safestocqty/>
  38. <exstocqty/>
  39. <wlnqty/>
  40. <sumqty/>
  41. <useqty/>
  42. <stocqty/>
  43. <reqqty/>
  44. </item>
  45. </goodlist>
  46. <dyestoclist>
  47. <item>
  48. <goodcd/>
  49. <instcd/>
  50. <agojego/>
  51. <receive/>
  52. <totsu/>
  53. <outgo/>
  54. <dayused/>
  55. <presentcnt/>
  56. <rem/>
  57. <srchflag/>
  58. <magamflag/>
  59. </item>
  60. </dyestoclist>
  61. <goodinfo/>
  62. <dyecdpamlist>
  63. <item>
  64. <pid/>
  65. <hngnm/>
  66. <excuexectodd/>
  67. <basecdflagdesc/>
  68. <calcscorcd/>
  69. <excucdnm/>
  70. <goodcd/>
  71. <goodnm/>
  72. <drugqty/>
  73. <speccd/>
  74. <prcpdd/>
  75. <instcd/>
  76. <excuroomcd/>
  77. </item>
  78. </dyecdpamlist>
  79. <dyemagamlist>
  80. <item>
  81. <iodd/>
  82. <magamflag/>
  83. <dutflag/>
  84. </item>
  85. </dyemagamlist>
  86. <solotopinfo>
  87. <item>
  88. <solotopqty/>
  89. </item>
  90. </solotopinfo>
  91. <xenetixinfo>
  92. <item>
  93. <xenetixqty/>
  94. </item>
  95. </xenetixinfo>
  96. </main>
  97. <send>
  98. <srchiodd/>
  99. <srchbasedd/>
  100. <globalinstance>
  101. <instance1/>
  102. </globalinstance>
  103. <srchsectcd/>
  104. <srchgoodcd/>
  105. <srchgoodnm/>
  106. <sectcd/>
  107. <data>
  108. <iptflag/>
  109. <goodcd/>
  110. <sectcd/>
  111. <qty/>
  112. <ioflag/>
  113. <iodd/>
  114. <suppdeptcd/>
  115. <mainflag/>
  116. </data>
  117. <srchdd/>
  118. <req>
  119. <data1/>
  120. </req>
  121. <sdate/>
  122. <edate/>
  123. <suppdeptcd/>
  124. </send>
  125. <cmb_info>
  126. <initexcuroomgrp2>
  127. <excuroomgrpcdid/>
  128. <excuroomgrpcdnm/>
  129. </initexcuroomgrp2>
  130. <goodlist>
  131. <item/>
  132. </goodlist>
  133. </cmb_info>
  134. <temp>
  135. <goodcd/>
  136. <goodnm/>
  137. <speccd/>
  138. <safestocqty/>
  139. <inswlniodd/>
  140. <inswlngoodcd/>
  141. <inswlnqty/>
  142. <setwlniodd/>
  143. <setwlngoodcd/>
  144. <setwlnqty/>
  145. <insuseiodd/>
  146. <insusegoodcd/>
  147. <insuseqty/>
  148. <setuseiodd/>
  149. <setusegoodcd/>
  150. <setuseqty/>
  151. <count/>
  152. </temp>
  153. <rexprnt>
  154. <dyestoclist>
  155. <srchiodd/>
  156. <srchsectcd/>
  157. <srchexcuroomgrp/>
  158. <srchsudept/>
  159. </dyestoclist>
  160. </rexprnt>
  161. </root>
  162. </instance>
  163. <script type="javascript" ev:event="xforms-ready">
  164. <![CDATA[
  165. aezfSetSuppDeptcd();
  166. model.setValue("/root/send/srchiodd", getCurrentDate());
  167. model.setValue("/root/send/edate", getCurrentDate());
  168. model.removeNodeset("/root/main/mainlist");
  169. model.refresh();
  170. submit("TRAEA01301");
  171. model.removeNodeset("/root/cmb_info/initexcuroomgrp2[" + 1 + "]");
  172. submit("TRAEB03501");
  173. cmb_sectcd.select(0);
  174. btn_save.visible = false;
  175. btn_del.visible = false;
  176. btn_disone.visible = true;
  177. btn_dissu.visible = true;
  178. btn_cal.visible = false;
  179. model.refresh();
  180. ]]>
  181. </script>
  182. <submission id="TRAEQ00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/">
  183. <script type="javascript" ev:event="xforms-submit-done">
  184. <![CDATA[
  185. var rowcnt = grd_mainlist.rows;
  186. for(var i = 0; i < rowcnt; i++ )
  187. {
  188. if(model.getValue("/root/tmp/rem") == "")
  189. {
  190. model.setValue("/root/tmp/rem", model.getValue("/root/main/mainlist[" + i + "]/rem"));
  191. }
  192. }
  193. sortGrid(grd_mainlist);
  194. ]]>
  195. </script>
  196. </submission>
  197. <submission id="TRAEB03501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/goodinfo"/>
  198. <submission id="TRAEA01301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/globalinstance" replace="instance" resultref="/root/cmb_info"/>
  199. <submission id="TRAEB03801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/temp/goodlist"/>
  200. <submission id="TRAEB03401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/mainlist"/>
  201. <submission id="TXAEB03401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/result"/>
  202. <submission id="TRAEQ01701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/goodlist"/>
  203. <submission id="TRAEA00902" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/cmb_info/excuroomcdlist"/>
  204. <submission id="TRAEB03402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/dyestoclist"/>
  205. <submission id="TXAEB03402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/temp/count"/>
  206. <submission id="TXAEB03403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/temp/count"/>
  207. <submission id="TXAEB03404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/temp/count"/>
  208. <submission id="TRAEB03403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/dyecdpamlist"/>
  209. <submission id="TXAEB03405" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/temp/count"/>
  210. <submission id="TRAEB03405" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/dyemagamlist"/>
  211. <submission id="TRAEB05101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/solotopinfo"/>
  212. <submission id="TRAEB05102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/xenetixinfo"/>
  213. <submission id="TRAEB03402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/dyestoclist"/>
  214. <submission id="TRAEB03406" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/dyemagamlist"/>
  215. </model>
  216. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  217. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  218. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  219. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  220. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  221. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  222. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  223. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  224. <script type="javascript">
  225. <![CDATA[
  226. function getGridData() {
  227. if(model.getValue("/root/send/srchiodd") != "") {
  228. model.setValue("/root/temp/goodnm", cmb_goodcd.label);
  229. model.setValue("/root/temp/inswlnqty", "0");
  230. model.setValue("/root/temp/setwlnqty", "0");
  231. model.setValue("/root/temp/insuseqty", "0");
  232. model.setValue("/root/temp/setuseqty", "0");
  233. model.removeNodeset("/root/main/mainlist");
  234. model.removeNodeset("/root/main/goodlist/item");
  235. btn_inSave.disabled = true;
  236. btn_inUpdt.disabled = true;
  237. btn_outSave.disabled = true;
  238. btn_outUpdt.disabled = true;
  239. ipt_inswlnday.disabled = true;
  240. ipt_insuseday.disabled = true;
  241. submit("TRAEB03401");
  242. model.setValue("/root/send/srchiodd", getCurrentDate());
  243. var srchgoodcd = model.getValue("/root/send/srchgoodcd");
  244. if (srchgoodcd != "") {
  245. btn_inSave.disabled = false;
  246. btn_outSave.disabled = false;
  247. ipt_inswlnday.disabled = false;
  248. ipt_insuseday.disabled = false;
  249. }
  250. model.refresh();
  251. }
  252. else
  253. {
  254. messageBox("날짜를", "C001");
  255. }
  256. }
  257. function getDyeList()
  258. {
  259. if( model.getValue("/root/send/srchiodd") == "" ){
  260. messageBox("입고일자를", "I007");
  261. return;
  262. }
  263. if( model.getValue("/root/send/srchsectcd") == "" ){
  264. messageBox("검사실을", "I007");
  265. return;
  266. }
  267. //2011.07.12 추가처방시 심사실에서 직접입력한경우도 같이 포함해서 조회되게 수정 - 박재영
  268. if(model.getValue("/root/send/srchsectcd") == "MCC011"){
  269. model.setValue("/root/send/data/mainflag", "Y");
  270. }else{
  271. model.setValue("/root/send/data/mainflag", "");
  272. }
  273. // 2011.02.07 c y w 조회시 환자정보리스트 클리어
  274. model.removeNodeset("/root/main/dyecdpamlist/item");
  275. var row = grd_dyelist.row-1;
  276. if( submit("TRAEB03402") ){
  277. if( model.getValue("/root/main/dyestoclist/item[1]/srchflag") == "1" ){ // 재고테이블에 데이터가 있을 경우
  278. if(model.getValue("/root/main/dyestoclist/item[1]/magamflag") == "S" ){ // 마감여부가 S일 경우
  279. btn_save.visible = true;
  280. btn_del.visible = true;
  281. btn_disone.visible = false;
  282. btn_dissu.visible = false;
  283. btn_cal.visible = true;
  284. }else{ // 마감했을경우 버튼 비활성화.
  285. btn_save.visible = false;
  286. btn_del.visible = false;
  287. btn_disone.visible = true;
  288. btn_dissu.visible = true;
  289. btn_cal.visible = false;
  290. }
  291. }else if( model.getValue("/root/main/dyestoclist/item[1]/srchflag") == "2" ){ // 데이터가 없을경우 활성화.
  292. btn_save.visible = true;
  293. btn_del.visible = false;
  294. btn_dissu.visible = true;
  295. btn_cal.visible = true;
  296. if(model.getValue("/root/main/dyestoclist/item[1]/magamflag") == "D" ){
  297. for(var a = 1 ; a <= grd_dyelist.rows ; a++ ){
  298. grd_dyelist.addStatus( a ,"update");
  299. }
  300. }else{
  301. for(var a = 1 ; a <= grd_dyelist.rows ; a++ ){
  302. grd_dyelist.addStatus( a ,"insert");
  303. }
  304. }
  305. }else{ //1 , 2 아니고 null일 경우 비활성화.
  306. btn_save.visible = false;
  307. btn_del.visible = false;
  308. btn_cal.visible = false;
  309. btn_disone.visible = true;
  310. btn_dissu.visible = true;
  311. }
  312. var bd = model.getValue("/root/send/srchiodd");
  313. var basedd = bd.substr(0,6);
  314. model.setValue("/root/send/srchbasedd", basedd);
  315. //2011.07.19 조영제 조영제 월별 마감일자,마감여부
  316. submit("TRAEB03406");
  317. for(var i = 1 ; i < grd_magamlist.rows ; i++ ){
  318. if(model.getValue("/root/main/dyemagamlist/item[" + i +"]/dutflag" ) == "4") {
  319. grd_magamlist.cellStyle("color" , i , grd_magamlist.colRef("iodd") , i , grd_magamlist.colRef("iodd")) = "#0000ff";
  320. }else if(model.getValue("/root/main/dyemagamlist/item[" + i +"]/dutflag" ) == "8" ){
  321. grd_magamlist.cellStyle("color" , i , grd_magamlist.colRef("iodd") , i , grd_magamlist.colRef("iodd")) = "#ff0000";
  322. }else{
  323. grd_magamlist.cellStyle("color" , i , grd_magamlist.colRef("iodd") , i , grd_magamlist.colRef("iodd")) = "#000000";
  324. }
  325. }
  326. }
  327. model.refresh();
  328. }
  329. ]]>
  330. </script>
  331. </xhtml:head>
  332. <xhtml:body pagewidth="1210" pageheight="780" style="margin-left:7; margin-top:0; margin-right:8; margin-bottom:0; ">
  333. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  334. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:208px; height:15px; ">조영제 재고관리(방사선종양센터)</caption>
  335. </group>
  336. <button id="btn_rept" class="btn4_letter4" style="left:510px; top:520px; width:80px; height:22px; ">
  337. <caption>입고저장</caption>
  338. <script type="javascript" ev:event="DOMActivate">
  339. <![CDATA[
  340. var nodecnt = model.getXPathValue("count(/root/main/mainlist)");
  341. var list1cnt = 1;
  342. var list2cnt = 1;
  343. var list3cnt = 1
  344. for(var i=1 ; i <= nodecnt; i++)
  345. {
  346. if(model.getValue("/root/main/mainlist[" + i +"]/basecdcnts" ) == "영상검사실")
  347. {
  348. model.makeNode("/root/tmp/rexlist/list1[" + list1cnt + "]");
  349. model.copyNode("/root/tmp/rexlist/list1[" + list1cnt +"]", "/root/main/mainlist[" + i + "]");
  350. list1cnt = list1cnt + 1;
  351. }
  352. }
  353. for(var i=1 ; i <= nodecnt; i++)
  354. {
  355. if(model.getValue("/root/main/mainlist[" + i +"]/basecdcnts" ) == "PET-CT실")
  356. {
  357. model.makeNode("/root/tmp/rexlist/list2[" + list2cnt + "]");
  358. model.copyNode("/root/tmp/rexlist/list2[" + list2cnt +"]", "/root/main/mainlist[" + i + "]");
  359. list2cnt = list2cnt + 1;
  360. }
  361. }
  362. for(var i=1 ; i <= nodecnt; i++)
  363. {
  364. if(model.getValue("/root/main/mainlist[" + i +"]/basecdcnts" ) == "치료,투약실")
  365. {
  366. model.makeNode("/root/tmp/rexlist/list3[" + list3cnt + "]");
  367. model.copyNode("/root/tmp/rexlist/list3[" + list3cnt +"]", "/root/main/mainlist[" + i + "]");
  368. list3cnt = list3cnt + 1;
  369. }
  370. }
  371. mergeRexList("/root/tmp/rexlist/list1");
  372. mergeRexList("/root/tmp/rexlist/list2");
  373. mergeRexList("/root/tmp/rexlist/list3");
  374. var patinsucnt = model.getXPathValue("sum( /root/main/mainlist/patinsucnt )");
  375. var patgnrlcnt = model.getXPathValue("sum( /root/main/mainlist/patgnrlcnt )");
  376. var testinsucnt = model.getXPathValue("sum( /root/main/mainlist/testinsucnt )");
  377. var testgnrlcnt = model.getXPathValue("sum( /root/main/mainlist/testgnrlcnt )");
  378. model.setValue("/root/tmp/rexlist/patinsucnt", patinsucnt);
  379. model.setValue("/root/tmp/rexlist/patgnrlcnt", patgnrlcnt);
  380. model.setValue("/root/tmp/rexlist/testinsucnt", testinsucnt);
  381. model.setValue("/root/tmp/rexlist/testgnrlcnt", testgnrlcnt);
  382. var ymd = model.getValue("/root/tmp/rexlist/list1/recdd");
  383. var year = ymd.substring(0,4);
  384. var month = ymd.substring(4,6);
  385. var day = ymd.substring(6,8);
  386. var yymmddstr = year + "/" + month + "/" + day + " " + getDateTime(new Date(year,month,day), "W") + "요일";
  387. model.setValue("/root/tmp/rexlist/srchdd", yymmddstr);
  388. model.makeNode("/root/tmp/rexlist/mainlist[58]");
  389. exeReportPreview("RPAEQ00400", "XMLSTR", "/root/tmp/rexlist");
  390. model.removeNodeset("/root/tmp/rexlist/list1");
  391. model.removeNodeset("/root/tmp/rexlist/list2");
  392. model.removeNodeset("/root/tmp/rexlist/list3");
  393. model.removeNodeset("/root/tmp/rexlist/mainlist");
  394. model.refresh();
  395. ]]>
  396. </script>
  397. </button>
  398. <button id="button1" class="btn4_letter4" style="left:1105px; top:520px; width:80px; height:22px; ">
  399. <caption>입고저장</caption>
  400. <script type="javascript" ev:event="DOMActivate">
  401. <![CDATA[
  402. var nodecnt = model.getXPathValue("count(/root/main/mainlist)");
  403. var list1cnt = 1;
  404. var list2cnt = 1;
  405. var list3cnt = 1
  406. for(var i=1 ; i <= nodecnt; i++)
  407. {
  408. if(model.getValue("/root/main/mainlist[" + i +"]/basecdcnts" ) == "영상검사실")
  409. {
  410. model.makeNode("/root/tmp/rexlist/list1[" + list1cnt + "]");
  411. model.copyNode("/root/tmp/rexlist/list1[" + list1cnt +"]", "/root/main/mainlist[" + i + "]");
  412. list1cnt = list1cnt + 1;
  413. }
  414. }
  415. for(var i=1 ; i <= nodecnt; i++)
  416. {
  417. if(model.getValue("/root/main/mainlist[" + i +"]/basecdcnts" ) == "PET-CT실")
  418. {
  419. model.makeNode("/root/tmp/rexlist/list2[" + list2cnt + "]");
  420. model.copyNode("/root/tmp/rexlist/list2[" + list2cnt +"]", "/root/main/mainlist[" + i + "]");
  421. list2cnt = list2cnt + 1;
  422. }
  423. }
  424. for(var i=1 ; i <= nodecnt; i++)
  425. {
  426. if(model.getValue("/root/main/mainlist[" + i +"]/basecdcnts" ) == "치료,투약실")
  427. {
  428. model.makeNode("/root/tmp/rexlist/list3[" + list3cnt + "]");
  429. model.copyNode("/root/tmp/rexlist/list3[" + list3cnt +"]", "/root/main/mainlist[" + i + "]");
  430. list3cnt = list3cnt + 1;
  431. }
  432. }
  433. mergeRexList("/root/tmp/rexlist/list1");
  434. mergeRexList("/root/tmp/rexlist/list2");
  435. mergeRexList("/root/tmp/rexlist/list3");
  436. var patinsucnt = model.getXPathValue("sum( /root/main/mainlist/patinsucnt )");
  437. var patgnrlcnt = model.getXPathValue("sum( /root/main/mainlist/patgnrlcnt )");
  438. var testinsucnt = model.getXPathValue("sum( /root/main/mainlist/testinsucnt )");
  439. var testgnrlcnt = model.getXPathValue("sum( /root/main/mainlist/testgnrlcnt )");
  440. model.setValue("/root/tmp/rexlist/patinsucnt", patinsucnt);
  441. model.setValue("/root/tmp/rexlist/patgnrlcnt", patgnrlcnt);
  442. model.setValue("/root/tmp/rexlist/testinsucnt", testinsucnt);
  443. model.setValue("/root/tmp/rexlist/testgnrlcnt", testgnrlcnt);
  444. var ymd = model.getValue("/root/tmp/rexlist/list1/recdd");
  445. var year = ymd.substring(0,4);
  446. var month = ymd.substring(4,6);
  447. var day = ymd.substring(6,8);
  448. var yymmddstr = year + "/" + month + "/" + day + " " + getDateTime(new Date(year,month,day), "W") + "요일";
  449. model.setValue("/root/tmp/rexlist/srchdd", yymmddstr);
  450. model.makeNode("/root/tmp/rexlist/mainlist[58]");
  451. exeReportPreview("RPAEQ00400", "XMLSTR", "/root/tmp/rexlist");
  452. model.removeNodeset("/root/tmp/rexlist/list1");
  453. model.removeNodeset("/root/tmp/rexlist/list2");
  454. model.removeNodeset("/root/tmp/rexlist/list3");
  455. model.removeNodeset("/root/tmp/rexlist/mainlist");
  456. model.refresh();
  457. ]]>
  458. </script>
  459. </button>
  460. <group id="group2" scroll="auto" style="left:0px; top:15px; width:1195px; height:730px; ">
  461. <group id="group4" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  462. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  463. <caption id="caption19" class="search_name" style="left:10px; top:9px; width:105px; height:17px; ">입출고 일자 :</caption>
  464. <input id="ipt_iodd" ref="/root/send/srchiodd" class="input_search" inputtype="date" format="yyyy-mm-dd" style="left:120px; top:8px; width:100px; height:19px; "/>
  465. <line id="line6" class="line_4" style="x1:1116px; y1:6px; x2:1116px; y2:28px; "/>
  466. <caption id="caption20" class="search_name" style="left:238px; top:9px; width:83px; height:17px; ">검사실 :</caption>
  467. <button id="button3" class="btn1_letter2" style="left:1129px; top:7px; width:56px; height:22px; ">
  468. <caption>조회</caption>
  469. <script type="javascript" ev:event="DOMActivate">
  470. <![CDATA[
  471. getDyeList();
  472. ]]>
  473. </script>
  474. </button>
  475. <select1 id="cmb_sectcd" ref="/root/send/srchsectcd" appearance="minimal" style="left:318px; top:8px; width:187px; height:19px; ">
  476. <choices>
  477. <itemset nodeset="/root/cmb_info/initexcuroomgrp2">
  478. <label ref="excuroomgrpcdnm"/>
  479. <value ref="excuroomgrpcdid"/>
  480. </itemset>
  481. </choices>
  482. <script type="javascript" ev:event="xforms-value-changed">
  483. <![CDATA[
  484. ]]>
  485. </script>
  486. </select1>
  487. <caption id="caption21" class="search_name" visibility="hidden" style="left:531px; top:9px; width:86px; height:17px; ">약품코드 :</caption>
  488. </group>
  489. <caption id="caption22" class="tit_2" style="left:0px; top:58px; width:105px; height:13px; ">입출고 현황</caption>
  490. <line id="line7" class="line_1" style="x1:0px; y1:74px; x2:1193px; y2:74px; "/>
  491. <datagrid id="grd_dyelist" nodeset="/root/main/dyestoclist/item" caption="재료코드^재료명^전일재고^수 령^총 수^소 모^소 모^현재고^비 고|재료코드^재료명^전일재고^수 령^총 수^불 출^일소모^현재고^비 고" colsep="^" colwidth="90, 220, 70, 70, 70, 70, 70, 70, 270, 100, 100, 100" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:0px; top:79px; width:1045px; height:426px; ">
  492. <col ref="goodcd" style="text-align:left; padding-left:10; "/>
  493. <col disabled="true" ref="goodcd" type="combo" style="text-align:left; padding-left:10; ">
  494. <choices>
  495. <itemset nodeset="/root/main/goodlist/item">
  496. <label ref="goodnm"/>
  497. <value ref="goodcd"/>
  498. </itemset>
  499. </choices>
  500. </col>
  501. <col ref="agojego" type="input" format="#,###" style="text-align:right; padding-right:20; "/>
  502. <col ref="receive" type="input" format="#,###" style="text-align:right; padding-right:20; "/>
  503. <col ref="totsu" format="#,###" style="text-align:right; padding-right:20; "/>
  504. <col ref="outgo" type="input" format="#,###" style="text-align:right; padding-right:20; "/>
  505. <col disabled="false" ref="dayused" type="input" format="#,###" style="text-align:right; padding-right:20; "/>
  506. <col ref="presentcnt" format="#,###" style="text-align:right; padding-right:20; "/>
  507. <col disabled="false" ref="rem" type="input" style="text-align:left; padding-left:10; "/>
  508. <col ref="iodd" visibility="hidden"/>
  509. <col ref="suppdeptcd" visibility="hidden"/>
  510. <col ref="sectcd" visibility="hidden"/>
  511. <script type="javascript" ev:event="DOMFocusOut">
  512. <![CDATA[
  513. // var cnt = getNodesetCount("/root/main/dyestoclist/item");
  514. if( grd_dyelist.row > 1 ){
  515. if( model.getValue("/root/main/dyestoclist/item[1]/goodcd") != "" ){
  516. var colidx = grd_dyelist.col;
  517. var row = grd_dyelist.row-1;
  518. // 수령
  519. if(grd_dyelist.colAttribute(colidx, "ref") == "receive") {
  520. var totsu = 0;
  521. totsu = parseInt(model.getValue("/root/main/dyestoclist/item["+ row +"]/agojego"))+parseInt( model.getValue("/root/main/dyestoclist/item["+ row +"]/receive"));
  522. model.setValue("/root/main/dyestoclist/item["+ row +"]/totsu" , totsu );
  523. }
  524. // 전일재고수령
  525. if(grd_dyelist.colAttribute(colidx, "ref") == "agojego") {
  526. var totsu = 0;
  527. totsu = parseInt(model.getValue("/root/main/dyestoclist/item["+ row +"]/agojego"))+parseInt( model.getValue("/root/main/dyestoclist/item["+ row +"]/receive"));
  528. model.setValue("/root/main/dyestoclist/item["+ row +"]/totsu" , totsu );
  529. }
  530. var presentcnt = 0;
  531. presentcnt = parseInt( model.getValue("/root/main/dyestoclist/item["+ row +"]/totsu")) - parseInt(model.getValue("/root/main/dyestoclist/item["+ row +"]/outgo")) - parseInt( model.getValue("/root/main/dyestoclist/item["+ row +"]/dayused"))
  532. model.setValue("/root/main/dyestoclist/item["+ row +"]/presentcnt" , presentcnt );
  533. model.refresh();
  534. }
  535. }
  536. ]]>
  537. </script>
  538. <script type="javascript" ev:event="ondblclick">
  539. <![CDATA[
  540. var colidx = grd_dyelist.col;
  541. if( isDataCell() ){
  542. if( grd_dyelist.row > 1 ){
  543. if(grd_dyelist.colAttribute(colidx, "ref") == "goodcd") {
  544. model.setValue("/root/send/data/sectcd", model.getValue("/root/send/srchsectcd"));
  545. model.setValue("/root/send/data/goodcd", model.getValue("/root/main/dyestoclist/item["+ ( grd_dyelist.row-1 ) +"]/goodcd"));
  546. model.setValue("/root/send/data/suppdeptcd", model.getValue("/root/send/globalinstance/instance1"));
  547. model.setValue("/root/send/data/iodd", model.getValue("/root/send/srchiodd"));
  548. //2011.07.12 추가처방시 심사실에서 직접입력한경우도 같이 포함해서 조회되게 수정 - 박재영
  549. if(model.getValue("/root/send/srchsectcd") == "MCC011"){
  550. model.setValue("/root/send/data/mainflag", "Y");
  551. }else{
  552. model.setValue("/root/send/data/mainflag", "");
  553. }
  554. // 2011.02.07 c y w 조회시 환자정보리스트 클리어
  555. model.removeNodeset("/root/main/dyecdpamlist/item");
  556. submit("TRAEB03403");
  557. }
  558. }
  559. }
  560. ]]>
  561. </script>
  562. </datagrid>
  563. <select1 id="cmb_goodcd" ref="/root/send/srchgoodcd" visibility="hidden" appearance="minimal" style="left:623px; top:18px; width:272px; height:19px; ">
  564. <choices>
  565. <itemset nodeset="/root/temp/goodlist/item">
  566. <label ref="goodnm"/>
  567. <value ref="goodcd"/>
  568. </itemset>
  569. </choices>
  570. <script type="javascript" ev:event="xforms-value-changed">
  571. <![CDATA[
  572. getGridData();
  573. model.setValue("/root/send/srchdd", model.getValue("/root/send/srchiodd"));
  574. submit("TRAEQ01701");
  575. model.refresh();
  576. ]]>
  577. </script>
  578. </select1>
  579. <datagrid id="datagrid1" nodeset="/root/main/dyecdpamlist/item" caption="등록번호^환자명^실시일자^검사실^처방코드^처방명^재료코드^재료명^용 량^규 격^처방일자^구분^검사실코드" colsep="^" colwidth="58, 54, 71, 80, 95, 202, 77, 195, 43, 50, 79, 56, 100" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" tooltip="true" style="left:0px; top:530px; width:1045px; height:195px; ">
  580. <col ref="pid" style="text-align:center; "/>
  581. <col ref="hngnm" style="text-align:center; "/>
  582. <col ref="excuexectodd" format="yyyy-mm-dd" style="text-align:center; "/>
  583. <col ref="basecdflagdesc" style="text-align:center; "/>
  584. <col ref="calcscorcd" style="text-align:center; "/>
  585. <col ref="excucdnm" style="text-align:left; "/>
  586. <col ref="goodcd" style="text-align:center; "/>
  587. <col ref="goodnm" style="text-align:left; "/>
  588. <col ref="drugqty" style="text-align:center; "/>
  589. <col ref="speccd" style="text-align:center; "/>
  590. <col ref="prcpdd" format="yyyy-mm-dd" style="text-align:center; "/>
  591. <col ref="instcd" visibility="hidden" style="text-align:center; "/>
  592. <col ref="excuroomcd" visibility="hidden" style="text-align:center; "/>
  593. </datagrid>
  594. <caption id="caption1" class="tit_2" style="left:0px; top:512px; width:170px; height:13px; ">조영제코드별 환자 조회</caption>
  595. <button id="btn_dissu" class="btn6_letter2" disabled="true" style="left:980px; top:50px; width:56px; height:22px; ">
  596. <caption>수정</caption>
  597. </button>
  598. <button id="btn_disone" class="btn6_letter3" disabled="true" style="left:905px; top:50px; width:68px; height:22px; ">
  599. <caption>일마감</caption>
  600. </button>
  601. <group id="grp_excucdrem" visibility="hidden" style="left:435px; top:265px; width:325px; height:130px; ">
  602. <button id="button4" class="btn4_letter2" style="left:255px; top:90px; width:56px; height:22px; ">
  603. <caption>닫기</caption>
  604. <script type="javascript" ev:event="DOMActivate">
  605. <![CDATA[
  606. grp_excucdrem.visible = false;
  607. ]]>
  608. </script>
  609. </button>
  610. <button id="button5" class="btn4_letter2" style="left:195px; top:90px; width:56px; height:22px; ">
  611. <caption>적용</caption>
  612. <script type="javascript" ev:event="DOMActivate">
  613. <![CDATA[
  614. if( messageBox("조영제 마감정리를","Q002")==6 ) {
  615. submit("TXAEB03405");
  616. }
  617. ]]>
  618. </script>
  619. </button>
  620. <caption id="caption8" class="tit_2" style="left:10px; top:13px; width:173px; height:14px; ">마감정리</caption>
  621. <shape id="rectangle2" appearance="rectangle" style="left:0px; top:0px; width:325px; height:130px; "/>
  622. <input id="input1" ref="/root/send/sdate" class="input_search" inputtype="date" format="yyyy-mm-dd" style="left:105px; top:40px; width:100px; height:19px; "/>
  623. <input id="input2" ref="/root/send/edate" class="input_search" inputtype="date" format="yyyy-mm-dd" style="left:215px; top:40px; width:100px; height:19px; "/>
  624. <caption id="caption2" class="search_name" visibility="visible" style="left:5px; top:40px; width:86px; height:17px; ">적용일자 :</caption>
  625. </group>
  626. <datagrid id="grd_magamlist" nodeset="/root/main/dyemagamlist/item" caption="마감일자^마감^dutflag" colsep="^" colwidth="68, 33,40" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" tooltip="true" style="left:1050px; top:79px; width:140px; height:645px; ">
  627. <col ref="iodd" format="yyyy-mm-dd" style="text-align:center; "/>
  628. <col ref="magamflag" style="text-align:center; "/>
  629. <col ref="dutflag" visibility="hidden" style="text-align:center; "/>
  630. <script type="javascript" ev:event="ondblclick">
  631. <![CDATA[
  632. if(grd_magamlist.row == 0)
  633. {
  634. return false;
  635. }
  636. model.setValue("/root/send/srchiodd", model.getValue("/root/main/dyemagamlist/item[" + grd_magamlist.row + "]/iodd"));
  637. getDyeList();
  638. ]]>
  639. </script>
  640. </datagrid>
  641. <caption id="caption3" class="tit_2" style="left:1045px; top:55px; width:144px; height:14px; ">월별 검사실 마감여부</caption>
  642. <button id="btn_excsave" class="btn2_letter4" style="left:775px; top:50px; width:64px; height:19px; ">
  643. <caption>엑셀저장</caption>
  644. <script type="javascript" ev:event="DOMActivate">
  645. <![CDATA[
  646. // var fileName = window.fileDialog("save", ",", false, "", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*"); // 2009-07-01 엑셀저장 두번째 저장 실패 오류 확인
  647. var filename = window.fileDialog("save",",",false,"excel","xls","All File(*.*)|*.*|Excel File(*.xls)|*.xls"); // 2009-07-01 엑셀저장 두번째 저장 실패 오류 확인 두번째 테스트
  648. if (filename != "") {
  649. grd_dyelist.saveExcel(filename);
  650. }
  651. ]]>
  652. </script>
  653. </button>
  654. <button id="btn_cal" class="btn3_letter2" style="left:843px; top:50px; width:56px; height:22px; ">
  655. <caption>계산</caption>
  656. <script type="javascript" ev:event="onclick">
  657. <![CDATA[
  658. var idx = grd_dyelist.row-1;
  659. if(model.getValue("/root/main/dyestoclist/item[" + idx + "]/goodcd") == "C75190300"){ // solotop
  660. submit("TRAEB05101");
  661. if (model.getValue("/root/main/solotopinfo/item/solotopqty") == ""){
  662. model.setValue("/root/main/solotopinfo/item/solotopqty",0);
  663. }
  664. model.setValue("/root/main/dyestoclist/item/dayused", model.getValue("/root/main/solotopinfo/item/solotopqty"));
  665. }else if(model.getValue("/root/main/dyestoclist/item[" + idx + "]/goodcd") == "C75235351"){ //xenetix
  666. submit("TRAEB05102");
  667. if (model.getValue("/root/main/xenetixinfo/item/xenetixqty") == ""){
  668. model.setValue("/root/main/xenetixinfo/item/xenetixqty",0);
  669. }
  670. model.setValue("/root/main/dyestoclist/item[" + idx + "]/dayused", model.getValue("/root/main/xenetixinfo/item/xenetixqty"));
  671. var dayused = model.getValue("/root/main/dyestoclist/item[" + idx + "]/dayused");
  672. var agojego = model.getValue("/root/main/dyestoclist/item[" + idx + "]/agojego");
  673. var representcnt = agojego - dayused ;
  674. model.setValue("/root/main/dyestoclist/item[" + idx + "]/presentcnt" , representcnt);
  675. }else{
  676. }
  677. ]]>
  678. </script>
  679. </button>
  680. </group>
  681. <button id="btn_save" class="btn3_letter3" style="left:905px; top:65px; width:68px; height:22px; ">
  682. <caption>일마감</caption>
  683. <script type="javascript" ev:event="DOMActivate">
  684. <![CDATA[
  685. var cnt = getNodesetCount("/root/main/dyestoclist/item");
  686. if( cnt > 0 ) {
  687. // alert( grd_dyelist.getUpdateData());
  688. if( model.getValue("/root/send/srchiodd") == "" ){
  689. messageBox("입고일자를", "I007");
  690. } else {
  691. if( messageBox("조영제 재고정보를","Q002")==6 ) {
  692. model.setValue("/root/send/req/data1", grd_dyelist.getUpdateData());
  693. submit("TXAEB03402");
  694. getDyeList();
  695. }
  696. }
  697. }else{
  698. messageBox("저장할 입고정보가", "I004");
  699. }
  700. ]]>
  701. </script>
  702. </button>
  703. <button id="btn_del" class="btn3_letter2" style="left:980px; top:65px; width:56px; height:22px; ">
  704. <caption>수정</caption>
  705. <script type="javascript" ev:event="DOMActivate">
  706. <![CDATA[
  707. var cnt = getNodesetCount("/root/main/dyestoclist/item");
  708. if( cnt > 0 ) {
  709. if( model.getValue("/root/send/srchiodd") == "" ){
  710. messageBox("입고일자를", "I007");
  711. }else{
  712. if ( messageBox("조영제 재고정보를","Q001")==6 ) {
  713. if( submit("TXAEB03404") ){
  714. model.removenode("/root/main/dyestoclist");
  715. }else{
  716. getDyeList();
  717. }
  718. }
  719. }
  720. } else {
  721. messageBox("삭제할 입고정보가", "I004");
  722. }
  723. model.refresh();
  724. ]]>
  725. </script>
  726. </button>
  727. <button id="btn_dayend" class="btn4_letter3" disabled="true" visibility="hidden" style="left:570px; top:65px; width:68px; height:22px; ">
  728. <caption>일마감</caption>
  729. <script type="javascript" ev:event="DOMActivate">
  730. <![CDATA[
  731. var cnt = getNodesetCount("/root/main/dyestoclist/item");
  732. if( cnt > 0 ) {
  733. if( model.getValue("root/send/srchiodd") == "" ){
  734. messageBox("입고일자를", "I007");
  735. }else{
  736. if ( messageBox("일마감을","Q004")==6 ) {
  737. submit("TXAEB03403");
  738. getDyeList();
  739. }
  740. }
  741. } else {
  742. messageBox("일마감 처리 할 입고정보가", "I004");
  743. }
  744. ]]>
  745. </script>
  746. </button>
  747. <group id="grp_btn" style="left:0px; top:745px; width:1195px; height:25px; ">
  748. <button id="button2" class="btn3_letter2" style="left:0px; top:0px; width:56px; height:22px; ">
  749. <caption>출력</caption>
  750. <script type="javascript" ev:event="DOMActivate">
  751. <![CDATA[
  752. var cnt = getNodesetCount("/root/main/dyestoclist/item");
  753. for( var i = 1; i <= cnt; i++){
  754. model.makeNode("/root/rexprnt/dyestoclist/item[" + i + "]");
  755. model.copyNode("/root/rexprnt/dyestoclist/item[" + i + "]", "/root/main/dyestoclist/item["+ i +"]");
  756. model.setValue("/root/rexprnt/dyestoclist/item[" + i + "]/goodcd", grd_dyelist.labelMatrix( i+1, 2 ));
  757. model.makeValue("/root/rexprnt/dyestoclist/item[" + i + "]/goodcdd", model.getValue("/root/main/dyestoclist/item["+ i +"]/goodcd"));
  758. }
  759. model.setValue("/root/rexprnt/dyestoclist/srchiodd", ipt_iodd.label );
  760. model.setValue("/root/rexprnt/dyestoclist/srchsectcd", cmb_sectcd.label );
  761. model.setValue("/root/rexprnt/dyestoclist/srchsudept", getUserInfo("dutplcenm") );
  762. model.refresh();
  763. exeReportPreview("RPAEB03401", "XMLSTR" , "" , "" , "false" , "", "", "", "", "false");
  764. model.removeNodeset("/root/rexprnt/dyestoclist/item");
  765. ]]>
  766. </script>
  767. </button>
  768. </group>
  769. <button id="button6" class="btn4_letter4" style="left:960px; top:522px; width:80px; height:22px; ">
  770. <caption>마감정리</caption>
  771. <script type="javascript" ev:event="DOMActivate">
  772. <![CDATA[
  773. grp_excucdrem.visible = true;
  774. model.setValue("/root/send/sdate", model.getValue("/root/send/srchiodd"));
  775. model.refresh();
  776. ]]>
  777. </script>
  778. </button>
  779. </xhtml:body>
  780. </xhtml:html>