SMMNR08100_특수혈액미불출리스트조회.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  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. <cond>
  11. <wardcd/>
  12. <blodcomcd/>
  13. <refdd/>
  14. <settingrnid/>
  15. <userid/>
  16. </cond>
  17. <spclblodnodelive>
  18. <spclblodnodelivelist>
  19. <rtnchk/>
  20. <roomcd/>
  21. <pid/>
  22. <patnm/>
  23. <blodkind/>
  24. <prcpqty/>
  25. <btype/>
  26. <rgstno/>
  27. <rsrvdt/>
  28. <prcpdt/>
  29. <senddt/>
  30. <rsrvchk/>
  31. <prcpcd/>
  32. <prcpdd/>
  33. <prcpno/>
  34. <prcphistno/>
  35. <tnsreqacptno/>
  36. <blodcomcd/>
  37. <execprcpuniqno/>
  38. </spclblodnodelivelist>
  39. </spclblodnodelive>
  40. </main>
  41. <send/>
  42. <init>
  43. <ward>
  44. <wardcd/>
  45. <wardnm/>
  46. </ward>
  47. <settingrn>
  48. <settingrnid/>
  49. <settingrnnm/>
  50. </settingrn>
  51. </init>
  52. <tmpcode>
  53. <LB1101>
  54. <cd/>
  55. <nm/>
  56. </LB1101>
  57. </tmpcode>
  58. </root>
  59. </instance>
  60. <script type="javascript" ev:event="xforms-ready">
  61. <![CDATA[
  62. model.removeNodeset("/root/main/spclblodnodelive");
  63. grd_spclblodnodelivelist.fixedcellcheckbox(0, grd_spclblodnodelivelist.colRef("rtnchk")) = true;
  64. grd_spclblodnodelivelist.fixedcellcheckbox(0, grd_spclblodnodelivelist.colRef("rsrvchk")) = true;
  65. //혈액종류 조회(TRLZZ00101 참조)
  66. model.removenode("/root/send");
  67. model.makeValue("/root/send/codeflag", "1101|");
  68. submit("TRMNR08101");
  69. model.setValue("/root/main/cond/blodcomcd", model.getValue("/root/tmpcode/tmpcode/LB1101/cd"));
  70. model.setValue("/root/main/cond/wardcd", getUserInfo("dutplcecd"));
  71. model.setValue("/root/main/cond/refdd", getCurrentDate());// 기준일에 현재날짜(디폴트)
  72. model.setValue("/root/main/cond/userid", getUserId());
  73. model.removenode("/root/send");
  74. model.makeValue("/root/send/wardcd", model.getValue("/root/main/cond/wardcd"));
  75. submit("TRMNW00101");
  76. //model.removenode("/root/init/ward[wardcd = '2280200000']"); // 응급의료센터 제외
  77. model.setValue("/root/main/cond/settingrnid", "");
  78. for(i = 1; i <= getNodesetCount("/root/init/settingrn"); i++ ) {
  79. if (model.getValue("/root/main/cond/userid") == model.getValue("/root/init/settingrn["+ i +"]/settingrnid")) {
  80. model.setValue("/root/main/cond/settingrnid", model.getValue("/root/main/cond/userid"));
  81. }
  82. }
  83. //리스트조회
  84. fGetSpclBlodNoDeliveList();
  85. ]]>
  86. </script>
  87. <script type="javascript">
  88. <![CDATA[
  89. //특수혈액미불출 리스트 조회버튼
  90. function fGetSpclBlodNoDeliveList(){
  91. model.removenode("/root/send");
  92. model.makeValue("/root/send/wardcd", model.getValue("/root/main/cond/wardcd"));
  93. model.makeValue("/root/send/blodcomcd", model.getValue("/root/main/cond/blodcomcd"));
  94. model.makeValue("/root/send/refdd", model.getValue("/root/main/cond/refdd"));
  95. model.makeValue("/root/send/settingrnid", model.getValue("/root/main/cond/settingrnid"));
  96. if(submit("TRMNR08102", false)){
  97. grd_spclblodnodelivelist.fixedcellischeck(0, grd_spclblodnodelivelist.colRef("rtnchk")) = true;
  98. }
  99. model.refresh();
  100. }
  101. //저장
  102. function fsave(){
  103. var rtncnt = getNodesetCount("/root/main/spclblodnodelive/spclblodnodelivelist[rtnchk = 'true']");
  104. var rsrvcnt = getNodesetCount("/root/main/spclblodnodelive/spclblodnodelivelist[rsrvchk = 'true']");
  105. var retMsg = messageBox("반환 "+ rtncnt + "건, 재예약 " + rsrvcnt + "건 입니다. 전송하시겠습니까?", "Q"); //yes=6, no=7
  106. if(retMsg != "6") {
  107. return;
  108. }
  109. var RtnInfoHeader = "pid▦tnsreqacptno▦blodcomcd▦execprcpuniqno▦preplog▩";
  110. var RtnInfoData = "";
  111. var RsrvInfoHeader = "pid▦tnsreqacptno▦blodcomcd▦execprcpuniqno▩";
  112. var RsrvInfoData = "";
  113. for(i = 1; i <= getNodesetCount("/root/main/spclblodnodelive/spclblodnodelivelist"); i++ ) {
  114. var rtnchk = model.getValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i +"]/rtnchk");
  115. var rsrvchk = model.getValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i +"]/rsrvchk");
  116. var pid = model.getValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i +"]/pid");
  117. var tnsreqacptno = model.getValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i +"]/tnsreqacptno");
  118. var blodcomcd = model.getValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i +"]/blodcomcd");
  119. var execprcpuniqno = model.getValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i +"]/execprcpuniqno");
  120. if(rtnchk == "true"){
  121. RtnInfoData += pid +"▦" //등록번호
  122. + tnsreqacptno +"▦" //접수번호
  123. + blodcomcd +"▦" //성분제제
  124. + execprcpuniqno +"▦" //실시처방유일번호
  125. + '1' +"▩"; //취소구분 ("1")
  126. }
  127. if(rsrvchk == "true"){
  128. RsrvInfoData += pid +"▦" //등록번호
  129. + tnsreqacptno +"▦" //접수번호
  130. + blodcomcd +"▦" //성분제제
  131. + execprcpuniqno +"▩"; //실시처방유일번호
  132. }
  133. }
  134. model.removeNodeset("/root/send");
  135. if (RtnInfoData != "") {
  136. model.makeValue("/root/send/rtnblodinfo", RtnInfoHeader + RtnInfoData);
  137. }
  138. if (RsrvInfoData != "") {
  139. model.makeValue("/root/send/rsrvblodinfo", RsrvInfoHeader + RsrvInfoData);
  140. }
  141. if(submit("TXMNR08101")){
  142. messageBox("전송이 완료되었습니다,", "I");
  143. fGetSpclBlodNoDeliveList();
  144. }
  145. }
  146. ]]>
  147. </script>
  148. <submission id="TRMNW00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init"/>
  149. <submission id="TRMNR08101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/tmpcode/LB1101"/>
  150. <submission id="TRMNR08102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/spclblodnodelive"/>
  151. <submission id="TXMNR08101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/tmp"/>
  152. </model>
  153. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  154. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  155. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  156. </xhtml:head>
  157. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  158. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  159. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:179px; height:14px; ">특수혈액미불출리스트조회</caption>
  160. </group>
  161. <group id="grp_biz" scroll="l" style="left:0px; top:13px; width:1195px; height:744px; ">
  162. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  163. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  164. <button id="button3" class="btn1_letter2" style="left:1030px; top:7px; width:56px; height:22px; ">
  165. <caption>조회</caption>
  166. <script type="javascript" ev:event="DOMActivate">
  167. <![CDATA[
  168. fGetSpclBlodNoDeliveList();
  169. ]]>
  170. </script>
  171. </button>
  172. <line id="line13" class="line_4" style="x1:1020px; y1:7px; x2:1020px; y2:29px; "/>
  173. <caption id="caption2" class="search_name" style="left:20px; top:10px; width:70px; height:17px; ">병동 :</caption>
  174. <input id="ipt_refdd" ref="/root/main/cond/refdd" class="input_search" inputtype="date" style="left:566px; top:9px; width:95px; height:19px; ">
  175. <script type="javascript" ev:event="xforms-value-changed">
  176. <![CDATA[
  177. fGetSpclBlodNoDeliveList();
  178. ]]>
  179. </script>
  180. </input>
  181. <select1 id="cmb_ward" ref="/root/main/cond/wardcd" class="combo_s_essential" appearance="minimal" style="left:94px; top:9px; width:139px; height:19px; ">
  182. <choices>
  183. <itemset nodeset="/root/init/ward/">
  184. <label ref="wardnm"/>
  185. <value ref="wardcd"/>
  186. </itemset>
  187. </choices>
  188. <script type="javascript" ev:event="xforms-value-changed">
  189. <![CDATA[
  190. model.removenode("/root/send");
  191. model.makeValue("/root/send/wardcd", model.getValue("/root/main/cond/wardcd"));
  192. submit("TRMNW00101");
  193. fGetSpclBlodNoDeliveList();
  194. ]]>
  195. </script>
  196. </select1>
  197. <caption id="caption9" class="search_name" style="left:480px; top:10px; width:86px; height:17px; ">예약일 :</caption>
  198. <button id="button1" class="btn1_letter4" style="left:1094px; top:7px; width:80px; height:22px; ">
  199. <caption>엑셀저장</caption>
  200. <script type="javascript" ev:event="DOMActivate">
  201. <![CDATA[
  202. var fileName = window.fileDialog("save", ",", false, "특수혈액미불출리스트_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  203. if (fileName != "") {
  204. grd_spclblodnodelivelist.saveExcel(fileName, "SheetName", true, true, "", "", false);
  205. }
  206. ]]>
  207. </script>
  208. </button>
  209. <select1 id="cmb_settingrn" ref="/root/main/cond/settingrnid" class="combo_search" appearance="minimal" style="left:775px; top:9px; width:85px; height:19px; ">
  210. <choices>
  211. <itemset nodeset="/root/init/settingrn">
  212. <label ref="settingrnnm"/>
  213. <value ref="settingrnid"/>
  214. </itemset>
  215. </choices>
  216. <script type="javascript" ev:event="xforms-value-changed">
  217. <![CDATA[
  218. fGetSpclBlodNoDeliveList();
  219. ]]>
  220. </script>
  221. </select1>
  222. <caption id="caption1" class="search_name" style="left:687px; top:10px; width:75px; height:17px; ">내환자:</caption>
  223. <caption id="caption3" class="search_name" style="left:256px; top:10px; width:91px; height:17px; ">혈액종류 :</caption>
  224. <select1 id="cmb_blodcomcd" ref="/root/main/cond/blodcomcd" class="combo_search" appearance="minimal" style="left:355px; top:9px; width:100px; height:19px; ">
  225. <choices>
  226. <itemset nodeset="/root/tmpcode/tmpcode/LB1101">
  227. <label ref="nm"/>
  228. <value ref="cd"/>
  229. </itemset>
  230. </choices>
  231. <script type="javascript" ev:event="xforms-value-changed">
  232. <![CDATA[
  233. fGetSpclBlodNoDeliveList();
  234. ]]>
  235. </script>
  236. </select1>
  237. </group>
  238. <datagrid id="grd_spclblodnodelivelist" nodeset="/root/main/spclblodnodelive/spclblodnodelivelist" caption="반환^병실^등록번호^환자명^혈액종류^수량^혈액형^주민등록번호^예약일시^처방일시^전송일시^예약" colsep="^" colwidth="50, 63, 90, 96, 97, 51, 59, 110, 105, 105, 105, 50" ellipsis="true" explorerbar="sort" frozencols="9" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" tooltip="true" style="left:0px; top:73px; width:1195px; height:669px; ">
  239. <col checkvalue="true,false" ref="rtnchk" type="checkbox"/>
  240. <col ref="roomcd" style="text-align:center; "/>
  241. <col ref="pid" style="text-align:center; "/>
  242. <col ref="patnm" style="text-align:center; "/>
  243. <col ref="blodkind" style="text-align:center; "/>
  244. <col ref="prcpqty" style="text-align:center; "/>
  245. <col ref="btype" style="text-align:center; "/>
  246. <col ref="rgstno"/>
  247. <col ref="rsrvdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  248. <col ref="prcpdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  249. <col ref="senddt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  250. <col checkvalue="true,false" key="rsrvchk" ref="rsrvchk" type="checkbox"/>
  251. <script type="javascript" ev:event="onclick">
  252. <![CDATA[
  253. var iCol = grd_spclblodnodelivelist.col;
  254. var iRow = grd_spclblodnodelivelist.row;
  255. if(iRow == 0){
  256. if(iCol == grd_spclblodnodelivelist.colRef("rtnchk")){
  257. if(grd_spclblodnodelivelist.fixedcellischeck(0, grd_spclblodnodelivelist.colRef("rtnchk")) == true){
  258. grd_spclblodnodelivelist.fixedcellischeck(0, grd_spclblodnodelivelist.colRef("rsrvchk")) = false;
  259. }else if(grd_spclblodnodelivelist.fixedcellischeck(0, grd_spclblodnodelivelist.colRef("rtnchk")) == false){
  260. grd_spclblodnodelivelist.fixedcellischeck(0, grd_spclblodnodelivelist.colRef("rsrvchk")) = true;
  261. }
  262. }else if(iCol == grd_spclblodnodelivelist.colRef("rsrvchk")){
  263. if(grd_spclblodnodelivelist.fixedcellischeck(0, grd_spclblodnodelivelist.colRef("rsrvchk")) == true){
  264. grd_spclblodnodelivelist.fixedcellischeck(0, grd_spclblodnodelivelist.colRef("rtnchk")) = false;
  265. }else if(grd_spclblodnodelivelist.fixedcellischeck(0, grd_spclblodnodelivelist.colRef("rsrvchk")) == false){
  266. grd_spclblodnodelivelist.fixedcellischeck(0, grd_spclblodnodelivelist.colRef("rtnchk")) = true;
  267. }
  268. }
  269. }
  270. for(i = 1; i <= getNodesetCount("/root/main/spclblodnodelive/spclblodnodelivelist"); i++ ) {
  271. if(iCol == grd_spclblodnodelivelist.colRef("rtnchk")){
  272. if(model.getValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i + "]/rtnchk") == "true"){
  273. model.setValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i + "]/rsrvchk", "false");
  274. }else if(model.getValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i + "]/rtnchk") == "false"){
  275. model.setValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i + "]/rsrvchk", "true");
  276. }
  277. }else if (grd_spclblodnodelivelist.col == grd_spclblodnodelivelist.colRef("rsrvchk")){
  278. if(model.getValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i + "]/rsrvchk") == "true"){
  279. model.setValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i + "]/rtnchk", "false");
  280. }else if(model.getValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i + "]/rsrvchk") == "false"){
  281. model.setValue("/root/main/spclblodnodelive/spclblodnodelivelist[" + i + "]/rtnchk", "true");
  282. }
  283. }
  284. }
  285. ]]>
  286. </script>
  287. </datagrid>
  288. <line id="line16" class="line_1" style="x1:0px; y1:68px; x2:1195px; y2:68px; "/>
  289. <caption id="caption26" class="tit_2" style="left:5px; top:53px; width:152px; height:13px; vertical-align:middle; ">특수혈액미불출 리스트</caption>
  290. <button id="btn_signsave" class="btn5_letter2" style="left:1153px; top:48px; width:42px; height:19px; ">
  291. <caption>저장</caption>
  292. <script type="javascript" ev:event="DOMActivate">
  293. <![CDATA[
  294. fsave();
  295. ]]>
  296. </script>
  297. </button>
  298. </group>
  299. </xhtml:body>
  300. </xhtml:html>