SMMNG04400_응급CCDBAG관리.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  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>응급CCD BAG 등록</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main_erccd>
  10. <cond>
  11. <opfromdd/>
  12. <optodd/>
  13. <flag>1</flag>
  14. <flag2>7</flag2>
  15. <cartgubn>O</cartgubn>
  16. </cond>
  17. <baginfo>
  18. <baglist>
  19. <bagstat/>
  20. <erbgcd/>
  21. <erbgnm/>
  22. <oproom/>
  23. <pid/>
  24. <hngnm/>
  25. </baglist>
  26. </baginfo>
  27. </main_erccd>
  28. <ersend>
  29. <reqdata/>
  30. </ersend>
  31. <temp>
  32. <printinfo/>
  33. </temp>
  34. <init>
  35. <codeinfo>
  36. <codelist/>
  37. </codeinfo>
  38. </init>
  39. </root>
  40. </instance>
  41. <script type="javascript">
  42. <![CDATA[
  43. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  44. var opyn = "N";
  45. function fInitialize() {
  46. var cartgubn = getScreenMenuParameter();
  47. if(cartgubn == "A") {
  48. rdo_cartgubn.value = cartgubn;
  49. }
  50. model.makeValue("/root/ersend/reqdata/cdgrupid", "'160'");
  51. model.makeValue("/root/ersend/reqdata/srchdd", getCurrentDate());
  52. submit("TRMNW00001");
  53. grd_baglist.fixedcellcheckbox(0, grd_baglist.colRef("chkyn")) = true;
  54. var deptcd = getUserInfo("dutplcecd");
  55. var node = instance1.selectNodes("/root/init/codeinfo/codelist[cdid='" + deptcd + "']");
  56. var userid = getUserInfo("userid");
  57. if(userid == "ENR") {
  58. opyn="Y";
  59. } else {
  60. if(node.length > 0) {
  61. btn_dlv.disabled = false;
  62. btn_dlvcncl.disabled = false;
  63. btn_reci.disabled = true;
  64. btn_recicncl.disabled = true;
  65. rdo_flag2.value = "9";
  66. opyn="N";
  67. rdo_cartgubn.disabled = false;
  68. } else {
  69. btn_dlv.disabled = true;
  70. btn_dlvcncl.disabled = true;
  71. btn_reci.disabled = false;
  72. btn_recicncl.disabled = false;
  73. rdo_flag2.value = "7";
  74. opyn="Y";
  75. rdo_cartgubn.disabled = true;
  76. }
  77. }
  78. model.setValue("/root/main_erccd/cond/opfromdd", getCurrentDate());
  79. model.setValue("/root/main_erccd/cond/optodd" , getCurrentDate());
  80. ipt_opfromdd.refresh();
  81. ipt_optodd.refresh();
  82. fSearch();
  83. }
  84. //조회
  85. function fSearch(){
  86. model.copyNode("/root/ersend/reqdata", "/root/main_erccd/cond");
  87. submit("TRMNG04401");
  88. grd_baglist.fixedcellischeck(0, grd_baglist.colRef("chkyn")) = false;
  89. var bagstatcd = "";
  90. //반납상태전에것들은 수령 및 불출 하지 못하도록 disable처리함.
  91. for(var i = grd_baglist.fixedRows; i < grd_baglist.rows; i++) {
  92. bagstatcd = grd_baglist.valueMatrix(i, grd_baglist.colRef("bagstatcd"));
  93. if(bagstatcd < "5") {
  94. grd_baglist.isReadOnly(i, grd_baglist.colRef("chkyn"), i, grd_baglist.colRef("chkyn")) = true;
  95. } else {
  96. grd_baglist.isReadOnly(i, grd_baglist.colRef("chkyn"), i, grd_baglist.colRef("chkyn")) = false;
  97. }
  98. }
  99. }
  100. //저장 flag(1:불출 2:수령 3:불출취소 4:수령취소)
  101. function fSave(flag){
  102. var chkyn;
  103. var node ="";
  104. var msgcnt = "";
  105. var rtn;
  106. node = instance1.selectNodes(grd_baglist.nodeset + "[chkyn='Y']");
  107. if(node.length == 0 || node.length == "" || node.length == null) {
  108. messageBox("선택된 항목이 없습니다.", "E");
  109. return;
  110. }
  111. if(flag == "1") {
  112. msgcnt = "불출 하시겠습니까?";
  113. } else if(flag == "2") {
  114. msgcnt = "수령 하시겠습니까?";
  115. node = instance1.selectNodes(grd_baglist.nodeset + "[chkyn='Y' and bagstatcd !='7']");
  116. if(node.length > 0) {
  117. messageBox("재불출상태인 CCD만 수령이 가능합니다.", "E");
  118. return;
  119. }
  120. } else if(flag == "3") {
  121. msgcnt = "불출취소 하시겠습니까?";
  122. node = instance1.selectNodes(grd_baglist.nodeset + "[chkyn='Y' and bagstatcd !='7']");
  123. if(node.length > 0) {
  124. messageBox("불출상태인 CCD만 불출취소가 가능합니다.", "E");
  125. return;
  126. }
  127. } else if(flag == "4") {
  128. msgcnt = "수령취소 하시겠습니까?";
  129. node = instance1.selectNodes(grd_baglist.nodeset + "[chkyn='Y' and bagstatcd !='8']");
  130. if(node.length > 0) {
  131. messageBox("수령상태인 CCD만 수령취소가 가능합니다.", "E");
  132. return;
  133. }
  134. }
  135. rtn = messageBox(msgcnt, "Q");
  136. //예 했을경우에만 저장로직 탐, 자동재조회.
  137. if(rtn == "6") {
  138. for(var i = grd_baglist.fixedRows; i < grd_baglist.rows; i++) {
  139. chkyn = grd_baglist.valueMatrix(i, grd_baglist.colRef("chkyn"));
  140. if(chkyn == "Y") {
  141. grd_baglist.valueMatrix(i, grd_baglist.colRef("flag")) = flag;
  142. }
  143. }
  144. model.makeValue("/root/ersend/savedata/baglist", getGridUpdateData(grd_baglist));
  145. submit("TXMNG04401");
  146. fSearch();
  147. }
  148. }
  149. function fPrint2() {
  150. exeReportPreview("RPMNG04400", "XMLSTR");
  151. }
  152. function fPrint() {
  153. var chkyn;
  154. var node ="";
  155. var erbgnm="";
  156. node = instance1.selectNodes(grd_baglist.nodeset + "[chkyn='Y']");
  157. if(node.length == 0 || node.length == "" || node.length == null) {
  158. messageBox("선택된 항목이 없습니다.", "E");
  159. return;
  160. }
  161. for(var i = grd_baglist.fixedRows; i < grd_baglist.rows; i++) {
  162. chkyn = grd_baglist.valueMatrix(i, grd_baglist.colRef("chkyn"));
  163. erbgnm = grd_baglist.valueMatrix(i, grd_baglist.colRef("erbgnm"));
  164. if(chkyn == "Y") {
  165. model.makeValue("/root/ersend/printdata/erbgcd", grd_baglist.valueMatrix(i, grd_baglist.colRef("erbgcd")));
  166. submit("TRMNG03601");
  167. model.makeNode("/root/temp/prtinfo/suturelist");
  168. model.makeNode("/root/temp/prtinfo/supllist");
  169. model.makeNode("/root/temp/prtinfo/sheetlist");
  170. model.makeNode("/root/temp/prtinfo/glovelist");
  171. model.makeValue("/root/temp/cond/erbgnm", erbgnm);
  172. if(opyn == "Y") {
  173. model.makeValue("/root/temp/cond/usernm", "");
  174. } else {
  175. model.makeValue("/root/temp/cond/usernm", getUserInfo("usernm"));
  176. }
  177. copyNodesetType("/root/temp/prtinfo/suturelist", "/root/temp/erbgdtlist[cureflag='1' and ccrdeliveyn='Y']");
  178. copyNodesetType("/root/temp/prtinfo/supllist", "/root/temp/erbgdtlist[cureflag='2' and ccrdeliveyn='Y']");
  179. copyNodesetType("/root/temp/prtinfo/sheetlist", "/root/temp/erbgdtlist[cureflag='7' and ccrdeliveyn='Y']");
  180. copyNodesetType("/root/temp/prtinfo/glovelist", "/root/temp/erbgdtlist[cureflag='8' and ccrdeliveyn='Y']");
  181. exeReportPreview("RPMNG04101", "XMLSTR", "", "" ,"true","","","","","true");
  182. model.removeNodeset("/root/temp/prtinfo");
  183. }
  184. }
  185. }
  186. ]]>
  187. </script>
  188. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  189. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  190. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  191. <script type="javascript" ev:event="xforms-ready">
  192. <![CDATA[
  193. fInitialize();
  194. ]]>
  195. </script>
  196. <submission id="TRMNG04401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/ersend/reqdata" resultref="/root/main_erccd/baginfo"/>
  197. <submission id="TXMNG04401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/ersend/savedata" resultref="/root/temp"/>
  198. <submission id="TRMNG03601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/ersend/printdata" resultref="/root/temp/erbgdtlist"/>
  199. <submission id="TRMNW00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/ersend/reqdata" resultref="/root/init/codeinfo"/>
  200. </model>
  201. </xhtml:head>
  202. <xhtml:body pagewidth="961" pageheight="715" guideline="2,450;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  203. <group id="grp_tle" style="left:0px; top:0px; width:925px; height:13px; ">
  204. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; font-family:돋움체; ">응급CCD BAG 등록</caption>
  205. </group>
  206. <group id="grp_biz" scroll="auto" style="left:0px; top:18px; width:925px; height:672px; ">
  207. <group id="grp_sea" style="left:0px; top:0px; width:925px; height:35px; font-family:돋움체; vertical-align:top; ">
  208. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:925px; height:35px; font-family:돋움체; background-color:#fffbf2; border-color:#ffd799; ">.,m</shape>
  209. <caption id="cap_instcd" class="search_name" style="left:5px; top:9px; width:90px; height:17px; font-family:돋움체; ">수술일자 :</caption>
  210. <line id="line13" class="line_4" style="x1:850px; y1:5px; x2:850px; y2:30px; font-family:돋움체; border-color:#ffe4bb; border-left-style:solid; "/>
  211. <button id="btn_search" class="btn1_letter2" navindex="2" style="left:860px; top:8px; width:56px; height:22px; font-family:돋움체; ">
  212. <caption>조회</caption>
  213. <script type="javascript" ev:event="DOMActivate">
  214. <![CDATA[
  215. fSearch();
  216. ]]>
  217. </script>
  218. </button>
  219. <select1 id="rdo_flag" ref="/root/main_erccd/cond/flag" appearance="full" cols="2" overflow="visible" style="left:100px; top:10px; width:95px; height:13px; border-style:none; ">
  220. <choices>
  221. <item>
  222. <label>오늘</label>
  223. <value>1</value>
  224. </item>
  225. <item>
  226. <label>어제</label>
  227. <value>2</value>
  228. </item>
  229. </choices>
  230. <script type="javascript" ev:event="xforms-value-changed">
  231. <![CDATA[
  232. var flag = model.getValue(rdo_flag.attribute("ref"));
  233. var fromdd;
  234. var todd;
  235. if(flag == "1") {
  236. fromdd = getCurrentDate();
  237. todd = getCurrentDate();
  238. } else {
  239. fromdd = getCurrentDate().toDate().getAddDate(-1,"D").getDateFormat("YYYYMMDD");
  240. todd = getCurrentDate().toDate().getAddDate(-1,"D").getDateFormat("YYYYMMDD");
  241. }
  242. model.setValue("/root/main_erccd/cond/opfromdd", fromdd);
  243. model.setValue("/root/main_erccd/cond/optodd" , todd);
  244. ipt_opfromdd.refresh();
  245. ipt_optodd.refresh();
  246. ]]>
  247. </script>
  248. </select1>
  249. <input id="ipt_opfromdd" ref="/root/main_erccd/cond/opfromdd" class="input_s_essential" inputtype="date" style="left:200px; top:8px; width:100px; height:19px; "/>
  250. <input id="ipt_optodd" ref="/root/main_erccd/cond/optodd" class="input_s_essential" inputtype="date" style="left:315px; top:8px; width:100px; height:19px; "/>
  251. <caption id="caption1" style="left:302px; top:10px; width:15px; height:20px; ">~</caption>
  252. <select1 id="rdo_flag2" ref="/root/main_erccd/cond/flag2" appearance="full" cols="5" overflow="visible" style="left:605px; top:10px; width:190px; height:13px; border-style:none; ">
  253. <choices>
  254. <item>
  255. <label>전체</label>
  256. <value/>
  257. </item>
  258. <item>
  259. <label>재불출</label>
  260. <value>7</value>
  261. </item>
  262. <item>
  263. <label>수령</label>
  264. <value>8</value>
  265. </item>
  266. <item>
  267. <label>반납</label>
  268. <value>9</value>
  269. </item>
  270. <item>
  271. <label>기타</label>
  272. <value>6</value>
  273. </item>
  274. </choices>
  275. </select1>
  276. <select1 id="rdo_cartgubn" ref="/root/main_erccd/cond/cartgubn" appearance="full" cols="2" overflow="visible" style="left:485px; top:10px; width:100px; height:13px; border-style:none; ">
  277. <choices>
  278. <item>
  279. <label>수술</label>
  280. <value>O</value>
  281. </item>
  282. <item>
  283. <label>마취</label>
  284. <value>A</value>
  285. </item>
  286. </choices>
  287. <script type="javascript" ev:event="xforms-value-changed">
  288. <![CDATA[
  289. fSearch();
  290. ]]>
  291. </script>
  292. </select1>
  293. <caption id="caption2" class="search_name" style="left:425px; top:10px; width:65px; height:17px; font-family:돋움체; ">구분 :</caption>
  294. </group>
  295. <caption id="caption8" class="tit_2" style="left:5px; top:49px; width:133px; height:13px; font-family:돋움체; ">응급CCD BAG</caption>
  296. <line id="line1" class="line_1" style="x1:0px; y1:64px; x2:925px; y2:64px; font-family:돋움체; "/>
  297. <datagrid id="grd_baglist" nodeset="/root/main_erccd/baginfo/baglist" class="datagrid2" caption="^Bag 상태^CCD Bag CD^EM CCD Bag^수술&#xA;방^등록번호^환자명^집도의^수술명^Cart최종&#xA;인증저장^Cart재불출&#xA;담당자^Cart재불출&#xA;담당자ID^수령자^재불출일시^수령일시^수령자ID^수술번호^flag" colsep="^" colwidth="24, 58, 0, 150, 38, 75, 70, 70, 211, 70, 66, 0, 51, 100, 100, 0, 0, 0" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:69px; width:925px; height:600px; font-family:돋움체; ">
  298. <col checkvalue="Y,N" ref="chkyn" type="checkbox"/>
  299. <col disabled="true" ref="bagstatcd" type="combo">
  300. <choices>
  301. <item>
  302. <label>저장</label>
  303. <value>2</value>
  304. </item>
  305. <item>
  306. <label>불출</label>
  307. <value>3</value>
  308. </item>
  309. <item>
  310. <label>처방</label>
  311. <value>4</value>
  312. </item>
  313. <item>
  314. <label>확정</label>
  315. <value>5</value>
  316. </item>
  317. <item>
  318. <label>반납</label>
  319. <value>9</value>
  320. </item>
  321. <item>
  322. <label>재불출</label>
  323. <value>7</value>
  324. </item>
  325. <item>
  326. <label>수령</label>
  327. <value>8</value>
  328. </item>
  329. </choices>
  330. </col>
  331. <col ref="erbgcd"/>
  332. <col ref="erbgnm"/>
  333. <col ref="oproom"/>
  334. <col ref="pid"/>
  335. <col ref="hngnm"/>
  336. <col ref="perfdrnm"/>
  337. <col ref="opnm"/>
  338. <col ref="cartuser"/>
  339. <col ref="redlvrnm" style="left:818px; top:32px; width:70px; height:23px; "/>
  340. <col ref="redlvrid" visibility="hidden"/>
  341. <col ref="recipntnm"/>
  342. <col ref="redlvrdt" format="yyyy-mm-dd hh:nn"/>
  343. <col ref="recipntdt" format="yyyy-mm-dd hh:nn"/>
  344. <col ref="recipntid" visibility="hidden"/>
  345. <col ref="oprsrvno" visibility="hidden"/>
  346. <col ref="flag" visibility="hidden"/>
  347. <script type="javascript" ev:event="onclick">
  348. <![CDATA[
  349. var bagstatcd;
  350. if(grd_baglist.row == 0 && grd_baglist.col == grd_baglist.colRef("chkyn")) {
  351. if(grd_baglist.fixedcellischeck(0, grd_baglist.colRef("chkyn"))) {
  352. for(var i = grd_baglist.fixedRows; i < grd_baglist.rows; i++) {
  353. bagstatcd = grd_baglist.valueMatrix(i, grd_baglist.colRef("bagstatcd"));
  354. if(bagstatcd < 5) {
  355. grd_baglist.valueMatrix(i, grd_baglist.colRef("chkyn")) = "N";
  356. } else {
  357. grd_baglist.rowStatus(i) = "2";
  358. }
  359. }
  360. } else {
  361. for(var i = grd_baglist.fixedRows; i < grd_baglist.rows; i++) {
  362. grd_baglist.rowStatus(i) = "0";
  363. }
  364. }
  365. }
  366. ]]>
  367. </script>
  368. </datagrid>
  369. <button id="btn_reci" class="btn2_letter2" style="left:705px; top:44px; width:42px; height:19px; ">
  370. <caption>수령</caption>
  371. <script type="javascript" ev:event="DOMActivate">
  372. <![CDATA[
  373. fSave("2");
  374. ]]>
  375. </script>
  376. </button>
  377. <button id="btn_dlv" class="btn2_letter2" style="left:595px; top:44px; width:42px; height:19px; ">
  378. <caption>불출</caption>
  379. <script type="javascript" ev:event="DOMActivate">
  380. <![CDATA[
  381. fSave("1");
  382. ]]>
  383. </script>
  384. </button>
  385. <button id="btn_prt" class="btn2_letter4" style="left:815px; top:44px; width:42px; height:19px; ">
  386. <caption>Bag출력</caption>
  387. <script type="javascript" ev:event="DOMActivate">
  388. <![CDATA[
  389. fPrint();
  390. ]]>
  391. </script>
  392. </button>
  393. <button id="btn_recicncl" class="btn2_letter4" style="left:749px; top:44px; width:64px; height:19px; ">
  394. <caption>수령취소</caption>
  395. <script type="javascript" ev:event="DOMActivate">
  396. <![CDATA[
  397. fSave("4");
  398. ]]>
  399. </script>
  400. </button>
  401. <button id="btn_dlvcncl" class="btn2_letter4" style="left:639px; top:44px; width:64px; height:19px; ">
  402. <caption>불출취소</caption>
  403. <script type="javascript" ev:event="DOMActivate">
  404. <![CDATA[
  405. fSave("3");
  406. ]]>
  407. </script>
  408. </button>
  409. <button id="button1" class="btn2_letter2" style="left:880px; top:44px; width:42px; height:19px; ">
  410. <caption>출력</caption>
  411. <script type="javascript" ev:event="DOMActivate">
  412. <![CDATA[
  413. fPrint2();
  414. ]]>
  415. </script>
  416. </button>
  417. </group>
  418. </xhtml:body>
  419. </xhtml:html>