SMAEB03401_조영제재고관리(knuh).xrw 33 KB

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